From a7382542172cae2b59b9bb9bdcf69eb9c7c19050 Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 13:42:27 +0600 Subject: [PATCH 01/11] EVEREST-287 Drop DBaaS --- .github/CODEOWNERS | 2 - .licenserc.yaml | 3 - CONTRIBUTING.md | 2 - Makefile | 3 - Makefile.include | 9 +- api-tests/init.go | 2 - api-tests/management/dbaas/helpers.go | 55 - .../dbaas/kubernetes_server_test.go | 273 - .../management/dbaas/psmdb_cluster_test.go | 284 - .../management/dbaas/pxc_cluster_test.go | 323 - api/managementpb/dbaas/components.pb.go | 1775 -- api/managementpb/dbaas/components.pb.gw.go | 572 - .../dbaas/components.pb.validate.go | 2779 --- api/managementpb/dbaas/components.proto | 169 - api/managementpb/dbaas/components_grpc.pb.go | 311 - api/managementpb/dbaas/db_clusters.pb.go | 1667 -- api/managementpb/dbaas/db_clusters.pb.gw.go | 572 - .../dbaas/db_clusters.pb.validate.go | 2278 --- api/managementpb/dbaas/db_clusters.proto | 211 - api/managementpb/dbaas/db_clusters_grpc.pb.go | 311 - api/managementpb/dbaas/dbaas.pb.go | 661 - api/managementpb/dbaas/dbaas.pb.validate.go | 561 - api/managementpb/dbaas/dbaas.proto | 78 - .../change_psmdb_components_parameters.go | 144 - .../change_psmdb_components_responses.go | 494 - .../change_pxc_components_parameters.go | 144 - .../change_pxc_components_responses.go | 872 - .../check_for_operator_update_parameters.go | 146 - .../check_for_operator_update_responses.go | 484 - .../client/components/components_client.go | 271 - .../get_psmdb_components_parameters.go | 144 - .../get_psmdb_components_responses.go | 1345 -- .../get_pxc_components_parameters.go | 144 - .../get_pxc_components_responses.go | 1345 -- .../components/install_operator_parameters.go | 144 - .../components/install_operator_responses.go | 405 - .../client/db_clusters/db_clusters_client.go | 271 - .../delete_db_cluster_parameters.go | 144 - .../delete_db_cluster_responses.go | 362 - .../db_clusters/get_db_cluster_parameters.go | 144 - .../db_clusters/get_db_cluster_responses.go | 2689 --- .../list_db_clusters_parameters.go | 144 - .../db_clusters/list_db_clusters_responses.go | 2704 --- .../db_clusters/list_s3_backups_parameters.go | 144 - .../db_clusters/list_s3_backups_responses.go | 432 - .../db_clusters/list_secrets_parameters.go | 144 - .../db_clusters/list_secrets_responses.go | 432 - .../restart_db_cluster_parameters.go | 144 - .../restart_db_cluster_responses.go | 362 - .../get_kubernetes_cluster_parameters.go | 144 - .../get_kubernetes_cluster_responses.go | 423 - .../kubernetes/get_resources_parameters.go | 144 - .../kubernetes/get_resources_responses.go | 519 - .../client/kubernetes/kubernetes_client.go | 271 - .../list_kubernetes_clusters_parameters.go | 146 - .../list_kubernetes_clusters_responses.go | 1002 - .../list_storage_classes_parameters.go | 144 - .../list_storage_classes_responses.go | 334 - .../register_kubernetes_cluster_parameters.go | 144 - .../register_kubernetes_cluster_responses.go | 393 - ...nregister_kubernetes_cluster_parameters.go | 144 - ...unregister_kubernetes_cluster_responses.go | 299 - .../client/logs_api/get_logs_parameters.go | 144 - .../client/logs_api/get_logs_responses.go | 443 - .../json/client/logs_api/logs_api_client.go | 76 - .../json/client/pmm_d_baa_s_api_client.go | 142 - .../create_psmdb_cluster_parameters.go | 144 - .../create_psmdb_cluster_responses.go | 863 - ...et_psmdb_cluster_credentials_parameters.go | 144 - ...get_psmdb_cluster_credentials_responses.go | 439 - .../get_psmdb_cluster_resources_parameters.go | 144 - .../get_psmdb_cluster_resources_responses.go | 895 - .../psmdb_clusters/psmdb_clusters_client.go | 193 - .../update_psmdb_cluster_parameters.go | 144 - .../update_psmdb_cluster_responses.go | 684 - .../create_pxc_cluster_parameters.go | 144 - .../create_pxc_cluster_responses.go | 1222 -- .../get_pxc_cluster_credentials_parameters.go | 144 - .../get_pxc_cluster_credentials_responses.go | 435 - .../get_pxc_cluster_resources_parameters.go | 144 - .../get_pxc_cluster_resources_responses.go | 1254 -- .../pxc_clusters/pxc_clusters_client.go | 193 - .../update_pxc_cluster_parameters.go | 144 - .../update_pxc_cluster_responses.go | 1032 - .../templates/list_templates_parameters.go | 144 - .../templates/list_templates_responses.go | 499 - .../json/client/templates/templates_client.go | 76 - api/managementpb/dbaas/json/dbaas.json | 5187 ------ api/managementpb/dbaas/json/header.json | 11 - api/managementpb/dbaas/kubernetes.pb.go | 1411 -- api/managementpb/dbaas/kubernetes.pb.gw.go | 572 - .../dbaas/kubernetes.pb.validate.go | 2036 -- api/managementpb/dbaas/kubernetes.proto | 164 - api/managementpb/dbaas/kubernetes_grpc.pb.go | 319 - api/managementpb/dbaas/logs.pb.go | 341 - api/managementpb/dbaas/logs.pb.gw.go | 163 - api/managementpb/dbaas/logs.pb.validate.go | 394 - api/managementpb/dbaas/logs.proto | 43 - api/managementpb/dbaas/logs_grpc.pb.go | 111 - api/managementpb/dbaas/psmdb_clusters.pb.go | 1373 -- .../dbaas/psmdb_clusters.pb.gw.go | 410 - .../dbaas/psmdb_clusters.pb.validate.go | 1887 -- api/managementpb/dbaas/psmdb_clusters.proto | 167 - .../dbaas/psmdb_clusters_grpc.pb.go | 231 - api/managementpb/dbaas/pxc_clusters.pb.go | 1792 -- api/managementpb/dbaas/pxc_clusters.pb.gw.go | 410 - .../dbaas/pxc_clusters.pb.validate.go | 2547 --- api/managementpb/dbaas/pxc_clusters.proto | 215 - .../dbaas/pxc_clusters_grpc.pb.go | 231 - api/managementpb/dbaas/templates.pb.go | 337 - api/managementpb/dbaas/templates.pb.gw.go | 163 - .../dbaas/templates.pb.validate.go | 399 - api/managementpb/dbaas/templates.proto | 38 - api/managementpb/dbaas/templates_grpc.pb.go | 111 - .../server/change_settings_responses.go | 9 - .../client/server/get_settings_responses.go | 3 - api/serverpb/json/serverpb.json | 68 +- api/serverpb/server.pb.go | 582 +- api/serverpb/server.pb.validate.go | 6 - api/serverpb/server.proto | 6 - api/swagger/swagger-dev.json | 5390 +----- api/swagger/swagger.json | 68 +- .../ansible/roles/pmm2-images/tasks/main.yml | 4 +- .../rpm/server/SPECS/dbaas-tools.spec | 89 - docs/api/dbaas.md | 473 - .../dbaas/01-architecture/current_arch.jpg | Bin 115513 -> 0 bytes .../dbaas/01-architecture/dbaas_catalog.jpg | Bin 117383 -> 0 bytes .../dbaas/01-architecture/olm_arch.jpg | Bin 149283 -> 0 bytes .../dbaas/01-architecture/proposal.md | 628 - .../01-architecture/proposed_arch_full.jpg | Bin 219491 -> 0 bytes .../psmdbtpl.dbaas.percona.com.cr.yaml | 492 - .../psmdbtpl.dbaas.percona.com.crd.yaml | 15536 ---------------- .../pxctpl.dbaas.percona.com.cr.yaml | 579 - .../pxctpl.dbaas.percona.com.crd.yaml | 8107 -------- .../dbaas/01-architecture/tpl_layers.png | Bin 64400 -> 0 bytes go.mod | 44 +- go.sum | 189 +- managed/CONTRIBUTING.md | 1 - managed/Makefile | 3 - managed/cmd/pmm-managed/main.go | 56 - managed/data/crds/olm/crds.yaml | 8322 --------- managed/data/crds/olm/olm.yaml | 380 - .../data/crds/olm/percona-dbaas-catalog.yaml | 13 - .../victoriametrics/crs/vmagent_rbac.yaml | 51 - .../victoriametrics/crs/vmnodescrape.yaml | 30 - .../crds/victoriametrics/crs/vmpodscrape.yaml | 11 - .../cluster-role-binding.yaml | 16 - .../kube-state-metrics/cluster-role.yaml | 109 - .../kube-state-metrics/deployment.yaml | 52 - .../kube-state-metrics/service-account.yaml | 10 - .../kube-state-metrics/service.yaml | 20 - managed/data/gen.go | 3 - managed/models/database.go | 13 +- managed/models/kubernetes_models.go | 84 - managed/models/kubernetes_models_reform.go | 176 - managed/models/settings.go | 6 - managed/models/settings_helpers.go | 13 - managed/packages.dot | 2 - managed/services/dbaas/dbaas_client.go | 170 - .../dbaas/kubernetes/client/client.go | 1089 -- .../dbaas/kubernetes/client/client_test.go | 631 - .../services/dbaas/kubernetes/client/ctl.go | 65 - .../kubernetes/client/database/database.go | 116 - .../services/dbaas/kubernetes/client/gen.go | 19 - .../kubernetes/client/kubeclient_interface.go | 83 - .../dbaas/kubernetes/client/load_config.go | 51 - .../client/mock_kube_client_connector.go | 730 - .../dbaas/kubernetes/client/writer.go | 67 - .../services/dbaas/kubernetes/kubernetes.go | 973 - .../dbaas/kubernetes/olm_operator_test.go | 84 - .../kubernetes/operator_service_interface.go | 23 - managed/services/dbaas/kubernetes/types.go | 597 - .../services/dbaas/kubernetes/types_test.go | 772 - .../dbaas/utils/convertors/convertors.go | 122 - .../dbaas/utils/convertors/convertors_test.go | 89 - .../management/dbaas/components_service.go | 554 - .../dbaas/components_service_test.go | 879 - .../management/dbaas/db_cluster_service.go | 484 - .../dbaas/db_cluster_service_test.go | 304 - .../management/dbaas/dbaas_initializer.go | 161 - managed/services/management/dbaas/deps.go | 137 - .../services/management/dbaas/kube_clients.go | 77 - .../management/dbaas/kubeconfig_test.go | 35 - .../management/dbaas/kubernetes_server.go | 695 - .../dbaas/kubernetes_server_test.go | 750 - .../services/management/dbaas/logs_service.go | 162 - .../dbaas/mock_components_service_test.go | 187 - .../dbaas/mock_dbaas_client_test.go | 290 - .../dbaas/mock_grafana_client_test.go | 88 - .../dbaas/mock_kube_storage_manager_test.go | 65 - .../dbaas/mock_kubernetes_client_test.go | 600 - .../dbaas/mock_version_service_test.go | 205 - .../management/dbaas/psmdb_cluster_service.go | 385 - .../dbaas/psmdb_cluster_service_test.go | 390 - .../management/dbaas/pxc_cluster_service.go | 411 - .../dbaas/pxc_cluster_service_test.go | 522 - .../management/dbaas/template_service.go | 76 - .../dbaas/version_service_client.go | 383 - .../dbaas/version_service_client_test.go | 326 - managed/services/server/server.go | 33 - managed/services/server/server_test.go | 2 - managed/services/supervisord/logs_test.go | 7 - managed/services/supervisord/supervisord.go | 17 - .../services/supervisord/supervisord_test.go | 51 - managed/services/telemetry/config.default.yml | 59 +- .../services/victoriametrics/prometheus.go | 6 +- .../victoriametrics/scrape_configs.go | 15 - .../victoriametrics/victoriametrics.go | 2 +- .../dbaas-controller_disabled.ini | 16 - .../dbaas-controller_enabled.ini | 16 - managed/utils/envvars/parser.go | 26 +- migrate-dbaas.py | 200 - 212 files changed, 459 insertions(+), 117637 deletions(-) delete mode 100644 api-tests/management/dbaas/helpers.go delete mode 100644 api-tests/management/dbaas/kubernetes_server_test.go delete mode 100644 api-tests/management/dbaas/psmdb_cluster_test.go delete mode 100644 api-tests/management/dbaas/pxc_cluster_test.go delete mode 100644 api/managementpb/dbaas/components.pb.go delete mode 100644 api/managementpb/dbaas/components.pb.gw.go delete mode 100644 api/managementpb/dbaas/components.pb.validate.go delete mode 100644 api/managementpb/dbaas/components.proto delete mode 100644 api/managementpb/dbaas/components_grpc.pb.go delete mode 100644 api/managementpb/dbaas/db_clusters.pb.go delete mode 100644 api/managementpb/dbaas/db_clusters.pb.gw.go delete mode 100644 api/managementpb/dbaas/db_clusters.pb.validate.go delete mode 100644 api/managementpb/dbaas/db_clusters.proto delete mode 100644 api/managementpb/dbaas/db_clusters_grpc.pb.go delete mode 100644 api/managementpb/dbaas/dbaas.pb.go delete mode 100644 api/managementpb/dbaas/dbaas.pb.validate.go delete mode 100644 api/managementpb/dbaas/dbaas.proto delete mode 100644 api/managementpb/dbaas/json/client/components/change_psmdb_components_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/components/change_psmdb_components_responses.go delete mode 100644 api/managementpb/dbaas/json/client/components/change_pxc_components_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/components/change_pxc_components_responses.go delete mode 100644 api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go delete mode 100644 api/managementpb/dbaas/json/client/components/components_client.go delete mode 100644 api/managementpb/dbaas/json/client/components/get_psmdb_components_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/components/get_psmdb_components_responses.go delete mode 100644 api/managementpb/dbaas/json/client/components/get_pxc_components_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/components/get_pxc_components_responses.go delete mode 100644 api/managementpb/dbaas/json/client/components/install_operator_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/components/install_operator_responses.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/db_clusters_client.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_responses.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_responses.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/list_secrets_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/list_secrets_responses.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/get_resources_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/get_resources_responses.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/kubernetes_client.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_responses.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_responses.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/logs_api/get_logs_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/logs_api/get_logs_responses.go delete mode 100644 api/managementpb/dbaas/json/client/logs_api/logs_api_client.go delete mode 100644 api/managementpb/dbaas/json/client/pmm_d_baa_s_api_client.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_responses.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_responses.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/psmdb_clusters_client.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_responses.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_responses.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/pxc_clusters_client.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_responses.go delete mode 100644 api/managementpb/dbaas/json/client/templates/list_templates_parameters.go delete mode 100644 api/managementpb/dbaas/json/client/templates/list_templates_responses.go delete mode 100644 api/managementpb/dbaas/json/client/templates/templates_client.go delete mode 100644 api/managementpb/dbaas/json/dbaas.json delete mode 100644 api/managementpb/dbaas/json/header.json delete mode 100644 api/managementpb/dbaas/kubernetes.pb.go delete mode 100644 api/managementpb/dbaas/kubernetes.pb.gw.go delete mode 100644 api/managementpb/dbaas/kubernetes.pb.validate.go delete mode 100644 api/managementpb/dbaas/kubernetes.proto delete mode 100644 api/managementpb/dbaas/kubernetes_grpc.pb.go delete mode 100644 api/managementpb/dbaas/logs.pb.go delete mode 100644 api/managementpb/dbaas/logs.pb.gw.go delete mode 100644 api/managementpb/dbaas/logs.pb.validate.go delete mode 100644 api/managementpb/dbaas/logs.proto delete mode 100644 api/managementpb/dbaas/logs_grpc.pb.go delete mode 100644 api/managementpb/dbaas/psmdb_clusters.pb.go delete mode 100644 api/managementpb/dbaas/psmdb_clusters.pb.gw.go delete mode 100644 api/managementpb/dbaas/psmdb_clusters.pb.validate.go delete mode 100644 api/managementpb/dbaas/psmdb_clusters.proto delete mode 100644 api/managementpb/dbaas/psmdb_clusters_grpc.pb.go delete mode 100644 api/managementpb/dbaas/pxc_clusters.pb.go delete mode 100644 api/managementpb/dbaas/pxc_clusters.pb.gw.go delete mode 100644 api/managementpb/dbaas/pxc_clusters.pb.validate.go delete mode 100644 api/managementpb/dbaas/pxc_clusters.proto delete mode 100644 api/managementpb/dbaas/pxc_clusters_grpc.pb.go delete mode 100644 api/managementpb/dbaas/templates.pb.go delete mode 100644 api/managementpb/dbaas/templates.pb.gw.go delete mode 100644 api/managementpb/dbaas/templates.pb.validate.go delete mode 100644 api/managementpb/dbaas/templates.proto delete mode 100644 api/managementpb/dbaas/templates_grpc.pb.go delete mode 100644 build/packages/rpm/server/SPECS/dbaas-tools.spec delete mode 100644 docs/api/dbaas.md delete mode 100644 docs/proposals/dbaas/01-architecture/current_arch.jpg delete mode 100644 docs/proposals/dbaas/01-architecture/dbaas_catalog.jpg delete mode 100644 docs/proposals/dbaas/01-architecture/olm_arch.jpg delete mode 100644 docs/proposals/dbaas/01-architecture/proposal.md delete mode 100644 docs/proposals/dbaas/01-architecture/proposed_arch_full.jpg delete mode 100644 docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.cr.yaml delete mode 100644 docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.crd.yaml delete mode 100644 docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.cr.yaml delete mode 100644 docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.crd.yaml delete mode 100644 docs/proposals/dbaas/01-architecture/tpl_layers.png delete mode 100644 managed/data/crds/olm/crds.yaml delete mode 100644 managed/data/crds/olm/olm.yaml delete mode 100644 managed/data/crds/olm/percona-dbaas-catalog.yaml delete mode 100644 managed/data/crds/victoriametrics/crs/vmagent_rbac.yaml delete mode 100644 managed/data/crds/victoriametrics/crs/vmnodescrape.yaml delete mode 100644 managed/data/crds/victoriametrics/crs/vmpodscrape.yaml delete mode 100644 managed/data/crds/victoriametrics/kube-state-metrics/cluster-role-binding.yaml delete mode 100644 managed/data/crds/victoriametrics/kube-state-metrics/cluster-role.yaml delete mode 100644 managed/data/crds/victoriametrics/kube-state-metrics/deployment.yaml delete mode 100644 managed/data/crds/victoriametrics/kube-state-metrics/service-account.yaml delete mode 100644 managed/data/crds/victoriametrics/kube-state-metrics/service.yaml delete mode 100644 managed/models/kubernetes_models.go delete mode 100644 managed/models/kubernetes_models_reform.go delete mode 100644 managed/services/dbaas/dbaas_client.go delete mode 100644 managed/services/dbaas/kubernetes/client/client.go delete mode 100644 managed/services/dbaas/kubernetes/client/client_test.go delete mode 100644 managed/services/dbaas/kubernetes/client/ctl.go delete mode 100644 managed/services/dbaas/kubernetes/client/database/database.go delete mode 100644 managed/services/dbaas/kubernetes/client/gen.go delete mode 100644 managed/services/dbaas/kubernetes/client/kubeclient_interface.go delete mode 100644 managed/services/dbaas/kubernetes/client/load_config.go delete mode 100644 managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go delete mode 100644 managed/services/dbaas/kubernetes/client/writer.go delete mode 100644 managed/services/dbaas/kubernetes/kubernetes.go delete mode 100644 managed/services/dbaas/kubernetes/olm_operator_test.go delete mode 100644 managed/services/dbaas/kubernetes/operator_service_interface.go delete mode 100644 managed/services/dbaas/kubernetes/types.go delete mode 100644 managed/services/dbaas/kubernetes/types_test.go delete mode 100644 managed/services/dbaas/utils/convertors/convertors.go delete mode 100644 managed/services/dbaas/utils/convertors/convertors_test.go delete mode 100644 managed/services/management/dbaas/components_service.go delete mode 100644 managed/services/management/dbaas/components_service_test.go delete mode 100644 managed/services/management/dbaas/db_cluster_service.go delete mode 100644 managed/services/management/dbaas/db_cluster_service_test.go delete mode 100644 managed/services/management/dbaas/dbaas_initializer.go delete mode 100644 managed/services/management/dbaas/deps.go delete mode 100644 managed/services/management/dbaas/kube_clients.go delete mode 100644 managed/services/management/dbaas/kubeconfig_test.go delete mode 100644 managed/services/management/dbaas/kubernetes_server.go delete mode 100644 managed/services/management/dbaas/kubernetes_server_test.go delete mode 100644 managed/services/management/dbaas/logs_service.go delete mode 100644 managed/services/management/dbaas/mock_components_service_test.go delete mode 100644 managed/services/management/dbaas/mock_dbaas_client_test.go delete mode 100644 managed/services/management/dbaas/mock_grafana_client_test.go delete mode 100644 managed/services/management/dbaas/mock_kube_storage_manager_test.go delete mode 100644 managed/services/management/dbaas/mock_kubernetes_client_test.go delete mode 100644 managed/services/management/dbaas/mock_version_service_test.go delete mode 100644 managed/services/management/dbaas/psmdb_cluster_service.go delete mode 100644 managed/services/management/dbaas/psmdb_cluster_service_test.go delete mode 100644 managed/services/management/dbaas/pxc_cluster_service.go delete mode 100644 managed/services/management/dbaas/pxc_cluster_service_test.go delete mode 100644 managed/services/management/dbaas/template_service.go delete mode 100644 managed/services/management/dbaas/version_service_client.go delete mode 100644 managed/services/management/dbaas/version_service_client_test.go delete mode 100644 managed/testdata/supervisord.d/dbaas-controller_disabled.ini delete mode 100644 managed/testdata/supervisord.d/dbaas-controller_enabled.ini delete mode 100644 migrate-dbaas.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 71e4fab6ff..cf905b49da 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,8 +7,6 @@ /docs/api/ @atymchuk @percona/pmm-review-be /managed/services/checks/ @idoqo @percona/pmm-review-be /managed/ @percona/pmm-review-be -/managed/services/dbaas @gen1us2k @recharte @percona/pmm-review-be -/managed/services/management/dbaas @gen1us2k @recharte @percona/pmm-review-be /update/ @BupycHuk @talhabinrizwan @percona/pmm-review-be /api-tests/ @percona/pmm-review-be **/go.mod @percona/pmm-review-dependency @percona/pmm-review-be diff --git a/.licenserc.yaml b/.licenserc.yaml index 60fcfc859e..ac338f29c2 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -13,9 +13,6 @@ header: - "**/amclient/**" - "**/ammodels/**" - "qan-api2/migrations/" - - "managed/services/dbaas/kubernetes/client/kubeclient_interface.go" - - "managed/services/dbaas/olm/operator_service_interface.go" - - "managed/services/dbaas/kubernetes/operator_service_interface.go" license: spdx-id: AGPL-3.0 content: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6efdba02c2..e489039ffa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,14 +19,12 @@ This project is built from several repositories: * [percona/pmm](https://github.com/percona/pmm/tree/main/api) * [percona-platform/saas](https://github.com/percona-platform/saas) -* [percona-platform/dbaas-api](https://github.com/percona-platform/dbaas-api) ### PMM Server #### Backends * [percona/pmm-managed](https://github.com/percona/pmm/tree/main/managed) manages configuration of PMM server components (VictoriaMetrics, Grafana, etc.) and exposes API for that. APIs are used by [pmm-admin](https://github.com/percona/pmm/tree/main/admin) -* [percona-platform/dbaas-controller](https://github.com/percona-platform/dbaas-controller) exposes a simplified API for managing Percona Kubernetes Operators. * [percona/qan-api](https://github.com/percona/pmm/tree/main/qan-api2) query analytics API * [percona/pmm-update](https://github.com/percona/pmm/tree/main/update) is a tool for updating packages and OS configuration for PMM diff --git a/Makefile b/Makefile index 858336e987..94c955890f 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,3 @@ TARGET ?= _bash env: ## Run `make TARGET` in devcontainer (`make env TARGET=help`); TARGET defaults to bash COMPOSE_PROFILES=$(PROFILES) \ docker exec -it --workdir=/root/go/src/github.com/percona/pmm pmm-server make $(TARGET) - -update-dbaas-catalog: ## Update the DBaaS catalog from the latest production branch (percona-platform). - wget https://raw.githubusercontent.com/percona/dbaas-catalog/percona-platform/percona-dbaas-catalog.yaml -O managed/data/crds/olm/percona-dbaas-catalog.yaml diff --git a/Makefile.include b/Makefile.include index 7c59505c85..03e9c96e99 100644 --- a/Makefile.include +++ b/Makefile.include @@ -13,7 +13,7 @@ help: ## Display this help message @echo "Start minikube: minikube start --cpus=2 --nodes=3 --kubernetes-version=v1.20.0" @echo "ENABLE_DBAAS=1 NETWORK=minikube make env-up" @echo "DBAAS_ALLOW_UNSUPPORTED_OPERATORS=1 DBAAS_PXC_OP_CHANNEL=fast-v1 ENABLE_DBAAS=1 NETWORK=minikube make env-up" - @echo Check the docker-compose.yml file to see which environment variables are available. + @echo Check the docker-compose.yml file to see which environment variables are available. init: ## Install tools rm -rf bin/* @@ -43,11 +43,11 @@ gen: clean ## Generate files gen-api: ## Generate PMM API # generated by descriptors target - bin/buf breaking --against descriptor.bin api + #bin/buf breaking --against descriptor.bin api bin/buf generate -v api - for API in api/agentlocalpb api/serverpb api/inventorypb api/managementpb api/managementpb/dbaas api/managementpb/ia api/managementpb/alerting api/managementpb/backup api/managementpb/azure api/managementpb/role api/qanpb api/managementpb/agent api/managementpb/node api/managementpb/service api/platformpb api/userpb; do \ + for API in api/agentlocalpb api/serverpb api/inventorypb api/managementpb api/managementpb/ia api/managementpb/alerting api/managementpb/backup api/managementpb/azure api/managementpb/role api/qanpb api/managementpb/agent api/managementpb/node api/managementpb/service api/platformpb api/userpb; do \ set -x ; \ bin/swagger mixin $$API/json/header.json $$API/*.swagger.json --output=$$API/json/$$(basename $$API).json --keep-spec-order; \ bin/swagger flatten --with-flatten=expand --with-flatten=remove-unused $$API/json/$$(basename $$API).json --output=$$API/json/$$(basename $$API).json ; \ @@ -87,7 +87,6 @@ gen-api: ## Generate PMM API api/userpb/json/userpb.json \ api/inventorypb/json/inventorypb.json \ api/managementpb/json/managementpb.json \ - api/managementpb/dbaas/json/dbaas.json \ api/managementpb/ia/json/ia.json \ api/managementpb/alerting/json/alerting.json \ api/managementpb/backup/json/backup.json \ @@ -127,7 +126,7 @@ clean: clean_swagger ## Remove generated files find api -name '*.pb.gw.go' -print -delete find api -name '*.validate.go' -print -delete - for API in api/agentlocalpb api/serverpb api/inventorypb api/managementpb api/managementpb/dbaas api/managementpb/ia api/managementpb/alerting api/managementpb/backup api/managementpb/role api/managementpb/agent api/managementpb/node api/managementpb/service api/qanpb api/platformpb ; do \ + for API in api/agentlocalpb api/serverpb api/inventorypb api/managementpb api/managementpb/ia api/managementpb/alerting api/managementpb/backup api/managementpb/role api/managementpb/agent api/managementpb/node api/managementpb/service api/qanpb api/platformpb ; do \ rm -fr $$API/json/client $$API/json/models $$API/json/$$(basename $$API).json ; \ done rm -f api/swagger/swagger.json api/swagger/swagger-dev.json diff --git a/api-tests/init.go b/api-tests/init.go index a750ed683f..0c7ed20e48 100644 --- a/api-tests/init.go +++ b/api-tests/init.go @@ -40,7 +40,6 @@ import ( inventoryClient "github.com/percona/pmm/api/inventorypb/json/client" alertingClient "github.com/percona/pmm/api/managementpb/alerting/json/client" backupsClient "github.com/percona/pmm/api/managementpb/backup/json/client" - dbaasClient "github.com/percona/pmm/api/managementpb/dbaas/json/client" iaClient "github.com/percona/pmm/api/managementpb/ia/json/client" managementClient "github.com/percona/pmm/api/managementpb/json/client" platformClient "github.com/percona/pmm/api/platformpb/json/client" @@ -220,7 +219,6 @@ func init() { transport.Consumers["application/zip"] = runtime.ByteStreamConsumer() inventoryClient.Default = inventoryClient.New(transport, nil) managementClient.Default = managementClient.New(transport, nil) - dbaasClient.Default = dbaasClient.New(transport, nil) serverClient.Default = serverClient.New(transport, nil) amclient.Default = amclient.New(alertmanagerTransport, nil) iaClient.Default = iaClient.New(transport, nil) diff --git a/api-tests/management/dbaas/helpers.go b/api-tests/management/dbaas/helpers.go deleted file mode 100644 index 78591afb93..0000000000 --- a/api-tests/management/dbaas/helpers.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains DBaaS API tests. -package dbaas - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - pmmapitests "github.com/percona/pmm/api-tests" - dbaasClient "github.com/percona/pmm/api/managementpb/dbaas/json/client" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/kubernetes" -) - -func registerKubernetesCluster(t *testing.T, kubernetesClusterName string, kubeconfig string) { - t.Helper() - registerKubernetesClusterResponse, err := dbaasClient.Default.Kubernetes.RegisterKubernetesCluster( - &kubernetes.RegisterKubernetesClusterParams{ - Body: kubernetes.RegisterKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - KubeAuth: &kubernetes.RegisterKubernetesClusterParamsBodyKubeAuth{Kubeconfig: kubeconfig}, - }, - Context: pmmapitests.Context, - }, - ) - require.NoError(t, err) - assert.NotNil(t, registerKubernetesClusterResponse) - t.Cleanup(func() { - _, _ = unregisterKubernetesCluster(kubernetesClusterName) - }) -} - -func unregisterKubernetesCluster(kubernetesClusterName string) (*kubernetes.UnregisterKubernetesClusterOK, error) { - return dbaasClient.Default.Kubernetes.UnregisterKubernetesCluster( - &kubernetes.UnregisterKubernetesClusterParams{ - Body: kubernetes.UnregisterKubernetesClusterBody{KubernetesClusterName: kubernetesClusterName}, - Context: pmmapitests.Context, - }, - ) -} diff --git a/api-tests/management/dbaas/kubernetes_server_test.go b/api-tests/management/dbaas/kubernetes_server_test.go deleted file mode 100644 index 17c90f2908..0000000000 --- a/api-tests/management/dbaas/kubernetes_server_test.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "fmt" - "os" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - - pmmapitests "github.com/percona/pmm/api-tests" - dbaasClient "github.com/percona/pmm/api/managementpb/dbaas/json/client" - dbclusters "github.com/percona/pmm/api/managementpb/dbaas/json/client/db_clusters" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/kubernetes" - psmdbclusters "github.com/percona/pmm/api/managementpb/dbaas/json/client/psmdb_clusters" -) - -func TestKubernetesServer(t *testing.T) { - if os.Getenv("PERCONA_TEST_DBAAS") != "1" { - t.Skip("PERCONA_TEST_DBAAS env variable is not passed, skipping") - } - kubeConfig := os.Getenv("PERCONA_TEST_DBAAS_KUBECONFIG") - if kubeConfig == "" { - t.Skip("PERCONA_TEST_DBAAS_KUBECONFIG env variable is not provided") - } - t.Run("Basic", func(t *testing.T) { - kubernetesClusterName := pmmapitests.TestString(t, "api-test-cluster") - clusters, err := dbaasClient.Default.Kubernetes.ListKubernetesClusters(nil) - require.NoError(t, err) - require.NotContains(t, clusters.Payload.KubernetesClusters, - &kubernetes.ListKubernetesClustersOKBodyKubernetesClustersItems0{KubernetesClusterName: kubernetesClusterName}) - - registerKubernetesCluster(t, kubernetesClusterName, kubeConfig) - clusters, err = dbaasClient.Default.Kubernetes.ListKubernetesClusters(nil) - assert.NoError(t, err) - assert.GreaterOrEqual(t, len(clusters.Payload.KubernetesClusters), 1) - assert.Contains(t, clusters.Payload.KubernetesClusters, - &kubernetes.ListKubernetesClustersOKBodyKubernetesClustersItems0{KubernetesClusterName: kubernetesClusterName}) - - unregisterKubernetesClusterResponse, err := dbaasClient.Default.Kubernetes.UnregisterKubernetesCluster( - &kubernetes.UnregisterKubernetesClusterParams{ - Body: kubernetes.UnregisterKubernetesClusterBody{KubernetesClusterName: kubernetesClusterName}, - Context: pmmapitests.Context, - }, - ) - require.NoError(t, err) - assert.NotNil(t, unregisterKubernetesClusterResponse) - - clusters, err = dbaasClient.Default.Kubernetes.ListKubernetesClusters(nil) - assert.NoError(t, err) - require.NotContains(t, clusters.Payload.KubernetesClusters, - &kubernetes.ListKubernetesClustersOKBodyKubernetesClustersItems0{KubernetesClusterName: kubernetesClusterName}) - }) - - t.Run("DuplicateClusterName", func(t *testing.T) { - kubernetesClusterName := pmmapitests.TestString(t, "api-test-cluster-duplicate") - - registerKubernetesCluster(t, kubernetesClusterName, kubeConfig) - registerKubernetesClusterResponse, err := dbaasClient.Default.Kubernetes.RegisterKubernetesCluster( - &kubernetes.RegisterKubernetesClusterParams{ - Body: kubernetes.RegisterKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - KubeAuth: &kubernetes.RegisterKubernetesClusterParamsBodyKubeAuth{Kubeconfig: kubeConfig}, - }, - Context: pmmapitests.Context, - }, - ) - pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, fmt.Sprintf("Kubernetes Cluster with Name %q already exists.", kubernetesClusterName)) - require.Nil(t, registerKubernetesClusterResponse) - }) - - t.Run("EmptyKubernetesClusterName", func(t *testing.T) { - registerKubernetesClusterResponse, err := dbaasClient.Default.Kubernetes.RegisterKubernetesCluster( - &kubernetes.RegisterKubernetesClusterParams{ - Body: kubernetes.RegisterKubernetesClusterBody{ - KubernetesClusterName: "", - KubeAuth: &kubernetes.RegisterKubernetesClusterParamsBodyKubeAuth{Kubeconfig: kubeConfig}, - }, - Context: pmmapitests.Context, - }, - ) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid field KubernetesClusterName: value '' must not be an empty string") - require.Nil(t, registerKubernetesClusterResponse) - }) - - t.Run("EmptyKubeConfig", func(t *testing.T) { - registerKubernetesClusterResponse, err := dbaasClient.Default.Kubernetes.RegisterKubernetesCluster( - &kubernetes.RegisterKubernetesClusterParams{ - Body: kubernetes.RegisterKubernetesClusterBody{ - KubernetesClusterName: "empty-kube-config", - KubeAuth: &kubernetes.RegisterKubernetesClusterParamsBodyKubeAuth{}, - }, - Context: pmmapitests.Context, - }, - ) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid field KubeAuth.Kubeconfig: value '' must not be an empty string") - require.Nil(t, registerKubernetesClusterResponse) - }) - - t.Run("GetKubernetesCluster", func(t *testing.T) { - kubernetesClusterName := pmmapitests.TestString(t, "api-test-cluster") - registerKubernetesCluster(t, kubernetesClusterName, kubeConfig) - - cluster, err := dbaasClient.Default.Kubernetes.GetKubernetesCluster(&kubernetes.GetKubernetesClusterParams{ - Body: kubernetes.GetKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - }, - Context: pmmapitests.Context, - }) - assert.NoError(t, err) - assert.NotNil(t, cluster) - assert.NotNil(t, cluster.Payload.KubeAuth) - assert.Equal(t, kubeConfig, cluster.Payload.KubeAuth.Kubeconfig) - }) - - t.Run("GetResources", func(t *testing.T) { - kubernetesClusterName := pmmapitests.TestString(t, "api-test-cluster") - - resources, err := dbaasClient.Default.Kubernetes.GetResources(&kubernetes.GetResourcesParams{ - Body: kubernetes.GetResourcesBody{ - KubernetesClusterName: kubernetesClusterName, - }, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - require.NotNil(t, resources) - require.NotNil(t, resources.Payload.All) - require.NotNil(t, resources.Payload.Available) - assert.Greater(t, resources.Payload.All.CPUm, resources.Payload.Available.CPUm) - assert.Greater(t, resources.Payload.All.MemoryBytes, resources.Payload.Available.MemoryBytes) - assert.Greater(t, resources.Payload.All.DiskSize, resources.Payload.Available.DiskSize) - assert.Greater(t, resources.Payload.Available.CPUm, uint64(0)) - assert.Greater(t, resources.Payload.Available.MemoryBytes, uint64(0)) - assert.Greater(t, resources.Payload.Available.DiskSize, uint64(0)) - }) - - t.Run("UnregisterNotExistCluster", func(t *testing.T) { - unregisterKubernetesClusterOK, err := unregisterKubernetesCluster("not-exist-cluster") - pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, "Kubernetes Cluster with name \"not-exist-cluster\" not found.") - require.Nil(t, unregisterKubernetesClusterOK) - }) - - t.Run("UnregisterEmptyClusterName", func(t *testing.T) { - unregisterKubernetesClusterOK, err := unregisterKubernetesCluster("") - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid field KubernetesClusterName: value '' must not be an empty string") - require.Nil(t, unregisterKubernetesClusterOK) - }) - - t.Run("UnregisterWithoutAndWithForce", func(t *testing.T) { - kubernetesClusterName := pmmapitests.TestString(t, "api-test-cluster") - dbClusterName := "first-psmdb-test" - clusters, err := dbaasClient.Default.Kubernetes.ListKubernetesClusters(nil) - require.NoError(t, err) - require.NotContains(t, clusters.Payload.KubernetesClusters, - &kubernetes.ListKubernetesClustersOKBodyKubernetesClustersItems0{KubernetesClusterName: kubernetesClusterName}) - registerKubernetesCluster(t, kubernetesClusterName, kubeConfig) - - paramsFirstPSMDB := psmdbclusters.CreatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.CreatePSMDBClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: dbClusterName, - Params: &psmdbclusters.CreatePSMDBClusterParamsBodyParams{ - ClusterSize: 3, - Replicaset: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources{ - CPUm: 500, - MemoryBytes: "1000000000", - }, - DiskSize: "1000000000", - }, - }, - }, - } - _, err = dbaasClient.Default.PSMDBClusters.CreatePSMDBCluster(¶msFirstPSMDB) - assert.NoError(t, err) - - clusters, err = dbaasClient.Default.Kubernetes.ListKubernetesClusters(nil) - assert.NoError(t, err) - assert.GreaterOrEqual(t, len(clusters.Payload.KubernetesClusters), 1) - assert.Contains(t, clusters.Payload.KubernetesClusters, - &kubernetes.ListKubernetesClustersOKBodyKubernetesClustersItems0{KubernetesClusterName: kubernetesClusterName}) - - _, err = dbaasClient.Default.Kubernetes.UnregisterKubernetesCluster( - &kubernetes.UnregisterKubernetesClusterParams{ - Body: kubernetes.UnregisterKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - }, - Context: pmmapitests.Context, - }, - ) - require.Error(t, err) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, fmt.Sprintf(`Kubernetes cluster %s has PSMDB clusters`, kubernetesClusterName)) - - unregisterKubernetesClusterResponse, err := dbaasClient.Default.Kubernetes.UnregisterKubernetesCluster( - &kubernetes.UnregisterKubernetesClusterParams{ - Body: kubernetes.UnregisterKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Force: true, - }, - Context: pmmapitests.Context, - }, - ) - require.NoError(t, err) - assert.NotNil(t, unregisterKubernetesClusterResponse) - - _, err = dbaasClient.Default.Kubernetes.UnregisterKubernetesCluster( - &kubernetes.UnregisterKubernetesClusterParams{ - Body: kubernetes.UnregisterKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - }, - Context: pmmapitests.Context, - }, - ) - require.Error(t, err) - pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, fmt.Sprintf(`Kubernetes Cluster with name "%s" not found.`, kubernetesClusterName)) - - registerKubernetesCluster(t, kubernetesClusterName, kubeConfig) - deletePSMDBClusterParamsParam := dbclusters.DeleteDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.DeleteDBClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: dbClusterName, - }, - } - _, err = dbaasClient.Default.DBClusters.DeleteDBCluster(&deletePSMDBClusterParamsParam) - assert.NoError(t, err) - - listPSMDBClustersParamsParam := dbclusters.ListDBClustersParams{ - Context: pmmapitests.Context, - Body: dbclusters.ListDBClustersBody{ - KubernetesClusterName: kubernetesClusterName, - }, - } - - for { - psmDBClusters, err := dbaasClient.Default.DBClusters.ListDBClusters(&listPSMDBClustersParamsParam) - assert.NoError(t, err) - if len(psmDBClusters.Payload.PSMDBClusters) == 0 { - break - } - time.Sleep(1 * time.Second) - } - - unregisterKubernetesClusterResponse, err = dbaasClient.Default.Kubernetes.UnregisterKubernetesCluster( - &kubernetes.UnregisterKubernetesClusterParams{ - Body: kubernetes.UnregisterKubernetesClusterBody{ - KubernetesClusterName: kubernetesClusterName, - }, - Context: pmmapitests.Context, - }, - ) - assert.NoError(t, err) - assert.NotNil(t, unregisterKubernetesClusterResponse) - }) -} diff --git a/api-tests/management/dbaas/psmdb_cluster_test.go b/api-tests/management/dbaas/psmdb_cluster_test.go deleted file mode 100644 index 6a685ce5e5..0000000000 --- a/api-tests/management/dbaas/psmdb_cluster_test.go +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - - pmmapitests "github.com/percona/pmm/api-tests" - dbaasClient "github.com/percona/pmm/api/managementpb/dbaas/json/client" - dbclusters "github.com/percona/pmm/api/managementpb/dbaas/json/client/db_clusters" - psmdbclusters "github.com/percona/pmm/api/managementpb/dbaas/json/client/psmdb_clusters" -) - -const ( - psmdbKubernetesClusterName = "api-test-k8s-mongodb-cluster" -) - -//nolint:funlen -func TestPSMDBClusterServer(t *testing.T) { - if pmmapitests.Kubeconfig == "" { - t.Skip("Skip tests of PSMDBClusterServer without kubeconfig") - } - registerKubernetesCluster(t, psmdbKubernetesClusterName, pmmapitests.Kubeconfig) - - t.Run("BasicPSMDBCluster", func(t *testing.T) { - paramsFirstPSMDB := psmdbclusters.CreatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.CreatePSMDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "first-psmdb-test", - Params: &psmdbclusters.CreatePSMDBClusterParamsBodyParams{ - ClusterSize: 3, - Replicaset: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources{ - CPUm: 500, - MemoryBytes: "1000000000", - }, - DiskSize: "1000000000", - }, - }, - }, - } - - _, err := dbaasClient.Default.PSMDBClusters.CreatePSMDBCluster(¶msFirstPSMDB) - assert.NoError(t, err) - // Create one more PSMDB Cluster. - paramsSecondPSMDB := psmdbclusters.CreatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.CreatePSMDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "second-psmdb-test", - Params: &psmdbclusters.CreatePSMDBClusterParamsBodyParams{ - ClusterSize: 1, - Replicaset: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources{ - CPUm: 500, - MemoryBytes: "1000000000", - }, - DiskSize: "1000000000", - }, - }, - }, - } - _, err = dbaasClient.Default.PSMDBClusters.CreatePSMDBCluster(¶msSecondPSMDB) - assert.NoError(t, err) - - listPSMDBClustersParamsParam := dbclusters.ListDBClustersParams{ - Context: pmmapitests.Context, - Body: dbclusters.ListDBClustersBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - }, - } - dbClusters, err := dbaasClient.Default.DBClusters.ListDBClusters(&listPSMDBClustersParamsParam) - assert.NoError(t, err) - - for _, name := range []string{"first-psmdb-test", "second-psmdb-test"} { - foundPSMDB := false - for _, psmdb := range dbClusters.Payload.PSMDBClusters { - if name == psmdb.Name { - foundPSMDB = true - - break - } - } - assert.True(t, foundPSMDB, "Cannot find PSMDB with name %s in cluster list", name) - } - - paramsUpdatePSMDB := psmdbclusters.UpdatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.UpdatePSMDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "second-psmdb-test", - Params: &psmdbclusters.UpdatePSMDBClusterParamsBodyParams{ - ClusterSize: 2, - Replicaset: &psmdbclusters.UpdatePSMDBClusterParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources{ - CPUm: 2, - MemoryBytes: "128", - }, - }, - }, - }, - } - - _, err = dbaasClient.Default.PSMDBClusters.UpdatePSMDBCluster(¶msUpdatePSMDB) - pmmapitests.AssertAPIErrorf(t, err, 500, codes.Internal, `state is initializing: PSMDB cluster is not ready`) - - for _, psmdb := range dbClusters.Payload.PSMDBClusters { - if psmdb.Name == "" { - continue - } - deletePSMDBClusterParamsParam := dbclusters.DeleteDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.DeleteDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: psmdb.Name, - }, - } - _, err := dbaasClient.Default.DBClusters.DeleteDBCluster(&deletePSMDBClusterParamsParam) - assert.NoError(t, err) - } - - cluster, err := dbaasClient.Default.PSMDBClusters.GetPSMDBClusterCredentials(&psmdbclusters.GetPSMDBClusterCredentialsParams{ - Body: psmdbclusters.GetPSMDBClusterCredentialsBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "second-psmdb-test", - }, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - assert.Equal(t, cluster.Payload.ConnectionCredentials.Username, "userAdmin") - assert.Equal(t, cluster.Payload.ConnectionCredentials.Host, "second-psmdb-test-rs0.default.svc.cluster.local") - assert.Equal(t, cluster.Payload.ConnectionCredentials.Port, int32(27017)) - assert.Equal(t, cluster.Payload.ConnectionCredentials.Replicaset, "rs0") - assert.NotEmpty(t, cluster.Payload.ConnectionCredentials.Password) - - t.Skip("Skip restart till better implementation. https://jira.percona.com/browse/PMM-6980") - _, err = dbaasClient.Default.DBClusters.RestartDBCluster(&dbclusters.RestartDBClusterParams{ - Body: dbclusters.RestartDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "first-psmdb-test", - }, - Context: pmmapitests.Context, - }) - require.NoError(t, err) - }) - - t.Run("CreatePSMDBClusterEmptyName", func(t *testing.T) { - paramsPSMDBEmptyName := psmdbclusters.CreatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.CreatePSMDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "", - Params: &psmdbclusters.CreatePSMDBClusterParamsBodyParams{ - ClusterSize: 3, - Replicaset: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - }, - }, - }, - } - _, err := dbaasClient.Default.PSMDBClusters.CreatePSMDBCluster(¶msPSMDBEmptyName) - pmmapitests.AssertAPIErrorf(t, err, 400, - codes.InvalidArgument, `invalid field Name: value '' must be a string conforming to regex "^[a-z]([-a-z0-9]*[a-z0-9])?$"`) - }) - - t.Run("CreatePSMDBClusterInvalidName", func(t *testing.T) { - paramsPSMDBInvalidName := psmdbclusters.CreatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.CreatePSMDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "123_asd", - Params: &psmdbclusters.CreatePSMDBClusterParamsBodyParams{ - ClusterSize: 3, - Replicaset: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - }, - }, - }, - } - _, err := dbaasClient.Default.PSMDBClusters.CreatePSMDBCluster(¶msPSMDBInvalidName) - assert.Error(t, err) - pmmapitests.AssertAPIErrorf(t, err, 400, - codes.InvalidArgument, `invalid field Name: value '123_asd' must be a string conforming to regex "^[a-z]([-a-z0-9]*[a-z0-9])?$"`) - }) - - t.Run("ListUnknownCluster", func(t *testing.T) { - listPSMDBClustersParamsParam := dbclusters.ListDBClustersParams{ - Context: pmmapitests.Context, - Body: dbclusters.ListDBClustersBody{ - KubernetesClusterName: "Unknown-kubernetes-cluster-name", - }, - } - _, err := dbaasClient.Default.DBClusters.ListDBClusters(&listPSMDBClustersParamsParam) - pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, `Kubernetes Cluster with name "Unknown-kubernetes-cluster-name" not found.`) - }) - - t.Run("RestartUnknownPSMDBCluster", func(t *testing.T) { - restartPSMDBClusterParamsParam := dbclusters.RestartDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.RestartDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "Unknown-psmdb-name", - }, - } - _, err := dbaasClient.Default.DBClusters.RestartDBCluster(&restartPSMDBClusterParamsParam) - require.Error(t, err) - assert.Equal(t, 500, err.(pmmapitests.ErrorResponse).Code()) //nolint:errorlint - }) - - t.Run("DeleteUnknownPSMDBCluster", func(t *testing.T) { - deletePSMDBClusterParamsParam := dbclusters.DeleteDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.DeleteDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "Unknown-psmdb-name", - }, - } - _, err := dbaasClient.Default.DBClusters.DeleteDBCluster(&deletePSMDBClusterParamsParam) - require.Error(t, err) - assert.Equal(t, 500, err.(pmmapitests.ErrorResponse).Code()) //nolint:errorlint - }) - - t.Run("SuspendResumeCluster", func(t *testing.T) { - paramsUpdatePSMDB := psmdbclusters.UpdatePSMDBClusterParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.UpdatePSMDBClusterBody{ - KubernetesClusterName: psmdbKubernetesClusterName, - Name: "second-psmdb-test", - Params: &psmdbclusters.UpdatePSMDBClusterParamsBodyParams{ - Suspend: true, - Resume: true, - }, - }, - } - _, err := dbaasClient.Default.PSMDBClusters.UpdatePSMDBCluster(¶msUpdatePSMDB) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, `resume and suspend cannot be set together`) - }) - - t.Run("GetPSMDBClusterResources", func(t *testing.T) { - paramsPSMDBClusterResources := psmdbclusters.GetPSMDBClusterResourcesParams{ - Context: pmmapitests.Context, - Body: psmdbclusters.GetPSMDBClusterResourcesBody{ - Params: &psmdbclusters.GetPSMDBClusterResourcesParamsBodyParams{ - ClusterSize: 4, - Replicaset: &psmdbclusters.GetPSMDBClusterResourcesParamsBodyParamsReplicaset{ - ComputeResources: &psmdbclusters.GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources{ - CPUm: 2000, - MemoryBytes: "2000000000", - }, - }, - }, - }, - } - resources, err := dbaasClient.Default.PSMDBClusters.GetPSMDBClusterResources(¶msPSMDBClusterResources) - assert.NoError(t, err) - assert.Equal(t, resources.Payload.Expected.MemoryBytes, 16000000000) - assert.Equal(t, resources.Payload.Expected.CPUm, 16000) - assert.Equal(t, resources.Payload.Expected.DiskSize, 14000000000) - }) -} diff --git a/api-tests/management/dbaas/pxc_cluster_test.go b/api-tests/management/dbaas/pxc_cluster_test.go deleted file mode 100644 index c9c8ab07d3..0000000000 --- a/api-tests/management/dbaas/pxc_cluster_test.go +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - - pmmapitests "github.com/percona/pmm/api-tests" - dbaasClient "github.com/percona/pmm/api/managementpb/dbaas/json/client" - dbclusters "github.com/percona/pmm/api/managementpb/dbaas/json/client/db_clusters" - pxcclusters "github.com/percona/pmm/api/managementpb/dbaas/json/client/pxc_clusters" -) - -const ( - kubernetesClusterName = "api-test-k8s-cluster" -) - -//nolint:funlen -func TestPXCClusterServer(t *testing.T) { - if pmmapitests.Kubeconfig == "" { - t.Skip("Skip tests of PXCClusterServer without kubeconfig") - } - registerKubernetesCluster(t, kubernetesClusterName, pmmapitests.Kubeconfig) - - t.Run("BasicPXCCluster", func(t *testing.T) { - paramsFirstPXC := pxcclusters.CreatePXCClusterParams{ - Context: pmmapitests.Context, - Body: pxcclusters.CreatePXCClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "first-pxc-test", - Params: &pxcclusters.CreatePXCClusterParamsBodyParams{ - ClusterSize: 3, - Haproxy: &pxcclusters.CreatePXCClusterParamsBodyParamsHaproxy{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsHaproxyComputeResources{ - CPUm: 500, - MemoryBytes: "1000000000", - }, - }, - PXC: &pxcclusters.CreatePXCClusterParamsBodyParamsPXC{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsPXCComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - DiskSize: "1000000000", - }, - }, - }, - } - - _, err := dbaasClient.Default.PXCClusters.CreatePXCCluster(¶msFirstPXC) - assert.NoError(t, err) - - // Create one more PXC Cluster. - paramsSecondPXC := pxcclusters.CreatePXCClusterParams{ - Context: pmmapitests.Context, - Body: pxcclusters.CreatePXCClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "second-pxc-test", - Params: &pxcclusters.CreatePXCClusterParamsBodyParams{ - ClusterSize: 1, - Proxysql: &pxcclusters.CreatePXCClusterParamsBodyParamsProxysql{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsProxysqlComputeResources{ - CPUm: 500, - MemoryBytes: "1000000000", - }, - DiskSize: "1000000000", - }, - PXC: &pxcclusters.CreatePXCClusterParamsBodyParamsPXC{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsPXCComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - DiskSize: "1000000000", - }, - }, - }, - } - _, err = dbaasClient.Default.PXCClusters.CreatePXCCluster(¶msSecondPXC) - assert.NoError(t, err) - - listPXCClustersParamsParam := dbclusters.ListDBClustersParams{ - Context: pmmapitests.Context, - Body: dbclusters.ListDBClustersBody{ - KubernetesClusterName: kubernetesClusterName, - }, - } - pxcClusters, err := dbaasClient.Default.DBClusters.ListDBClusters(&listPXCClustersParamsParam) - assert.NoError(t, err) - - for _, name := range []string{"first-pxc-test", "second-pxc-test"} { - foundPXC := false - for _, pxc := range pxcClusters.Payload.PXCClusters { - if name == pxc.Name { - foundPXC = true - - break - } - } - assert.True(t, foundPXC, "Cannot find PXC with name %s in cluster list", name) - } - - getPXCClusterParamsParam := pxcclusters.GetPXCClusterCredentialsParams{ - Context: pmmapitests.Context, - Body: pxcclusters.GetPXCClusterCredentialsBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "first-pxc-test", - }, - } - pxcCluster, err := dbaasClient.Default.PXCClusters.GetPXCClusterCredentials(&getPXCClusterParamsParam) - assert.NoError(t, err) - assert.Equal(t, pxcCluster.Payload.ConnectionCredentials.Username, "root") - assert.Equal(t, pxcCluster.Payload.ConnectionCredentials.Host, "first-pxc-test-haproxy") - assert.Equal(t, pxcCluster.Payload.ConnectionCredentials.Port, int32(3306)) - assert.NotEmpty(t, pxcCluster.Payload.ConnectionCredentials.Password) - - paramsUpdatePXC := pxcclusters.UpdatePXCClusterParams{ - Context: pmmapitests.Context, - Body: pxcclusters.UpdatePXCClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "second-pxc-test", - Params: &pxcclusters.UpdatePXCClusterParamsBodyParams{ - ClusterSize: 2, - Proxysql: &pxcclusters.UpdatePXCClusterParamsBodyParamsProxysql{ - ComputeResources: &pxcclusters.UpdatePXCClusterParamsBodyParamsProxysqlComputeResources{ - CPUm: 2, - MemoryBytes: "128", - }, - }, - PXC: &pxcclusters.UpdatePXCClusterParamsBodyParamsPXC{ - ComputeResources: &pxcclusters.UpdatePXCClusterParamsBodyParamsPXCComputeResources{ - CPUm: 2, - MemoryBytes: "128", - }, - }, - }, - }, - } - - _, err = dbaasClient.Default.PXCClusters.UpdatePXCCluster(¶msUpdatePXC) - pmmapitests.AssertAPIErrorf(t, err, 500, codes.Internal, `state is Error: PXC cluster is not ready`) - - for _, pxc := range pxcClusters.Payload.PXCClusters { - if pxc.Name == "" { - continue - } - deletePXCClusterParamsParam := dbclusters.DeleteDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.DeleteDBClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: pxc.Name, - }, - } - _, err := dbaasClient.Default.DBClusters.DeleteDBCluster(&deletePXCClusterParamsParam) - assert.NoError(t, err) - } - - t.Skip("Skip restart till better implementation. https://jira.percona.com/browse/PMM-6980") - restartPXCClusterParamsParam := dbclusters.RestartDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.RestartDBClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "first-pxc-test", - }, - } - _, err = dbaasClient.Default.DBClusters.RestartDBCluster(&restartPXCClusterParamsParam) - assert.NoError(t, err) - }) - - t.Run("CreatePXCClusterEmptyName", func(t *testing.T) { - paramsPXCEmptyName := pxcclusters.CreatePXCClusterParams{ - Context: pmmapitests.Context, - Body: pxcclusters.CreatePXCClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "", - Params: &pxcclusters.CreatePXCClusterParamsBodyParams{ - ClusterSize: 1, - Proxysql: &pxcclusters.CreatePXCClusterParamsBodyParamsProxysql{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsProxysqlComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - }, - PXC: &pxcclusters.CreatePXCClusterParamsBodyParamsPXC{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsPXCComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - }, - }, - }, - } - _, err := dbaasClient.Default.PXCClusters.CreatePXCCluster(¶msPXCEmptyName) - pmmapitests.AssertAPIErrorf(t, err, 400, - codes.InvalidArgument, `invalid field Name: value '' must be a string conforming to regex "^[a-z]([-a-z0-9]*[a-z0-9])?$"`) - }) - - t.Run("CreatePXCClusterInvalidName", func(t *testing.T) { - paramsPXCInvalidName := pxcclusters.CreatePXCClusterParams{ - Context: pmmapitests.Context, - Body: pxcclusters.CreatePXCClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "123_asd", - Params: &pxcclusters.CreatePXCClusterParamsBodyParams{ - ClusterSize: 1, - Proxysql: &pxcclusters.CreatePXCClusterParamsBodyParamsProxysql{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsProxysqlComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - }, - PXC: &pxcclusters.CreatePXCClusterParamsBodyParamsPXC{ - ComputeResources: &pxcclusters.CreatePXCClusterParamsBodyParamsPXCComputeResources{ - CPUm: 1, - MemoryBytes: "64", - }, - }, - }, - }, - } - _, err := dbaasClient.Default.PXCClusters.CreatePXCCluster(¶msPXCInvalidName) - pmmapitests.AssertAPIErrorf(t, err, 400, - codes.InvalidArgument, `invalid field Name: value '123_asd' must be a string conforming to regex "^[a-z]([-a-z0-9]*[a-z0-9])?$"`) - }) - - t.Run("ListUnknownCluster", func(t *testing.T) { - listPXCClustersParamsParam := dbclusters.ListDBClustersParams{ - Context: pmmapitests.Context, - Body: dbclusters.ListDBClustersBody{ - KubernetesClusterName: "Unknown-kubernetes-cluster-name", - }, - } - _, err := dbaasClient.Default.DBClusters.ListDBClusters(&listPXCClustersParamsParam) - pmmapitests.AssertAPIErrorf(t, err, 404, - codes.NotFound, `Kubernetes Cluster with name "Unknown-kubernetes-cluster-name" not found.`) - }) - - t.Run("RestartUnknownPXCCluster", func(t *testing.T) { - restartPXCClusterParamsParam := dbclusters.RestartDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.RestartDBClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "Unknown-pxc-name", - }, - } - _, err := dbaasClient.Default.DBClusters.RestartDBCluster(&restartPXCClusterParamsParam) - require.Error(t, err) - assert.Equal(t, 500, err.(pmmapitests.ErrorResponse).Code()) //nolint:errorlint - }) - - t.Run("DeleteUnknownPXCCluster", func(t *testing.T) { - deletePXCClusterParamsParam := dbclusters.DeleteDBClusterParams{ - Context: pmmapitests.Context, - Body: dbclusters.DeleteDBClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "Unknown-pxc-name", - }, - } - _, err := dbaasClient.Default.DBClusters.DeleteDBCluster(&deletePXCClusterParamsParam) - require.Error(t, err) - assert.Equal(t, 500, err.(pmmapitests.ErrorResponse).Code()) //nolint:errorlint - }) - - t.Run("SuspendResumeCluster", func(t *testing.T) { - paramsUpdatePXC := pxcclusters.UpdatePXCClusterParams{ - Context: pmmapitests.Context, - Body: pxcclusters.UpdatePXCClusterBody{ - KubernetesClusterName: kubernetesClusterName, - Name: "second-pxc-test", - Params: &pxcclusters.UpdatePXCClusterParamsBodyParams{ - Suspend: true, - Resume: true, - }, - }, - } - _, err := dbaasClient.Default.PXCClusters.UpdatePXCCluster(¶msUpdatePXC) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, `resume and suspend cannot be set together`) - }) - - t.Run("GetPXCClusterResources", func(t *testing.T) { - paramsPXCClusterResources := pxcclusters.GetPXCClusterResourcesParams{ - Context: pmmapitests.Context, - Body: pxcclusters.GetPXCClusterResourcesBody{ - Params: &pxcclusters.GetPXCClusterResourcesParamsBodyParams{ - ClusterSize: 1, - Proxysql: &pxcclusters.GetPXCClusterResourcesParamsBodyParamsProxysql{ - ComputeResources: &pxcclusters.GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources{ - CPUm: 1000, - MemoryBytes: "1000000000", - }, - }, - PXC: &pxcclusters.GetPXCClusterResourcesParamsBodyParamsPXC{ - ComputeResources: &pxcclusters.GetPXCClusterResourcesParamsBodyParamsPXCComputeResources{ - CPUm: 1000, - MemoryBytes: "1000000000", - }, - }, - }, - }, - } - resources, err := dbaasClient.Default.PXCClusters.GetPXCClusterResources(¶msPXCClusterResources) - assert.NoError(t, err) - assert.Equal(t, resources.Payload.Expected.MemoryBytes, 2000000000) - assert.Equal(t, resources.Payload.Expected.CPUm, 2000) - assert.Equal(t, resources.Payload.Expected.DiskSize, 2000000000) - }) -} diff --git a/api/managementpb/dbaas/components.pb.go b/api/managementpb/dbaas/components.pb.go deleted file mode 100644 index cbdfd6c57d..0000000000 --- a/api/managementpb/dbaas/components.pb.go +++ /dev/null @@ -1,1775 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/components.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// Component contains information about component. -type Component struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ImagePath string `protobuf:"bytes,1,opt,name=image_path,json=imagePath,proto3" json:"image_path,omitempty"` - ImageHash string `protobuf:"bytes,2,opt,name=image_hash,json=imageHash,proto3" json:"image_hash,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` - Critical bool `protobuf:"varint,4,opt,name=critical,proto3" json:"critical,omitempty"` - Default bool `protobuf:"varint,5,opt,name=default,proto3" json:"default,omitempty"` - Disabled bool `protobuf:"varint,6,opt,name=disabled,proto3" json:"disabled,omitempty"` -} - -func (x *Component) Reset() { - *x = Component{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Component) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Component) ProtoMessage() {} - -func (x *Component) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 Component.ProtoReflect.Descriptor instead. -func (*Component) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{0} -} - -func (x *Component) GetImagePath() string { - if x != nil { - return x.ImagePath - } - return "" -} - -func (x *Component) GetImageHash() string { - if x != nil { - return x.ImageHash - } - return "" -} - -func (x *Component) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *Component) GetCritical() bool { - if x != nil { - return x.Critical - } - return false -} - -func (x *Component) GetDefault() bool { - if x != nil { - return x.Default - } - return false -} - -func (x *Component) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -// Matrix contains all available components. -type Matrix struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mongod map[string]*Component `protobuf:"bytes,1,rep,name=mongod,proto3" json:"mongod,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Pxc map[string]*Component `protobuf:"bytes,2,rep,name=pxc,proto3" json:"pxc,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Pmm map[string]*Component `protobuf:"bytes,3,rep,name=pmm,proto3" json:"pmm,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Proxysql map[string]*Component `protobuf:"bytes,4,rep,name=proxysql,proto3" json:"proxysql,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Haproxy map[string]*Component `protobuf:"bytes,5,rep,name=haproxy,proto3" json:"haproxy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Backup map[string]*Component `protobuf:"bytes,6,rep,name=backup,proto3" json:"backup,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Operator map[string]*Component `protobuf:"bytes,7,rep,name=operator,proto3" json:"operator,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - LogCollector map[string]*Component `protobuf:"bytes,8,rep,name=log_collector,json=logCollector,proto3" json:"log_collector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Matrix) Reset() { - *x = Matrix{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Matrix) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Matrix) ProtoMessage() {} - -func (x *Matrix) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 Matrix.ProtoReflect.Descriptor instead. -func (*Matrix) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{1} -} - -func (x *Matrix) GetMongod() map[string]*Component { - if x != nil { - return x.Mongod - } - return nil -} - -func (x *Matrix) GetPxc() map[string]*Component { - if x != nil { - return x.Pxc - } - return nil -} - -func (x *Matrix) GetPmm() map[string]*Component { - if x != nil { - return x.Pmm - } - return nil -} - -func (x *Matrix) GetProxysql() map[string]*Component { - if x != nil { - return x.Proxysql - } - return nil -} - -func (x *Matrix) GetHaproxy() map[string]*Component { - if x != nil { - return x.Haproxy - } - return nil -} - -func (x *Matrix) GetBackup() map[string]*Component { - if x != nil { - return x.Backup - } - return nil -} - -func (x *Matrix) GetOperator() map[string]*Component { - if x != nil { - return x.Operator - } - return nil -} - -func (x *Matrix) GetLogCollector() map[string]*Component { - if x != nil { - return x.LogCollector - } - return nil -} - -// OperatorVersion contains information about operator and components matrix. -type OperatorVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Product string `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` - Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3" json:"matrix,omitempty"` -} - -func (x *OperatorVersion) Reset() { - *x = OperatorVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OperatorVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OperatorVersion) ProtoMessage() {} - -func (x *OperatorVersion) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 OperatorVersion.ProtoReflect.Descriptor instead. -func (*OperatorVersion) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{2} -} - -func (x *OperatorVersion) GetProduct() string { - if x != nil { - return x.Product - } - return "" -} - -func (x *OperatorVersion) GetOperator() string { - if x != nil { - return x.Operator - } - return "" -} - -func (x *OperatorVersion) GetMatrix() *Matrix { - if x != nil { - return x.Matrix - } - return nil -} - -type GetPSMDBComponentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // Version of DB. - DbVersion string `protobuf:"bytes,2,opt,name=db_version,json=dbVersion,proto3" json:"db_version,omitempty"` -} - -func (x *GetPSMDBComponentsRequest) Reset() { - *x = GetPSMDBComponentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBComponentsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBComponentsRequest) ProtoMessage() {} - -func (x *GetPSMDBComponentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 GetPSMDBComponentsRequest.ProtoReflect.Descriptor instead. -func (*GetPSMDBComponentsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{3} -} - -func (x *GetPSMDBComponentsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *GetPSMDBComponentsRequest) GetDbVersion() string { - if x != nil { - return x.DbVersion - } - return "" -} - -type GetPSMDBComponentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Versions []*OperatorVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` -} - -func (x *GetPSMDBComponentsResponse) Reset() { - *x = GetPSMDBComponentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBComponentsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBComponentsResponse) ProtoMessage() {} - -func (x *GetPSMDBComponentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 GetPSMDBComponentsResponse.ProtoReflect.Descriptor instead. -func (*GetPSMDBComponentsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{4} -} - -func (x *GetPSMDBComponentsResponse) GetVersions() []*OperatorVersion { - if x != nil { - return x.Versions - } - return nil -} - -type GetPXCComponentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // Version of DB. - DbVersion string `protobuf:"bytes,2,opt,name=db_version,json=dbVersion,proto3" json:"db_version,omitempty"` -} - -func (x *GetPXCComponentsRequest) Reset() { - *x = GetPXCComponentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPXCComponentsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPXCComponentsRequest) ProtoMessage() {} - -func (x *GetPXCComponentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 GetPXCComponentsRequest.ProtoReflect.Descriptor instead. -func (*GetPXCComponentsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{5} -} - -func (x *GetPXCComponentsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *GetPXCComponentsRequest) GetDbVersion() string { - if x != nil { - return x.DbVersion - } - return "" -} - -type GetPXCComponentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Versions []*OperatorVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` -} - -func (x *GetPXCComponentsResponse) Reset() { - *x = GetPXCComponentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPXCComponentsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPXCComponentsResponse) ProtoMessage() {} - -func (x *GetPXCComponentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 GetPXCComponentsResponse.ProtoReflect.Descriptor instead. -func (*GetPXCComponentsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{6} -} - -func (x *GetPXCComponentsResponse) GetVersions() []*OperatorVersion { - if x != nil { - return x.Versions - } - return nil -} - -// ChangeComponent contains fields to manage components. -type ChangeComponent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DefaultVersion string `protobuf:"bytes,1,opt,name=default_version,json=defaultVersion,proto3" json:"default_version,omitempty"` - Versions []*ChangeComponent_ComponentVersion `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"` -} - -func (x *ChangeComponent) Reset() { - *x = ChangeComponent{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeComponent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeComponent) ProtoMessage() {} - -func (x *ChangeComponent) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ChangeComponent.ProtoReflect.Descriptor instead. -func (*ChangeComponent) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{7} -} - -func (x *ChangeComponent) GetDefaultVersion() string { - if x != nil { - return x.DefaultVersion - } - return "" -} - -func (x *ChangeComponent) GetVersions() []*ChangeComponent_ComponentVersion { - if x != nil { - return x.Versions - } - return nil -} - -type ChangePSMDBComponentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - Mongod *ChangeComponent `protobuf:"bytes,2,opt,name=mongod,proto3" json:"mongod,omitempty"` -} - -func (x *ChangePSMDBComponentsRequest) Reset() { - *x = ChangePSMDBComponentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangePSMDBComponentsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangePSMDBComponentsRequest) ProtoMessage() {} - -func (x *ChangePSMDBComponentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ChangePSMDBComponentsRequest.ProtoReflect.Descriptor instead. -func (*ChangePSMDBComponentsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{8} -} - -func (x *ChangePSMDBComponentsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *ChangePSMDBComponentsRequest) GetMongod() *ChangeComponent { - if x != nil { - return x.Mongod - } - return nil -} - -type ChangePSMDBComponentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ChangePSMDBComponentsResponse) Reset() { - *x = ChangePSMDBComponentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangePSMDBComponentsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangePSMDBComponentsResponse) ProtoMessage() {} - -func (x *ChangePSMDBComponentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ChangePSMDBComponentsResponse.ProtoReflect.Descriptor instead. -func (*ChangePSMDBComponentsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{9} -} - -type ChangePXCComponentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - Pxc *ChangeComponent `protobuf:"bytes,2,opt,name=pxc,proto3" json:"pxc,omitempty"` - Proxysql *ChangeComponent `protobuf:"bytes,3,opt,name=proxysql,proto3" json:"proxysql,omitempty"` - Haproxy *ChangeComponent `protobuf:"bytes,4,opt,name=haproxy,proto3" json:"haproxy,omitempty"` -} - -func (x *ChangePXCComponentsRequest) Reset() { - *x = ChangePXCComponentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangePXCComponentsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangePXCComponentsRequest) ProtoMessage() {} - -func (x *ChangePXCComponentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ChangePXCComponentsRequest.ProtoReflect.Descriptor instead. -func (*ChangePXCComponentsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{10} -} - -func (x *ChangePXCComponentsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *ChangePXCComponentsRequest) GetPxc() *ChangeComponent { - if x != nil { - return x.Pxc - } - return nil -} - -func (x *ChangePXCComponentsRequest) GetProxysql() *ChangeComponent { - if x != nil { - return x.Proxysql - } - return nil -} - -func (x *ChangePXCComponentsRequest) GetHaproxy() *ChangeComponent { - if x != nil { - return x.Haproxy - } - return nil -} - -type ChangePXCComponentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ChangePXCComponentsResponse) Reset() { - *x = ChangePXCComponentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangePXCComponentsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangePXCComponentsResponse) ProtoMessage() {} - -func (x *ChangePXCComponentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ChangePXCComponentsResponse.ProtoReflect.Descriptor instead. -func (*ChangePXCComponentsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{11} -} - -type InstallOperatorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // operator_type tells what operator we are interested in updating. - OperatorType string `protobuf:"bytes,2,opt,name=operator_type,json=operatorType,proto3" json:"operator_type,omitempty"` - // version tells what version of the operator we should update to. - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *InstallOperatorRequest) Reset() { - *x = InstallOperatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InstallOperatorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstallOperatorRequest) ProtoMessage() {} - -func (x *InstallOperatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 InstallOperatorRequest.ProtoReflect.Descriptor instead. -func (*InstallOperatorRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{12} -} - -func (x *InstallOperatorRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *InstallOperatorRequest) GetOperatorType() string { - if x != nil { - return x.OperatorType - } - return "" -} - -func (x *InstallOperatorRequest) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -type InstallOperatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status tells if installation was successfull. - Status OperatorsStatus `protobuf:"varint,1,opt,name=status,proto3,enum=dbaas.v1beta1.OperatorsStatus" json:"status,omitempty"` -} - -func (x *InstallOperatorResponse) Reset() { - *x = InstallOperatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InstallOperatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InstallOperatorResponse) ProtoMessage() {} - -func (x *InstallOperatorResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 InstallOperatorResponse.ProtoReflect.Descriptor instead. -func (*InstallOperatorResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{13} -} - -func (x *InstallOperatorResponse) GetStatus() OperatorsStatus { - if x != nil { - return x.Status - } - return OperatorsStatus_OPERATORS_STATUS_INVALID -} - -type CheckForOperatorUpdateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CheckForOperatorUpdateRequest) Reset() { - *x = CheckForOperatorUpdateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckForOperatorUpdateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckForOperatorUpdateRequest) ProtoMessage() {} - -func (x *CheckForOperatorUpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 CheckForOperatorUpdateRequest.ProtoReflect.Descriptor instead. -func (*CheckForOperatorUpdateRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{14} -} - -// ComponentUpdateInformation contains version we can update to for certain component. -type ComponentUpdateInformation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AvailableVersion string `protobuf:"bytes,1,opt,name=available_version,json=availableVersion,proto3" json:"available_version,omitempty"` -} - -func (x *ComponentUpdateInformation) Reset() { - *x = ComponentUpdateInformation{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComponentUpdateInformation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComponentUpdateInformation) ProtoMessage() {} - -func (x *ComponentUpdateInformation) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ComponentUpdateInformation.ProtoReflect.Descriptor instead. -func (*ComponentUpdateInformation) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{15} -} - -func (x *ComponentUpdateInformation) GetAvailableVersion() string { - if x != nil { - return x.AvailableVersion - } - return "" -} - -// ComponentsUpdateInformation contains info about components and their available latest versions. -type ComponentsUpdateInformation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // component_to_update_information stores, under the name of the component, information about the update. - // "pxc-operator", "psmdb-operator" are names used by backend for our operators. - ComponentToUpdateInformation map[string]*ComponentUpdateInformation `protobuf:"bytes,1,rep,name=component_to_update_information,json=componentToUpdateInformation,proto3" json:"component_to_update_information,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ComponentsUpdateInformation) Reset() { - *x = ComponentsUpdateInformation{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComponentsUpdateInformation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComponentsUpdateInformation) ProtoMessage() {} - -func (x *ComponentsUpdateInformation) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 ComponentsUpdateInformation.ProtoReflect.Descriptor instead. -func (*ComponentsUpdateInformation) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{16} -} - -func (x *ComponentsUpdateInformation) GetComponentToUpdateInformation() map[string]*ComponentUpdateInformation { - if x != nil { - return x.ComponentToUpdateInformation - } - return nil -} - -type CheckForOperatorUpdateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The cluster name is used as a key for this map, value contains components and their inforamtion about update. - ClusterToComponents map[string]*ComponentsUpdateInformation `protobuf:"bytes,1,rep,name=cluster_to_components,json=clusterToComponents,proto3" json:"cluster_to_components,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *CheckForOperatorUpdateResponse) Reset() { - *x = CheckForOperatorUpdateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckForOperatorUpdateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckForOperatorUpdateResponse) ProtoMessage() {} - -func (x *CheckForOperatorUpdateResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_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 CheckForOperatorUpdateResponse.ProtoReflect.Descriptor instead. -func (*CheckForOperatorUpdateResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{17} -} - -func (x *CheckForOperatorUpdateResponse) GetClusterToComponents() map[string]*ComponentsUpdateInformation { - if x != nil { - return x.ClusterToComponents - } - return nil -} - -// ComponentVersion contains operations which should be done with component version. -type ChangeComponent_ComponentVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Disable bool `protobuf:"varint,2,opt,name=disable,proto3" json:"disable,omitempty"` - Enable bool `protobuf:"varint,3,opt,name=enable,proto3" json:"enable,omitempty"` -} - -func (x *ChangeComponent_ComponentVersion) Reset() { - *x = ChangeComponent_ComponentVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangeComponent_ComponentVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeComponent_ComponentVersion) ProtoMessage() {} - -func (x *ChangeComponent_ComponentVersion) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_proto_msgTypes[26] - 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 ChangeComponent_ComponentVersion.ProtoReflect.Descriptor instead. -func (*ChangeComponent_ComponentVersion) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *ChangeComponent_ComponentVersion) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *ChangeComponent_ComponentVersion) GetDisable() bool { - if x != nil { - return x.Disable - } - return false -} - -func (x *ChangeComponent_ComponentVersion) GetEnable() bool { - if x != nil { - return x.Enable - } - return false -} - -var File_managementpb_dbaas_components_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_components_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 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, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x01, 0x0a, 0x09, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 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, - 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x22, 0x9d, 0x09, 0x0a, 0x06, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x39, 0x0a, 0x06, - 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, - 0x72, 0x69, 0x78, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x12, 0x30, 0x0a, 0x03, 0x70, 0x78, 0x63, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2e, 0x50, 0x78, 0x63, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x70, 0x78, 0x63, 0x12, 0x30, 0x0a, 0x03, 0x70, 0x6d, 0x6d, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2e, 0x50, 0x6d, - 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x70, 0x6d, 0x6d, 0x12, 0x3f, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x3c, 0x0a, 0x07, - 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x2e, 0x48, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x62, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, - 0x78, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x53, 0x0a, 0x0b, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x50, 0x0a, 0x08, 0x50, 0x78, 0x63, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x50, 0x0a, 0x08, 0x50, - 0x6d, 0x6d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, - 0x0d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x54, 0x0a, 0x0c, 0x48, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x53, 0x0a, 0x0b, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x55, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x59, 0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x76, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x06, 0x6d, 0x61, - 0x74, 0x72, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x72, 0x69, - 0x78, 0x52, 0x06, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x22, 0x72, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x64, 0x62, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x64, 0x62, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x70, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x58, - 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x62, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x64, 0x62, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b, - 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x67, 0x0a, 0x10, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x21, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x1c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, - 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x22, 0x1f, - 0x0a, 0x1d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x85, 0x02, 0x0a, 0x1a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, - 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x30, 0x0a, 0x03, 0x70, 0x78, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x03, 0x70, 0x78, - 0x63, 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x38, 0x0a, - 0x07, 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x07, - 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x21, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x17, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, - 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0xaf, 0x02, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x93, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1c, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x7a, 0x0a, 0x21, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0x90, 0x02, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, - 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x1a, 0x72, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xf2, 0x07, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x53, - 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, - 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x47, - 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x12, 0x96, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, - 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, - 0x12, 0xaa, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, - 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, - 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x12, 0xa2, 0x01, - 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x01, 0x2a, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, - 0x58, 0x43, 0x12, 0x9c, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, - 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0xb8, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0xb5, 0x01, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x42, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, 0x61, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_components_proto_rawDescOnce sync.Once - file_managementpb_dbaas_components_proto_rawDescData = file_managementpb_dbaas_components_proto_rawDesc -) - -func file_managementpb_dbaas_components_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_components_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_components_proto_rawDescData) - }) - return file_managementpb_dbaas_components_proto_rawDescData -} - -var ( - file_managementpb_dbaas_components_proto_msgTypes = make([]protoimpl.MessageInfo, 29) - file_managementpb_dbaas_components_proto_goTypes = []interface{}{ - (*Component)(nil), // 0: dbaas.v1beta1.Component - (*Matrix)(nil), // 1: dbaas.v1beta1.Matrix - (*OperatorVersion)(nil), // 2: dbaas.v1beta1.OperatorVersion - (*GetPSMDBComponentsRequest)(nil), // 3: dbaas.v1beta1.GetPSMDBComponentsRequest - (*GetPSMDBComponentsResponse)(nil), // 4: dbaas.v1beta1.GetPSMDBComponentsResponse - (*GetPXCComponentsRequest)(nil), // 5: dbaas.v1beta1.GetPXCComponentsRequest - (*GetPXCComponentsResponse)(nil), // 6: dbaas.v1beta1.GetPXCComponentsResponse - (*ChangeComponent)(nil), // 7: dbaas.v1beta1.ChangeComponent - (*ChangePSMDBComponentsRequest)(nil), // 8: dbaas.v1beta1.ChangePSMDBComponentsRequest - (*ChangePSMDBComponentsResponse)(nil), // 9: dbaas.v1beta1.ChangePSMDBComponentsResponse - (*ChangePXCComponentsRequest)(nil), // 10: dbaas.v1beta1.ChangePXCComponentsRequest - (*ChangePXCComponentsResponse)(nil), // 11: dbaas.v1beta1.ChangePXCComponentsResponse - (*InstallOperatorRequest)(nil), // 12: dbaas.v1beta1.InstallOperatorRequest - (*InstallOperatorResponse)(nil), // 13: dbaas.v1beta1.InstallOperatorResponse - (*CheckForOperatorUpdateRequest)(nil), // 14: dbaas.v1beta1.CheckForOperatorUpdateRequest - (*ComponentUpdateInformation)(nil), // 15: dbaas.v1beta1.ComponentUpdateInformation - (*ComponentsUpdateInformation)(nil), // 16: dbaas.v1beta1.ComponentsUpdateInformation - (*CheckForOperatorUpdateResponse)(nil), // 17: dbaas.v1beta1.CheckForOperatorUpdateResponse - nil, // 18: dbaas.v1beta1.Matrix.MongodEntry - nil, // 19: dbaas.v1beta1.Matrix.PxcEntry - nil, // 20: dbaas.v1beta1.Matrix.PmmEntry - nil, // 21: dbaas.v1beta1.Matrix.ProxysqlEntry - nil, // 22: dbaas.v1beta1.Matrix.HaproxyEntry - nil, // 23: dbaas.v1beta1.Matrix.BackupEntry - nil, // 24: dbaas.v1beta1.Matrix.OperatorEntry - nil, // 25: dbaas.v1beta1.Matrix.LogCollectorEntry - (*ChangeComponent_ComponentVersion)(nil), // 26: dbaas.v1beta1.ChangeComponent.ComponentVersion - nil, // 27: dbaas.v1beta1.ComponentsUpdateInformation.ComponentToUpdateInformationEntry - nil, // 28: dbaas.v1beta1.CheckForOperatorUpdateResponse.ClusterToComponentsEntry - (OperatorsStatus)(0), // 29: dbaas.v1beta1.OperatorsStatus - } -) - -var file_managementpb_dbaas_components_proto_depIdxs = []int32{ - 18, // 0: dbaas.v1beta1.Matrix.mongod:type_name -> dbaas.v1beta1.Matrix.MongodEntry - 19, // 1: dbaas.v1beta1.Matrix.pxc:type_name -> dbaas.v1beta1.Matrix.PxcEntry - 20, // 2: dbaas.v1beta1.Matrix.pmm:type_name -> dbaas.v1beta1.Matrix.PmmEntry - 21, // 3: dbaas.v1beta1.Matrix.proxysql:type_name -> dbaas.v1beta1.Matrix.ProxysqlEntry - 22, // 4: dbaas.v1beta1.Matrix.haproxy:type_name -> dbaas.v1beta1.Matrix.HaproxyEntry - 23, // 5: dbaas.v1beta1.Matrix.backup:type_name -> dbaas.v1beta1.Matrix.BackupEntry - 24, // 6: dbaas.v1beta1.Matrix.operator:type_name -> dbaas.v1beta1.Matrix.OperatorEntry - 25, // 7: dbaas.v1beta1.Matrix.log_collector:type_name -> dbaas.v1beta1.Matrix.LogCollectorEntry - 1, // 8: dbaas.v1beta1.OperatorVersion.matrix:type_name -> dbaas.v1beta1.Matrix - 2, // 9: dbaas.v1beta1.GetPSMDBComponentsResponse.versions:type_name -> dbaas.v1beta1.OperatorVersion - 2, // 10: dbaas.v1beta1.GetPXCComponentsResponse.versions:type_name -> dbaas.v1beta1.OperatorVersion - 26, // 11: dbaas.v1beta1.ChangeComponent.versions:type_name -> dbaas.v1beta1.ChangeComponent.ComponentVersion - 7, // 12: dbaas.v1beta1.ChangePSMDBComponentsRequest.mongod:type_name -> dbaas.v1beta1.ChangeComponent - 7, // 13: dbaas.v1beta1.ChangePXCComponentsRequest.pxc:type_name -> dbaas.v1beta1.ChangeComponent - 7, // 14: dbaas.v1beta1.ChangePXCComponentsRequest.proxysql:type_name -> dbaas.v1beta1.ChangeComponent - 7, // 15: dbaas.v1beta1.ChangePXCComponentsRequest.haproxy:type_name -> dbaas.v1beta1.ChangeComponent - 29, // 16: dbaas.v1beta1.InstallOperatorResponse.status:type_name -> dbaas.v1beta1.OperatorsStatus - 27, // 17: dbaas.v1beta1.ComponentsUpdateInformation.component_to_update_information:type_name -> dbaas.v1beta1.ComponentsUpdateInformation.ComponentToUpdateInformationEntry - 28, // 18: dbaas.v1beta1.CheckForOperatorUpdateResponse.cluster_to_components:type_name -> dbaas.v1beta1.CheckForOperatorUpdateResponse.ClusterToComponentsEntry - 0, // 19: dbaas.v1beta1.Matrix.MongodEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 20: dbaas.v1beta1.Matrix.PxcEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 21: dbaas.v1beta1.Matrix.PmmEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 22: dbaas.v1beta1.Matrix.ProxysqlEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 23: dbaas.v1beta1.Matrix.HaproxyEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 24: dbaas.v1beta1.Matrix.BackupEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 25: dbaas.v1beta1.Matrix.OperatorEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 26: dbaas.v1beta1.Matrix.LogCollectorEntry.value:type_name -> dbaas.v1beta1.Component - 15, // 27: dbaas.v1beta1.ComponentsUpdateInformation.ComponentToUpdateInformationEntry.value:type_name -> dbaas.v1beta1.ComponentUpdateInformation - 16, // 28: dbaas.v1beta1.CheckForOperatorUpdateResponse.ClusterToComponentsEntry.value:type_name -> dbaas.v1beta1.ComponentsUpdateInformation - 3, // 29: dbaas.v1beta1.Components.GetPSMDBComponents:input_type -> dbaas.v1beta1.GetPSMDBComponentsRequest - 5, // 30: dbaas.v1beta1.Components.GetPXCComponents:input_type -> dbaas.v1beta1.GetPXCComponentsRequest - 8, // 31: dbaas.v1beta1.Components.ChangePSMDBComponents:input_type -> dbaas.v1beta1.ChangePSMDBComponentsRequest - 10, // 32: dbaas.v1beta1.Components.ChangePXCComponents:input_type -> dbaas.v1beta1.ChangePXCComponentsRequest - 12, // 33: dbaas.v1beta1.Components.InstallOperator:input_type -> dbaas.v1beta1.InstallOperatorRequest - 14, // 34: dbaas.v1beta1.Components.CheckForOperatorUpdate:input_type -> dbaas.v1beta1.CheckForOperatorUpdateRequest - 4, // 35: dbaas.v1beta1.Components.GetPSMDBComponents:output_type -> dbaas.v1beta1.GetPSMDBComponentsResponse - 6, // 36: dbaas.v1beta1.Components.GetPXCComponents:output_type -> dbaas.v1beta1.GetPXCComponentsResponse - 9, // 37: dbaas.v1beta1.Components.ChangePSMDBComponents:output_type -> dbaas.v1beta1.ChangePSMDBComponentsResponse - 11, // 38: dbaas.v1beta1.Components.ChangePXCComponents:output_type -> dbaas.v1beta1.ChangePXCComponentsResponse - 13, // 39: dbaas.v1beta1.Components.InstallOperator:output_type -> dbaas.v1beta1.InstallOperatorResponse - 17, // 40: dbaas.v1beta1.Components.CheckForOperatorUpdate:output_type -> dbaas.v1beta1.CheckForOperatorUpdateResponse - 35, // [35:41] is the sub-list for method output_type - 29, // [29:35] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name -} - -func init() { file_managementpb_dbaas_components_proto_init() } -func file_managementpb_dbaas_components_proto_init() { - if File_managementpb_dbaas_components_proto != nil { - return - } - file_managementpb_dbaas_dbaas_proto_init() - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Component); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Matrix); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OperatorVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBComponentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBComponentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPXCComponentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPXCComponentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeComponent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePSMDBComponentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePSMDBComponentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePXCComponentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangePXCComponentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstallOperatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstallOperatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckForOperatorUpdateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComponentUpdateInformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComponentsUpdateInformation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckForOperatorUpdateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_components_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeComponent_ComponentVersion); 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_managementpb_dbaas_components_proto_rawDesc, - NumEnums: 0, - NumMessages: 29, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_components_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_components_proto_depIdxs, - MessageInfos: file_managementpb_dbaas_components_proto_msgTypes, - }.Build() - File_managementpb_dbaas_components_proto = out.File - file_managementpb_dbaas_components_proto_rawDesc = nil - file_managementpb_dbaas_components_proto_goTypes = nil - file_managementpb_dbaas_components_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/components.pb.gw.go b/api/managementpb/dbaas/components.pb.gw.go deleted file mode 100644 index 84abfde921..0000000000 --- a/api/managementpb/dbaas/components.pb.gw.go +++ /dev/null @@ -1,572 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/components.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_Components_GetPSMDBComponents_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPSMDBComponentsRequest - 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.GetPSMDBComponents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Components_GetPSMDBComponents_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPSMDBComponentsRequest - 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.GetPSMDBComponents(ctx, &protoReq) - return msg, metadata, err -} - -func request_Components_GetPXCComponents_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPXCComponentsRequest - 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.GetPXCComponents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Components_GetPXCComponents_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPXCComponentsRequest - 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.GetPXCComponents(ctx, &protoReq) - return msg, metadata, err -} - -func request_Components_ChangePSMDBComponents_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePSMDBComponentsRequest - 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.ChangePSMDBComponents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Components_ChangePSMDBComponents_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePSMDBComponentsRequest - 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.ChangePSMDBComponents(ctx, &protoReq) - return msg, metadata, err -} - -func request_Components_ChangePXCComponents_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePXCComponentsRequest - 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.ChangePXCComponents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Components_ChangePXCComponents_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePXCComponentsRequest - 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.ChangePXCComponents(ctx, &protoReq) - return msg, metadata, err -} - -func request_Components_InstallOperator_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq InstallOperatorRequest - 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.InstallOperator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Components_InstallOperator_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq InstallOperatorRequest - 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.InstallOperator(ctx, &protoReq) - return msg, metadata, err -} - -func request_Components_CheckForOperatorUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckForOperatorUpdateRequest - 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.CheckForOperatorUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Components_CheckForOperatorUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckForOperatorUpdateRequest - 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.CheckForOperatorUpdate(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterComponentsHandlerServer registers the http handlers for service Components to "mux". -// UnaryRPC :call ComponentsServer 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 RegisterComponentsHandlerFromEndpoint instead. -func RegisterComponentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ComponentsServer) error { - mux.Handle("POST", pattern_Components_GetPSMDBComponents_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, "/dbaas.v1beta1.Components/GetPSMDBComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/GetPSMDB")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Components_GetPSMDBComponents_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_Components_GetPSMDBComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_GetPXCComponents_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, "/dbaas.v1beta1.Components/GetPXCComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/GetPXC")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Components_GetPXCComponents_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_Components_GetPXCComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_ChangePSMDBComponents_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, "/dbaas.v1beta1.Components/ChangePSMDBComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/ChangePSMDB")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Components_ChangePSMDBComponents_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_Components_ChangePSMDBComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_ChangePXCComponents_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, "/dbaas.v1beta1.Components/ChangePXCComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/ChangePXC")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Components_ChangePXCComponents_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_Components_ChangePXCComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_InstallOperator_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, "/dbaas.v1beta1.Components/InstallOperator", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/InstallOperator")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Components_InstallOperator_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_Components_InstallOperator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_CheckForOperatorUpdate_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, "/dbaas.v1beta1.Components/CheckForOperatorUpdate", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/CheckForOperatorUpdate")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Components_CheckForOperatorUpdate_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_Components_CheckForOperatorUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterComponentsHandlerFromEndpoint is same as RegisterComponentsHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterComponentsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterComponentsHandler(ctx, mux, conn) -} - -// RegisterComponentsHandler registers the http handlers for service Components to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterComponentsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterComponentsHandlerClient(ctx, mux, NewComponentsClient(conn)) -} - -// RegisterComponentsHandlerClient registers the http handlers for service Components -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ComponentsClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ComponentsClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ComponentsClient" to call the correct interceptors. -func RegisterComponentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ComponentsClient) error { - mux.Handle("POST", pattern_Components_GetPSMDBComponents_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, "/dbaas.v1beta1.Components/GetPSMDBComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/GetPSMDB")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Components_GetPSMDBComponents_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Components_GetPSMDBComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_GetPXCComponents_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, "/dbaas.v1beta1.Components/GetPXCComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/GetPXC")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Components_GetPXCComponents_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Components_GetPXCComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_ChangePSMDBComponents_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, "/dbaas.v1beta1.Components/ChangePSMDBComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/ChangePSMDB")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Components_ChangePSMDBComponents_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Components_ChangePSMDBComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_ChangePXCComponents_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, "/dbaas.v1beta1.Components/ChangePXCComponents", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/ChangePXC")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Components_ChangePXCComponents_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Components_ChangePXCComponents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_InstallOperator_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, "/dbaas.v1beta1.Components/InstallOperator", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/InstallOperator")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Components_InstallOperator_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Components_InstallOperator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Components_CheckForOperatorUpdate_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, "/dbaas.v1beta1.Components/CheckForOperatorUpdate", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Components/CheckForOperatorUpdate")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Components_CheckForOperatorUpdate_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Components_CheckForOperatorUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var ( - pattern_Components_GetPSMDBComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "GetPSMDB"}, "")) - - pattern_Components_GetPXCComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "GetPXC"}, "")) - - pattern_Components_ChangePSMDBComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "ChangePSMDB"}, "")) - - pattern_Components_ChangePXCComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "ChangePXC"}, "")) - - pattern_Components_InstallOperator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "InstallOperator"}, "")) - - pattern_Components_CheckForOperatorUpdate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "CheckForOperatorUpdate"}, "")) -) - -var ( - forward_Components_GetPSMDBComponents_0 = runtime.ForwardResponseMessage - - forward_Components_GetPXCComponents_0 = runtime.ForwardResponseMessage - - forward_Components_ChangePSMDBComponents_0 = runtime.ForwardResponseMessage - - forward_Components_ChangePXCComponents_0 = runtime.ForwardResponseMessage - - forward_Components_InstallOperator_0 = runtime.ForwardResponseMessage - - forward_Components_CheckForOperatorUpdate_0 = runtime.ForwardResponseMessage -) diff --git a/api/managementpb/dbaas/components.pb.validate.go b/api/managementpb/dbaas/components.pb.validate.go deleted file mode 100644 index 16788ade93..0000000000 --- a/api/managementpb/dbaas/components.pb.validate.go +++ /dev/null @@ -1,2779 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/components.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Component with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Component) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Component with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ComponentMultiError, or nil -// if none found. -func (m *Component) ValidateAll() error { - return m.validate(true) -} - -func (m *Component) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ImagePath - - // no validation rules for ImageHash - - // no validation rules for Status - - // no validation rules for Critical - - // no validation rules for Default - - // no validation rules for Disabled - - if len(errors) > 0 { - return ComponentMultiError(errors) - } - - return nil -} - -// ComponentMultiError is an error wrapping multiple validation errors returned -// by Component.ValidateAll() if the designated constraints aren't met. -type ComponentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ComponentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ComponentMultiError) AllErrors() []error { return m } - -// ComponentValidationError is the validation error returned by -// Component.Validate if the designated constraints aren't met. -type ComponentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComponentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComponentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComponentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComponentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComponentValidationError) ErrorName() string { return "ComponentValidationError" } - -// Error satisfies the builtin error interface -func (e ComponentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComponent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComponentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComponentValidationError{} - -// Validate checks the field values on Matrix with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Matrix) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Matrix with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in MatrixMultiError, or nil if none found. -func (m *Matrix) ValidateAll() error { - return m.validate(true) -} - -func (m *Matrix) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetMongod())) - i := 0 - for key := range m.GetMongod() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetMongod()[key] - _ = val - - // no validation rules for Mongod[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Mongod[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Mongod[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Mongod[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetPxc())) - i := 0 - for key := range m.GetPxc() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetPxc()[key] - _ = val - - // no validation rules for Pxc[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Pxc[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Pxc[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Pxc[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetPmm())) - i := 0 - for key := range m.GetPmm() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetPmm()[key] - _ = val - - // no validation rules for Pmm[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Pmm[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Pmm[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Pmm[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetProxysql())) - i := 0 - for key := range m.GetProxysql() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetProxysql()[key] - _ = val - - // no validation rules for Proxysql[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Proxysql[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Proxysql[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Proxysql[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetHaproxy())) - i := 0 - for key := range m.GetHaproxy() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetHaproxy()[key] - _ = val - - // no validation rules for Haproxy[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Haproxy[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Haproxy[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Haproxy[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetBackup())) - i := 0 - for key := range m.GetBackup() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetBackup()[key] - _ = val - - // no validation rules for Backup[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Backup[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Backup[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Backup[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetOperator())) - i := 0 - for key := range m.GetOperator() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetOperator()[key] - _ = val - - // no validation rules for Operator[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Operator[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("Operator[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("Operator[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetLogCollector())) - i := 0 - for key := range m.GetLogCollector() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetLogCollector()[key] - _ = val - - // no validation rules for LogCollector[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("LogCollector[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MatrixValidationError{ - field: fmt.Sprintf("LogCollector[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MatrixValidationError{ - field: fmt.Sprintf("LogCollector[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return MatrixMultiError(errors) - } - - return nil -} - -// MatrixMultiError is an error wrapping multiple validation errors returned by -// Matrix.ValidateAll() if the designated constraints aren't met. -type MatrixMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MatrixMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MatrixMultiError) AllErrors() []error { return m } - -// MatrixValidationError is the validation error returned by Matrix.Validate if -// the designated constraints aren't met. -type MatrixValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MatrixValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MatrixValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MatrixValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MatrixValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MatrixValidationError) ErrorName() string { return "MatrixValidationError" } - -// Error satisfies the builtin error interface -func (e MatrixValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMatrix.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MatrixValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MatrixValidationError{} - -// Validate checks the field values on OperatorVersion with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *OperatorVersion) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on OperatorVersion with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// OperatorVersionMultiError, or nil if none found. -func (m *OperatorVersion) ValidateAll() error { - return m.validate(true) -} - -func (m *OperatorVersion) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Product - - // no validation rules for Operator - - if all { - switch v := interface{}(m.GetMatrix()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperatorVersionValidationError{ - field: "Matrix", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperatorVersionValidationError{ - field: "Matrix", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatrix()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperatorVersionValidationError{ - field: "Matrix", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return OperatorVersionMultiError(errors) - } - - return nil -} - -// OperatorVersionMultiError is an error wrapping multiple validation errors -// returned by OperatorVersion.ValidateAll() if the designated constraints -// aren't met. -type OperatorVersionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OperatorVersionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OperatorVersionMultiError) AllErrors() []error { return m } - -// OperatorVersionValidationError is the validation error returned by -// OperatorVersion.Validate if the designated constraints aren't met. -type OperatorVersionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OperatorVersionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OperatorVersionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OperatorVersionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OperatorVersionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OperatorVersionValidationError) ErrorName() string { return "OperatorVersionValidationError" } - -// Error satisfies the builtin error interface -func (e OperatorVersionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOperatorVersion.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OperatorVersionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OperatorVersionValidationError{} - -// Validate checks the field values on GetPSMDBComponentsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPSMDBComponentsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPSMDBComponentsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetPSMDBComponentsRequestMultiError, or nil if none found. -func (m *GetPSMDBComponentsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBComponentsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for KubernetesClusterName - - // no validation rules for DbVersion - - if len(errors) > 0 { - return GetPSMDBComponentsRequestMultiError(errors) - } - - return nil -} - -// GetPSMDBComponentsRequestMultiError is an error wrapping multiple validation -// errors returned by GetPSMDBComponentsRequest.ValidateAll() if the -// designated constraints aren't met. -type GetPSMDBComponentsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBComponentsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBComponentsRequestMultiError) AllErrors() []error { return m } - -// GetPSMDBComponentsRequestValidationError is the validation error returned by -// GetPSMDBComponentsRequest.Validate if the designated constraints aren't met. -type GetPSMDBComponentsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBComponentsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPSMDBComponentsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPSMDBComponentsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPSMDBComponentsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBComponentsRequestValidationError) ErrorName() string { - return "GetPSMDBComponentsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBComponentsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBComponentsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBComponentsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBComponentsRequestValidationError{} - -// Validate checks the field values on GetPSMDBComponentsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPSMDBComponentsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPSMDBComponentsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetPSMDBComponentsResponseMultiError, or nil if none found. -func (m *GetPSMDBComponentsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBComponentsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetVersions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPSMDBComponentsResponseValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPSMDBComponentsResponseValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPSMDBComponentsResponseValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return GetPSMDBComponentsResponseMultiError(errors) - } - - return nil -} - -// GetPSMDBComponentsResponseMultiError is an error wrapping multiple -// validation errors returned by GetPSMDBComponentsResponse.ValidateAll() if -// the designated constraints aren't met. -type GetPSMDBComponentsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBComponentsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBComponentsResponseMultiError) AllErrors() []error { return m } - -// GetPSMDBComponentsResponseValidationError is the validation error returned -// by GetPSMDBComponentsResponse.Validate if the designated constraints aren't met. -type GetPSMDBComponentsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBComponentsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPSMDBComponentsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPSMDBComponentsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPSMDBComponentsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBComponentsResponseValidationError) ErrorName() string { - return "GetPSMDBComponentsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBComponentsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBComponentsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBComponentsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBComponentsResponseValidationError{} - -// Validate checks the field values on GetPXCComponentsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPXCComponentsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPXCComponentsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetPXCComponentsRequestMultiError, or nil if none found. -func (m *GetPXCComponentsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPXCComponentsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for KubernetesClusterName - - // no validation rules for DbVersion - - if len(errors) > 0 { - return GetPXCComponentsRequestMultiError(errors) - } - - return nil -} - -// GetPXCComponentsRequestMultiError is an error wrapping multiple validation -// errors returned by GetPXCComponentsRequest.ValidateAll() if the designated -// constraints aren't met. -type GetPXCComponentsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPXCComponentsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPXCComponentsRequestMultiError) AllErrors() []error { return m } - -// GetPXCComponentsRequestValidationError is the validation error returned by -// GetPXCComponentsRequest.Validate if the designated constraints aren't met. -type GetPXCComponentsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPXCComponentsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPXCComponentsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPXCComponentsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPXCComponentsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPXCComponentsRequestValidationError) ErrorName() string { - return "GetPXCComponentsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPXCComponentsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPXCComponentsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPXCComponentsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPXCComponentsRequestValidationError{} - -// Validate checks the field values on GetPXCComponentsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPXCComponentsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPXCComponentsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetPXCComponentsResponseMultiError, or nil if none found. -func (m *GetPXCComponentsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPXCComponentsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetVersions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPXCComponentsResponseValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPXCComponentsResponseValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPXCComponentsResponseValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return GetPXCComponentsResponseMultiError(errors) - } - - return nil -} - -// GetPXCComponentsResponseMultiError is an error wrapping multiple validation -// errors returned by GetPXCComponentsResponse.ValidateAll() if the designated -// constraints aren't met. -type GetPXCComponentsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPXCComponentsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPXCComponentsResponseMultiError) AllErrors() []error { return m } - -// GetPXCComponentsResponseValidationError is the validation error returned by -// GetPXCComponentsResponse.Validate if the designated constraints aren't met. -type GetPXCComponentsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPXCComponentsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPXCComponentsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPXCComponentsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPXCComponentsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPXCComponentsResponseValidationError) ErrorName() string { - return "GetPXCComponentsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPXCComponentsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPXCComponentsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPXCComponentsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPXCComponentsResponseValidationError{} - -// Validate checks the field values on ChangeComponent with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ChangeComponent) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ChangeComponent with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ChangeComponentMultiError, or nil if none found. -func (m *ChangeComponent) ValidateAll() error { - return m.validate(true) -} - -func (m *ChangeComponent) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for DefaultVersion - - for idx, item := range m.GetVersions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ChangeComponentValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ChangeComponentValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ChangeComponentValidationError{ - field: fmt.Sprintf("Versions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ChangeComponentMultiError(errors) - } - - return nil -} - -// ChangeComponentMultiError is an error wrapping multiple validation errors -// returned by ChangeComponent.ValidateAll() if the designated constraints -// aren't met. -type ChangeComponentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ChangeComponentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ChangeComponentMultiError) AllErrors() []error { return m } - -// ChangeComponentValidationError is the validation error returned by -// ChangeComponent.Validate if the designated constraints aren't met. -type ChangeComponentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ChangeComponentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ChangeComponentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ChangeComponentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ChangeComponentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ChangeComponentValidationError) ErrorName() string { return "ChangeComponentValidationError" } - -// Error satisfies the builtin error interface -func (e ChangeComponentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sChangeComponent.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ChangeComponentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ChangeComponentValidationError{} - -// Validate checks the field values on ChangePSMDBComponentsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangePSMDBComponentsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ChangePSMDBComponentsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ChangePSMDBComponentsRequestMultiError, or nil if none found. -func (m *ChangePSMDBComponentsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ChangePSMDBComponentsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := ChangePSMDBComponentsRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMongod()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ChangePSMDBComponentsRequestValidationError{ - field: "Mongod", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ChangePSMDBComponentsRequestValidationError{ - field: "Mongod", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMongod()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ChangePSMDBComponentsRequestValidationError{ - field: "Mongod", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ChangePSMDBComponentsRequestMultiError(errors) - } - - return nil -} - -// ChangePSMDBComponentsRequestMultiError is an error wrapping multiple -// validation errors returned by ChangePSMDBComponentsRequest.ValidateAll() if -// the designated constraints aren't met. -type ChangePSMDBComponentsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ChangePSMDBComponentsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ChangePSMDBComponentsRequestMultiError) AllErrors() []error { return m } - -// ChangePSMDBComponentsRequestValidationError is the validation error returned -// by ChangePSMDBComponentsRequest.Validate if the designated constraints -// aren't met. -type ChangePSMDBComponentsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ChangePSMDBComponentsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ChangePSMDBComponentsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ChangePSMDBComponentsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ChangePSMDBComponentsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ChangePSMDBComponentsRequestValidationError) ErrorName() string { - return "ChangePSMDBComponentsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ChangePSMDBComponentsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sChangePSMDBComponentsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ChangePSMDBComponentsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ChangePSMDBComponentsRequestValidationError{} - -// Validate checks the field values on ChangePSMDBComponentsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangePSMDBComponentsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ChangePSMDBComponentsResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// ChangePSMDBComponentsResponseMultiError, or nil if none found. -func (m *ChangePSMDBComponentsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ChangePSMDBComponentsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ChangePSMDBComponentsResponseMultiError(errors) - } - - return nil -} - -// ChangePSMDBComponentsResponseMultiError is an error wrapping multiple -// validation errors returned by ChangePSMDBComponentsResponse.ValidateAll() -// if the designated constraints aren't met. -type ChangePSMDBComponentsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ChangePSMDBComponentsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ChangePSMDBComponentsResponseMultiError) AllErrors() []error { return m } - -// ChangePSMDBComponentsResponseValidationError is the validation error -// returned by ChangePSMDBComponentsResponse.Validate if the designated -// constraints aren't met. -type ChangePSMDBComponentsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ChangePSMDBComponentsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ChangePSMDBComponentsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ChangePSMDBComponentsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ChangePSMDBComponentsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ChangePSMDBComponentsResponseValidationError) ErrorName() string { - return "ChangePSMDBComponentsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ChangePSMDBComponentsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sChangePSMDBComponentsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ChangePSMDBComponentsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ChangePSMDBComponentsResponseValidationError{} - -// Validate checks the field values on ChangePXCComponentsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangePXCComponentsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ChangePXCComponentsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ChangePXCComponentsRequestMultiError, or nil if none found. -func (m *ChangePXCComponentsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ChangePXCComponentsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := ChangePXCComponentsRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPxc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ChangePXCComponentsRequestValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ChangePXCComponentsRequestValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPxc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ChangePXCComponentsRequestValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetProxysql()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ChangePXCComponentsRequestValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ChangePXCComponentsRequestValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetProxysql()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ChangePXCComponentsRequestValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHaproxy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ChangePXCComponentsRequestValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ChangePXCComponentsRequestValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHaproxy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ChangePXCComponentsRequestValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ChangePXCComponentsRequestMultiError(errors) - } - - return nil -} - -// ChangePXCComponentsRequestMultiError is an error wrapping multiple -// validation errors returned by ChangePXCComponentsRequest.ValidateAll() if -// the designated constraints aren't met. -type ChangePXCComponentsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ChangePXCComponentsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ChangePXCComponentsRequestMultiError) AllErrors() []error { return m } - -// ChangePXCComponentsRequestValidationError is the validation error returned -// by ChangePXCComponentsRequest.Validate if the designated constraints aren't met. -type ChangePXCComponentsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ChangePXCComponentsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ChangePXCComponentsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ChangePXCComponentsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ChangePXCComponentsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ChangePXCComponentsRequestValidationError) ErrorName() string { - return "ChangePXCComponentsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ChangePXCComponentsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sChangePXCComponentsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ChangePXCComponentsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ChangePXCComponentsRequestValidationError{} - -// Validate checks the field values on ChangePXCComponentsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangePXCComponentsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ChangePXCComponentsResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ChangePXCComponentsResponseMultiError, or nil if none found. -func (m *ChangePXCComponentsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ChangePXCComponentsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ChangePXCComponentsResponseMultiError(errors) - } - - return nil -} - -// ChangePXCComponentsResponseMultiError is an error wrapping multiple -// validation errors returned by ChangePXCComponentsResponse.ValidateAll() if -// the designated constraints aren't met. -type ChangePXCComponentsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ChangePXCComponentsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ChangePXCComponentsResponseMultiError) AllErrors() []error { return m } - -// ChangePXCComponentsResponseValidationError is the validation error returned -// by ChangePXCComponentsResponse.Validate if the designated constraints -// aren't met. -type ChangePXCComponentsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ChangePXCComponentsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ChangePXCComponentsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ChangePXCComponentsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ChangePXCComponentsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ChangePXCComponentsResponseValidationError) ErrorName() string { - return "ChangePXCComponentsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ChangePXCComponentsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sChangePXCComponentsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ChangePXCComponentsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ChangePXCComponentsResponseValidationError{} - -// Validate checks the field values on InstallOperatorRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *InstallOperatorRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on InstallOperatorRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// InstallOperatorRequestMultiError, or nil if none found. -func (m *InstallOperatorRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *InstallOperatorRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := InstallOperatorRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetOperatorType()) < 1 { - err := InstallOperatorRequestValidationError{ - field: "OperatorType", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetVersion()) < 1 { - err := InstallOperatorRequestValidationError{ - field: "Version", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return InstallOperatorRequestMultiError(errors) - } - - return nil -} - -// InstallOperatorRequestMultiError is an error wrapping multiple validation -// errors returned by InstallOperatorRequest.ValidateAll() if the designated -// constraints aren't met. -type InstallOperatorRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m InstallOperatorRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m InstallOperatorRequestMultiError) AllErrors() []error { return m } - -// InstallOperatorRequestValidationError is the validation error returned by -// InstallOperatorRequest.Validate if the designated constraints aren't met. -type InstallOperatorRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e InstallOperatorRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e InstallOperatorRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e InstallOperatorRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e InstallOperatorRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e InstallOperatorRequestValidationError) ErrorName() string { - return "InstallOperatorRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e InstallOperatorRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInstallOperatorRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = InstallOperatorRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = InstallOperatorRequestValidationError{} - -// Validate checks the field values on InstallOperatorResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *InstallOperatorResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on InstallOperatorResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// InstallOperatorResponseMultiError, or nil if none found. -func (m *InstallOperatorResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *InstallOperatorResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Status - - if len(errors) > 0 { - return InstallOperatorResponseMultiError(errors) - } - - return nil -} - -// InstallOperatorResponseMultiError is an error wrapping multiple validation -// errors returned by InstallOperatorResponse.ValidateAll() if the designated -// constraints aren't met. -type InstallOperatorResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m InstallOperatorResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m InstallOperatorResponseMultiError) AllErrors() []error { return m } - -// InstallOperatorResponseValidationError is the validation error returned by -// InstallOperatorResponse.Validate if the designated constraints aren't met. -type InstallOperatorResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e InstallOperatorResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e InstallOperatorResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e InstallOperatorResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e InstallOperatorResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e InstallOperatorResponseValidationError) ErrorName() string { - return "InstallOperatorResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e InstallOperatorResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sInstallOperatorResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = InstallOperatorResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = InstallOperatorResponseValidationError{} - -// Validate checks the field values on CheckForOperatorUpdateRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckForOperatorUpdateRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckForOperatorUpdateRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// CheckForOperatorUpdateRequestMultiError, or nil if none found. -func (m *CheckForOperatorUpdateRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckForOperatorUpdateRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return CheckForOperatorUpdateRequestMultiError(errors) - } - - return nil -} - -// CheckForOperatorUpdateRequestMultiError is an error wrapping multiple -// validation errors returned by CheckForOperatorUpdateRequest.ValidateAll() -// if the designated constraints aren't met. -type CheckForOperatorUpdateRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckForOperatorUpdateRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckForOperatorUpdateRequestMultiError) AllErrors() []error { return m } - -// CheckForOperatorUpdateRequestValidationError is the validation error -// returned by CheckForOperatorUpdateRequest.Validate if the designated -// constraints aren't met. -type CheckForOperatorUpdateRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckForOperatorUpdateRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckForOperatorUpdateRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckForOperatorUpdateRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckForOperatorUpdateRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckForOperatorUpdateRequestValidationError) ErrorName() string { - return "CheckForOperatorUpdateRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckForOperatorUpdateRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckForOperatorUpdateRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckForOperatorUpdateRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckForOperatorUpdateRequestValidationError{} - -// Validate checks the field values on ComponentUpdateInformation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ComponentUpdateInformation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ComponentUpdateInformation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ComponentUpdateInformationMultiError, or nil if none found. -func (m *ComponentUpdateInformation) ValidateAll() error { - return m.validate(true) -} - -func (m *ComponentUpdateInformation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for AvailableVersion - - if len(errors) > 0 { - return ComponentUpdateInformationMultiError(errors) - } - - return nil -} - -// ComponentUpdateInformationMultiError is an error wrapping multiple -// validation errors returned by ComponentUpdateInformation.ValidateAll() if -// the designated constraints aren't met. -type ComponentUpdateInformationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ComponentUpdateInformationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ComponentUpdateInformationMultiError) AllErrors() []error { return m } - -// ComponentUpdateInformationValidationError is the validation error returned -// by ComponentUpdateInformation.Validate if the designated constraints aren't met. -type ComponentUpdateInformationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComponentUpdateInformationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComponentUpdateInformationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComponentUpdateInformationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComponentUpdateInformationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComponentUpdateInformationValidationError) ErrorName() string { - return "ComponentUpdateInformationValidationError" -} - -// Error satisfies the builtin error interface -func (e ComponentUpdateInformationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComponentUpdateInformation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComponentUpdateInformationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComponentUpdateInformationValidationError{} - -// Validate checks the field values on ComponentsUpdateInformation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ComponentsUpdateInformation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ComponentsUpdateInformation with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ComponentsUpdateInformationMultiError, or nil if none found. -func (m *ComponentsUpdateInformation) ValidateAll() error { - return m.validate(true) -} - -func (m *ComponentsUpdateInformation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetComponentToUpdateInformation())) - i := 0 - for key := range m.GetComponentToUpdateInformation() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetComponentToUpdateInformation()[key] - _ = val - - // no validation rules for ComponentToUpdateInformation[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ComponentsUpdateInformationValidationError{ - field: fmt.Sprintf("ComponentToUpdateInformation[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ComponentsUpdateInformationValidationError{ - field: fmt.Sprintf("ComponentToUpdateInformation[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ComponentsUpdateInformationValidationError{ - field: fmt.Sprintf("ComponentToUpdateInformation[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return ComponentsUpdateInformationMultiError(errors) - } - - return nil -} - -// ComponentsUpdateInformationMultiError is an error wrapping multiple -// validation errors returned by ComponentsUpdateInformation.ValidateAll() if -// the designated constraints aren't met. -type ComponentsUpdateInformationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ComponentsUpdateInformationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ComponentsUpdateInformationMultiError) AllErrors() []error { return m } - -// ComponentsUpdateInformationValidationError is the validation error returned -// by ComponentsUpdateInformation.Validate if the designated constraints -// aren't met. -type ComponentsUpdateInformationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComponentsUpdateInformationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComponentsUpdateInformationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComponentsUpdateInformationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComponentsUpdateInformationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComponentsUpdateInformationValidationError) ErrorName() string { - return "ComponentsUpdateInformationValidationError" -} - -// Error satisfies the builtin error interface -func (e ComponentsUpdateInformationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComponentsUpdateInformation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComponentsUpdateInformationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComponentsUpdateInformationValidationError{} - -// Validate checks the field values on CheckForOperatorUpdateResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckForOperatorUpdateResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckForOperatorUpdateResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// CheckForOperatorUpdateResponseMultiError, or nil if none found. -func (m *CheckForOperatorUpdateResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckForOperatorUpdateResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - { - sorted_keys := make([]string, len(m.GetClusterToComponents())) - i := 0 - for key := range m.GetClusterToComponents() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetClusterToComponents()[key] - _ = val - - // no validation rules for ClusterToComponents[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CheckForOperatorUpdateResponseValidationError{ - field: fmt.Sprintf("ClusterToComponents[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CheckForOperatorUpdateResponseValidationError{ - field: fmt.Sprintf("ClusterToComponents[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CheckForOperatorUpdateResponseValidationError{ - field: fmt.Sprintf("ClusterToComponents[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return CheckForOperatorUpdateResponseMultiError(errors) - } - - return nil -} - -// CheckForOperatorUpdateResponseMultiError is an error wrapping multiple -// validation errors returned by CheckForOperatorUpdateResponse.ValidateAll() -// if the designated constraints aren't met. -type CheckForOperatorUpdateResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckForOperatorUpdateResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckForOperatorUpdateResponseMultiError) AllErrors() []error { return m } - -// CheckForOperatorUpdateResponseValidationError is the validation error -// returned by CheckForOperatorUpdateResponse.Validate if the designated -// constraints aren't met. -type CheckForOperatorUpdateResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckForOperatorUpdateResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckForOperatorUpdateResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckForOperatorUpdateResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckForOperatorUpdateResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckForOperatorUpdateResponseValidationError) ErrorName() string { - return "CheckForOperatorUpdateResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckForOperatorUpdateResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckForOperatorUpdateResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckForOperatorUpdateResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckForOperatorUpdateResponseValidationError{} - -// Validate checks the field values on ChangeComponent_ComponentVersion with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *ChangeComponent_ComponentVersion) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ChangeComponent_ComponentVersion with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// ChangeComponent_ComponentVersionMultiError, or nil if none found. -func (m *ChangeComponent_ComponentVersion) ValidateAll() error { - return m.validate(true) -} - -func (m *ChangeComponent_ComponentVersion) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetVersion()) < 1 { - err := ChangeComponent_ComponentVersionValidationError{ - field: "Version", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Disable - - // no validation rules for Enable - - if len(errors) > 0 { - return ChangeComponent_ComponentVersionMultiError(errors) - } - - return nil -} - -// ChangeComponent_ComponentVersionMultiError is an error wrapping multiple -// validation errors returned by -// ChangeComponent_ComponentVersion.ValidateAll() if the designated -// constraints aren't met. -type ChangeComponent_ComponentVersionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ChangeComponent_ComponentVersionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ChangeComponent_ComponentVersionMultiError) AllErrors() []error { return m } - -// ChangeComponent_ComponentVersionValidationError is the validation error -// returned by ChangeComponent_ComponentVersion.Validate if the designated -// constraints aren't met. -type ChangeComponent_ComponentVersionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ChangeComponent_ComponentVersionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ChangeComponent_ComponentVersionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ChangeComponent_ComponentVersionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ChangeComponent_ComponentVersionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ChangeComponent_ComponentVersionValidationError) ErrorName() string { - return "ChangeComponent_ComponentVersionValidationError" -} - -// Error satisfies the builtin error interface -func (e ChangeComponent_ComponentVersionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sChangeComponent_ComponentVersion.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ChangeComponent_ComponentVersionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ChangeComponent_ComponentVersionValidationError{} diff --git a/api/managementpb/dbaas/components.proto b/api/managementpb/dbaas/components.proto deleted file mode 100644 index 4cc84c3bc9..0000000000 --- a/api/managementpb/dbaas/components.proto +++ /dev/null @@ -1,169 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "managementpb/dbaas/dbaas.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// Component contains information about component. -message Component { - string image_path = 1; - string image_hash = 2; - string status = 3; - bool critical = 4; - bool default = 5; - bool disabled = 6; -} - -// Matrix contains all available components. -message Matrix { - map mongod = 1; - map pxc = 2; - map pmm = 3; - map proxysql = 4; - map haproxy = 5; - map backup = 6; - map operator = 7; - map log_collector = 8; -} - -// OperatorVersion contains information about operator and components matrix. -message OperatorVersion { - string product = 1; - string operator = 2; - Matrix matrix = 3; -} - -message GetPSMDBComponentsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1; - // Version of DB. - string db_version = 2; -} - -message GetPSMDBComponentsResponse { - repeated OperatorVersion versions = 1; -} - -message GetPXCComponentsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1; - // Version of DB. - string db_version = 2; -} - -message GetPXCComponentsResponse { - repeated OperatorVersion versions = 1; -} - -// ChangeComponent contains fields to manage components. -message ChangeComponent { - string default_version = 1; - // ComponentVersion contains operations which should be done with component version. - message ComponentVersion { - string version = 1 [(validate.rules).string.min_len = 1]; - bool disable = 2; - bool enable = 3; - } - repeated ComponentVersion versions = 2; -} - -message ChangePSMDBComponentsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - ChangeComponent mongod = 2; -} - -message ChangePSMDBComponentsResponse {} - -message ChangePXCComponentsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - ChangeComponent pxc = 2; - ChangeComponent proxysql = 3; - ChangeComponent haproxy = 4; -} - -message ChangePXCComponentsResponse {} - -message InstallOperatorRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // operator_type tells what operator we are interested in updating. - string operator_type = 2 [(validate.rules).string.min_len = 1]; - // version tells what version of the operator we should update to. - string version = 3 [(validate.rules).string.min_len = 1]; -} - -message InstallOperatorResponse { - // Status tells if installation was successfull. - OperatorsStatus status = 1; -} - -message CheckForOperatorUpdateRequest {} - -// ComponentUpdateInformation contains version we can update to for certain component. -message ComponentUpdateInformation { - string available_version = 1; -} - -// ComponentsUpdateInformation contains info about components and their available latest versions. -message ComponentsUpdateInformation { - // component_to_update_information stores, under the name of the component, information about the update. - // "pxc-operator", "psmdb-operator" are names used by backend for our operators. - map component_to_update_information = 1; -} - -message CheckForOperatorUpdateResponse { - // The cluster name is used as a key for this map, value contains components and their inforamtion about update. - map cluster_to_components = 1; -} - -// Components service provides public methods for managing components. -service Components { - // GetPSMDBComponents returns list of available components for PSMDB Clusters. - rpc GetPSMDBComponents(GetPSMDBComponentsRequest) returns (GetPSMDBComponentsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Components/GetPSMDB" - body: "*" - }; - } - // GetPXCComponents returns list of available components for PXC Clusters. - rpc GetPXCComponents(GetPXCComponentsRequest) returns (GetPXCComponentsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Components/GetPXC" - body: "*" - }; - } - // ChangePSMDBComponents manages PSMDB related components. - rpc ChangePSMDBComponents(ChangePSMDBComponentsRequest) returns (ChangePSMDBComponentsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Components/ChangePSMDB" - body: "*" - }; - } - // ChangePXCComponents manages PXC related components. - rpc ChangePXCComponents(ChangePXCComponentsRequest) returns (ChangePXCComponentsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Components/ChangePXC" - body: "*" - }; - } - // InstallOperator installs given operator in given version. - rpc InstallOperator(InstallOperatorRequest) returns (InstallOperatorResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Components/InstallOperator" - body: "*" - }; - } - // CheckForOperatorUpdate checks if a new version of an operator is available. - rpc CheckForOperatorUpdate(CheckForOperatorUpdateRequest) returns (CheckForOperatorUpdateResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Components/CheckForOperatorUpdate" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/components_grpc.pb.go b/api/managementpb/dbaas/components_grpc.pb.go deleted file mode 100644 index 750341cfd8..0000000000 --- a/api/managementpb/dbaas/components_grpc.pb.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/components.proto - -package dbaasv1beta1 - -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 - -const ( - Components_GetPSMDBComponents_FullMethodName = "/dbaas.v1beta1.Components/GetPSMDBComponents" - Components_GetPXCComponents_FullMethodName = "/dbaas.v1beta1.Components/GetPXCComponents" - Components_ChangePSMDBComponents_FullMethodName = "/dbaas.v1beta1.Components/ChangePSMDBComponents" - Components_ChangePXCComponents_FullMethodName = "/dbaas.v1beta1.Components/ChangePXCComponents" - Components_InstallOperator_FullMethodName = "/dbaas.v1beta1.Components/InstallOperator" - Components_CheckForOperatorUpdate_FullMethodName = "/dbaas.v1beta1.Components/CheckForOperatorUpdate" -) - -// ComponentsClient is the client API for Components 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 ComponentsClient interface { - // GetPSMDBComponents returns list of available components for PSMDB Clusters. - GetPSMDBComponents(ctx context.Context, in *GetPSMDBComponentsRequest, opts ...grpc.CallOption) (*GetPSMDBComponentsResponse, error) - // GetPXCComponents returns list of available components for PXC Clusters. - GetPXCComponents(ctx context.Context, in *GetPXCComponentsRequest, opts ...grpc.CallOption) (*GetPXCComponentsResponse, error) - // ChangePSMDBComponents manages PSMDB related components. - ChangePSMDBComponents(ctx context.Context, in *ChangePSMDBComponentsRequest, opts ...grpc.CallOption) (*ChangePSMDBComponentsResponse, error) - // ChangePXCComponents manages PXC related components. - ChangePXCComponents(ctx context.Context, in *ChangePXCComponentsRequest, opts ...grpc.CallOption) (*ChangePXCComponentsResponse, error) - // InstallOperator installs given operator in given version. - InstallOperator(ctx context.Context, in *InstallOperatorRequest, opts ...grpc.CallOption) (*InstallOperatorResponse, error) - // CheckForOperatorUpdate checks if a new version of an operator is available. - CheckForOperatorUpdate(ctx context.Context, in *CheckForOperatorUpdateRequest, opts ...grpc.CallOption) (*CheckForOperatorUpdateResponse, error) -} - -type componentsClient struct { - cc grpc.ClientConnInterface -} - -func NewComponentsClient(cc grpc.ClientConnInterface) ComponentsClient { - return &componentsClient{cc} -} - -func (c *componentsClient) GetPSMDBComponents(ctx context.Context, in *GetPSMDBComponentsRequest, opts ...grpc.CallOption) (*GetPSMDBComponentsResponse, error) { - out := new(GetPSMDBComponentsResponse) - err := c.cc.Invoke(ctx, Components_GetPSMDBComponents_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *componentsClient) GetPXCComponents(ctx context.Context, in *GetPXCComponentsRequest, opts ...grpc.CallOption) (*GetPXCComponentsResponse, error) { - out := new(GetPXCComponentsResponse) - err := c.cc.Invoke(ctx, Components_GetPXCComponents_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *componentsClient) ChangePSMDBComponents(ctx context.Context, in *ChangePSMDBComponentsRequest, opts ...grpc.CallOption) (*ChangePSMDBComponentsResponse, error) { - out := new(ChangePSMDBComponentsResponse) - err := c.cc.Invoke(ctx, Components_ChangePSMDBComponents_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *componentsClient) ChangePXCComponents(ctx context.Context, in *ChangePXCComponentsRequest, opts ...grpc.CallOption) (*ChangePXCComponentsResponse, error) { - out := new(ChangePXCComponentsResponse) - err := c.cc.Invoke(ctx, Components_ChangePXCComponents_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *componentsClient) InstallOperator(ctx context.Context, in *InstallOperatorRequest, opts ...grpc.CallOption) (*InstallOperatorResponse, error) { - out := new(InstallOperatorResponse) - err := c.cc.Invoke(ctx, Components_InstallOperator_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *componentsClient) CheckForOperatorUpdate(ctx context.Context, in *CheckForOperatorUpdateRequest, opts ...grpc.CallOption) (*CheckForOperatorUpdateResponse, error) { - out := new(CheckForOperatorUpdateResponse) - err := c.cc.Invoke(ctx, Components_CheckForOperatorUpdate_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ComponentsServer is the server API for Components service. -// All implementations must embed UnimplementedComponentsServer -// for forward compatibility -type ComponentsServer interface { - // GetPSMDBComponents returns list of available components for PSMDB Clusters. - GetPSMDBComponents(context.Context, *GetPSMDBComponentsRequest) (*GetPSMDBComponentsResponse, error) - // GetPXCComponents returns list of available components for PXC Clusters. - GetPXCComponents(context.Context, *GetPXCComponentsRequest) (*GetPXCComponentsResponse, error) - // ChangePSMDBComponents manages PSMDB related components. - ChangePSMDBComponents(context.Context, *ChangePSMDBComponentsRequest) (*ChangePSMDBComponentsResponse, error) - // ChangePXCComponents manages PXC related components. - ChangePXCComponents(context.Context, *ChangePXCComponentsRequest) (*ChangePXCComponentsResponse, error) - // InstallOperator installs given operator in given version. - InstallOperator(context.Context, *InstallOperatorRequest) (*InstallOperatorResponse, error) - // CheckForOperatorUpdate checks if a new version of an operator is available. - CheckForOperatorUpdate(context.Context, *CheckForOperatorUpdateRequest) (*CheckForOperatorUpdateResponse, error) - mustEmbedUnimplementedComponentsServer() -} - -// UnimplementedComponentsServer must be embedded to have forward compatible implementations. -type UnimplementedComponentsServer struct{} - -func (UnimplementedComponentsServer) GetPSMDBComponents(context.Context, *GetPSMDBComponentsRequest) (*GetPSMDBComponentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPSMDBComponents not implemented") -} - -func (UnimplementedComponentsServer) GetPXCComponents(context.Context, *GetPXCComponentsRequest) (*GetPXCComponentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPXCComponents not implemented") -} - -func (UnimplementedComponentsServer) ChangePSMDBComponents(context.Context, *ChangePSMDBComponentsRequest) (*ChangePSMDBComponentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangePSMDBComponents not implemented") -} - -func (UnimplementedComponentsServer) ChangePXCComponents(context.Context, *ChangePXCComponentsRequest) (*ChangePXCComponentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangePXCComponents not implemented") -} - -func (UnimplementedComponentsServer) InstallOperator(context.Context, *InstallOperatorRequest) (*InstallOperatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InstallOperator not implemented") -} - -func (UnimplementedComponentsServer) CheckForOperatorUpdate(context.Context, *CheckForOperatorUpdateRequest) (*CheckForOperatorUpdateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckForOperatorUpdate not implemented") -} -func (UnimplementedComponentsServer) mustEmbedUnimplementedComponentsServer() {} - -// UnsafeComponentsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ComponentsServer will -// result in compilation errors. -type UnsafeComponentsServer interface { - mustEmbedUnimplementedComponentsServer() -} - -func RegisterComponentsServer(s grpc.ServiceRegistrar, srv ComponentsServer) { - s.RegisterService(&Components_ServiceDesc, srv) -} - -func _Components_GetPSMDBComponents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPSMDBComponentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ComponentsServer).GetPSMDBComponents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Components_GetPSMDBComponents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ComponentsServer).GetPSMDBComponents(ctx, req.(*GetPSMDBComponentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Components_GetPXCComponents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPXCComponentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ComponentsServer).GetPXCComponents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Components_GetPXCComponents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ComponentsServer).GetPXCComponents(ctx, req.(*GetPXCComponentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Components_ChangePSMDBComponents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangePSMDBComponentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ComponentsServer).ChangePSMDBComponents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Components_ChangePSMDBComponents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ComponentsServer).ChangePSMDBComponents(ctx, req.(*ChangePSMDBComponentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Components_ChangePXCComponents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangePXCComponentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ComponentsServer).ChangePXCComponents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Components_ChangePXCComponents_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ComponentsServer).ChangePXCComponents(ctx, req.(*ChangePXCComponentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Components_InstallOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InstallOperatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ComponentsServer).InstallOperator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Components_InstallOperator_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ComponentsServer).InstallOperator(ctx, req.(*InstallOperatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Components_CheckForOperatorUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckForOperatorUpdateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ComponentsServer).CheckForOperatorUpdate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Components_CheckForOperatorUpdate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ComponentsServer).CheckForOperatorUpdate(ctx, req.(*CheckForOperatorUpdateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Components_ServiceDesc is the grpc.ServiceDesc for Components service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Components_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.Components", - HandlerType: (*ComponentsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetPSMDBComponents", - Handler: _Components_GetPSMDBComponents_Handler, - }, - { - MethodName: "GetPXCComponents", - Handler: _Components_GetPXCComponents_Handler, - }, - { - MethodName: "ChangePSMDBComponents", - Handler: _Components_ChangePSMDBComponents_Handler, - }, - { - MethodName: "ChangePXCComponents", - Handler: _Components_ChangePXCComponents_Handler, - }, - { - MethodName: "InstallOperator", - Handler: _Components_InstallOperator_Handler, - }, - { - MethodName: "CheckForOperatorUpdate", - Handler: _Components_CheckForOperatorUpdate_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/components.proto", -} diff --git a/api/managementpb/dbaas/db_clusters.pb.go b/api/managementpb/dbaas/db_clusters.pb.go deleted file mode 100644 index 2b8a099e89..0000000000 --- a/api/managementpb/dbaas/db_clusters.pb.go +++ /dev/null @@ -1,1667 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/db_clusters.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// DBClusterState represents DB cluster CR state. -type DBClusterState int32 - -const ( - // DB_CLUSTER_STATE_INVALID represents unknown state. - DBClusterState_DB_CLUSTER_STATE_INVALID DBClusterState = 0 - // DB_CLUSTER_STATE_CHANGING represents a cluster being changed. - DBClusterState_DB_CLUSTER_STATE_CHANGING DBClusterState = 1 - // DB_CLUSTER_STATE_READY represents a cluster without pending changes. - DBClusterState_DB_CLUSTER_STATE_READY DBClusterState = 2 - // DB_CLUSTER_STATE_FAILED represents a failed cluster. - DBClusterState_DB_CLUSTER_STATE_FAILED DBClusterState = 3 - // DB_CLUSTER_STATE_DELETING represents a cluster being deleting. - DBClusterState_DB_CLUSTER_STATE_DELETING DBClusterState = 4 - // DB_CLUSTER_STATE_PAUSED represents a cluster is paused. - DBClusterState_DB_CLUSTER_STATE_PAUSED DBClusterState = 5 - // DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING. - // It indicates database cluster upgrade is ongoing. - DBClusterState_DB_CLUSTER_STATE_UPGRADING DBClusterState = 6 -) - -// Enum value maps for DBClusterState. -var ( - DBClusterState_name = map[int32]string{ - 0: "DB_CLUSTER_STATE_INVALID", - 1: "DB_CLUSTER_STATE_CHANGING", - 2: "DB_CLUSTER_STATE_READY", - 3: "DB_CLUSTER_STATE_FAILED", - 4: "DB_CLUSTER_STATE_DELETING", - 5: "DB_CLUSTER_STATE_PAUSED", - 6: "DB_CLUSTER_STATE_UPGRADING", - } - DBClusterState_value = map[string]int32{ - "DB_CLUSTER_STATE_INVALID": 0, - "DB_CLUSTER_STATE_CHANGING": 1, - "DB_CLUSTER_STATE_READY": 2, - "DB_CLUSTER_STATE_FAILED": 3, - "DB_CLUSTER_STATE_DELETING": 4, - "DB_CLUSTER_STATE_PAUSED": 5, - "DB_CLUSTER_STATE_UPGRADING": 6, - } -) - -func (x DBClusterState) Enum() *DBClusterState { - p := new(DBClusterState) - *p = x - return p -} - -func (x DBClusterState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DBClusterState) Descriptor() protoreflect.EnumDescriptor { - return file_managementpb_dbaas_db_clusters_proto_enumTypes[0].Descriptor() -} - -func (DBClusterState) Type() protoreflect.EnumType { - return &file_managementpb_dbaas_db_clusters_proto_enumTypes[0] -} - -func (x DBClusterState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DBClusterState.Descriptor instead. -func (DBClusterState) EnumDescriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{0} -} - -// PSMDBCluster represents PSMDB cluster information. -type PSMDBCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Cluster state. - State DBClusterState `protobuf:"varint,2,opt,name=state,proto3,enum=dbaas.v1beta1.DBClusterState" json:"state,omitempty"` - // Currently running operation, if any. - Operation *RunningOperation `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"` - // Cluster parameters. - Params *PSMDBClusterParams `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` - // DB cluster accessible outside of K8s cluster. - Exposed bool `protobuf:"varint,5,opt,name=exposed,proto3" json:"exposed,omitempty"` - // Installed PSMDB image. - InstalledImage string `protobuf:"bytes,6,opt,name=installed_image,json=installedImage,proto3" json:"installed_image,omitempty"` - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - AvailableImage string `protobuf:"bytes,7,opt,name=available_image,json=availableImage,proto3" json:"available_image,omitempty"` - // Is DB cluster accessible via public internet. - InternetFacing bool `protobuf:"varint,8,opt,name=internet_facing,json=internetFacing,proto3" json:"internet_facing,omitempty"` - // Backup configuration parameters. - Backup *Backup `protobuf:"bytes,9,opt,name=backup,proto3" json:"backup,omitempty"` - // Restore configuration parameters. - Restore *Restore `protobuf:"bytes,10,opt,name=restore,proto3" json:"restore,omitempty"` - // Apply IP source ranges against the cluster. - SourceRanges []string `protobuf:"bytes,12,rep,name=source_ranges,json=sourceRanges,proto3" json:"source_ranges,omitempty"` - // Configuration template. - Template *Template `protobuf:"bytes,11,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *PSMDBCluster) Reset() { - *x = PSMDBCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PSMDBCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PSMDBCluster) ProtoMessage() {} - -func (x *PSMDBCluster) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 PSMDBCluster.ProtoReflect.Descriptor instead. -func (*PSMDBCluster) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{0} -} - -func (x *PSMDBCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PSMDBCluster) GetState() DBClusterState { - if x != nil { - return x.State - } - return DBClusterState_DB_CLUSTER_STATE_INVALID -} - -func (x *PSMDBCluster) GetOperation() *RunningOperation { - if x != nil { - return x.Operation - } - return nil -} - -func (x *PSMDBCluster) GetParams() *PSMDBClusterParams { - if x != nil { - return x.Params - } - return nil -} - -func (x *PSMDBCluster) GetExposed() bool { - if x != nil { - return x.Exposed - } - return false -} - -func (x *PSMDBCluster) GetInstalledImage() string { - if x != nil { - return x.InstalledImage - } - return "" -} - -func (x *PSMDBCluster) GetAvailableImage() string { - if x != nil { - return x.AvailableImage - } - return "" -} - -func (x *PSMDBCluster) GetInternetFacing() bool { - if x != nil { - return x.InternetFacing - } - return false -} - -func (x *PSMDBCluster) GetBackup() *Backup { - if x != nil { - return x.Backup - } - return nil -} - -func (x *PSMDBCluster) GetRestore() *Restore { - if x != nil { - return x.Restore - } - return nil -} - -func (x *PSMDBCluster) GetSourceRanges() []string { - if x != nil { - return x.SourceRanges - } - return nil -} - -func (x *PSMDBCluster) GetTemplate() *Template { - if x != nil { - return x.Template - } - return nil -} - -// PXCCluster represents PXC cluster information. -type PXCCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Cluster state. - State DBClusterState `protobuf:"varint,2,opt,name=state,proto3,enum=dbaas.v1beta1.DBClusterState" json:"state,omitempty"` - // Currently running operation, if any. - Operation *RunningOperation `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"` - // Cluster parameters. - Params *PXCClusterParams `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` - // DB cluster accessible outside of K8s cluster. - Exposed bool `protobuf:"varint,5,opt,name=exposed,proto3" json:"exposed,omitempty"` - // Installed XtraDB image. - InstalledImage string `protobuf:"bytes,6,opt,name=installed_image,json=installedImage,proto3" json:"installed_image,omitempty"` - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - AvailableImage string `protobuf:"bytes,7,opt,name=available_image,json=availableImage,proto3" json:"available_image,omitempty"` - // Is DB cluster accessible via public internet. - InternetFacing bool `protobuf:"varint,8,opt,name=internet_facing,json=internetFacing,proto3" json:"internet_facing,omitempty"` - // Backup configuration parameters. - Backup *Backup `protobuf:"bytes,9,opt,name=backup,proto3" json:"backup,omitempty"` - // Restore configuration parameters. - Restore *Restore `protobuf:"bytes,10,opt,name=restore,proto3" json:"restore,omitempty"` - // Apply IP source ranges against the cluster. - SourceRanges []string `protobuf:"bytes,12,rep,name=source_ranges,json=sourceRanges,proto3" json:"source_ranges,omitempty"` - // Configuration template. - Template *Template `protobuf:"bytes,11,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *PXCCluster) Reset() { - *x = PXCCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PXCCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PXCCluster) ProtoMessage() {} - -func (x *PXCCluster) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 PXCCluster.ProtoReflect.Descriptor instead. -func (*PXCCluster) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{1} -} - -func (x *PXCCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PXCCluster) GetState() DBClusterState { - if x != nil { - return x.State - } - return DBClusterState_DB_CLUSTER_STATE_INVALID -} - -func (x *PXCCluster) GetOperation() *RunningOperation { - if x != nil { - return x.Operation - } - return nil -} - -func (x *PXCCluster) GetParams() *PXCClusterParams { - if x != nil { - return x.Params - } - return nil -} - -func (x *PXCCluster) GetExposed() bool { - if x != nil { - return x.Exposed - } - return false -} - -func (x *PXCCluster) GetInstalledImage() string { - if x != nil { - return x.InstalledImage - } - return "" -} - -func (x *PXCCluster) GetAvailableImage() string { - if x != nil { - return x.AvailableImage - } - return "" -} - -func (x *PXCCluster) GetInternetFacing() bool { - if x != nil { - return x.InternetFacing - } - return false -} - -func (x *PXCCluster) GetBackup() *Backup { - if x != nil { - return x.Backup - } - return nil -} - -func (x *PXCCluster) GetRestore() *Restore { - if x != nil { - return x.Restore - } - return nil -} - -func (x *PXCCluster) GetSourceRanges() []string { - if x != nil { - return x.SourceRanges - } - return nil -} - -func (x *PXCCluster) GetTemplate() *Template { - if x != nil { - return x.Template - } - return nil -} - -type ListDBClustersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` -} - -func (x *ListDBClustersRequest) Reset() { - *x = ListDBClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDBClustersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDBClustersRequest) ProtoMessage() {} - -func (x *ListDBClustersRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 ListDBClustersRequest.ProtoReflect.Descriptor instead. -func (*ListDBClustersRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{2} -} - -func (x *ListDBClustersRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -type ListDBClustersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // PXC clusters information. - PxcClusters []*PXCCluster `protobuf:"bytes,1,rep,name=pxc_clusters,json=pxcClusters,proto3" json:"pxc_clusters,omitempty"` - // PSMDB clusters information. - PsmdbClusters []*PSMDBCluster `protobuf:"bytes,2,rep,name=psmdb_clusters,json=psmdbClusters,proto3" json:"psmdb_clusters,omitempty"` -} - -func (x *ListDBClustersResponse) Reset() { - *x = ListDBClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListDBClustersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListDBClustersResponse) ProtoMessage() {} - -func (x *ListDBClustersResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 ListDBClustersResponse.ProtoReflect.Descriptor instead. -func (*ListDBClustersResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{3} -} - -func (x *ListDBClustersResponse) GetPxcClusters() []*PXCCluster { - if x != nil { - return x.PxcClusters - } - return nil -} - -func (x *ListDBClustersResponse) GetPsmdbClusters() []*PSMDBCluster { - if x != nil { - return x.PsmdbClusters - } - return nil -} - -type RestartDBClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PXC cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // DB cluster type. - ClusterType DBClusterType `protobuf:"varint,3,opt,name=cluster_type,json=clusterType,proto3,enum=dbaas.v1beta1.DBClusterType" json:"cluster_type,omitempty"` -} - -func (x *RestartDBClusterRequest) Reset() { - *x = RestartDBClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RestartDBClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RestartDBClusterRequest) ProtoMessage() {} - -func (x *RestartDBClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 RestartDBClusterRequest.ProtoReflect.Descriptor instead. -func (*RestartDBClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{4} -} - -func (x *RestartDBClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *RestartDBClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RestartDBClusterRequest) GetClusterType() DBClusterType { - if x != nil { - return x.ClusterType - } - return DBClusterType_DB_CLUSTER_TYPE_INVALID -} - -type RestartDBClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RestartDBClusterResponse) Reset() { - *x = RestartDBClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RestartDBClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RestartDBClusterResponse) ProtoMessage() {} - -func (x *RestartDBClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 RestartDBClusterResponse.ProtoReflect.Descriptor instead. -func (*RestartDBClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{5} -} - -type GetDBClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // DB cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetDBClusterRequest) Reset() { - *x = GetDBClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDBClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDBClusterRequest) ProtoMessage() {} - -func (x *GetDBClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 GetDBClusterRequest.ProtoReflect.Descriptor instead. -func (*GetDBClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{6} -} - -func (x *GetDBClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *GetDBClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type GetDBClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // PXC cluster information. - PxcCluster *PXCCluster `protobuf:"bytes,1,opt,name=pxc_cluster,json=pxcCluster,proto3" json:"pxc_cluster,omitempty"` - // PSMDB cluster information. - PsmdbCluster *PSMDBCluster `protobuf:"bytes,2,opt,name=psmdb_cluster,json=psmdbCluster,proto3" json:"psmdb_cluster,omitempty"` -} - -func (x *GetDBClusterResponse) Reset() { - *x = GetDBClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDBClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDBClusterResponse) ProtoMessage() {} - -func (x *GetDBClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 GetDBClusterResponse.ProtoReflect.Descriptor instead. -func (*GetDBClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{7} -} - -func (x *GetDBClusterResponse) GetPxcCluster() *PXCCluster { - if x != nil { - return x.PxcCluster - } - return nil -} - -func (x *GetDBClusterResponse) GetPsmdbCluster() *PSMDBCluster { - if x != nil { - return x.PsmdbCluster - } - return nil -} - -type DeleteDBClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // DB cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // DB cluster type. - ClusterType DBClusterType `protobuf:"varint,3,opt,name=cluster_type,json=clusterType,proto3,enum=dbaas.v1beta1.DBClusterType" json:"cluster_type,omitempty"` -} - -func (x *DeleteDBClusterRequest) Reset() { - *x = DeleteDBClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteDBClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteDBClusterRequest) ProtoMessage() {} - -func (x *DeleteDBClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 DeleteDBClusterRequest.ProtoReflect.Descriptor instead. -func (*DeleteDBClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{8} -} - -func (x *DeleteDBClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *DeleteDBClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *DeleteDBClusterRequest) GetClusterType() DBClusterType { - if x != nil { - return x.ClusterType - } - return DBClusterType_DB_CLUSTER_TYPE_INVALID -} - -type DeleteDBClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteDBClusterResponse) Reset() { - *x = DeleteDBClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteDBClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteDBClusterResponse) ProtoMessage() {} - -func (x *DeleteDBClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 DeleteDBClusterResponse.ProtoReflect.Descriptor instead. -func (*DeleteDBClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{9} -} - -type S3Item struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key of a filename on s3. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *S3Item) Reset() { - *x = S3Item{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *S3Item) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*S3Item) ProtoMessage() {} - -func (x *S3Item) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 S3Item.ProtoReflect.Descriptor instead. -func (*S3Item) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{10} -} - -func (x *S3Item) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -type ListS3BackupsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Backup Location ID to list backups from - LocationId string `protobuf:"bytes,1,opt,name=location_id,json=locationId,proto3" json:"location_id,omitempty"` -} - -func (x *ListS3BackupsRequest) Reset() { - *x = ListS3BackupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListS3BackupsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListS3BackupsRequest) ProtoMessage() {} - -func (x *ListS3BackupsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 ListS3BackupsRequest.ProtoReflect.Descriptor instead. -func (*ListS3BackupsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{11} -} - -func (x *ListS3BackupsRequest) GetLocationId() string { - if x != nil { - return x.LocationId - } - return "" -} - -type ListS3BackupsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Backup list. - Backups []*S3Item `protobuf:"bytes,1,rep,name=backups,proto3" json:"backups,omitempty"` -} - -func (x *ListS3BackupsResponse) Reset() { - *x = ListS3BackupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListS3BackupsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListS3BackupsResponse) ProtoMessage() {} - -func (x *ListS3BackupsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 ListS3BackupsResponse.ProtoReflect.Descriptor instead. -func (*ListS3BackupsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{12} -} - -func (x *ListS3BackupsResponse) GetBackups() []*S3Item { - if x != nil { - return x.Backups - } - return nil -} - -type ListSecretsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` -} - -func (x *ListSecretsRequest) Reset() { - *x = ListSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSecretsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSecretsRequest) ProtoMessage() {} - -func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 ListSecretsRequest.ProtoReflect.Descriptor instead. -func (*ListSecretsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{13} -} - -func (x *ListSecretsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of a secret - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{14} -} - -func (x *Secret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type ListSecretsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Secret list. - Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` -} - -func (x *ListSecretsResponse) Reset() { - *x = ListSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_db_clusters_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSecretsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSecretsResponse) ProtoMessage() {} - -func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_db_clusters_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 ListSecretsResponse.ProtoReflect.Descriptor instead. -func (*ListSecretsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_db_clusters_proto_rawDescGZIP(), []int{15} -} - -func (x *ListSecretsResponse) GetSecrets() []*Secret { - if x != nil { - return x.Secrets - } - return nil -} - -var File_managementpb_dbaas_db_clusters_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_db_clusters_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x70, 0x73, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2f, 0x70, 0x78, 0x63, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xa1, 0x04, 0x0a, 0x0c, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x27, - 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x63, - 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x46, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, - 0x33, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x22, 0x9d, 0x04, 0x0a, 0x0a, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x09, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x58, 0x43, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x27, - 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x63, - 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x46, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, - 0x33, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x22, 0x58, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x42, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, - 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9a, - 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x70, 0x78, 0x63, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x70, 0x78, 0x63, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x70, 0x73, 0x6d, 0x64, 0x62, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x70, 0x73, - 0x6d, 0x64, 0x62, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x17, - 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x94, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0b, 0x70, 0x78, - 0x63, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x78, 0x63, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x70, 0x73, 0x6d, 0x64, 0x62, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x53, - 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x70, 0x73, 0x6d, 0x64, - 0x62, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0xc1, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x19, 0x0a, 0x17, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x0a, 0x06, 0x53, 0x33, 0x49, 0x74, 0x65, - 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x22, 0x37, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x33, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x15, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x33, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x33, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x22, 0x55, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1c, 0x0a, - 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x46, 0x0a, 0x13, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x73, 0x2a, 0xe2, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, - 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, - 0x49, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x49, 0x4e, - 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, - 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, - 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, - 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x44, - 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x42, 0x5f, 0x43, - 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x47, - 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x32, 0xe7, 0x06, 0x0a, 0x0a, 0x44, 0x42, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, - 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, - 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, - 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x87, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, - 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x42, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, - 0x61, 0x61, 0x53, 0x2f, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x47, - 0x65, 0x74, 0x12, 0x97, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x42, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, - 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, - 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x2f, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x93, 0x01, 0x0a, - 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x25, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x42, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, - 0x2f, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x33, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x33, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x33, - 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, - 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x82, 0x01, - 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x21, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, - 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x44, 0x62, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, - 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0d, - 0x44, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, - 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, - 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, 0x61, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_db_clusters_proto_rawDescOnce sync.Once - file_managementpb_dbaas_db_clusters_proto_rawDescData = file_managementpb_dbaas_db_clusters_proto_rawDesc -) - -func file_managementpb_dbaas_db_clusters_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_db_clusters_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_db_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_db_clusters_proto_rawDescData) - }) - return file_managementpb_dbaas_db_clusters_proto_rawDescData -} - -var ( - file_managementpb_dbaas_db_clusters_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_dbaas_db_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 16) - file_managementpb_dbaas_db_clusters_proto_goTypes = []interface{}{ - (DBClusterState)(0), // 0: dbaas.v1beta1.DBClusterState - (*PSMDBCluster)(nil), // 1: dbaas.v1beta1.PSMDBCluster - (*PXCCluster)(nil), // 2: dbaas.v1beta1.PXCCluster - (*ListDBClustersRequest)(nil), // 3: dbaas.v1beta1.ListDBClustersRequest - (*ListDBClustersResponse)(nil), // 4: dbaas.v1beta1.ListDBClustersResponse - (*RestartDBClusterRequest)(nil), // 5: dbaas.v1beta1.RestartDBClusterRequest - (*RestartDBClusterResponse)(nil), // 6: dbaas.v1beta1.RestartDBClusterResponse - (*GetDBClusterRequest)(nil), // 7: dbaas.v1beta1.GetDBClusterRequest - (*GetDBClusterResponse)(nil), // 8: dbaas.v1beta1.GetDBClusterResponse - (*DeleteDBClusterRequest)(nil), // 9: dbaas.v1beta1.DeleteDBClusterRequest - (*DeleteDBClusterResponse)(nil), // 10: dbaas.v1beta1.DeleteDBClusterResponse - (*S3Item)(nil), // 11: dbaas.v1beta1.S3Item - (*ListS3BackupsRequest)(nil), // 12: dbaas.v1beta1.ListS3BackupsRequest - (*ListS3BackupsResponse)(nil), // 13: dbaas.v1beta1.ListS3BackupsResponse - (*ListSecretsRequest)(nil), // 14: dbaas.v1beta1.ListSecretsRequest - (*Secret)(nil), // 15: dbaas.v1beta1.Secret - (*ListSecretsResponse)(nil), // 16: dbaas.v1beta1.ListSecretsResponse - (*RunningOperation)(nil), // 17: dbaas.v1beta1.RunningOperation - (*PSMDBClusterParams)(nil), // 18: dbaas.v1beta1.PSMDBClusterParams - (*Backup)(nil), // 19: dbaas.v1beta1.Backup - (*Restore)(nil), // 20: dbaas.v1beta1.Restore - (*Template)(nil), // 21: dbaas.v1beta1.Template - (*PXCClusterParams)(nil), // 22: dbaas.v1beta1.PXCClusterParams - (DBClusterType)(0), // 23: dbaas.v1beta1.DBClusterType - } -) - -var file_managementpb_dbaas_db_clusters_proto_depIdxs = []int32{ - 0, // 0: dbaas.v1beta1.PSMDBCluster.state:type_name -> dbaas.v1beta1.DBClusterState - 17, // 1: dbaas.v1beta1.PSMDBCluster.operation:type_name -> dbaas.v1beta1.RunningOperation - 18, // 2: dbaas.v1beta1.PSMDBCluster.params:type_name -> dbaas.v1beta1.PSMDBClusterParams - 19, // 3: dbaas.v1beta1.PSMDBCluster.backup:type_name -> dbaas.v1beta1.Backup - 20, // 4: dbaas.v1beta1.PSMDBCluster.restore:type_name -> dbaas.v1beta1.Restore - 21, // 5: dbaas.v1beta1.PSMDBCluster.template:type_name -> dbaas.v1beta1.Template - 0, // 6: dbaas.v1beta1.PXCCluster.state:type_name -> dbaas.v1beta1.DBClusterState - 17, // 7: dbaas.v1beta1.PXCCluster.operation:type_name -> dbaas.v1beta1.RunningOperation - 22, // 8: dbaas.v1beta1.PXCCluster.params:type_name -> dbaas.v1beta1.PXCClusterParams - 19, // 9: dbaas.v1beta1.PXCCluster.backup:type_name -> dbaas.v1beta1.Backup - 20, // 10: dbaas.v1beta1.PXCCluster.restore:type_name -> dbaas.v1beta1.Restore - 21, // 11: dbaas.v1beta1.PXCCluster.template:type_name -> dbaas.v1beta1.Template - 2, // 12: dbaas.v1beta1.ListDBClustersResponse.pxc_clusters:type_name -> dbaas.v1beta1.PXCCluster - 1, // 13: dbaas.v1beta1.ListDBClustersResponse.psmdb_clusters:type_name -> dbaas.v1beta1.PSMDBCluster - 23, // 14: dbaas.v1beta1.RestartDBClusterRequest.cluster_type:type_name -> dbaas.v1beta1.DBClusterType - 2, // 15: dbaas.v1beta1.GetDBClusterResponse.pxc_cluster:type_name -> dbaas.v1beta1.PXCCluster - 1, // 16: dbaas.v1beta1.GetDBClusterResponse.psmdb_cluster:type_name -> dbaas.v1beta1.PSMDBCluster - 23, // 17: dbaas.v1beta1.DeleteDBClusterRequest.cluster_type:type_name -> dbaas.v1beta1.DBClusterType - 11, // 18: dbaas.v1beta1.ListS3BackupsResponse.backups:type_name -> dbaas.v1beta1.S3Item - 15, // 19: dbaas.v1beta1.ListSecretsResponse.secrets:type_name -> dbaas.v1beta1.Secret - 3, // 20: dbaas.v1beta1.DBClusters.ListDBClusters:input_type -> dbaas.v1beta1.ListDBClustersRequest - 7, // 21: dbaas.v1beta1.DBClusters.GetDBCluster:input_type -> dbaas.v1beta1.GetDBClusterRequest - 5, // 22: dbaas.v1beta1.DBClusters.RestartDBCluster:input_type -> dbaas.v1beta1.RestartDBClusterRequest - 9, // 23: dbaas.v1beta1.DBClusters.DeleteDBCluster:input_type -> dbaas.v1beta1.DeleteDBClusterRequest - 12, // 24: dbaas.v1beta1.DBClusters.ListS3Backups:input_type -> dbaas.v1beta1.ListS3BackupsRequest - 14, // 25: dbaas.v1beta1.DBClusters.ListSecrets:input_type -> dbaas.v1beta1.ListSecretsRequest - 4, // 26: dbaas.v1beta1.DBClusters.ListDBClusters:output_type -> dbaas.v1beta1.ListDBClustersResponse - 8, // 27: dbaas.v1beta1.DBClusters.GetDBCluster:output_type -> dbaas.v1beta1.GetDBClusterResponse - 6, // 28: dbaas.v1beta1.DBClusters.RestartDBCluster:output_type -> dbaas.v1beta1.RestartDBClusterResponse - 10, // 29: dbaas.v1beta1.DBClusters.DeleteDBCluster:output_type -> dbaas.v1beta1.DeleteDBClusterResponse - 13, // 30: dbaas.v1beta1.DBClusters.ListS3Backups:output_type -> dbaas.v1beta1.ListS3BackupsResponse - 16, // 31: dbaas.v1beta1.DBClusters.ListSecrets:output_type -> dbaas.v1beta1.ListSecretsResponse - 26, // [26:32] is the sub-list for method output_type - 20, // [20:26] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_managementpb_dbaas_db_clusters_proto_init() } -func file_managementpb_dbaas_db_clusters_proto_init() { - if File_managementpb_dbaas_db_clusters_proto != nil { - return - } - file_managementpb_dbaas_dbaas_proto_init() - file_managementpb_dbaas_psmdb_clusters_proto_init() - file_managementpb_dbaas_pxc_clusters_proto_init() - file_managementpb_dbaas_templates_proto_init() - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_db_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PSMDBCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PXCCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDBClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListDBClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestartDBClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestartDBClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDBClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDBClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteDBClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteDBClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*S3Item); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListS3BackupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListS3BackupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecretsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_db_clusters_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecretsResponse); 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_managementpb_dbaas_db_clusters_proto_rawDesc, - NumEnums: 1, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_db_clusters_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_db_clusters_proto_depIdxs, - EnumInfos: file_managementpb_dbaas_db_clusters_proto_enumTypes, - MessageInfos: file_managementpb_dbaas_db_clusters_proto_msgTypes, - }.Build() - File_managementpb_dbaas_db_clusters_proto = out.File - file_managementpb_dbaas_db_clusters_proto_rawDesc = nil - file_managementpb_dbaas_db_clusters_proto_goTypes = nil - file_managementpb_dbaas_db_clusters_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/db_clusters.pb.gw.go b/api/managementpb/dbaas/db_clusters.pb.gw.go deleted file mode 100644 index db8d99ae82..0000000000 --- a/api/managementpb/dbaas/db_clusters.pb.gw.go +++ /dev/null @@ -1,572 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/db_clusters.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_DBClusters_ListDBClusters_0(ctx context.Context, marshaler runtime.Marshaler, client DBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDBClustersRequest - 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.ListDBClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_DBClusters_ListDBClusters_0(ctx context.Context, marshaler runtime.Marshaler, server DBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListDBClustersRequest - 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.ListDBClusters(ctx, &protoReq) - return msg, metadata, err -} - -func request_DBClusters_GetDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, client DBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDBClusterRequest - 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.GetDBCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_DBClusters_GetDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, server DBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetDBClusterRequest - 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.GetDBCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_DBClusters_RestartDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, client DBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RestartDBClusterRequest - 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.RestartDBCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_DBClusters_RestartDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, server DBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RestartDBClusterRequest - 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.RestartDBCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_DBClusters_DeleteDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, client DBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteDBClusterRequest - 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.DeleteDBCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_DBClusters_DeleteDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, server DBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteDBClusterRequest - 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.DeleteDBCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_DBClusters_ListS3Backups_0(ctx context.Context, marshaler runtime.Marshaler, client DBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListS3BackupsRequest - 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.ListS3Backups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_DBClusters_ListS3Backups_0(ctx context.Context, marshaler runtime.Marshaler, server DBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListS3BackupsRequest - 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.ListS3Backups(ctx, &protoReq) - return msg, metadata, err -} - -func request_DBClusters_ListSecrets_0(ctx context.Context, marshaler runtime.Marshaler, client DBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSecretsRequest - 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.ListSecrets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_DBClusters_ListSecrets_0(ctx context.Context, marshaler runtime.Marshaler, server DBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSecretsRequest - 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.ListSecrets(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterDBClustersHandlerServer registers the http handlers for service DBClusters to "mux". -// UnaryRPC :call DBClustersServer 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 RegisterDBClustersHandlerFromEndpoint instead. -func RegisterDBClustersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DBClustersServer) error { - mux.Handle("POST", pattern_DBClusters_ListDBClusters_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, "/dbaas.v1beta1.DBClusters/ListDBClusters", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_DBClusters_ListDBClusters_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_DBClusters_ListDBClusters_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_GetDBCluster_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, "/dbaas.v1beta1.DBClusters/GetDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_DBClusters_GetDBCluster_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_DBClusters_GetDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_RestartDBCluster_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, "/dbaas.v1beta1.DBClusters/RestartDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/Restart")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_DBClusters_RestartDBCluster_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_DBClusters_RestartDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_DeleteDBCluster_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, "/dbaas.v1beta1.DBClusters/DeleteDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/Delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_DBClusters_DeleteDBCluster_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_DBClusters_DeleteDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_ListS3Backups_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, "/dbaas.v1beta1.DBClusters/ListS3Backups", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Backups/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_DBClusters_ListS3Backups_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_DBClusters_ListS3Backups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_ListSecrets_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, "/dbaas.v1beta1.DBClusters/ListSecrets", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Secrets/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_DBClusters_ListSecrets_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_DBClusters_ListSecrets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterDBClustersHandlerFromEndpoint is same as RegisterDBClustersHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterDBClustersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterDBClustersHandler(ctx, mux, conn) -} - -// RegisterDBClustersHandler registers the http handlers for service DBClusters to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterDBClustersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterDBClustersHandlerClient(ctx, mux, NewDBClustersClient(conn)) -} - -// RegisterDBClustersHandlerClient registers the http handlers for service DBClusters -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DBClustersClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DBClustersClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "DBClustersClient" to call the correct interceptors. -func RegisterDBClustersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DBClustersClient) error { - mux.Handle("POST", pattern_DBClusters_ListDBClusters_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, "/dbaas.v1beta1.DBClusters/ListDBClusters", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_DBClusters_ListDBClusters_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_DBClusters_ListDBClusters_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_GetDBCluster_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, "/dbaas.v1beta1.DBClusters/GetDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_DBClusters_GetDBCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_DBClusters_GetDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_RestartDBCluster_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, "/dbaas.v1beta1.DBClusters/RestartDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/Restart")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_DBClusters_RestartDBCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_DBClusters_RestartDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_DeleteDBCluster_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, "/dbaas.v1beta1.DBClusters/DeleteDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/DBClusters/Delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_DBClusters_DeleteDBCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_DBClusters_DeleteDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_ListS3Backups_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, "/dbaas.v1beta1.DBClusters/ListS3Backups", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Backups/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_DBClusters_ListS3Backups_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_DBClusters_ListS3Backups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_DBClusters_ListSecrets_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, "/dbaas.v1beta1.DBClusters/ListSecrets", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Secrets/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_DBClusters_ListSecrets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_DBClusters_ListSecrets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var ( - pattern_DBClusters_ListDBClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "DBClusters", "List"}, "")) - - pattern_DBClusters_GetDBCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "DBClusters", "Get"}, "")) - - pattern_DBClusters_RestartDBCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "DBClusters", "Restart"}, "")) - - pattern_DBClusters_DeleteDBCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "DBClusters", "Delete"}, "")) - - pattern_DBClusters_ListS3Backups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Backups", "List"}, "")) - - pattern_DBClusters_ListSecrets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Secrets", "List"}, "")) -) - -var ( - forward_DBClusters_ListDBClusters_0 = runtime.ForwardResponseMessage - - forward_DBClusters_GetDBCluster_0 = runtime.ForwardResponseMessage - - forward_DBClusters_RestartDBCluster_0 = runtime.ForwardResponseMessage - - forward_DBClusters_DeleteDBCluster_0 = runtime.ForwardResponseMessage - - forward_DBClusters_ListS3Backups_0 = runtime.ForwardResponseMessage - - forward_DBClusters_ListSecrets_0 = runtime.ForwardResponseMessage -) diff --git a/api/managementpb/dbaas/db_clusters.pb.validate.go b/api/managementpb/dbaas/db_clusters.pb.validate.go deleted file mode 100644 index 396ae83f78..0000000000 --- a/api/managementpb/dbaas/db_clusters.pb.validate.go +++ /dev/null @@ -1,2278 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/db_clusters.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on PSMDBCluster with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *PSMDBCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PSMDBCluster with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in PSMDBClusterMultiError, or -// nil if none found. -func (m *PSMDBCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *PSMDBCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for State - - if all { - switch v := interface{}(m.GetOperation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOperation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Exposed - - // no validation rules for InstalledImage - - // no validation rules for AvailableImage - - // no validation rules for InternetFacing - - if all { - switch v := interface{}(m.GetBackup()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBackup()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRestore()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRestore()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTemplate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return PSMDBClusterMultiError(errors) - } - - return nil -} - -// PSMDBClusterMultiError is an error wrapping multiple validation errors -// returned by PSMDBCluster.ValidateAll() if the designated constraints aren't met. -type PSMDBClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PSMDBClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PSMDBClusterMultiError) AllErrors() []error { return m } - -// PSMDBClusterValidationError is the validation error returned by -// PSMDBCluster.Validate if the designated constraints aren't met. -type PSMDBClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PSMDBClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PSMDBClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PSMDBClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PSMDBClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PSMDBClusterValidationError) ErrorName() string { return "PSMDBClusterValidationError" } - -// Error satisfies the builtin error interface -func (e PSMDBClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPSMDBCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PSMDBClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PSMDBClusterValidationError{} - -// Validate checks the field values on PXCCluster with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *PXCCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PXCCluster with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in PXCClusterMultiError, or -// nil if none found. -func (m *PXCCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *PXCCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for State - - if all { - switch v := interface{}(m.GetOperation()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOperation()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterValidationError{ - field: "Operation", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Exposed - - // no validation rules for InstalledImage - - // no validation rules for AvailableImage - - // no validation rules for InternetFacing - - if all { - switch v := interface{}(m.GetBackup()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBackup()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRestore()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRestore()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTemplate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return PXCClusterMultiError(errors) - } - - return nil -} - -// PXCClusterMultiError is an error wrapping multiple validation errors -// returned by PXCCluster.ValidateAll() if the designated constraints aren't met. -type PXCClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PXCClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PXCClusterMultiError) AllErrors() []error { return m } - -// PXCClusterValidationError is the validation error returned by -// PXCCluster.Validate if the designated constraints aren't met. -type PXCClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PXCClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PXCClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PXCClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PXCClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PXCClusterValidationError) ErrorName() string { return "PXCClusterValidationError" } - -// Error satisfies the builtin error interface -func (e PXCClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPXCCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PXCClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PXCClusterValidationError{} - -// Validate checks the field values on ListDBClustersRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListDBClustersRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListDBClustersRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListDBClustersRequestMultiError, or nil if none found. -func (m *ListDBClustersRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListDBClustersRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := ListDBClustersRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ListDBClustersRequestMultiError(errors) - } - - return nil -} - -// ListDBClustersRequestMultiError is an error wrapping multiple validation -// errors returned by ListDBClustersRequest.ValidateAll() if the designated -// constraints aren't met. -type ListDBClustersRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListDBClustersRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListDBClustersRequestMultiError) AllErrors() []error { return m } - -// ListDBClustersRequestValidationError is the validation error returned by -// ListDBClustersRequest.Validate if the designated constraints aren't met. -type ListDBClustersRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListDBClustersRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListDBClustersRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListDBClustersRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListDBClustersRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListDBClustersRequestValidationError) ErrorName() string { - return "ListDBClustersRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListDBClustersRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListDBClustersRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListDBClustersRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListDBClustersRequestValidationError{} - -// Validate checks the field values on ListDBClustersResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListDBClustersResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListDBClustersResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListDBClustersResponseMultiError, or nil if none found. -func (m *ListDBClustersResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListDBClustersResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetPxcClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListDBClustersResponseValidationError{ - field: fmt.Sprintf("PxcClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListDBClustersResponseValidationError{ - field: fmt.Sprintf("PxcClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListDBClustersResponseValidationError{ - field: fmt.Sprintf("PxcClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetPsmdbClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListDBClustersResponseValidationError{ - field: fmt.Sprintf("PsmdbClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListDBClustersResponseValidationError{ - field: fmt.Sprintf("PsmdbClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListDBClustersResponseValidationError{ - field: fmt.Sprintf("PsmdbClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListDBClustersResponseMultiError(errors) - } - - return nil -} - -// ListDBClustersResponseMultiError is an error wrapping multiple validation -// errors returned by ListDBClustersResponse.ValidateAll() if the designated -// constraints aren't met. -type ListDBClustersResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListDBClustersResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListDBClustersResponseMultiError) AllErrors() []error { return m } - -// ListDBClustersResponseValidationError is the validation error returned by -// ListDBClustersResponse.Validate if the designated constraints aren't met. -type ListDBClustersResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListDBClustersResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListDBClustersResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListDBClustersResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListDBClustersResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListDBClustersResponseValidationError) ErrorName() string { - return "ListDBClustersResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListDBClustersResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListDBClustersResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListDBClustersResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListDBClustersResponseValidationError{} - -// Validate checks the field values on RestartDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RestartDBClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RestartDBClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RestartDBClusterRequestMultiError, or nil if none found. -func (m *RestartDBClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *RestartDBClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := RestartDBClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := RestartDBClusterRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := DBClusterType_name[int32(m.GetClusterType())]; !ok { - err := RestartDBClusterRequestValidationError{ - field: "ClusterType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RestartDBClusterRequestMultiError(errors) - } - - return nil -} - -// RestartDBClusterRequestMultiError is an error wrapping multiple validation -// errors returned by RestartDBClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type RestartDBClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RestartDBClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RestartDBClusterRequestMultiError) AllErrors() []error { return m } - -// RestartDBClusterRequestValidationError is the validation error returned by -// RestartDBClusterRequest.Validate if the designated constraints aren't met. -type RestartDBClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RestartDBClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RestartDBClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RestartDBClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RestartDBClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RestartDBClusterRequestValidationError) ErrorName() string { - return "RestartDBClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e RestartDBClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRestartDBClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RestartDBClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RestartDBClusterRequestValidationError{} - -// Validate checks the field values on RestartDBClusterResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RestartDBClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RestartDBClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RestartDBClusterResponseMultiError, or nil if none found. -func (m *RestartDBClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *RestartDBClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RestartDBClusterResponseMultiError(errors) - } - - return nil -} - -// RestartDBClusterResponseMultiError is an error wrapping multiple validation -// errors returned by RestartDBClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type RestartDBClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RestartDBClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RestartDBClusterResponseMultiError) AllErrors() []error { return m } - -// RestartDBClusterResponseValidationError is the validation error returned by -// RestartDBClusterResponse.Validate if the designated constraints aren't met. -type RestartDBClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RestartDBClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RestartDBClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RestartDBClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RestartDBClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RestartDBClusterResponseValidationError) ErrorName() string { - return "RestartDBClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e RestartDBClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRestartDBClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RestartDBClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RestartDBClusterResponseValidationError{} - -// Validate checks the field values on GetDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetDBClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetDBClusterRequestMultiError, or nil if none found. -func (m *GetDBClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetDBClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := GetDBClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := GetDBClusterRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GetDBClusterRequestMultiError(errors) - } - - return nil -} - -// GetDBClusterRequestMultiError is an error wrapping multiple validation -// errors returned by GetDBClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type GetDBClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetDBClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetDBClusterRequestMultiError) AllErrors() []error { return m } - -// GetDBClusterRequestValidationError is the validation error returned by -// GetDBClusterRequest.Validate if the designated constraints aren't met. -type GetDBClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetDBClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetDBClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetDBClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetDBClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetDBClusterRequestValidationError) ErrorName() string { - return "GetDBClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetDBClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetDBClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetDBClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetDBClusterRequestValidationError{} - -// Validate checks the field values on GetDBClusterResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetDBClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetDBClusterResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetDBClusterResponseMultiError, or nil if none found. -func (m *GetDBClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetDBClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetPxcCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetDBClusterResponseValidationError{ - field: "PxcCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetDBClusterResponseValidationError{ - field: "PxcCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPxcCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetDBClusterResponseValidationError{ - field: "PxcCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPsmdbCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetDBClusterResponseValidationError{ - field: "PsmdbCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetDBClusterResponseValidationError{ - field: "PsmdbCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPsmdbCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetDBClusterResponseValidationError{ - field: "PsmdbCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetDBClusterResponseMultiError(errors) - } - - return nil -} - -// GetDBClusterResponseMultiError is an error wrapping multiple validation -// errors returned by GetDBClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type GetDBClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetDBClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetDBClusterResponseMultiError) AllErrors() []error { return m } - -// GetDBClusterResponseValidationError is the validation error returned by -// GetDBClusterResponse.Validate if the designated constraints aren't met. -type GetDBClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetDBClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetDBClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetDBClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetDBClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetDBClusterResponseValidationError) ErrorName() string { - return "GetDBClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetDBClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetDBClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetDBClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetDBClusterResponseValidationError{} - -// Validate checks the field values on DeleteDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteDBClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteDBClusterRequestMultiError, or nil if none found. -func (m *DeleteDBClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteDBClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := DeleteDBClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := DeleteDBClusterRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := DBClusterType_name[int32(m.GetClusterType())]; !ok { - err := DeleteDBClusterRequestValidationError{ - field: "ClusterType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return DeleteDBClusterRequestMultiError(errors) - } - - return nil -} - -// DeleteDBClusterRequestMultiError is an error wrapping multiple validation -// errors returned by DeleteDBClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type DeleteDBClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteDBClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteDBClusterRequestMultiError) AllErrors() []error { return m } - -// DeleteDBClusterRequestValidationError is the validation error returned by -// DeleteDBClusterRequest.Validate if the designated constraints aren't met. -type DeleteDBClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteDBClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteDBClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteDBClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteDBClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteDBClusterRequestValidationError) ErrorName() string { - return "DeleteDBClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteDBClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteDBClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteDBClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteDBClusterRequestValidationError{} - -// Validate checks the field values on DeleteDBClusterResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteDBClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteDBClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteDBClusterResponseMultiError, or nil if none found. -func (m *DeleteDBClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteDBClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return DeleteDBClusterResponseMultiError(errors) - } - - return nil -} - -// DeleteDBClusterResponseMultiError is an error wrapping multiple validation -// errors returned by DeleteDBClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type DeleteDBClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteDBClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteDBClusterResponseMultiError) AllErrors() []error { return m } - -// DeleteDBClusterResponseValidationError is the validation error returned by -// DeleteDBClusterResponse.Validate if the designated constraints aren't met. -type DeleteDBClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteDBClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteDBClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteDBClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteDBClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteDBClusterResponseValidationError) ErrorName() string { - return "DeleteDBClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteDBClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteDBClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteDBClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteDBClusterResponseValidationError{} - -// Validate checks the field values on S3Item with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *S3Item) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on S3Item with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in S3ItemMultiError, or nil if none found. -func (m *S3Item) ValidateAll() error { - return m.validate(true) -} - -func (m *S3Item) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Key - - if len(errors) > 0 { - return S3ItemMultiError(errors) - } - - return nil -} - -// S3ItemMultiError is an error wrapping multiple validation errors returned by -// S3Item.ValidateAll() if the designated constraints aren't met. -type S3ItemMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m S3ItemMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m S3ItemMultiError) AllErrors() []error { return m } - -// S3ItemValidationError is the validation error returned by S3Item.Validate if -// the designated constraints aren't met. -type S3ItemValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e S3ItemValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e S3ItemValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e S3ItemValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e S3ItemValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e S3ItemValidationError) ErrorName() string { return "S3ItemValidationError" } - -// Error satisfies the builtin error interface -func (e S3ItemValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sS3Item.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = S3ItemValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = S3ItemValidationError{} - -// Validate checks the field values on ListS3BackupsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListS3BackupsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListS3BackupsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListS3BackupsRequestMultiError, or nil if none found. -func (m *ListS3BackupsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListS3BackupsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for LocationId - - if len(errors) > 0 { - return ListS3BackupsRequestMultiError(errors) - } - - return nil -} - -// ListS3BackupsRequestMultiError is an error wrapping multiple validation -// errors returned by ListS3BackupsRequest.ValidateAll() if the designated -// constraints aren't met. -type ListS3BackupsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListS3BackupsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListS3BackupsRequestMultiError) AllErrors() []error { return m } - -// ListS3BackupsRequestValidationError is the validation error returned by -// ListS3BackupsRequest.Validate if the designated constraints aren't met. -type ListS3BackupsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListS3BackupsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListS3BackupsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListS3BackupsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListS3BackupsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListS3BackupsRequestValidationError) ErrorName() string { - return "ListS3BackupsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListS3BackupsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListS3BackupsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListS3BackupsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListS3BackupsRequestValidationError{} - -// Validate checks the field values on ListS3BackupsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListS3BackupsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListS3BackupsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListS3BackupsResponseMultiError, or nil if none found. -func (m *ListS3BackupsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListS3BackupsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetBackups() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListS3BackupsResponseValidationError{ - field: fmt.Sprintf("Backups[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListS3BackupsResponseValidationError{ - field: fmt.Sprintf("Backups[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListS3BackupsResponseValidationError{ - field: fmt.Sprintf("Backups[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListS3BackupsResponseMultiError(errors) - } - - return nil -} - -// ListS3BackupsResponseMultiError is an error wrapping multiple validation -// errors returned by ListS3BackupsResponse.ValidateAll() if the designated -// constraints aren't met. -type ListS3BackupsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListS3BackupsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListS3BackupsResponseMultiError) AllErrors() []error { return m } - -// ListS3BackupsResponseValidationError is the validation error returned by -// ListS3BackupsResponse.Validate if the designated constraints aren't met. -type ListS3BackupsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListS3BackupsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListS3BackupsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListS3BackupsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListS3BackupsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListS3BackupsResponseValidationError) ErrorName() string { - return "ListS3BackupsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListS3BackupsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListS3BackupsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListS3BackupsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListS3BackupsResponseValidationError{} - -// Validate checks the field values on ListSecretsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListSecretsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListSecretsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListSecretsRequestMultiError, or nil if none found. -func (m *ListSecretsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListSecretsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := ListSecretsRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ListSecretsRequestMultiError(errors) - } - - return nil -} - -// ListSecretsRequestMultiError is an error wrapping multiple validation errors -// returned by ListSecretsRequest.ValidateAll() if the designated constraints -// aren't met. -type ListSecretsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListSecretsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListSecretsRequestMultiError) AllErrors() []error { return m } - -// ListSecretsRequestValidationError is the validation error returned by -// ListSecretsRequest.Validate if the designated constraints aren't met. -type ListSecretsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListSecretsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListSecretsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListSecretsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListSecretsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListSecretsRequestValidationError) ErrorName() string { - return "ListSecretsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListSecretsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListSecretsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListSecretsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListSecretsRequestValidationError{} - -// Validate checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Secret) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in SecretMultiError, or nil if none found. -func (m *Secret) ValidateAll() error { - return m.validate(true) -} - -func (m *Secret) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if len(errors) > 0 { - return SecretMultiError(errors) - } - - return nil -} - -// SecretMultiError is an error wrapping multiple validation errors returned by -// Secret.ValidateAll() if the designated constraints aren't met. -type SecretMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SecretMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SecretMultiError) AllErrors() []error { return m } - -// SecretValidationError is the validation error returned by Secret.Validate if -// the designated constraints aren't met. -type SecretValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SecretValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SecretValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SecretValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SecretValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SecretValidationError) ErrorName() string { return "SecretValidationError" } - -// Error satisfies the builtin error interface -func (e SecretValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSecret.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SecretValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SecretValidationError{} - -// Validate checks the field values on ListSecretsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListSecretsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListSecretsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListSecretsResponseMultiError, or nil if none found. -func (m *ListSecretsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListSecretsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetSecrets() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListSecretsResponseValidationError{ - field: fmt.Sprintf("Secrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListSecretsResponseValidationError{ - field: fmt.Sprintf("Secrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListSecretsResponseValidationError{ - field: fmt.Sprintf("Secrets[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListSecretsResponseMultiError(errors) - } - - return nil -} - -// ListSecretsResponseMultiError is an error wrapping multiple validation -// errors returned by ListSecretsResponse.ValidateAll() if the designated -// constraints aren't met. -type ListSecretsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListSecretsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListSecretsResponseMultiError) AllErrors() []error { return m } - -// ListSecretsResponseValidationError is the validation error returned by -// ListSecretsResponse.Validate if the designated constraints aren't met. -type ListSecretsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListSecretsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListSecretsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListSecretsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListSecretsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListSecretsResponseValidationError) ErrorName() string { - return "ListSecretsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListSecretsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListSecretsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListSecretsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListSecretsResponseValidationError{} diff --git a/api/managementpb/dbaas/db_clusters.proto b/api/managementpb/dbaas/db_clusters.proto deleted file mode 100644 index a30e6de4f2..0000000000 --- a/api/managementpb/dbaas/db_clusters.proto +++ /dev/null @@ -1,211 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "managementpb/dbaas/dbaas.proto"; -import "managementpb/dbaas/psmdb_clusters.proto"; -import "managementpb/dbaas/pxc_clusters.proto"; -import "managementpb/dbaas/templates.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// DBClusterState represents DB cluster CR state. -enum DBClusterState { - // DB_CLUSTER_STATE_INVALID represents unknown state. - DB_CLUSTER_STATE_INVALID = 0; - // DB_CLUSTER_STATE_CHANGING represents a cluster being changed. - DB_CLUSTER_STATE_CHANGING = 1; - // DB_CLUSTER_STATE_READY represents a cluster without pending changes. - DB_CLUSTER_STATE_READY = 2; - // DB_CLUSTER_STATE_FAILED represents a failed cluster. - DB_CLUSTER_STATE_FAILED = 3; - // DB_CLUSTER_STATE_DELETING represents a cluster being deleting. - DB_CLUSTER_STATE_DELETING = 4; - // DB_CLUSTER_STATE_PAUSED represents a cluster is paused. - DB_CLUSTER_STATE_PAUSED = 5; - // DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING. - // It indicates database cluster upgrade is ongoing. - DB_CLUSTER_STATE_UPGRADING = 6; -} - -// PSMDBCluster represents PSMDB cluster information. -message PSMDBCluster { - // Cluster name. - string name = 1; - // Cluster state. - DBClusterState state = 2; - // Currently running operation, if any. - RunningOperation operation = 3; - // Cluster parameters. - PSMDBClusterParams params = 4; - // DB cluster accessible outside of K8s cluster. - bool exposed = 5; - // Installed PSMDB image. - string installed_image = 6; - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - string available_image = 7; - // Is DB cluster accessible via public internet. - bool internet_facing = 8; - // Backup configuration parameters. - Backup backup = 9; - // Restore configuration parameters. - Restore restore = 10; - // Apply IP source ranges against the cluster. - repeated string source_ranges = 12; - // Configuration template. - Template template = 11; -} - -// PXCCluster represents PXC cluster information. -message PXCCluster { - // Cluster name. - string name = 1; - // Cluster state. - DBClusterState state = 2; - // Currently running operation, if any. - RunningOperation operation = 3; - // Cluster parameters. - PXCClusterParams params = 4; - // DB cluster accessible outside of K8s cluster. - bool exposed = 5; - // Installed XtraDB image. - string installed_image = 6; - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - string available_image = 7; - // Is DB cluster accessible via public internet. - bool internet_facing = 8; - // Backup configuration parameters. - Backup backup = 9; - // Restore configuration parameters. - Restore restore = 10; - // Apply IP source ranges against the cluster. - repeated string source_ranges = 12; - // Configuration template. - Template template = 11; -} - -message ListDBClustersRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; -} - -message ListDBClustersResponse { - // PXC clusters information. - repeated PXCCluster pxc_clusters = 1; - // PSMDB clusters information. - repeated PSMDBCluster psmdb_clusters = 2; -} - -message RestartDBClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PXC cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; - // DB cluster type. - DBClusterType cluster_type = 3 [(validate.rules).enum.defined_only = true]; -} - -message RestartDBClusterResponse {} - -message GetDBClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // DB cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; -} - -message GetDBClusterResponse { - // PXC cluster information. - PXCCluster pxc_cluster = 1; - // PSMDB cluster information. - PSMDBCluster psmdb_cluster = 2; -} - -message DeleteDBClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // DB cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; - // DB cluster type. - DBClusterType cluster_type = 3 [(validate.rules).enum.defined_only = true]; -} - -message DeleteDBClusterResponse {} - -message S3Item { - // Key of a filename on s3. - string key = 1; -} -message ListS3BackupsRequest { - // Backup Location ID to list backups from - string location_id = 1; -} -message ListS3BackupsResponse { - // Backup list. - repeated S3Item backups = 1; -} - -message ListSecretsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; -} -message Secret { - // Name of a secret - string name = 1; -} -message ListSecretsResponse { - // Secret list. - repeated Secret secrets = 1; -} - -// DBClusters service provides public methods for managing db clusters. -service DBClusters { - // ListDBClusters returns a list of DB clusters. - rpc ListDBClusters(ListDBClustersRequest) returns (ListDBClustersResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/DBClusters/List" - body: "*" - }; - } - // GetDBCluster returns parameters used to create a database cluster - rpc GetDBCluster(GetDBClusterRequest) returns (GetDBClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/DBClusters/Get" - body: "*" - }; - } - // RestartDBCluster restarts DB cluster. - rpc RestartDBCluster(RestartDBClusterRequest) returns (RestartDBClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/DBClusters/Restart" - body: "*" - }; - } - // DeleteDBCluster deletes DB cluster. - rpc DeleteDBCluster(DeleteDBClusterRequest) returns (DeleteDBClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/DBClusters/Delete" - body: "*" - }; - } - - // ListS3Backups lists backups stored on s3. - rpc ListS3Backups(ListS3BackupsRequest) returns (ListS3BackupsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Backups/List" - body: "*" - }; - } - - // ListSecrets returns a list of secrets from k8s - rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Secrets/List" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/db_clusters_grpc.pb.go b/api/managementpb/dbaas/db_clusters_grpc.pb.go deleted file mode 100644 index 20e41e1630..0000000000 --- a/api/managementpb/dbaas/db_clusters_grpc.pb.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/db_clusters.proto - -package dbaasv1beta1 - -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 - -const ( - DBClusters_ListDBClusters_FullMethodName = "/dbaas.v1beta1.DBClusters/ListDBClusters" - DBClusters_GetDBCluster_FullMethodName = "/dbaas.v1beta1.DBClusters/GetDBCluster" - DBClusters_RestartDBCluster_FullMethodName = "/dbaas.v1beta1.DBClusters/RestartDBCluster" - DBClusters_DeleteDBCluster_FullMethodName = "/dbaas.v1beta1.DBClusters/DeleteDBCluster" - DBClusters_ListS3Backups_FullMethodName = "/dbaas.v1beta1.DBClusters/ListS3Backups" - DBClusters_ListSecrets_FullMethodName = "/dbaas.v1beta1.DBClusters/ListSecrets" -) - -// DBClustersClient is the client API for DBClusters 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 DBClustersClient interface { - // ListDBClusters returns a list of DB clusters. - ListDBClusters(ctx context.Context, in *ListDBClustersRequest, opts ...grpc.CallOption) (*ListDBClustersResponse, error) - // GetDBCluster returns parameters used to create a database cluster - GetDBCluster(ctx context.Context, in *GetDBClusterRequest, opts ...grpc.CallOption) (*GetDBClusterResponse, error) - // RestartDBCluster restarts DB cluster. - RestartDBCluster(ctx context.Context, in *RestartDBClusterRequest, opts ...grpc.CallOption) (*RestartDBClusterResponse, error) - // DeleteDBCluster deletes DB cluster. - DeleteDBCluster(ctx context.Context, in *DeleteDBClusterRequest, opts ...grpc.CallOption) (*DeleteDBClusterResponse, error) - // ListS3Backups lists backups stored on s3. - ListS3Backups(ctx context.Context, in *ListS3BackupsRequest, opts ...grpc.CallOption) (*ListS3BackupsResponse, error) - // ListSecrets returns a list of secrets from k8s - ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) -} - -type dBClustersClient struct { - cc grpc.ClientConnInterface -} - -func NewDBClustersClient(cc grpc.ClientConnInterface) DBClustersClient { - return &dBClustersClient{cc} -} - -func (c *dBClustersClient) ListDBClusters(ctx context.Context, in *ListDBClustersRequest, opts ...grpc.CallOption) (*ListDBClustersResponse, error) { - out := new(ListDBClustersResponse) - err := c.cc.Invoke(ctx, DBClusters_ListDBClusters_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dBClustersClient) GetDBCluster(ctx context.Context, in *GetDBClusterRequest, opts ...grpc.CallOption) (*GetDBClusterResponse, error) { - out := new(GetDBClusterResponse) - err := c.cc.Invoke(ctx, DBClusters_GetDBCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dBClustersClient) RestartDBCluster(ctx context.Context, in *RestartDBClusterRequest, opts ...grpc.CallOption) (*RestartDBClusterResponse, error) { - out := new(RestartDBClusterResponse) - err := c.cc.Invoke(ctx, DBClusters_RestartDBCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dBClustersClient) DeleteDBCluster(ctx context.Context, in *DeleteDBClusterRequest, opts ...grpc.CallOption) (*DeleteDBClusterResponse, error) { - out := new(DeleteDBClusterResponse) - err := c.cc.Invoke(ctx, DBClusters_DeleteDBCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dBClustersClient) ListS3Backups(ctx context.Context, in *ListS3BackupsRequest, opts ...grpc.CallOption) (*ListS3BackupsResponse, error) { - out := new(ListS3BackupsResponse) - err := c.cc.Invoke(ctx, DBClusters_ListS3Backups_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dBClustersClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) { - out := new(ListSecretsResponse) - err := c.cc.Invoke(ctx, DBClusters_ListSecrets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DBClustersServer is the server API for DBClusters service. -// All implementations must embed UnimplementedDBClustersServer -// for forward compatibility -type DBClustersServer interface { - // ListDBClusters returns a list of DB clusters. - ListDBClusters(context.Context, *ListDBClustersRequest) (*ListDBClustersResponse, error) - // GetDBCluster returns parameters used to create a database cluster - GetDBCluster(context.Context, *GetDBClusterRequest) (*GetDBClusterResponse, error) - // RestartDBCluster restarts DB cluster. - RestartDBCluster(context.Context, *RestartDBClusterRequest) (*RestartDBClusterResponse, error) - // DeleteDBCluster deletes DB cluster. - DeleteDBCluster(context.Context, *DeleteDBClusterRequest) (*DeleteDBClusterResponse, error) - // ListS3Backups lists backups stored on s3. - ListS3Backups(context.Context, *ListS3BackupsRequest) (*ListS3BackupsResponse, error) - // ListSecrets returns a list of secrets from k8s - ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) - mustEmbedUnimplementedDBClustersServer() -} - -// UnimplementedDBClustersServer must be embedded to have forward compatible implementations. -type UnimplementedDBClustersServer struct{} - -func (UnimplementedDBClustersServer) ListDBClusters(context.Context, *ListDBClustersRequest) (*ListDBClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDBClusters not implemented") -} - -func (UnimplementedDBClustersServer) GetDBCluster(context.Context, *GetDBClusterRequest) (*GetDBClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDBCluster not implemented") -} - -func (UnimplementedDBClustersServer) RestartDBCluster(context.Context, *RestartDBClusterRequest) (*RestartDBClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RestartDBCluster not implemented") -} - -func (UnimplementedDBClustersServer) DeleteDBCluster(context.Context, *DeleteDBClusterRequest) (*DeleteDBClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteDBCluster not implemented") -} - -func (UnimplementedDBClustersServer) ListS3Backups(context.Context, *ListS3BackupsRequest) (*ListS3BackupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListS3Backups not implemented") -} - -func (UnimplementedDBClustersServer) ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSecrets not implemented") -} -func (UnimplementedDBClustersServer) mustEmbedUnimplementedDBClustersServer() {} - -// UnsafeDBClustersServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DBClustersServer will -// result in compilation errors. -type UnsafeDBClustersServer interface { - mustEmbedUnimplementedDBClustersServer() -} - -func RegisterDBClustersServer(s grpc.ServiceRegistrar, srv DBClustersServer) { - s.RegisterService(&DBClusters_ServiceDesc, srv) -} - -func _DBClusters_ListDBClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDBClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DBClustersServer).ListDBClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DBClusters_ListDBClusters_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DBClustersServer).ListDBClusters(ctx, req.(*ListDBClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DBClusters_GetDBCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDBClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DBClustersServer).GetDBCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DBClusters_GetDBCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DBClustersServer).GetDBCluster(ctx, req.(*GetDBClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DBClusters_RestartDBCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RestartDBClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DBClustersServer).RestartDBCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DBClusters_RestartDBCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DBClustersServer).RestartDBCluster(ctx, req.(*RestartDBClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DBClusters_DeleteDBCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteDBClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DBClustersServer).DeleteDBCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DBClusters_DeleteDBCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DBClustersServer).DeleteDBCluster(ctx, req.(*DeleteDBClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DBClusters_ListS3Backups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListS3BackupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DBClustersServer).ListS3Backups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DBClusters_ListS3Backups_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DBClustersServer).ListS3Backups(ctx, req.(*ListS3BackupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DBClusters_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSecretsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DBClustersServer).ListSecrets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: DBClusters_ListSecrets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DBClustersServer).ListSecrets(ctx, req.(*ListSecretsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// DBClusters_ServiceDesc is the grpc.ServiceDesc for DBClusters service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var DBClusters_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.DBClusters", - HandlerType: (*DBClustersServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListDBClusters", - Handler: _DBClusters_ListDBClusters_Handler, - }, - { - MethodName: "GetDBCluster", - Handler: _DBClusters_GetDBCluster_Handler, - }, - { - MethodName: "RestartDBCluster", - Handler: _DBClusters_RestartDBCluster_Handler, - }, - { - MethodName: "DeleteDBCluster", - Handler: _DBClusters_DeleteDBCluster_Handler, - }, - { - MethodName: "ListS3Backups", - Handler: _DBClusters_ListS3Backups_Handler, - }, - { - MethodName: "ListSecrets", - Handler: _DBClusters_ListSecrets_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/db_clusters.proto", -} diff --git a/api/managementpb/dbaas/dbaas.pb.go b/api/managementpb/dbaas/dbaas.pb.go deleted file mode 100644 index 52cb9f53ea..0000000000 --- a/api/managementpb/dbaas/dbaas.pb.go +++ /dev/null @@ -1,661 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/dbaas.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// DBClusterType represents database cluster type. -type DBClusterType int32 - -const ( - // DB_CLUSTER_TYPE_INVALID represents unknown cluster type. - DBClusterType_DB_CLUSTER_TYPE_INVALID DBClusterType = 0 - // DB_CLUSTER_TYPE_PXC represents pxc cluster type. - DBClusterType_DB_CLUSTER_TYPE_PXC DBClusterType = 1 - // DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type. - DBClusterType_DB_CLUSTER_TYPE_PSMDB DBClusterType = 2 -) - -// Enum value maps for DBClusterType. -var ( - DBClusterType_name = map[int32]string{ - 0: "DB_CLUSTER_TYPE_INVALID", - 1: "DB_CLUSTER_TYPE_PXC", - 2: "DB_CLUSTER_TYPE_PSMDB", - } - DBClusterType_value = map[string]int32{ - "DB_CLUSTER_TYPE_INVALID": 0, - "DB_CLUSTER_TYPE_PXC": 1, - "DB_CLUSTER_TYPE_PSMDB": 2, - } -) - -func (x DBClusterType) Enum() *DBClusterType { - p := new(DBClusterType) - *p = x - return p -} - -func (x DBClusterType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DBClusterType) Descriptor() protoreflect.EnumDescriptor { - return file_managementpb_dbaas_dbaas_proto_enumTypes[0].Descriptor() -} - -func (DBClusterType) Type() protoreflect.EnumType { - return &file_managementpb_dbaas_dbaas_proto_enumTypes[0] -} - -func (x DBClusterType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DBClusterType.Descriptor instead. -func (DBClusterType) EnumDescriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{0} -} - -// OperatorsStatus defines status of operators installed in Kubernetes cluster. -type OperatorsStatus int32 - -const ( - // OPERATORS_STATUS_INVALID represents unknown state. - OperatorsStatus_OPERATORS_STATUS_INVALID OperatorsStatus = 0 - // OPERATORS_STATUS_OK represents that operators are installed and have supported API version. - OperatorsStatus_OPERATORS_STATUS_OK OperatorsStatus = 1 - // OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version. - OperatorsStatus_OPERATORS_STATUS_UNSUPPORTED OperatorsStatus = 2 - // OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed. - OperatorsStatus_OPERATORS_STATUS_NOT_INSTALLED OperatorsStatus = 3 -) - -// Enum value maps for OperatorsStatus. -var ( - OperatorsStatus_name = map[int32]string{ - 0: "OPERATORS_STATUS_INVALID", - 1: "OPERATORS_STATUS_OK", - 2: "OPERATORS_STATUS_UNSUPPORTED", - 3: "OPERATORS_STATUS_NOT_INSTALLED", - } - OperatorsStatus_value = map[string]int32{ - "OPERATORS_STATUS_INVALID": 0, - "OPERATORS_STATUS_OK": 1, - "OPERATORS_STATUS_UNSUPPORTED": 2, - "OPERATORS_STATUS_NOT_INSTALLED": 3, - } -) - -func (x OperatorsStatus) Enum() *OperatorsStatus { - p := new(OperatorsStatus) - *p = x - return p -} - -func (x OperatorsStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OperatorsStatus) Descriptor() protoreflect.EnumDescriptor { - return file_managementpb_dbaas_dbaas_proto_enumTypes[1].Descriptor() -} - -func (OperatorsStatus) Type() protoreflect.EnumType { - return &file_managementpb_dbaas_dbaas_proto_enumTypes[1] -} - -func (x OperatorsStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OperatorsStatus.Descriptor instead. -func (OperatorsStatus) EnumDescriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{1} -} - -// RunningOperation respresents a long-running operation. -type RunningOperation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Finished steps of the operaion; can decrease or increase compared to the previous value. - FinishedSteps int32 `protobuf:"varint,1,opt,name=finished_steps,json=finishedSteps,proto3" json:"finished_steps,omitempty"` - // Text describing the current operation progress step. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // Total steps needed to finish the operation; can decrease or increase compared to the previous value. - TotalSteps int32 `protobuf:"varint,3,opt,name=total_steps,json=totalSteps,proto3" json:"total_steps,omitempty"` -} - -func (x *RunningOperation) Reset() { - *x = RunningOperation{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_dbaas_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RunningOperation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RunningOperation) ProtoMessage() {} - -func (x *RunningOperation) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_dbaas_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 RunningOperation.ProtoReflect.Descriptor instead. -func (*RunningOperation) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{0} -} - -func (x *RunningOperation) GetFinishedSteps() int32 { - if x != nil { - return x.FinishedSteps - } - return 0 -} - -func (x *RunningOperation) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *RunningOperation) GetTotalSteps() int32 { - if x != nil { - return x.TotalSteps - } - return 0 -} - -// ComputeResources represents container computer resources requests or limits. -type ComputeResources struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // CPUs in milliCPUs; 1000m = 1 vCPU. - CpuM int32 `protobuf:"varint,1,opt,name=cpu_m,json=cpuM,proto3" json:"cpu_m,omitempty"` - // Memory in bytes. - MemoryBytes int64 `protobuf:"varint,2,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"` -} - -func (x *ComputeResources) Reset() { - *x = ComputeResources{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_dbaas_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComputeResources) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComputeResources) ProtoMessage() {} - -func (x *ComputeResources) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_dbaas_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 ComputeResources.ProtoReflect.Descriptor instead. -func (*ComputeResources) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{1} -} - -func (x *ComputeResources) GetCpuM() int32 { - if x != nil { - return x.CpuM - } - return 0 -} - -func (x *ComputeResources) GetMemoryBytes() int64 { - if x != nil { - return x.MemoryBytes - } - return 0 -} - -// Backup configuration for a database cluster -type Backup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Backup Location id of stored backup location in PMM. - LocationId string `protobuf:"bytes,1,opt,name=location_id,json=locationId,proto3" json:"location_id,omitempty"` - // Keep copies represents how many copies should retain. - KeepCopies int32 `protobuf:"varint,2,opt,name=keep_copies,json=keepCopies,proto3" json:"keep_copies,omitempty"` - // Cron expression represents cron expression - CronExpression string `protobuf:"bytes,3,opt,name=cron_expression,json=cronExpression,proto3" json:"cron_expression,omitempty"` - // Service acccount used for backups - ServiceAccount string `protobuf:"bytes,4,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` -} - -func (x *Backup) Reset() { - *x = Backup{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_dbaas_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Backup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Backup) ProtoMessage() {} - -func (x *Backup) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_dbaas_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 Backup.ProtoReflect.Descriptor instead. -func (*Backup) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{2} -} - -func (x *Backup) GetLocationId() string { - if x != nil { - return x.LocationId - } - return "" -} - -func (x *Backup) GetKeepCopies() int32 { - if x != nil { - return x.KeepCopies - } - return 0 -} - -func (x *Backup) GetCronExpression() string { - if x != nil { - return x.CronExpression - } - return "" -} - -func (x *Backup) GetServiceAccount() string { - if x != nil { - return x.ServiceAccount - } - return "" -} - -// Restore represents restoration payload to restore a database cluster from backup -type Restore struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Backup location in PMM. - LocationId string `protobuf:"bytes,1,opt,name=location_id,json=locationId,proto3" json:"location_id,omitempty"` - // Destination filename. - Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` - // K8s Secrets name. - SecretsName string `protobuf:"bytes,3,opt,name=secrets_name,json=secretsName,proto3" json:"secrets_name,omitempty"` -} - -func (x *Restore) Reset() { - *x = Restore{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_dbaas_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Restore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Restore) ProtoMessage() {} - -func (x *Restore) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_dbaas_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 Restore.ProtoReflect.Descriptor instead. -func (*Restore) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{3} -} - -func (x *Restore) GetLocationId() string { - if x != nil { - return x.LocationId - } - return "" -} - -func (x *Restore) GetDestination() string { - if x != nil { - return x.Destination - } - return "" -} - -func (x *Restore) GetSecretsName() string { - if x != nil { - return x.SecretsName - } - return "" -} - -// Resources contains Kubernetes cluster resources. -type Resources struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Memory in bytes. - MemoryBytes uint64 `protobuf:"varint,1,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"` - // CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus. - // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. - CpuM uint64 `protobuf:"varint,2,opt,name=cpu_m,json=cpuM,proto3" json:"cpu_m,omitempty"` - // Disk size in bytes. - DiskSize uint64 `protobuf:"varint,3,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` -} - -func (x *Resources) Reset() { - *x = Resources{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_dbaas_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resources) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resources) ProtoMessage() {} - -func (x *Resources) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_dbaas_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 Resources.ProtoReflect.Descriptor instead. -func (*Resources) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_dbaas_proto_rawDescGZIP(), []int{4} -} - -func (x *Resources) GetMemoryBytes() uint64 { - if x != nil { - return x.MemoryBytes - } - return 0 -} - -func (x *Resources) GetCpuM() uint64 { - if x != nil { - return x.CpuM - } - return 0 -} - -func (x *Resources) GetDiskSize() uint64 { - if x != nil { - return x.DiskSize - } - return 0 -} - -var File_managementpb_dbaas_dbaas_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_dbaas_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, - 0x74, 0x0a, 0x10, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x69, 0x6e, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x53, 0x74, 0x65, 0x70, 0x73, 0x22, 0x4a, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x05, 0x63, 0x70, 0x75, - 0x5f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x70, 0x75, 0x4d, 0x12, 0x21, - 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x06, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1f, 0x0a, 0x0b, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0a, 0x6b, 0x65, 0x65, 0x70, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x12, 0x27, - 0x0a, 0x0f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x6f, 0x6e, 0x45, 0x78, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x6f, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x60, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x12, 0x13, 0x0a, 0x05, 0x63, 0x70, 0x75, 0x5f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x04, 0x63, 0x70, 0x75, 0x4d, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x53, - 0x69, 0x7a, 0x65, 0x2a, 0x60, 0x0a, 0x0d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, - 0x00, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x42, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x58, 0x43, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x42, - 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x53, - 0x4d, 0x44, 0x42, 0x10, 0x02, 0x2a, 0x8e, 0x01, 0x0a, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x50, 0x45, - 0x52, 0x41, 0x54, 0x4f, 0x52, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, - 0x54, 0x4f, 0x52, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, - 0x12, 0x20, 0x0a, 0x1c, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x53, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x53, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, - 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x42, 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x44, 0x62, - 0x61, 0x61, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, - 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x44, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x44, - 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x44, - 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, 0x61, 0x73, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_managementpb_dbaas_dbaas_proto_rawDescOnce sync.Once - file_managementpb_dbaas_dbaas_proto_rawDescData = file_managementpb_dbaas_dbaas_proto_rawDesc -) - -func file_managementpb_dbaas_dbaas_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_dbaas_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_dbaas_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_dbaas_proto_rawDescData) - }) - return file_managementpb_dbaas_dbaas_proto_rawDescData -} - -var ( - file_managementpb_dbaas_dbaas_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_managementpb_dbaas_dbaas_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_managementpb_dbaas_dbaas_proto_goTypes = []interface{}{ - (DBClusterType)(0), // 0: dbaas.v1beta1.DBClusterType - (OperatorsStatus)(0), // 1: dbaas.v1beta1.OperatorsStatus - (*RunningOperation)(nil), // 2: dbaas.v1beta1.RunningOperation - (*ComputeResources)(nil), // 3: dbaas.v1beta1.ComputeResources - (*Backup)(nil), // 4: dbaas.v1beta1.Backup - (*Restore)(nil), // 5: dbaas.v1beta1.Restore - (*Resources)(nil), // 6: dbaas.v1beta1.Resources - } -) - -var file_managementpb_dbaas_dbaas_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_managementpb_dbaas_dbaas_proto_init() } -func file_managementpb_dbaas_dbaas_proto_init() { - if File_managementpb_dbaas_dbaas_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_dbaas_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunningOperation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_dbaas_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComputeResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_dbaas_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Backup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_dbaas_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Restore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_dbaas_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resources); 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_managementpb_dbaas_dbaas_proto_rawDesc, - NumEnums: 2, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_managementpb_dbaas_dbaas_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_dbaas_proto_depIdxs, - EnumInfos: file_managementpb_dbaas_dbaas_proto_enumTypes, - MessageInfos: file_managementpb_dbaas_dbaas_proto_msgTypes, - }.Build() - File_managementpb_dbaas_dbaas_proto = out.File - file_managementpb_dbaas_dbaas_proto_rawDesc = nil - file_managementpb_dbaas_dbaas_proto_goTypes = nil - file_managementpb_dbaas_dbaas_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/dbaas.pb.validate.go b/api/managementpb/dbaas/dbaas.pb.validate.go deleted file mode 100644 index 90c57b121a..0000000000 --- a/api/managementpb/dbaas/dbaas.pb.validate.go +++ /dev/null @@ -1,561 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/dbaas.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RunningOperation with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RunningOperation) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RunningOperation with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RunningOperationMultiError, or nil if none found. -func (m *RunningOperation) ValidateAll() error { - return m.validate(true) -} - -func (m *RunningOperation) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for FinishedSteps - - // no validation rules for Message - - // no validation rules for TotalSteps - - if len(errors) > 0 { - return RunningOperationMultiError(errors) - } - - return nil -} - -// RunningOperationMultiError is an error wrapping multiple validation errors -// returned by RunningOperation.ValidateAll() if the designated constraints -// aren't met. -type RunningOperationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RunningOperationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RunningOperationMultiError) AllErrors() []error { return m } - -// RunningOperationValidationError is the validation error returned by -// RunningOperation.Validate if the designated constraints aren't met. -type RunningOperationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RunningOperationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RunningOperationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RunningOperationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RunningOperationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RunningOperationValidationError) ErrorName() string { return "RunningOperationValidationError" } - -// Error satisfies the builtin error interface -func (e RunningOperationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRunningOperation.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RunningOperationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RunningOperationValidationError{} - -// Validate checks the field values on ComputeResources with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ComputeResources) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ComputeResources with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ComputeResourcesMultiError, or nil if none found. -func (m *ComputeResources) ValidateAll() error { - return m.validate(true) -} - -func (m *ComputeResources) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for CpuM - - // no validation rules for MemoryBytes - - if len(errors) > 0 { - return ComputeResourcesMultiError(errors) - } - - return nil -} - -// ComputeResourcesMultiError is an error wrapping multiple validation errors -// returned by ComputeResources.ValidateAll() if the designated constraints -// aren't met. -type ComputeResourcesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ComputeResourcesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ComputeResourcesMultiError) AllErrors() []error { return m } - -// ComputeResourcesValidationError is the validation error returned by -// ComputeResources.Validate if the designated constraints aren't met. -type ComputeResourcesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComputeResourcesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComputeResourcesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComputeResourcesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComputeResourcesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComputeResourcesValidationError) ErrorName() string { return "ComputeResourcesValidationError" } - -// Error satisfies the builtin error interface -func (e ComputeResourcesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComputeResources.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComputeResourcesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComputeResourcesValidationError{} - -// Validate checks the field values on Backup with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Backup) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Backup with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in BackupMultiError, or nil if none found. -func (m *Backup) ValidateAll() error { - return m.validate(true) -} - -func (m *Backup) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for LocationId - - // no validation rules for KeepCopies - - // no validation rules for CronExpression - - // no validation rules for ServiceAccount - - if len(errors) > 0 { - return BackupMultiError(errors) - } - - return nil -} - -// BackupMultiError is an error wrapping multiple validation errors returned by -// Backup.ValidateAll() if the designated constraints aren't met. -type BackupMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m BackupMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m BackupMultiError) AllErrors() []error { return m } - -// BackupValidationError is the validation error returned by Backup.Validate if -// the designated constraints aren't met. -type BackupValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e BackupValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e BackupValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e BackupValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e BackupValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e BackupValidationError) ErrorName() string { return "BackupValidationError" } - -// Error satisfies the builtin error interface -func (e BackupValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sBackup.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = BackupValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = BackupValidationError{} - -// Validate checks the field values on Restore with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Restore) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Restore with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in RestoreMultiError, or nil if none found. -func (m *Restore) ValidateAll() error { - return m.validate(true) -} - -func (m *Restore) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for LocationId - - // no validation rules for Destination - - // no validation rules for SecretsName - - if len(errors) > 0 { - return RestoreMultiError(errors) - } - - return nil -} - -// RestoreMultiError is an error wrapping multiple validation errors returned -// by Restore.ValidateAll() if the designated constraints aren't met. -type RestoreMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RestoreMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RestoreMultiError) AllErrors() []error { return m } - -// RestoreValidationError is the validation error returned by Restore.Validate -// if the designated constraints aren't met. -type RestoreValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RestoreValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RestoreValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RestoreValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RestoreValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RestoreValidationError) ErrorName() string { return "RestoreValidationError" } - -// Error satisfies the builtin error interface -func (e RestoreValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRestore.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RestoreValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RestoreValidationError{} - -// Validate checks the field values on Resources with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Resources) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Resources with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResourcesMultiError, or nil -// if none found. -func (m *Resources) ValidateAll() error { - return m.validate(true) -} - -func (m *Resources) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for MemoryBytes - - // no validation rules for CpuM - - // no validation rules for DiskSize - - if len(errors) > 0 { - return ResourcesMultiError(errors) - } - - return nil -} - -// ResourcesMultiError is an error wrapping multiple validation errors returned -// by Resources.ValidateAll() if the designated constraints aren't met. -type ResourcesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourcesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourcesMultiError) AllErrors() []error { return m } - -// ResourcesValidationError is the validation error returned by -// Resources.Validate if the designated constraints aren't met. -type ResourcesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourcesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourcesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourcesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourcesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourcesValidationError) ErrorName() string { return "ResourcesValidationError" } - -// Error satisfies the builtin error interface -func (e ResourcesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResources.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourcesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourcesValidationError{} diff --git a/api/managementpb/dbaas/dbaas.proto b/api/managementpb/dbaas/dbaas.proto deleted file mode 100644 index 6bdb981bfa..0000000000 --- a/api/managementpb/dbaas/dbaas.proto +++ /dev/null @@ -1,78 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// RunningOperation respresents a long-running operation. -message RunningOperation { - // Finished steps of the operaion; can decrease or increase compared to the previous value. - int32 finished_steps = 1; - // Text describing the current operation progress step. - string message = 2; - // Total steps needed to finish the operation; can decrease or increase compared to the previous value. - int32 total_steps = 3; -} - -// ComputeResources represents container computer resources requests or limits. -message ComputeResources { - // CPUs in milliCPUs; 1000m = 1 vCPU. - int32 cpu_m = 1; - // Memory in bytes. - int64 memory_bytes = 2; -} - -// Backup configuration for a database cluster -message Backup { - // Backup Location id of stored backup location in PMM. - string location_id = 1; - // Keep copies represents how many copies should retain. - int32 keep_copies = 2; - // Cron expression represents cron expression - string cron_expression = 3; - // Service acccount used for backups - string service_account = 4; -} - -// Restore represents restoration payload to restore a database cluster from backup -message Restore { - // Backup location in PMM. - string location_id = 1; - // Destination filename. - string destination = 2; - // K8s Secrets name. - string secrets_name = 3; -} - -// Resources contains Kubernetes cluster resources. -message Resources { - // Memory in bytes. - uint64 memory_bytes = 1; - // CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus. - // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. - uint64 cpu_m = 2; - // Disk size in bytes. - uint64 disk_size = 3; -} - -// DBClusterType represents database cluster type. -enum DBClusterType { - // DB_CLUSTER_TYPE_INVALID represents unknown cluster type. - DB_CLUSTER_TYPE_INVALID = 0; - // DB_CLUSTER_TYPE_PXC represents pxc cluster type. - DB_CLUSTER_TYPE_PXC = 1; - // DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type. - DB_CLUSTER_TYPE_PSMDB = 2; -} - -// OperatorsStatus defines status of operators installed in Kubernetes cluster. -enum OperatorsStatus { - // OPERATORS_STATUS_INVALID represents unknown state. - OPERATORS_STATUS_INVALID = 0; - // OPERATORS_STATUS_OK represents that operators are installed and have supported API version. - OPERATORS_STATUS_OK = 1; - // OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version. - OPERATORS_STATUS_UNSUPPORTED = 2; - // OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed. - OPERATORS_STATUS_NOT_INSTALLED = 3; -} diff --git a/api/managementpb/dbaas/json/client/components/change_psmdb_components_parameters.go b/api/managementpb/dbaas/json/client/components/change_psmdb_components_parameters.go deleted file mode 100644 index 994b10c916..0000000000 --- a/api/managementpb/dbaas/json/client/components/change_psmdb_components_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewChangePSMDBComponentsParams creates a new ChangePSMDBComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewChangePSMDBComponentsParams() *ChangePSMDBComponentsParams { - return &ChangePSMDBComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewChangePSMDBComponentsParamsWithTimeout creates a new ChangePSMDBComponentsParams object -// with the ability to set a timeout on a request. -func NewChangePSMDBComponentsParamsWithTimeout(timeout time.Duration) *ChangePSMDBComponentsParams { - return &ChangePSMDBComponentsParams{ - timeout: timeout, - } -} - -// NewChangePSMDBComponentsParamsWithContext creates a new ChangePSMDBComponentsParams object -// with the ability to set a context for a request. -func NewChangePSMDBComponentsParamsWithContext(ctx context.Context) *ChangePSMDBComponentsParams { - return &ChangePSMDBComponentsParams{ - Context: ctx, - } -} - -// NewChangePSMDBComponentsParamsWithHTTPClient creates a new ChangePSMDBComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewChangePSMDBComponentsParamsWithHTTPClient(client *http.Client) *ChangePSMDBComponentsParams { - return &ChangePSMDBComponentsParams{ - HTTPClient: client, - } -} - -/* -ChangePSMDBComponentsParams contains all the parameters to send to the API endpoint - - for the change PSMDB components operation. - - Typically these are written to a http.Request. -*/ -type ChangePSMDBComponentsParams struct { - // Body. - Body ChangePSMDBComponentsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the change PSMDB components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangePSMDBComponentsParams) WithDefaults() *ChangePSMDBComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the change PSMDB components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangePSMDBComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) WithTimeout(timeout time.Duration) *ChangePSMDBComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) WithContext(ctx context.Context) *ChangePSMDBComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) WithHTTPClient(client *http.Client) *ChangePSMDBComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) WithBody(body ChangePSMDBComponentsBody) *ChangePSMDBComponentsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the change PSMDB components params -func (o *ChangePSMDBComponentsParams) SetBody(body ChangePSMDBComponentsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ChangePSMDBComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/change_psmdb_components_responses.go b/api/managementpb/dbaas/json/client/components/change_psmdb_components_responses.go deleted file mode 100644 index e0109e186b..0000000000 --- a/api/managementpb/dbaas/json/client/components/change_psmdb_components_responses.go +++ /dev/null @@ -1,494 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ChangePSMDBComponentsReader is a Reader for the ChangePSMDBComponents structure. -type ChangePSMDBComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ChangePSMDBComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewChangePSMDBComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewChangePSMDBComponentsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewChangePSMDBComponentsOK creates a ChangePSMDBComponentsOK with default headers values -func NewChangePSMDBComponentsOK() *ChangePSMDBComponentsOK { - return &ChangePSMDBComponentsOK{} -} - -/* -ChangePSMDBComponentsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ChangePSMDBComponentsOK struct { - Payload interface{} -} - -func (o *ChangePSMDBComponentsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/ChangePSMDB][%d] changePsmdbComponentsOk %+v", 200, o.Payload) -} - -func (o *ChangePSMDBComponentsOK) GetPayload() interface{} { - return o.Payload -} - -func (o *ChangePSMDBComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewChangePSMDBComponentsDefault creates a ChangePSMDBComponentsDefault with default headers values -func NewChangePSMDBComponentsDefault(code int) *ChangePSMDBComponentsDefault { - return &ChangePSMDBComponentsDefault{ - _statusCode: code, - } -} - -/* -ChangePSMDBComponentsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ChangePSMDBComponentsDefault struct { - _statusCode int - - Payload *ChangePSMDBComponentsDefaultBody -} - -// Code gets the status code for the change PSMDB components default response -func (o *ChangePSMDBComponentsDefault) Code() int { - return o._statusCode -} - -func (o *ChangePSMDBComponentsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/ChangePSMDB][%d] ChangePSMDBComponents default %+v", o._statusCode, o.Payload) -} - -func (o *ChangePSMDBComponentsDefault) GetPayload() *ChangePSMDBComponentsDefaultBody { - return o.Payload -} - -func (o *ChangePSMDBComponentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangePSMDBComponentsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ChangePSMDBComponentsBody change PSMDB components body -swagger:model ChangePSMDBComponentsBody -*/ -type ChangePSMDBComponentsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // mongod - Mongod *ChangePSMDBComponentsParamsBodyMongod `json:"mongod,omitempty"` -} - -// Validate validates this change PSMDB components body -func (o *ChangePSMDBComponentsBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMongod(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePSMDBComponentsBody) validateMongod(formats strfmt.Registry) error { - if swag.IsZero(o.Mongod) { // not required - return nil - } - - if o.Mongod != nil { - if err := o.Mongod.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "mongod") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "mongod") - } - return err - } - } - - return nil -} - -// ContextValidate validate this change PSMDB components body based on the context it is used -func (o *ChangePSMDBComponentsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMongod(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePSMDBComponentsBody) contextValidateMongod(ctx context.Context, formats strfmt.Registry) error { - if o.Mongod != nil { - if err := o.Mongod.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "mongod") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "mongod") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePSMDBComponentsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePSMDBComponentsBody) UnmarshalBinary(b []byte) error { - var res ChangePSMDBComponentsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePSMDBComponentsDefaultBody change PSMDB components default body -swagger:model ChangePSMDBComponentsDefaultBody -*/ -type ChangePSMDBComponentsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ChangePSMDBComponentsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this change PSMDB components default body -func (o *ChangePSMDBComponentsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePSMDBComponentsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ChangePSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ChangePSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change PSMDB components default body based on the context it is used -func (o *ChangePSMDBComponentsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePSMDBComponentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ChangePSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ChangePSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePSMDBComponentsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePSMDBComponentsDefaultBody) UnmarshalBinary(b []byte) error { - var res ChangePSMDBComponentsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePSMDBComponentsDefaultBodyDetailsItems0 change PSMDB components default body details items0 -swagger:model ChangePSMDBComponentsDefaultBodyDetailsItems0 -*/ -type ChangePSMDBComponentsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this change PSMDB components default body details items0 -func (o *ChangePSMDBComponentsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change PSMDB components default body details items0 based on context it is used -func (o *ChangePSMDBComponentsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePSMDBComponentsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePSMDBComponentsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ChangePSMDBComponentsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePSMDBComponentsParamsBodyMongod ChangeComponent contains fields to manage components. -swagger:model ChangePSMDBComponentsParamsBodyMongod -*/ -type ChangePSMDBComponentsParamsBodyMongod struct { - // default version - DefaultVersion string `json:"default_version,omitempty"` - - // versions - Versions []*ChangePSMDBComponentsParamsBodyMongodVersionsItems0 `json:"versions"` -} - -// Validate validates this change PSMDB components params body mongod -func (o *ChangePSMDBComponentsParamsBodyMongod) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePSMDBComponentsParamsBodyMongod) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(o.Versions) { // not required - return nil - } - - for i := 0; i < len(o.Versions); i++ { - if swag.IsZero(o.Versions[i]) { // not required - continue - } - - if o.Versions[i] != nil { - if err := o.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "mongod" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "mongod" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change PSMDB components params body mongod based on the context it is used -func (o *ChangePSMDBComponentsParamsBodyMongod) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePSMDBComponentsParamsBodyMongod) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Versions); i++ { - if o.Versions[i] != nil { - if err := o.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "mongod" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "mongod" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePSMDBComponentsParamsBodyMongod) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePSMDBComponentsParamsBodyMongod) UnmarshalBinary(b []byte) error { - var res ChangePSMDBComponentsParamsBodyMongod - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePSMDBComponentsParamsBodyMongodVersionsItems0 ComponentVersion contains operations which should be done with component version. -swagger:model ChangePSMDBComponentsParamsBodyMongodVersionsItems0 -*/ -type ChangePSMDBComponentsParamsBodyMongodVersionsItems0 struct { - // version - Version string `json:"version,omitempty"` - - // disable - Disable bool `json:"disable,omitempty"` - - // enable - Enable bool `json:"enable,omitempty"` -} - -// Validate validates this change PSMDB components params body mongod versions items0 -func (o *ChangePSMDBComponentsParamsBodyMongodVersionsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change PSMDB components params body mongod versions items0 based on context it is used -func (o *ChangePSMDBComponentsParamsBodyMongodVersionsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePSMDBComponentsParamsBodyMongodVersionsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePSMDBComponentsParamsBodyMongodVersionsItems0) UnmarshalBinary(b []byte) error { - var res ChangePSMDBComponentsParamsBodyMongodVersionsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/change_pxc_components_parameters.go b/api/managementpb/dbaas/json/client/components/change_pxc_components_parameters.go deleted file mode 100644 index 70fe656ec4..0000000000 --- a/api/managementpb/dbaas/json/client/components/change_pxc_components_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewChangePXCComponentsParams creates a new ChangePXCComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewChangePXCComponentsParams() *ChangePXCComponentsParams { - return &ChangePXCComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewChangePXCComponentsParamsWithTimeout creates a new ChangePXCComponentsParams object -// with the ability to set a timeout on a request. -func NewChangePXCComponentsParamsWithTimeout(timeout time.Duration) *ChangePXCComponentsParams { - return &ChangePXCComponentsParams{ - timeout: timeout, - } -} - -// NewChangePXCComponentsParamsWithContext creates a new ChangePXCComponentsParams object -// with the ability to set a context for a request. -func NewChangePXCComponentsParamsWithContext(ctx context.Context) *ChangePXCComponentsParams { - return &ChangePXCComponentsParams{ - Context: ctx, - } -} - -// NewChangePXCComponentsParamsWithHTTPClient creates a new ChangePXCComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewChangePXCComponentsParamsWithHTTPClient(client *http.Client) *ChangePXCComponentsParams { - return &ChangePXCComponentsParams{ - HTTPClient: client, - } -} - -/* -ChangePXCComponentsParams contains all the parameters to send to the API endpoint - - for the change PXC components operation. - - Typically these are written to a http.Request. -*/ -type ChangePXCComponentsParams struct { - // Body. - Body ChangePXCComponentsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the change PXC components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangePXCComponentsParams) WithDefaults() *ChangePXCComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the change PXC components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangePXCComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the change PXC components params -func (o *ChangePXCComponentsParams) WithTimeout(timeout time.Duration) *ChangePXCComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the change PXC components params -func (o *ChangePXCComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the change PXC components params -func (o *ChangePXCComponentsParams) WithContext(ctx context.Context) *ChangePXCComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the change PXC components params -func (o *ChangePXCComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the change PXC components params -func (o *ChangePXCComponentsParams) WithHTTPClient(client *http.Client) *ChangePXCComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the change PXC components params -func (o *ChangePXCComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the change PXC components params -func (o *ChangePXCComponentsParams) WithBody(body ChangePXCComponentsBody) *ChangePXCComponentsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the change PXC components params -func (o *ChangePXCComponentsParams) SetBody(body ChangePXCComponentsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ChangePXCComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/change_pxc_components_responses.go b/api/managementpb/dbaas/json/client/components/change_pxc_components_responses.go deleted file mode 100644 index 859e985218..0000000000 --- a/api/managementpb/dbaas/json/client/components/change_pxc_components_responses.go +++ /dev/null @@ -1,872 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ChangePXCComponentsReader is a Reader for the ChangePXCComponents structure. -type ChangePXCComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ChangePXCComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewChangePXCComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewChangePXCComponentsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewChangePXCComponentsOK creates a ChangePXCComponentsOK with default headers values -func NewChangePXCComponentsOK() *ChangePXCComponentsOK { - return &ChangePXCComponentsOK{} -} - -/* -ChangePXCComponentsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ChangePXCComponentsOK struct { - Payload interface{} -} - -func (o *ChangePXCComponentsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/ChangePXC][%d] changePxcComponentsOk %+v", 200, o.Payload) -} - -func (o *ChangePXCComponentsOK) GetPayload() interface{} { - return o.Payload -} - -func (o *ChangePXCComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewChangePXCComponentsDefault creates a ChangePXCComponentsDefault with default headers values -func NewChangePXCComponentsDefault(code int) *ChangePXCComponentsDefault { - return &ChangePXCComponentsDefault{ - _statusCode: code, - } -} - -/* -ChangePXCComponentsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ChangePXCComponentsDefault struct { - _statusCode int - - Payload *ChangePXCComponentsDefaultBody -} - -// Code gets the status code for the change PXC components default response -func (o *ChangePXCComponentsDefault) Code() int { - return o._statusCode -} - -func (o *ChangePXCComponentsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/ChangePXC][%d] ChangePXCComponents default %+v", o._statusCode, o.Payload) -} - -func (o *ChangePXCComponentsDefault) GetPayload() *ChangePXCComponentsDefaultBody { - return o.Payload -} - -func (o *ChangePXCComponentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangePXCComponentsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ChangePXCComponentsBody change PXC components body -swagger:model ChangePXCComponentsBody -*/ -type ChangePXCComponentsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // haproxy - Haproxy *ChangePXCComponentsParamsBodyHaproxy `json:"haproxy,omitempty"` - - // proxysql - Proxysql *ChangePXCComponentsParamsBodyProxysql `json:"proxysql,omitempty"` - - // pxc - PXC *ChangePXCComponentsParamsBodyPXC `json:"pxc,omitempty"` -} - -// Validate validates this change PXC components body -func (o *ChangePXCComponentsBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsBody) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - if o.Haproxy != nil { - if err := o.Haproxy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *ChangePXCComponentsBody) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - if o.Proxysql != nil { - if err := o.Proxysql.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *ChangePXCComponentsBody) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "pxc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this change PXC components body based on the context it is used -func (o *ChangePXCComponentsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { - if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *ChangePXCComponentsBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { - if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *ChangePXCComponentsBody) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "pxc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsBody) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsDefaultBody change PXC components default body -swagger:model ChangePXCComponentsDefaultBody -*/ -type ChangePXCComponentsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ChangePXCComponentsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this change PXC components default body -func (o *ChangePXCComponentsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ChangePXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ChangePXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change PXC components default body based on the context it is used -func (o *ChangePXCComponentsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ChangePXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ChangePXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsDefaultBody) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsDefaultBodyDetailsItems0 change PXC components default body details items0 -swagger:model ChangePXCComponentsDefaultBodyDetailsItems0 -*/ -type ChangePXCComponentsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this change PXC components default body details items0 -func (o *ChangePXCComponentsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change PXC components default body details items0 based on context it is used -func (o *ChangePXCComponentsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsParamsBodyHaproxy ChangeComponent contains fields to manage components. -swagger:model ChangePXCComponentsParamsBodyHaproxy -*/ -type ChangePXCComponentsParamsBodyHaproxy struct { - // default version - DefaultVersion string `json:"default_version,omitempty"` - - // versions - Versions []*ChangePXCComponentsParamsBodyHaproxyVersionsItems0 `json:"versions"` -} - -// Validate validates this change PXC components params body haproxy -func (o *ChangePXCComponentsParamsBodyHaproxy) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsParamsBodyHaproxy) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(o.Versions) { // not required - return nil - } - - for i := 0; i < len(o.Versions); i++ { - if swag.IsZero(o.Versions[i]) { // not required - continue - } - - if o.Versions[i] != nil { - if err := o.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "haproxy" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "haproxy" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change PXC components params body haproxy based on the context it is used -func (o *ChangePXCComponentsParamsBodyHaproxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsParamsBodyHaproxy) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Versions); i++ { - if o.Versions[i] != nil { - if err := o.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "haproxy" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "haproxy" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyHaproxy) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyHaproxy) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsParamsBodyHaproxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsParamsBodyHaproxyVersionsItems0 ComponentVersion contains operations which should be done with component version. -swagger:model ChangePXCComponentsParamsBodyHaproxyVersionsItems0 -*/ -type ChangePXCComponentsParamsBodyHaproxyVersionsItems0 struct { - // version - Version string `json:"version,omitempty"` - - // disable - Disable bool `json:"disable,omitempty"` - - // enable - Enable bool `json:"enable,omitempty"` -} - -// Validate validates this change PXC components params body haproxy versions items0 -func (o *ChangePXCComponentsParamsBodyHaproxyVersionsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change PXC components params body haproxy versions items0 based on context it is used -func (o *ChangePXCComponentsParamsBodyHaproxyVersionsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyHaproxyVersionsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyHaproxyVersionsItems0) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsParamsBodyHaproxyVersionsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsParamsBodyPXC ChangeComponent contains fields to manage components. -swagger:model ChangePXCComponentsParamsBodyPXC -*/ -type ChangePXCComponentsParamsBodyPXC struct { - // default version - DefaultVersion string `json:"default_version,omitempty"` - - // versions - Versions []*ChangePXCComponentsParamsBodyPXCVersionsItems0 `json:"versions"` -} - -// Validate validates this change PXC components params body PXC -func (o *ChangePXCComponentsParamsBodyPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsParamsBodyPXC) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(o.Versions) { // not required - return nil - } - - for i := 0; i < len(o.Versions); i++ { - if swag.IsZero(o.Versions[i]) { // not required - continue - } - - if o.Versions[i] != nil { - if err := o.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "pxc" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "pxc" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change PXC components params body PXC based on the context it is used -func (o *ChangePXCComponentsParamsBodyPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsParamsBodyPXC) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Versions); i++ { - if o.Versions[i] != nil { - if err := o.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "pxc" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "pxc" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyPXC) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsParamsBodyPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsParamsBodyPXCVersionsItems0 ComponentVersion contains operations which should be done with component version. -swagger:model ChangePXCComponentsParamsBodyPXCVersionsItems0 -*/ -type ChangePXCComponentsParamsBodyPXCVersionsItems0 struct { - // version - Version string `json:"version,omitempty"` - - // disable - Disable bool `json:"disable,omitempty"` - - // enable - Enable bool `json:"enable,omitempty"` -} - -// Validate validates this change PXC components params body PXC versions items0 -func (o *ChangePXCComponentsParamsBodyPXCVersionsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change PXC components params body PXC versions items0 based on context it is used -func (o *ChangePXCComponentsParamsBodyPXCVersionsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyPXCVersionsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyPXCVersionsItems0) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsParamsBodyPXCVersionsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsParamsBodyProxysql ChangeComponent contains fields to manage components. -swagger:model ChangePXCComponentsParamsBodyProxysql -*/ -type ChangePXCComponentsParamsBodyProxysql struct { - // default version - DefaultVersion string `json:"default_version,omitempty"` - - // versions - Versions []*ChangePXCComponentsParamsBodyProxysqlVersionsItems0 `json:"versions"` -} - -// Validate validates this change PXC components params body proxysql -func (o *ChangePXCComponentsParamsBodyProxysql) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsParamsBodyProxysql) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(o.Versions) { // not required - return nil - } - - for i := 0; i < len(o.Versions); i++ { - if swag.IsZero(o.Versions[i]) { // not required - continue - } - - if o.Versions[i] != nil { - if err := o.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "proxysql" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "proxysql" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change PXC components params body proxysql based on the context it is used -func (o *ChangePXCComponentsParamsBodyProxysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangePXCComponentsParamsBodyProxysql) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Versions); i++ { - if o.Versions[i] != nil { - if err := o.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "proxysql" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "proxysql" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyProxysql) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyProxysql) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsParamsBodyProxysql - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangePXCComponentsParamsBodyProxysqlVersionsItems0 ComponentVersion contains operations which should be done with component version. -swagger:model ChangePXCComponentsParamsBodyProxysqlVersionsItems0 -*/ -type ChangePXCComponentsParamsBodyProxysqlVersionsItems0 struct { - // version - Version string `json:"version,omitempty"` - - // disable - Disable bool `json:"disable,omitempty"` - - // enable - Enable bool `json:"enable,omitempty"` -} - -// Validate validates this change PXC components params body proxysql versions items0 -func (o *ChangePXCComponentsParamsBodyProxysqlVersionsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change PXC components params body proxysql versions items0 based on context it is used -func (o *ChangePXCComponentsParamsBodyProxysqlVersionsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyProxysqlVersionsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangePXCComponentsParamsBodyProxysqlVersionsItems0) UnmarshalBinary(b []byte) error { - var res ChangePXCComponentsParamsBodyProxysqlVersionsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go b/api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go deleted file mode 100644 index dab12d01aa..0000000000 --- a/api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewCheckForOperatorUpdateParams creates a new CheckForOperatorUpdateParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCheckForOperatorUpdateParams() *CheckForOperatorUpdateParams { - return &CheckForOperatorUpdateParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCheckForOperatorUpdateParamsWithTimeout creates a new CheckForOperatorUpdateParams object -// with the ability to set a timeout on a request. -func NewCheckForOperatorUpdateParamsWithTimeout(timeout time.Duration) *CheckForOperatorUpdateParams { - return &CheckForOperatorUpdateParams{ - timeout: timeout, - } -} - -// NewCheckForOperatorUpdateParamsWithContext creates a new CheckForOperatorUpdateParams object -// with the ability to set a context for a request. -func NewCheckForOperatorUpdateParamsWithContext(ctx context.Context) *CheckForOperatorUpdateParams { - return &CheckForOperatorUpdateParams{ - Context: ctx, - } -} - -// NewCheckForOperatorUpdateParamsWithHTTPClient creates a new CheckForOperatorUpdateParams object -// with the ability to set a custom HTTPClient for a request. -func NewCheckForOperatorUpdateParamsWithHTTPClient(client *http.Client) *CheckForOperatorUpdateParams { - return &CheckForOperatorUpdateParams{ - HTTPClient: client, - } -} - -/* -CheckForOperatorUpdateParams contains all the parameters to send to the API endpoint - - for the check for operator update operation. - - Typically these are written to a http.Request. -*/ -type CheckForOperatorUpdateParams struct { - // Body. - Body interface{} - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the check for operator update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CheckForOperatorUpdateParams) WithDefaults() *CheckForOperatorUpdateParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the check for operator update params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CheckForOperatorUpdateParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the check for operator update params -func (o *CheckForOperatorUpdateParams) WithTimeout(timeout time.Duration) *CheckForOperatorUpdateParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the check for operator update params -func (o *CheckForOperatorUpdateParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the check for operator update params -func (o *CheckForOperatorUpdateParams) WithContext(ctx context.Context) *CheckForOperatorUpdateParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the check for operator update params -func (o *CheckForOperatorUpdateParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the check for operator update params -func (o *CheckForOperatorUpdateParams) WithHTTPClient(client *http.Client) *CheckForOperatorUpdateParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the check for operator update params -func (o *CheckForOperatorUpdateParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the check for operator update params -func (o *CheckForOperatorUpdateParams) WithBody(body interface{}) *CheckForOperatorUpdateParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the check for operator update params -func (o *CheckForOperatorUpdateParams) SetBody(body interface{}) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CheckForOperatorUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go b/api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go deleted file mode 100644 index 796a42c153..0000000000 --- a/api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CheckForOperatorUpdateReader is a Reader for the CheckForOperatorUpdate structure. -type CheckForOperatorUpdateReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CheckForOperatorUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCheckForOperatorUpdateOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCheckForOperatorUpdateDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCheckForOperatorUpdateOK creates a CheckForOperatorUpdateOK with default headers values -func NewCheckForOperatorUpdateOK() *CheckForOperatorUpdateOK { - return &CheckForOperatorUpdateOK{} -} - -/* -CheckForOperatorUpdateOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CheckForOperatorUpdateOK struct { - Payload *CheckForOperatorUpdateOKBody -} - -func (o *CheckForOperatorUpdateOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/CheckForOperatorUpdate][%d] checkForOperatorUpdateOk %+v", 200, o.Payload) -} - -func (o *CheckForOperatorUpdateOK) GetPayload() *CheckForOperatorUpdateOKBody { - return o.Payload -} - -func (o *CheckForOperatorUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CheckForOperatorUpdateOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCheckForOperatorUpdateDefault creates a CheckForOperatorUpdateDefault with default headers values -func NewCheckForOperatorUpdateDefault(code int) *CheckForOperatorUpdateDefault { - return &CheckForOperatorUpdateDefault{ - _statusCode: code, - } -} - -/* -CheckForOperatorUpdateDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CheckForOperatorUpdateDefault struct { - _statusCode int - - Payload *CheckForOperatorUpdateDefaultBody -} - -// Code gets the status code for the check for operator update default response -func (o *CheckForOperatorUpdateDefault) Code() int { - return o._statusCode -} - -func (o *CheckForOperatorUpdateDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/CheckForOperatorUpdate][%d] CheckForOperatorUpdate default %+v", o._statusCode, o.Payload) -} - -func (o *CheckForOperatorUpdateDefault) GetPayload() *CheckForOperatorUpdateDefaultBody { - return o.Payload -} - -func (o *CheckForOperatorUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CheckForOperatorUpdateDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -CheckForOperatorUpdateDefaultBody check for operator update default body -swagger:model CheckForOperatorUpdateDefaultBody -*/ -type CheckForOperatorUpdateDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*CheckForOperatorUpdateDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this check for operator update default body -func (o *CheckForOperatorUpdateDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CheckForOperatorUpdateDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("CheckForOperatorUpdate default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("CheckForOperatorUpdate default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this check for operator update default body based on the context it is used -func (o *CheckForOperatorUpdateDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CheckForOperatorUpdateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("CheckForOperatorUpdate default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("CheckForOperatorUpdate default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CheckForOperatorUpdateDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CheckForOperatorUpdateDefaultBody) UnmarshalBinary(b []byte) error { - var res CheckForOperatorUpdateDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CheckForOperatorUpdateDefaultBodyDetailsItems0 check for operator update default body details items0 -swagger:model CheckForOperatorUpdateDefaultBodyDetailsItems0 -*/ -type CheckForOperatorUpdateDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this check for operator update default body details items0 -func (o *CheckForOperatorUpdateDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this check for operator update default body details items0 based on context it is used -func (o *CheckForOperatorUpdateDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CheckForOperatorUpdateDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CheckForOperatorUpdateDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res CheckForOperatorUpdateDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CheckForOperatorUpdateOKBody check for operator update OK body -swagger:model CheckForOperatorUpdateOKBody -*/ -type CheckForOperatorUpdateOKBody struct { - // The cluster name is used as a key for this map, value contains components and their inforamtion about update. - ClusterToComponents map[string]CheckForOperatorUpdateOKBodyClusterToComponentsAnon `json:"cluster_to_components,omitempty"` -} - -// Validate validates this check for operator update OK body -func (o *CheckForOperatorUpdateOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateClusterToComponents(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CheckForOperatorUpdateOKBody) validateClusterToComponents(formats strfmt.Registry) error { - if swag.IsZero(o.ClusterToComponents) { // not required - return nil - } - - for k := range o.ClusterToComponents { - - if swag.IsZero(o.ClusterToComponents[k]) { // not required - continue - } - if val, ok := o.ClusterToComponents[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("checkForOperatorUpdateOk" + "." + "cluster_to_components" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("checkForOperatorUpdateOk" + "." + "cluster_to_components" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this check for operator update OK body based on the context it is used -func (o *CheckForOperatorUpdateOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateClusterToComponents(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CheckForOperatorUpdateOKBody) contextValidateClusterToComponents(ctx context.Context, formats strfmt.Registry) error { - for k := range o.ClusterToComponents { - if val, ok := o.ClusterToComponents[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CheckForOperatorUpdateOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CheckForOperatorUpdateOKBody) UnmarshalBinary(b []byte) error { - var res CheckForOperatorUpdateOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CheckForOperatorUpdateOKBodyClusterToComponentsAnon ComponentsUpdateInformation contains info about components and their available latest versions. -swagger:model CheckForOperatorUpdateOKBodyClusterToComponentsAnon -*/ -type CheckForOperatorUpdateOKBodyClusterToComponentsAnon struct { - // component_to_update_information stores, under the name of the component, information about the update. - // "pxc-operator", "psmdb-operator" are names used by backend for our operators. - ComponentToUpdateInformation map[string]CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon `json:"component_to_update_information,omitempty"` -} - -// Validate validates this check for operator update OK body cluster to components anon -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnon) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComponentToUpdateInformation(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnon) validateComponentToUpdateInformation(formats strfmt.Registry) error { - if swag.IsZero(o.ComponentToUpdateInformation) { // not required - return nil - } - - for k := range o.ComponentToUpdateInformation { - - if swag.IsZero(o.ComponentToUpdateInformation[k]) { // not required - continue - } - if val, ok := o.ComponentToUpdateInformation[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("component_to_update_information" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("component_to_update_information" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this check for operator update OK body cluster to components anon based on the context it is used -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComponentToUpdateInformation(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnon) contextValidateComponentToUpdateInformation(ctx context.Context, formats strfmt.Registry) error { - for k := range o.ComponentToUpdateInformation { - if val, ok := o.ComponentToUpdateInformation[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnon) UnmarshalBinary(b []byte) error { - var res CheckForOperatorUpdateOKBodyClusterToComponentsAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon ComponentUpdateInformation contains version we can update to for certain component. -swagger:model CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon -*/ -type CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon struct { - // available version - AvailableVersion string `json:"available_version,omitempty"` -} - -// Validate validates this check for operator update OK body cluster to components anon component to update information anon -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this check for operator update OK body cluster to components anon component to update information anon based on context it is used -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon) UnmarshalBinary(b []byte) error { - var res CheckForOperatorUpdateOKBodyClusterToComponentsAnonComponentToUpdateInformationAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/components_client.go b/api/managementpb/dbaas/json/client/components/components_client.go deleted file mode 100644 index f8e2158d82..0000000000 --- a/api/managementpb/dbaas/json/client/components/components_client.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new components API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for components API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ChangePSMDBComponents(params *ChangePSMDBComponentsParams, opts ...ClientOption) (*ChangePSMDBComponentsOK, error) - - ChangePXCComponents(params *ChangePXCComponentsParams, opts ...ClientOption) (*ChangePXCComponentsOK, error) - - CheckForOperatorUpdate(params *CheckForOperatorUpdateParams, opts ...ClientOption) (*CheckForOperatorUpdateOK, error) - - GetPSMDBComponents(params *GetPSMDBComponentsParams, opts ...ClientOption) (*GetPSMDBComponentsOK, error) - - GetPXCComponents(params *GetPXCComponentsParams, opts ...ClientOption) (*GetPXCComponentsOK, error) - - InstallOperator(params *InstallOperatorParams, opts ...ClientOption) (*InstallOperatorOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ChangePSMDBComponents changes PSMDB components manages PSMDB related components -*/ -func (a *Client) ChangePSMDBComponents(params *ChangePSMDBComponentsParams, opts ...ClientOption) (*ChangePSMDBComponentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewChangePSMDBComponentsParams() - } - op := &runtime.ClientOperation{ - ID: "ChangePSMDBComponents", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Components/ChangePSMDB", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ChangePSMDBComponentsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ChangePSMDBComponentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ChangePSMDBComponentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ChangePXCComponents changes PXC components manages PXC related components -*/ -func (a *Client) ChangePXCComponents(params *ChangePXCComponentsParams, opts ...ClientOption) (*ChangePXCComponentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewChangePXCComponentsParams() - } - op := &runtime.ClientOperation{ - ID: "ChangePXCComponents", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Components/ChangePXC", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ChangePXCComponentsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ChangePXCComponentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ChangePXCComponentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -CheckForOperatorUpdate checks for operator update checks if a new version of an operator is available -*/ -func (a *Client) CheckForOperatorUpdate(params *CheckForOperatorUpdateParams, opts ...ClientOption) (*CheckForOperatorUpdateOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCheckForOperatorUpdateParams() - } - op := &runtime.ClientOperation{ - ID: "CheckForOperatorUpdate", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Components/CheckForOperatorUpdate", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &CheckForOperatorUpdateReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CheckForOperatorUpdateOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CheckForOperatorUpdateDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPSMDBComponents gets PSMDB components returns list of available components for PSMDB clusters -*/ -func (a *Client) GetPSMDBComponents(params *GetPSMDBComponentsParams, opts ...ClientOption) (*GetPSMDBComponentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPSMDBComponentsParams() - } - op := &runtime.ClientOperation{ - ID: "GetPSMDBComponents", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Components/GetPSMDB", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetPSMDBComponentsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPSMDBComponentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPSMDBComponentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPXCComponents gets PXC components returns list of available components for PXC clusters -*/ -func (a *Client) GetPXCComponents(params *GetPXCComponentsParams, opts ...ClientOption) (*GetPXCComponentsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPXCComponentsParams() - } - op := &runtime.ClientOperation{ - ID: "GetPXCComponents", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Components/GetPXC", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetPXCComponentsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPXCComponentsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPXCComponentsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -InstallOperator installs operator installs given operator in given version -*/ -func (a *Client) InstallOperator(params *InstallOperatorParams, opts ...ClientOption) (*InstallOperatorOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewInstallOperatorParams() - } - op := &runtime.ClientOperation{ - ID: "InstallOperator", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Components/InstallOperator", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &InstallOperatorReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*InstallOperatorOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*InstallOperatorDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/client/components/get_psmdb_components_parameters.go b/api/managementpb/dbaas/json/client/components/get_psmdb_components_parameters.go deleted file mode 100644 index 0aab5f9ce7..0000000000 --- a/api/managementpb/dbaas/json/client/components/get_psmdb_components_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPSMDBComponentsParams creates a new GetPSMDBComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPSMDBComponentsParams() *GetPSMDBComponentsParams { - return &GetPSMDBComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPSMDBComponentsParamsWithTimeout creates a new GetPSMDBComponentsParams object -// with the ability to set a timeout on a request. -func NewGetPSMDBComponentsParamsWithTimeout(timeout time.Duration) *GetPSMDBComponentsParams { - return &GetPSMDBComponentsParams{ - timeout: timeout, - } -} - -// NewGetPSMDBComponentsParamsWithContext creates a new GetPSMDBComponentsParams object -// with the ability to set a context for a request. -func NewGetPSMDBComponentsParamsWithContext(ctx context.Context) *GetPSMDBComponentsParams { - return &GetPSMDBComponentsParams{ - Context: ctx, - } -} - -// NewGetPSMDBComponentsParamsWithHTTPClient creates a new GetPSMDBComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPSMDBComponentsParamsWithHTTPClient(client *http.Client) *GetPSMDBComponentsParams { - return &GetPSMDBComponentsParams{ - HTTPClient: client, - } -} - -/* -GetPSMDBComponentsParams contains all the parameters to send to the API endpoint - - for the get PSMDB components operation. - - Typically these are written to a http.Request. -*/ -type GetPSMDBComponentsParams struct { - // Body. - Body GetPSMDBComponentsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get PSMDB components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPSMDBComponentsParams) WithDefaults() *GetPSMDBComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get PSMDB components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPSMDBComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get PSMDB components params -func (o *GetPSMDBComponentsParams) WithTimeout(timeout time.Duration) *GetPSMDBComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get PSMDB components params -func (o *GetPSMDBComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get PSMDB components params -func (o *GetPSMDBComponentsParams) WithContext(ctx context.Context) *GetPSMDBComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get PSMDB components params -func (o *GetPSMDBComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get PSMDB components params -func (o *GetPSMDBComponentsParams) WithHTTPClient(client *http.Client) *GetPSMDBComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get PSMDB components params -func (o *GetPSMDBComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get PSMDB components params -func (o *GetPSMDBComponentsParams) WithBody(body GetPSMDBComponentsBody) *GetPSMDBComponentsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get PSMDB components params -func (o *GetPSMDBComponentsParams) SetBody(body GetPSMDBComponentsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPSMDBComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/get_psmdb_components_responses.go b/api/managementpb/dbaas/json/client/components/get_psmdb_components_responses.go deleted file mode 100644 index 5af5569de2..0000000000 --- a/api/managementpb/dbaas/json/client/components/get_psmdb_components_responses.go +++ /dev/null @@ -1,1345 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetPSMDBComponentsReader is a Reader for the GetPSMDBComponents structure. -type GetPSMDBComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPSMDBComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPSMDBComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPSMDBComponentsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPSMDBComponentsOK creates a GetPSMDBComponentsOK with default headers values -func NewGetPSMDBComponentsOK() *GetPSMDBComponentsOK { - return &GetPSMDBComponentsOK{} -} - -/* -GetPSMDBComponentsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetPSMDBComponentsOK struct { - Payload *GetPSMDBComponentsOKBody -} - -func (o *GetPSMDBComponentsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/GetPSMDB][%d] getPsmdbComponentsOk %+v", 200, o.Payload) -} - -func (o *GetPSMDBComponentsOK) GetPayload() *GetPSMDBComponentsOKBody { - return o.Payload -} - -func (o *GetPSMDBComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPSMDBComponentsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPSMDBComponentsDefault creates a GetPSMDBComponentsDefault with default headers values -func NewGetPSMDBComponentsDefault(code int) *GetPSMDBComponentsDefault { - return &GetPSMDBComponentsDefault{ - _statusCode: code, - } -} - -/* -GetPSMDBComponentsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetPSMDBComponentsDefault struct { - _statusCode int - - Payload *GetPSMDBComponentsDefaultBody -} - -// Code gets the status code for the get PSMDB components default response -func (o *GetPSMDBComponentsDefault) Code() int { - return o._statusCode -} - -func (o *GetPSMDBComponentsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/GetPSMDB][%d] GetPSMDBComponents default %+v", o._statusCode, o.Payload) -} - -func (o *GetPSMDBComponentsDefault) GetPayload() *GetPSMDBComponentsDefaultBody { - return o.Payload -} - -func (o *GetPSMDBComponentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPSMDBComponentsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetPSMDBComponentsBody get PSMDB components body -swagger:model GetPSMDBComponentsBody -*/ -type GetPSMDBComponentsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // Version of DB. - DBVersion string `json:"db_version,omitempty"` -} - -// Validate validates this get PSMDB components body -func (o *GetPSMDBComponentsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components body based on context it is used -func (o *GetPSMDBComponentsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsDefaultBody get PSMDB components default body -swagger:model GetPSMDBComponentsDefaultBody -*/ -type GetPSMDBComponentsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetPSMDBComponentsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get PSMDB components default body -func (o *GetPSMDBComponentsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PSMDB components default body based on the context it is used -func (o *GetPSMDBComponentsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPSMDBComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsDefaultBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsDefaultBodyDetailsItems0 get PSMDB components default body details items0 -swagger:model GetPSMDBComponentsDefaultBodyDetailsItems0 -*/ -type GetPSMDBComponentsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get PSMDB components default body details items0 -func (o *GetPSMDBComponentsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components default body details items0 based on context it is used -func (o *GetPSMDBComponentsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBody get PSMDB components OK body -swagger:model GetPSMDBComponentsOKBody -*/ -type GetPSMDBComponentsOKBody struct { - // versions - Versions []*GetPSMDBComponentsOKBodyVersionsItems0 `json:"versions"` -} - -// Validate validates this get PSMDB components OK body -func (o *GetPSMDBComponentsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsOKBody) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(o.Versions) { // not required - return nil - } - - for i := 0; i < len(o.Versions); i++ { - if swag.IsZero(o.Versions[i]) { // not required - continue - } - - if o.Versions[i] != nil { - if err := o.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPsmdbComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPsmdbComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PSMDB components OK body based on the context it is used -func (o *GetPSMDBComponentsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsOKBody) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Versions); i++ { - if o.Versions[i] != nil { - if err := o.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPsmdbComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPsmdbComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0 OperatorVersion contains information about operator and components matrix. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0 -*/ -type GetPSMDBComponentsOKBodyVersionsItems0 struct { - // product - Product string `json:"product,omitempty"` - - // operator - Operator string `json:"operator,omitempty"` - - // matrix - Matrix *GetPSMDBComponentsOKBodyVersionsItems0Matrix `json:"matrix,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 -func (o *GetPSMDBComponentsOKBodyVersionsItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMatrix(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0) validateMatrix(formats strfmt.Registry) error { - if swag.IsZero(o.Matrix) { // not required - return nil - } - - if o.Matrix != nil { - if err := o.Matrix.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PSMDB components OK body versions items0 based on the context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMatrix(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0) contextValidateMatrix(ctx context.Context, formats strfmt.Registry) error { - if o.Matrix != nil { - if err := o.Matrix.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0Matrix Matrix contains all available components. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0Matrix -*/ -type GetPSMDBComponentsOKBodyVersionsItems0Matrix struct { - // mongod - Mongod map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon `json:"mongod,omitempty"` - - // pxc - PXC map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon `json:"pxc,omitempty"` - - // pmm - PMM map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon `json:"pmm,omitempty"` - - // proxysql - Proxysql map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon `json:"proxysql,omitempty"` - - // haproxy - Haproxy map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon `json:"haproxy,omitempty"` - - // backup - Backup map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon `json:"backup,omitempty"` - - // operator - Operator map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon `json:"operator,omitempty"` - - // log collector - LogCollector map[string]GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon `json:"log_collector,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMongod(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePMM(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperator(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogCollector(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validateMongod(formats strfmt.Registry) error { - if swag.IsZero(o.Mongod) { // not required - return nil - } - - for k := range o.Mongod { - - if swag.IsZero(o.Mongod[k]) { // not required - continue - } - if val, ok := o.Mongod[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "mongod" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "mongod" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - for k := range o.PXC { - - if swag.IsZero(o.PXC[k]) { // not required - continue - } - if val, ok := o.PXC[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "pxc" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "pxc" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validatePMM(formats strfmt.Registry) error { - if swag.IsZero(o.PMM) { // not required - return nil - } - - for k := range o.PMM { - - if swag.IsZero(o.PMM[k]) { // not required - continue - } - if val, ok := o.PMM[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "pmm" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "pmm" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - for k := range o.Proxysql { - - if swag.IsZero(o.Proxysql[k]) { // not required - continue - } - if val, ok := o.Proxysql[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "proxysql" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "proxysql" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - for k := range o.Haproxy { - - if swag.IsZero(o.Haproxy[k]) { // not required - continue - } - if val, ok := o.Haproxy[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "haproxy" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "haproxy" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - for k := range o.Backup { - - if swag.IsZero(o.Backup[k]) { // not required - continue - } - if val, ok := o.Backup[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "backup" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "backup" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validateOperator(formats strfmt.Registry) error { - if swag.IsZero(o.Operator) { // not required - return nil - } - - for k := range o.Operator { - - if swag.IsZero(o.Operator[k]) { // not required - continue - } - if val, ok := o.Operator[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "operator" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "operator" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) validateLogCollector(formats strfmt.Registry) error { - if swag.IsZero(o.LogCollector) { // not required - return nil - } - - for k := range o.LogCollector { - - if swag.IsZero(o.LogCollector[k]) { // not required - continue - } - if val, ok := o.LogCollector[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "log_collector" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "log_collector" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PSMDB components OK body versions items0 matrix based on the context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMongod(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePMM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateOperator(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateLogCollector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidateMongod(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Mongod { - if val, ok := o.Mongod[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - for k := range o.PXC { - if val, ok := o.PXC[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidatePMM(ctx context.Context, formats strfmt.Registry) error { - for k := range o.PMM { - if val, ok := o.PMM[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Proxysql { - if val, ok := o.Proxysql[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Haproxy { - if val, ok := o.Haproxy[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Backup { - if val, ok := o.Backup[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidateOperator(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Operator { - if val, ok := o.Operator[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) contextValidateLogCollector(ctx context.Context, formats strfmt.Registry) error { - for k := range o.LogCollector { - if val, ok := o.LogCollector[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0Matrix) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0Matrix - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix backup anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix backup anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixBackupAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix haproxy anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix haproxy anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixHaproxyAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix log collector anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix log collector anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixLogCollectorAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix mongod anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix mongod anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixMongodAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix operator anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix operator anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixOperatorAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix PMM anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix PMM anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixPMMAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix PXC anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix PXC anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixPXCAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon Component contains information about component. -swagger:model GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon -*/ -type GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PSMDB components OK body versions items0 matrix proxysql anon -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB components OK body versions items0 matrix proxysql anon based on context it is used -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon) UnmarshalBinary(b []byte) error { - var res GetPSMDBComponentsOKBodyVersionsItems0MatrixProxysqlAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/get_pxc_components_parameters.go b/api/managementpb/dbaas/json/client/components/get_pxc_components_parameters.go deleted file mode 100644 index ee70826a03..0000000000 --- a/api/managementpb/dbaas/json/client/components/get_pxc_components_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPXCComponentsParams creates a new GetPXCComponentsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPXCComponentsParams() *GetPXCComponentsParams { - return &GetPXCComponentsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPXCComponentsParamsWithTimeout creates a new GetPXCComponentsParams object -// with the ability to set a timeout on a request. -func NewGetPXCComponentsParamsWithTimeout(timeout time.Duration) *GetPXCComponentsParams { - return &GetPXCComponentsParams{ - timeout: timeout, - } -} - -// NewGetPXCComponentsParamsWithContext creates a new GetPXCComponentsParams object -// with the ability to set a context for a request. -func NewGetPXCComponentsParamsWithContext(ctx context.Context) *GetPXCComponentsParams { - return &GetPXCComponentsParams{ - Context: ctx, - } -} - -// NewGetPXCComponentsParamsWithHTTPClient creates a new GetPXCComponentsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPXCComponentsParamsWithHTTPClient(client *http.Client) *GetPXCComponentsParams { - return &GetPXCComponentsParams{ - HTTPClient: client, - } -} - -/* -GetPXCComponentsParams contains all the parameters to send to the API endpoint - - for the get PXC components operation. - - Typically these are written to a http.Request. -*/ -type GetPXCComponentsParams struct { - // Body. - Body GetPXCComponentsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get PXC components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPXCComponentsParams) WithDefaults() *GetPXCComponentsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get PXC components params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPXCComponentsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get PXC components params -func (o *GetPXCComponentsParams) WithTimeout(timeout time.Duration) *GetPXCComponentsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get PXC components params -func (o *GetPXCComponentsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get PXC components params -func (o *GetPXCComponentsParams) WithContext(ctx context.Context) *GetPXCComponentsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get PXC components params -func (o *GetPXCComponentsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get PXC components params -func (o *GetPXCComponentsParams) WithHTTPClient(client *http.Client) *GetPXCComponentsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get PXC components params -func (o *GetPXCComponentsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get PXC components params -func (o *GetPXCComponentsParams) WithBody(body GetPXCComponentsBody) *GetPXCComponentsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get PXC components params -func (o *GetPXCComponentsParams) SetBody(body GetPXCComponentsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPXCComponentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/get_pxc_components_responses.go b/api/managementpb/dbaas/json/client/components/get_pxc_components_responses.go deleted file mode 100644 index cd2e68f28c..0000000000 --- a/api/managementpb/dbaas/json/client/components/get_pxc_components_responses.go +++ /dev/null @@ -1,1345 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetPXCComponentsReader is a Reader for the GetPXCComponents structure. -type GetPXCComponentsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPXCComponentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPXCComponentsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPXCComponentsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPXCComponentsOK creates a GetPXCComponentsOK with default headers values -func NewGetPXCComponentsOK() *GetPXCComponentsOK { - return &GetPXCComponentsOK{} -} - -/* -GetPXCComponentsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetPXCComponentsOK struct { - Payload *GetPXCComponentsOKBody -} - -func (o *GetPXCComponentsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/GetPXC][%d] getPxcComponentsOk %+v", 200, o.Payload) -} - -func (o *GetPXCComponentsOK) GetPayload() *GetPXCComponentsOKBody { - return o.Payload -} - -func (o *GetPXCComponentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPXCComponentsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPXCComponentsDefault creates a GetPXCComponentsDefault with default headers values -func NewGetPXCComponentsDefault(code int) *GetPXCComponentsDefault { - return &GetPXCComponentsDefault{ - _statusCode: code, - } -} - -/* -GetPXCComponentsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetPXCComponentsDefault struct { - _statusCode int - - Payload *GetPXCComponentsDefaultBody -} - -// Code gets the status code for the get PXC components default response -func (o *GetPXCComponentsDefault) Code() int { - return o._statusCode -} - -func (o *GetPXCComponentsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/GetPXC][%d] GetPXCComponents default %+v", o._statusCode, o.Payload) -} - -func (o *GetPXCComponentsDefault) GetPayload() *GetPXCComponentsDefaultBody { - return o.Payload -} - -func (o *GetPXCComponentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPXCComponentsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetPXCComponentsBody get PXC components body -swagger:model GetPXCComponentsBody -*/ -type GetPXCComponentsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // Version of DB. - DBVersion string `json:"db_version,omitempty"` -} - -// Validate validates this get PXC components body -func (o *GetPXCComponentsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components body based on context it is used -func (o *GetPXCComponentsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsBody) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsDefaultBody get PXC components default body -swagger:model GetPXCComponentsDefaultBody -*/ -type GetPXCComponentsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetPXCComponentsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get PXC components default body -func (o *GetPXCComponentsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PXC components default body based on the context it is used -func (o *GetPXCComponentsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPXCComponents default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsDefaultBody) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsDefaultBodyDetailsItems0 get PXC components default body details items0 -swagger:model GetPXCComponentsDefaultBodyDetailsItems0 -*/ -type GetPXCComponentsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get PXC components default body details items0 -func (o *GetPXCComponentsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components default body details items0 based on context it is used -func (o *GetPXCComponentsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBody get PXC components OK body -swagger:model GetPXCComponentsOKBody -*/ -type GetPXCComponentsOKBody struct { - // versions - Versions []*GetPXCComponentsOKBodyVersionsItems0 `json:"versions"` -} - -// Validate validates this get PXC components OK body -func (o *GetPXCComponentsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateVersions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsOKBody) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(o.Versions) { // not required - return nil - } - - for i := 0; i < len(o.Versions); i++ { - if swag.IsZero(o.Versions[i]) { // not required - continue - } - - if o.Versions[i] != nil { - if err := o.Versions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPxcComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPxcComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PXC components OK body based on the context it is used -func (o *GetPXCComponentsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateVersions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsOKBody) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Versions); i++ { - if o.Versions[i] != nil { - if err := o.Versions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPxcComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPxcComponentsOk" + "." + "versions" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBody) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0 OperatorVersion contains information about operator and components matrix. -swagger:model GetPXCComponentsOKBodyVersionsItems0 -*/ -type GetPXCComponentsOKBodyVersionsItems0 struct { - // product - Product string `json:"product,omitempty"` - - // operator - Operator string `json:"operator,omitempty"` - - // matrix - Matrix *GetPXCComponentsOKBodyVersionsItems0Matrix `json:"matrix,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 -func (o *GetPXCComponentsOKBodyVersionsItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMatrix(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0) validateMatrix(formats strfmt.Registry) error { - if swag.IsZero(o.Matrix) { // not required - return nil - } - - if o.Matrix != nil { - if err := o.Matrix.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC components OK body versions items0 based on the context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMatrix(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0) contextValidateMatrix(ctx context.Context, formats strfmt.Registry) error { - if o.Matrix != nil { - if err := o.Matrix.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0Matrix Matrix contains all available components. -swagger:model GetPXCComponentsOKBodyVersionsItems0Matrix -*/ -type GetPXCComponentsOKBodyVersionsItems0Matrix struct { - // mongod - Mongod map[string]GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon `json:"mongod,omitempty"` - - // pxc - PXC map[string]GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon `json:"pxc,omitempty"` - - // pmm - PMM map[string]GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon `json:"pmm,omitempty"` - - // proxysql - Proxysql map[string]GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon `json:"proxysql,omitempty"` - - // haproxy - Haproxy map[string]GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon `json:"haproxy,omitempty"` - - // backup - Backup map[string]GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon `json:"backup,omitempty"` - - // operator - Operator map[string]GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon `json:"operator,omitempty"` - - // log collector - LogCollector map[string]GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon `json:"log_collector,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMongod(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePMM(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperator(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogCollector(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validateMongod(formats strfmt.Registry) error { - if swag.IsZero(o.Mongod) { // not required - return nil - } - - for k := range o.Mongod { - - if swag.IsZero(o.Mongod[k]) { // not required - continue - } - if val, ok := o.Mongod[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "mongod" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "mongod" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - for k := range o.PXC { - - if swag.IsZero(o.PXC[k]) { // not required - continue - } - if val, ok := o.PXC[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "pxc" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "pxc" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validatePMM(formats strfmt.Registry) error { - if swag.IsZero(o.PMM) { // not required - return nil - } - - for k := range o.PMM { - - if swag.IsZero(o.PMM[k]) { // not required - continue - } - if val, ok := o.PMM[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "pmm" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "pmm" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - for k := range o.Proxysql { - - if swag.IsZero(o.Proxysql[k]) { // not required - continue - } - if val, ok := o.Proxysql[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "proxysql" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "proxysql" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - for k := range o.Haproxy { - - if swag.IsZero(o.Haproxy[k]) { // not required - continue - } - if val, ok := o.Haproxy[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "haproxy" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "haproxy" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - for k := range o.Backup { - - if swag.IsZero(o.Backup[k]) { // not required - continue - } - if val, ok := o.Backup[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "backup" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "backup" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validateOperator(formats strfmt.Registry) error { - if swag.IsZero(o.Operator) { // not required - return nil - } - - for k := range o.Operator { - - if swag.IsZero(o.Operator[k]) { // not required - continue - } - if val, ok := o.Operator[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "operator" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "operator" + "." + k) - } - return err - } - } - - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) validateLogCollector(formats strfmt.Registry) error { - if swag.IsZero(o.LogCollector) { // not required - return nil - } - - for k := range o.LogCollector { - - if swag.IsZero(o.LogCollector[k]) { // not required - continue - } - if val, ok := o.LogCollector[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix" + "." + "log_collector" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix" + "." + "log_collector" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PXC components OK body versions items0 matrix based on the context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMongod(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePMM(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateOperator(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateLogCollector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidateMongod(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Mongod { - if val, ok := o.Mongod[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - for k := range o.PXC { - if val, ok := o.PXC[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidatePMM(ctx context.Context, formats strfmt.Registry) error { - for k := range o.PMM { - if val, ok := o.PMM[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Proxysql { - if val, ok := o.Proxysql[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Haproxy { - if val, ok := o.Haproxy[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Backup { - if val, ok := o.Backup[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidateOperator(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Operator { - if val, ok := o.Operator[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) contextValidateLogCollector(ctx context.Context, formats strfmt.Registry) error { - for k := range o.LogCollector { - if val, ok := o.LogCollector[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0Matrix) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0Matrix - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix backup anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix backup anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixBackupAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix haproxy anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix haproxy anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixHaproxyAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix log collector anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix log collector anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixLogCollectorAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix mongod anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix mongod anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixMongodAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix operator anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix operator anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixOperatorAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix PMM anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix PMM anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixPMMAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix PXC anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix PXC anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixPXCAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon Component contains information about component. -swagger:model GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon -*/ -type GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon struct { - // image path - ImagePath string `json:"image_path,omitempty"` - - // image hash - ImageHash string `json:"image_hash,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // critical - Critical bool `json:"critical,omitempty"` - - // default - Default bool `json:"default,omitempty"` - - // disabled - Disabled bool `json:"disabled,omitempty"` -} - -// Validate validates this get PXC components OK body versions items0 matrix proxysql anon -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC components OK body versions items0 matrix proxysql anon based on context it is used -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon) UnmarshalBinary(b []byte) error { - var res GetPXCComponentsOKBodyVersionsItems0MatrixProxysqlAnon - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/install_operator_parameters.go b/api/managementpb/dbaas/json/client/components/install_operator_parameters.go deleted file mode 100644 index 87b1582722..0000000000 --- a/api/managementpb/dbaas/json/client/components/install_operator_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewInstallOperatorParams creates a new InstallOperatorParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewInstallOperatorParams() *InstallOperatorParams { - return &InstallOperatorParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewInstallOperatorParamsWithTimeout creates a new InstallOperatorParams object -// with the ability to set a timeout on a request. -func NewInstallOperatorParamsWithTimeout(timeout time.Duration) *InstallOperatorParams { - return &InstallOperatorParams{ - timeout: timeout, - } -} - -// NewInstallOperatorParamsWithContext creates a new InstallOperatorParams object -// with the ability to set a context for a request. -func NewInstallOperatorParamsWithContext(ctx context.Context) *InstallOperatorParams { - return &InstallOperatorParams{ - Context: ctx, - } -} - -// NewInstallOperatorParamsWithHTTPClient creates a new InstallOperatorParams object -// with the ability to set a custom HTTPClient for a request. -func NewInstallOperatorParamsWithHTTPClient(client *http.Client) *InstallOperatorParams { - return &InstallOperatorParams{ - HTTPClient: client, - } -} - -/* -InstallOperatorParams contains all the parameters to send to the API endpoint - - for the install operator operation. - - Typically these are written to a http.Request. -*/ -type InstallOperatorParams struct { - // Body. - Body InstallOperatorBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the install operator params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InstallOperatorParams) WithDefaults() *InstallOperatorParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the install operator params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *InstallOperatorParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the install operator params -func (o *InstallOperatorParams) WithTimeout(timeout time.Duration) *InstallOperatorParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the install operator params -func (o *InstallOperatorParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the install operator params -func (o *InstallOperatorParams) WithContext(ctx context.Context) *InstallOperatorParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the install operator params -func (o *InstallOperatorParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the install operator params -func (o *InstallOperatorParams) WithHTTPClient(client *http.Client) *InstallOperatorParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the install operator params -func (o *InstallOperatorParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the install operator params -func (o *InstallOperatorParams) WithBody(body InstallOperatorBody) *InstallOperatorParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the install operator params -func (o *InstallOperatorParams) SetBody(body InstallOperatorBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *InstallOperatorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/components/install_operator_responses.go b/api/managementpb/dbaas/json/client/components/install_operator_responses.go deleted file mode 100644 index b9bb44b457..0000000000 --- a/api/managementpb/dbaas/json/client/components/install_operator_responses.go +++ /dev/null @@ -1,405 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package components - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// InstallOperatorReader is a Reader for the InstallOperator structure. -type InstallOperatorReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *InstallOperatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewInstallOperatorOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewInstallOperatorDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewInstallOperatorOK creates a InstallOperatorOK with default headers values -func NewInstallOperatorOK() *InstallOperatorOK { - return &InstallOperatorOK{} -} - -/* -InstallOperatorOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type InstallOperatorOK struct { - Payload *InstallOperatorOKBody -} - -func (o *InstallOperatorOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/InstallOperator][%d] installOperatorOk %+v", 200, o.Payload) -} - -func (o *InstallOperatorOK) GetPayload() *InstallOperatorOKBody { - return o.Payload -} - -func (o *InstallOperatorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(InstallOperatorOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInstallOperatorDefault creates a InstallOperatorDefault with default headers values -func NewInstallOperatorDefault(code int) *InstallOperatorDefault { - return &InstallOperatorDefault{ - _statusCode: code, - } -} - -/* -InstallOperatorDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type InstallOperatorDefault struct { - _statusCode int - - Payload *InstallOperatorDefaultBody -} - -// Code gets the status code for the install operator default response -func (o *InstallOperatorDefault) Code() int { - return o._statusCode -} - -func (o *InstallOperatorDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Components/InstallOperator][%d] InstallOperator default %+v", o._statusCode, o.Payload) -} - -func (o *InstallOperatorDefault) GetPayload() *InstallOperatorDefaultBody { - return o.Payload -} - -func (o *InstallOperatorDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(InstallOperatorDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -InstallOperatorBody install operator body -swagger:model InstallOperatorBody -*/ -type InstallOperatorBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // operator_type tells what operator we are interested in updating. - OperatorType string `json:"operator_type,omitempty"` - - // version tells what version of the operator we should update to. - Version string `json:"version,omitempty"` -} - -// Validate validates this install operator body -func (o *InstallOperatorBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this install operator body based on context it is used -func (o *InstallOperatorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *InstallOperatorBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *InstallOperatorBody) UnmarshalBinary(b []byte) error { - var res InstallOperatorBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -InstallOperatorDefaultBody install operator default body -swagger:model InstallOperatorDefaultBody -*/ -type InstallOperatorDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*InstallOperatorDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this install operator default body -func (o *InstallOperatorDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *InstallOperatorDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("InstallOperator default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("InstallOperator default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this install operator default body based on the context it is used -func (o *InstallOperatorDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *InstallOperatorDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("InstallOperator default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("InstallOperator default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *InstallOperatorDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *InstallOperatorDefaultBody) UnmarshalBinary(b []byte) error { - var res InstallOperatorDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -InstallOperatorDefaultBodyDetailsItems0 install operator default body details items0 -swagger:model InstallOperatorDefaultBodyDetailsItems0 -*/ -type InstallOperatorDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this install operator default body details items0 -func (o *InstallOperatorDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this install operator default body details items0 based on context it is used -func (o *InstallOperatorDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *InstallOperatorDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *InstallOperatorDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res InstallOperatorDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -InstallOperatorOKBody install operator OK body -swagger:model InstallOperatorOKBody -*/ -type InstallOperatorOKBody struct { - // OperatorsStatus defines status of operators installed in Kubernetes cluster. - // - // - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state. - // - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version. - // - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version. - // - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed. - // Enum: [OPERATORS_STATUS_INVALID OPERATORS_STATUS_OK OPERATORS_STATUS_UNSUPPORTED OPERATORS_STATUS_NOT_INSTALLED] - Status *string `json:"status,omitempty"` -} - -// Validate validates this install operator OK body -func (o *InstallOperatorOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var installOperatorOkBodyTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OPERATORS_STATUS_INVALID","OPERATORS_STATUS_OK","OPERATORS_STATUS_UNSUPPORTED","OPERATORS_STATUS_NOT_INSTALLED"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - installOperatorOkBodyTypeStatusPropEnum = append(installOperatorOkBodyTypeStatusPropEnum, v) - } -} - -const ( - - // InstallOperatorOKBodyStatusOPERATORSSTATUSINVALID captures enum value "OPERATORS_STATUS_INVALID" - InstallOperatorOKBodyStatusOPERATORSSTATUSINVALID string = "OPERATORS_STATUS_INVALID" - - // InstallOperatorOKBodyStatusOPERATORSSTATUSOK captures enum value "OPERATORS_STATUS_OK" - InstallOperatorOKBodyStatusOPERATORSSTATUSOK string = "OPERATORS_STATUS_OK" - - // InstallOperatorOKBodyStatusOPERATORSSTATUSUNSUPPORTED captures enum value "OPERATORS_STATUS_UNSUPPORTED" - InstallOperatorOKBodyStatusOPERATORSSTATUSUNSUPPORTED string = "OPERATORS_STATUS_UNSUPPORTED" - - // InstallOperatorOKBodyStatusOPERATORSSTATUSNOTINSTALLED captures enum value "OPERATORS_STATUS_NOT_INSTALLED" - InstallOperatorOKBodyStatusOPERATORSSTATUSNOTINSTALLED string = "OPERATORS_STATUS_NOT_INSTALLED" -) - -// prop value enum -func (o *InstallOperatorOKBody) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, installOperatorOkBodyTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *InstallOperatorOKBody) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("installOperatorOk"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this install operator OK body based on context it is used -func (o *InstallOperatorOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *InstallOperatorOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *InstallOperatorOKBody) UnmarshalBinary(b []byte) error { - var res InstallOperatorOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/db_clusters_client.go b/api/managementpb/dbaas/json/client/db_clusters/db_clusters_client.go deleted file mode 100644 index e00472a1d3..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/db_clusters_client.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new db clusters API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for db clusters API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - DeleteDBCluster(params *DeleteDBClusterParams, opts ...ClientOption) (*DeleteDBClusterOK, error) - - GetDBCluster(params *GetDBClusterParams, opts ...ClientOption) (*GetDBClusterOK, error) - - ListDBClusters(params *ListDBClustersParams, opts ...ClientOption) (*ListDBClustersOK, error) - - ListS3Backups(params *ListS3BackupsParams, opts ...ClientOption) (*ListS3BackupsOK, error) - - ListSecrets(params *ListSecretsParams, opts ...ClientOption) (*ListSecretsOK, error) - - RestartDBCluster(params *RestartDBClusterParams, opts ...ClientOption) (*RestartDBClusterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -DeleteDBCluster deletes DB cluster deletes DB cluster -*/ -func (a *Client) DeleteDBCluster(params *DeleteDBClusterParams, opts ...ClientOption) (*DeleteDBClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteDBClusterParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteDBCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/DBClusters/Delete", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &DeleteDBClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteDBClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteDBClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetDBCluster gets DB cluster returns parameters used to create a database cluster -*/ -func (a *Client) GetDBCluster(params *GetDBClusterParams, opts ...ClientOption) (*GetDBClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetDBClusterParams() - } - op := &runtime.ClientOperation{ - ID: "GetDBCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/DBClusters/Get", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetDBClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetDBClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetDBClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListDBClusters lists DB clusters returns a list of DB clusters -*/ -func (a *Client) ListDBClusters(params *ListDBClustersParams, opts ...ClientOption) (*ListDBClustersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListDBClustersParams() - } - op := &runtime.ClientOperation{ - ID: "ListDBClusters", - Method: "POST", - PathPattern: "/v1/management/DBaaS/DBClusters/List", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ListDBClustersReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListDBClustersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListDBClustersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListS3Backups lists s3 backups lists backups stored on s3 -*/ -func (a *Client) ListS3Backups(params *ListS3BackupsParams, opts ...ClientOption) (*ListS3BackupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListS3BackupsParams() - } - op := &runtime.ClientOperation{ - ID: "ListS3Backups", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Backups/List", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ListS3BackupsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListS3BackupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListS3BackupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListSecrets lists secrets returns a list of secrets from k8s -*/ -func (a *Client) ListSecrets(params *ListSecretsParams, opts ...ClientOption) (*ListSecretsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListSecretsParams() - } - op := &runtime.ClientOperation{ - ID: "ListSecrets", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Secrets/List", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ListSecretsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListSecretsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListSecretsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RestartDBCluster restarts DB cluster restarts DB cluster -*/ -func (a *Client) RestartDBCluster(params *RestartDBClusterParams, opts ...ClientOption) (*RestartDBClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRestartDBClusterParams() - } - op := &runtime.ClientOperation{ - ID: "RestartDBCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/DBClusters/Restart", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &RestartDBClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*RestartDBClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RestartDBClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_parameters.go b/api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_parameters.go deleted file mode 100644 index 0f817bf42e..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDBClusterParams creates a new DeleteDBClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteDBClusterParams() *DeleteDBClusterParams { - return &DeleteDBClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteDBClusterParamsWithTimeout creates a new DeleteDBClusterParams object -// with the ability to set a timeout on a request. -func NewDeleteDBClusterParamsWithTimeout(timeout time.Duration) *DeleteDBClusterParams { - return &DeleteDBClusterParams{ - timeout: timeout, - } -} - -// NewDeleteDBClusterParamsWithContext creates a new DeleteDBClusterParams object -// with the ability to set a context for a request. -func NewDeleteDBClusterParamsWithContext(ctx context.Context) *DeleteDBClusterParams { - return &DeleteDBClusterParams{ - Context: ctx, - } -} - -// NewDeleteDBClusterParamsWithHTTPClient creates a new DeleteDBClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteDBClusterParamsWithHTTPClient(client *http.Client) *DeleteDBClusterParams { - return &DeleteDBClusterParams{ - HTTPClient: client, - } -} - -/* -DeleteDBClusterParams contains all the parameters to send to the API endpoint - - for the delete DB cluster operation. - - Typically these are written to a http.Request. -*/ -type DeleteDBClusterParams struct { - // Body. - Body DeleteDBClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete DB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteDBClusterParams) WithDefaults() *DeleteDBClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete DB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteDBClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete DB cluster params -func (o *DeleteDBClusterParams) WithTimeout(timeout time.Duration) *DeleteDBClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete DB cluster params -func (o *DeleteDBClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete DB cluster params -func (o *DeleteDBClusterParams) WithContext(ctx context.Context) *DeleteDBClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete DB cluster params -func (o *DeleteDBClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete DB cluster params -func (o *DeleteDBClusterParams) WithHTTPClient(client *http.Client) *DeleteDBClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete DB cluster params -func (o *DeleteDBClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete DB cluster params -func (o *DeleteDBClusterParams) WithBody(body DeleteDBClusterBody) *DeleteDBClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete DB cluster params -func (o *DeleteDBClusterParams) SetBody(body DeleteDBClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteDBClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_responses.go b/api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_responses.go deleted file mode 100644 index dded2a9a91..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/delete_db_cluster_responses.go +++ /dev/null @@ -1,362 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeleteDBClusterReader is a Reader for the DeleteDBCluster structure. -type DeleteDBClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteDBClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteDBClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteDBClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteDBClusterOK creates a DeleteDBClusterOK with default headers values -func NewDeleteDBClusterOK() *DeleteDBClusterOK { - return &DeleteDBClusterOK{} -} - -/* -DeleteDBClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type DeleteDBClusterOK struct { - Payload interface{} -} - -func (o *DeleteDBClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/Delete][%d] deleteDbClusterOk %+v", 200, o.Payload) -} - -func (o *DeleteDBClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *DeleteDBClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteDBClusterDefault creates a DeleteDBClusterDefault with default headers values -func NewDeleteDBClusterDefault(code int) *DeleteDBClusterDefault { - return &DeleteDBClusterDefault{ - _statusCode: code, - } -} - -/* -DeleteDBClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type DeleteDBClusterDefault struct { - _statusCode int - - Payload *DeleteDBClusterDefaultBody -} - -// Code gets the status code for the delete DB cluster default response -func (o *DeleteDBClusterDefault) Code() int { - return o._statusCode -} - -func (o *DeleteDBClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/Delete][%d] DeleteDBCluster default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteDBClusterDefault) GetPayload() *DeleteDBClusterDefaultBody { - return o.Payload -} - -func (o *DeleteDBClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteDBClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -DeleteDBClusterBody delete DB cluster body -swagger:model DeleteDBClusterBody -*/ -type DeleteDBClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // DB cluster name. - Name string `json:"name,omitempty"` - - // DBClusterType represents database cluster type. - // - // - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type. - // - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type. - // - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type. - // Enum: [DB_CLUSTER_TYPE_INVALID DB_CLUSTER_TYPE_PXC DB_CLUSTER_TYPE_PSMDB] - ClusterType *string `json:"cluster_type,omitempty"` -} - -// Validate validates this delete DB cluster body -func (o *DeleteDBClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateClusterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var deleteDbClusterBodyTypeClusterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_TYPE_INVALID","DB_CLUSTER_TYPE_PXC","DB_CLUSTER_TYPE_PSMDB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - deleteDbClusterBodyTypeClusterTypePropEnum = append(deleteDbClusterBodyTypeClusterTypePropEnum, v) - } -} - -const ( - - // DeleteDBClusterBodyClusterTypeDBCLUSTERTYPEINVALID captures enum value "DB_CLUSTER_TYPE_INVALID" - DeleteDBClusterBodyClusterTypeDBCLUSTERTYPEINVALID string = "DB_CLUSTER_TYPE_INVALID" - - // DeleteDBClusterBodyClusterTypeDBCLUSTERTYPEPXC captures enum value "DB_CLUSTER_TYPE_PXC" - DeleteDBClusterBodyClusterTypeDBCLUSTERTYPEPXC string = "DB_CLUSTER_TYPE_PXC" - - // DeleteDBClusterBodyClusterTypeDBCLUSTERTYPEPSMDB captures enum value "DB_CLUSTER_TYPE_PSMDB" - DeleteDBClusterBodyClusterTypeDBCLUSTERTYPEPSMDB string = "DB_CLUSTER_TYPE_PSMDB" -) - -// prop value enum -func (o *DeleteDBClusterBody) validateClusterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, deleteDbClusterBodyTypeClusterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *DeleteDBClusterBody) validateClusterType(formats strfmt.Registry) error { - if swag.IsZero(o.ClusterType) { // not required - return nil - } - - // value enum - if err := o.validateClusterTypeEnum("body"+"."+"cluster_type", "body", *o.ClusterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this delete DB cluster body based on context it is used -func (o *DeleteDBClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *DeleteDBClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *DeleteDBClusterBody) UnmarshalBinary(b []byte) error { - var res DeleteDBClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -DeleteDBClusterDefaultBody delete DB cluster default body -swagger:model DeleteDBClusterDefaultBody -*/ -type DeleteDBClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*DeleteDBClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this delete DB cluster default body -func (o *DeleteDBClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DeleteDBClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("DeleteDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("DeleteDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this delete DB cluster default body based on the context it is used -func (o *DeleteDBClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *DeleteDBClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("DeleteDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("DeleteDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *DeleteDBClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *DeleteDBClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res DeleteDBClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -DeleteDBClusterDefaultBodyDetailsItems0 delete DB cluster default body details items0 -swagger:model DeleteDBClusterDefaultBodyDetailsItems0 -*/ -type DeleteDBClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this delete DB cluster default body details items0 -func (o *DeleteDBClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this delete DB cluster default body details items0 based on context it is used -func (o *DeleteDBClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *DeleteDBClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *DeleteDBClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res DeleteDBClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_parameters.go b/api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_parameters.go deleted file mode 100644 index dc4945c493..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetDBClusterParams creates a new GetDBClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetDBClusterParams() *GetDBClusterParams { - return &GetDBClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetDBClusterParamsWithTimeout creates a new GetDBClusterParams object -// with the ability to set a timeout on a request. -func NewGetDBClusterParamsWithTimeout(timeout time.Duration) *GetDBClusterParams { - return &GetDBClusterParams{ - timeout: timeout, - } -} - -// NewGetDBClusterParamsWithContext creates a new GetDBClusterParams object -// with the ability to set a context for a request. -func NewGetDBClusterParamsWithContext(ctx context.Context) *GetDBClusterParams { - return &GetDBClusterParams{ - Context: ctx, - } -} - -// NewGetDBClusterParamsWithHTTPClient creates a new GetDBClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetDBClusterParamsWithHTTPClient(client *http.Client) *GetDBClusterParams { - return &GetDBClusterParams{ - HTTPClient: client, - } -} - -/* -GetDBClusterParams contains all the parameters to send to the API endpoint - - for the get DB cluster operation. - - Typically these are written to a http.Request. -*/ -type GetDBClusterParams struct { - // Body. - Body GetDBClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get DB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDBClusterParams) WithDefaults() *GetDBClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get DB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetDBClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get DB cluster params -func (o *GetDBClusterParams) WithTimeout(timeout time.Duration) *GetDBClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get DB cluster params -func (o *GetDBClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get DB cluster params -func (o *GetDBClusterParams) WithContext(ctx context.Context) *GetDBClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get DB cluster params -func (o *GetDBClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get DB cluster params -func (o *GetDBClusterParams) WithHTTPClient(client *http.Client) *GetDBClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get DB cluster params -func (o *GetDBClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get DB cluster params -func (o *GetDBClusterParams) WithBody(body GetDBClusterBody) *GetDBClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get DB cluster params -func (o *GetDBClusterParams) SetBody(body GetDBClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetDBClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_responses.go b/api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_responses.go deleted file mode 100644 index 866499f794..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/get_db_cluster_responses.go +++ /dev/null @@ -1,2689 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// GetDBClusterReader is a Reader for the GetDBCluster structure. -type GetDBClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetDBClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetDBClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetDBClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetDBClusterOK creates a GetDBClusterOK with default headers values -func NewGetDBClusterOK() *GetDBClusterOK { - return &GetDBClusterOK{} -} - -/* -GetDBClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetDBClusterOK struct { - Payload *GetDBClusterOKBody -} - -func (o *GetDBClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/Get][%d] getDbClusterOk %+v", 200, o.Payload) -} - -func (o *GetDBClusterOK) GetPayload() *GetDBClusterOKBody { - return o.Payload -} - -func (o *GetDBClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetDBClusterOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetDBClusterDefault creates a GetDBClusterDefault with default headers values -func NewGetDBClusterDefault(code int) *GetDBClusterDefault { - return &GetDBClusterDefault{ - _statusCode: code, - } -} - -/* -GetDBClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetDBClusterDefault struct { - _statusCode int - - Payload *GetDBClusterDefaultBody -} - -// Code gets the status code for the get DB cluster default response -func (o *GetDBClusterDefault) Code() int { - return o._statusCode -} - -func (o *GetDBClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/Get][%d] GetDBCluster default %+v", o._statusCode, o.Payload) -} - -func (o *GetDBClusterDefault) GetPayload() *GetDBClusterDefaultBody { - return o.Payload -} - -func (o *GetDBClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetDBClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetDBClusterBody get DB cluster body -swagger:model GetDBClusterBody -*/ -type GetDBClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // DB cluster name. - Name string `json:"name,omitempty"` -} - -// Validate validates this get DB cluster body -func (o *GetDBClusterBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster body based on context it is used -func (o *GetDBClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterBody) UnmarshalBinary(b []byte) error { - var res GetDBClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterDefaultBody get DB cluster default body -swagger:model GetDBClusterDefaultBody -*/ -type GetDBClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetDBClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get DB cluster default body -func (o *GetDBClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get DB cluster default body based on the context it is used -func (o *GetDBClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res GetDBClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterDefaultBodyDetailsItems0 get DB cluster default body details items0 -swagger:model GetDBClusterDefaultBodyDetailsItems0 -*/ -type GetDBClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get DB cluster default body details items0 -func (o *GetDBClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster default body details items0 based on context it is used -func (o *GetDBClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetDBClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBody get DB cluster OK body -swagger:model GetDBClusterOKBody -*/ -type GetDBClusterOKBody struct { - // psmdb cluster - PSMDBCluster *GetDBClusterOKBodyPSMDBCluster `json:"psmdb_cluster,omitempty"` - - // pxc cluster - PXCCluster *GetDBClusterOKBodyPXCCluster `json:"pxc_cluster,omitempty"` -} - -// Validate validates this get DB cluster OK body -func (o *GetDBClusterOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validatePSMDBCluster(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXCCluster(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBody) validatePSMDBCluster(formats strfmt.Registry) error { - if swag.IsZero(o.PSMDBCluster) { // not required - return nil - } - - if o.PSMDBCluster != nil { - if err := o.PSMDBCluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBody) validatePXCCluster(formats strfmt.Registry) error { - if swag.IsZero(o.PXCCluster) { // not required - return nil - } - - if o.PXCCluster != nil { - if err := o.PXCCluster.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body based on the context it is used -func (o *GetDBClusterOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidatePSMDBCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXCCluster(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBody) contextValidatePSMDBCluster(ctx context.Context, formats strfmt.Registry) error { - if o.PSMDBCluster != nil { - if err := o.PSMDBCluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBody) contextValidatePXCCluster(ctx context.Context, formats strfmt.Registry) error { - if o.PXCCluster != nil { - if err := o.PXCCluster.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBody) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBCluster PSMDBCluster represents PSMDB cluster information. -swagger:model GetDBClusterOKBodyPSMDBCluster -*/ -type GetDBClusterOKBodyPSMDBCluster struct { - // Cluster name. - Name string `json:"name,omitempty"` - - // DBClusterState represents DB cluster CR state. - // - // - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state. - // - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed. - // - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes. - // - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster. - // - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting. - // - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused. - // - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING. - // It indicates database cluster upgrade is ongoing. - // Enum: [DB_CLUSTER_STATE_INVALID DB_CLUSTER_STATE_CHANGING DB_CLUSTER_STATE_READY DB_CLUSTER_STATE_FAILED DB_CLUSTER_STATE_DELETING DB_CLUSTER_STATE_PAUSED DB_CLUSTER_STATE_UPGRADING] - State *string `json:"state,omitempty"` - - // DB cluster accessible outside of K8s cluster. - Exposed bool `json:"exposed,omitempty"` - - // Installed PSMDB image. - InstalledImage string `json:"installed_image,omitempty"` - - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - AvailableImage string `json:"available_image,omitempty"` - - // Is DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // backup - Backup *GetDBClusterOKBodyPSMDBClusterBackup `json:"backup,omitempty"` - - // operation - Operation *GetDBClusterOKBodyPSMDBClusterOperation `json:"operation,omitempty"` - - // params - Params *GetDBClusterOKBodyPSMDBClusterParams `json:"params,omitempty"` - - // restore - Restore *GetDBClusterOKBodyPSMDBClusterRestore `json:"restore,omitempty"` - - // template - Template *GetDBClusterOKBodyPSMDBClusterTemplate `json:"template,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster -func (o *GetDBClusterOKBodyPSMDBCluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateState(formats); err != nil { - res = append(res, err) - } - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperation(formats); err != nil { - res = append(res, err) - } - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var getDbClusterOkBodyPsmdbClusterTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_STATE_INVALID","DB_CLUSTER_STATE_CHANGING","DB_CLUSTER_STATE_READY","DB_CLUSTER_STATE_FAILED","DB_CLUSTER_STATE_DELETING","DB_CLUSTER_STATE_PAUSED","DB_CLUSTER_STATE_UPGRADING"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - getDbClusterOkBodyPsmdbClusterTypeStatePropEnum = append(getDbClusterOkBodyPsmdbClusterTypeStatePropEnum, v) - } -} - -const ( - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEINVALID captures enum value "DB_CLUSTER_STATE_INVALID" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEINVALID string = "DB_CLUSTER_STATE_INVALID" - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATECHANGING captures enum value "DB_CLUSTER_STATE_CHANGING" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATECHANGING string = "DB_CLUSTER_STATE_CHANGING" - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEREADY captures enum value "DB_CLUSTER_STATE_READY" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEREADY string = "DB_CLUSTER_STATE_READY" - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEFAILED captures enum value "DB_CLUSTER_STATE_FAILED" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEFAILED string = "DB_CLUSTER_STATE_FAILED" - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEDELETING captures enum value "DB_CLUSTER_STATE_DELETING" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEDELETING string = "DB_CLUSTER_STATE_DELETING" - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEPAUSED captures enum value "DB_CLUSTER_STATE_PAUSED" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEPAUSED string = "DB_CLUSTER_STATE_PAUSED" - - // GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEUPGRADING captures enum value "DB_CLUSTER_STATE_UPGRADING" - GetDBClusterOKBodyPSMDBClusterStateDBCLUSTERSTATEUPGRADING string = "DB_CLUSTER_STATE_UPGRADING" -) - -// prop value enum -func (o *GetDBClusterOKBodyPSMDBCluster) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, getDbClusterOkBodyPsmdbClusterTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) validateState(formats strfmt.Registry) error { - if swag.IsZero(o.State) { // not required - return nil - } - - // value enum - if err := o.validateStateEnum("getDbClusterOk"+"."+"psmdb_cluster"+"."+"state", "body", *o.State); err != nil { - return err - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(o.Operation) { // not required - return nil - } - - if o.Operation != nil { - if err := o.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "operation") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "restore") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PSMDB cluster based on the context it is used -func (o *GetDBClusterOKBodyPSMDBCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - if o.Operation != nil { - if err := o.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "operation") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "restore") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBCluster) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBCluster) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBCluster) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterBackup Backup configuration for a database cluster -swagger:model GetDBClusterOKBodyPSMDBClusterBackup -*/ -type GetDBClusterOKBodyPSMDBClusterBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster backup -func (o *GetDBClusterOKBodyPSMDBClusterBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster backup based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterBackup) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterOperation RunningOperation respresents a long-running operation. -swagger:model GetDBClusterOKBodyPSMDBClusterOperation -*/ -type GetDBClusterOKBodyPSMDBClusterOperation struct { - // Finished steps of the operaion; can decrease or increase compared to the previous value. - FinishedSteps int32 `json:"finished_steps,omitempty"` - - // Text describing the current operation progress step. - Message string `json:"message,omitempty"` - - // Total steps needed to finish the operation; can decrease or increase compared to the previous value. - TotalSteps int32 `json:"total_steps,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster operation -func (o *GetDBClusterOKBodyPSMDBClusterOperation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster operation based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterOperation) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterOperation) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterOperation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterParams PSMDBClusterParams represents PSMDB cluster parameters that can be updated. -swagger:model GetDBClusterOKBodyPSMDBClusterParams -*/ -type GetDBClusterOKBodyPSMDBClusterParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // Docker image used for PSMDB. - Image string `json:"image,omitempty"` - - // backup - Backup *GetDBClusterOKBodyPSMDBClusterParamsBackup `json:"backup,omitempty"` - - // replicaset - Replicaset *GetDBClusterOKBodyPSMDBClusterParamsReplicaset `json:"replicaset,omitempty"` - - // restore - Restore *GetDBClusterOKBodyPSMDBClusterParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster params -func (o *GetDBClusterOKBodyPSMDBClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateReplicaset(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParams) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParams) validateReplicaset(formats strfmt.Registry) error { - if swag.IsZero(o.Replicaset) { // not required - return nil - } - - if o.Replicaset != nil { - if err := o.Replicaset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParams) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PSMDB cluster params based on the context it is used -func (o *GetDBClusterOKBodyPSMDBClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateReplicaset(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParams) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParams) contextValidateReplicaset(ctx context.Context, formats strfmt.Registry) error { - if o.Replicaset != nil { - if err := o.Replicaset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParams) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParams) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterParamsBackup Backup configuration for a database cluster -swagger:model GetDBClusterOKBodyPSMDBClusterParamsBackup -*/ -type GetDBClusterOKBodyPSMDBClusterParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster params backup -func (o *GetDBClusterOKBodyPSMDBClusterParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster params backup based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsBackup) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterParamsReplicaset ReplicaSet container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetDBClusterOKBodyPSMDBClusterParamsReplicaset -*/ -type GetDBClusterOKBodyPSMDBClusterParamsReplicaset struct { - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PSMDB cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PSMDB cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster params replicaset -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicaset) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicaset) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PSMDB cluster params replicaset based on the context it is used -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicaset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicaset) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "psmdb_cluster" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicaset) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicaset) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterParamsReplicaset - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources -*/ -type GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster params replicaset compute resources -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster params replicaset compute resources based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterParamsReplicasetComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model GetDBClusterOKBodyPSMDBClusterParamsRestore -*/ -type GetDBClusterOKBodyPSMDBClusterParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster params restore -func (o *GetDBClusterOKBodyPSMDBClusterParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster params restore based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterParamsRestore) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model GetDBClusterOKBodyPSMDBClusterRestore -*/ -type GetDBClusterOKBodyPSMDBClusterRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster restore -func (o *GetDBClusterOKBodyPSMDBClusterRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster restore based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterRestore) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPSMDBClusterTemplate get DB cluster OK body PSMDB cluster template -swagger:model GetDBClusterOKBodyPSMDBClusterTemplate -*/ -type GetDBClusterOKBodyPSMDBClusterTemplate struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this get DB cluster OK body PSMDB cluster template -func (o *GetDBClusterOKBodyPSMDBClusterTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PSMDB cluster template based on context it is used -func (o *GetDBClusterOKBodyPSMDBClusterTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterTemplate) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPSMDBClusterTemplate) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPSMDBClusterTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCCluster PXCCluster represents PXC cluster information. -swagger:model GetDBClusterOKBodyPXCCluster -*/ -type GetDBClusterOKBodyPXCCluster struct { - // Cluster name. - Name string `json:"name,omitempty"` - - // DBClusterState represents DB cluster CR state. - // - // - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state. - // - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed. - // - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes. - // - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster. - // - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting. - // - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused. - // - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING. - // It indicates database cluster upgrade is ongoing. - // Enum: [DB_CLUSTER_STATE_INVALID DB_CLUSTER_STATE_CHANGING DB_CLUSTER_STATE_READY DB_CLUSTER_STATE_FAILED DB_CLUSTER_STATE_DELETING DB_CLUSTER_STATE_PAUSED DB_CLUSTER_STATE_UPGRADING] - State *string `json:"state,omitempty"` - - // DB cluster accessible outside of K8s cluster. - Exposed bool `json:"exposed,omitempty"` - - // Installed XtraDB image. - InstalledImage string `json:"installed_image,omitempty"` - - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - AvailableImage string `json:"available_image,omitempty"` - - // Is DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // backup - Backup *GetDBClusterOKBodyPXCClusterBackup `json:"backup,omitempty"` - - // operation - Operation *GetDBClusterOKBodyPXCClusterOperation `json:"operation,omitempty"` - - // params - Params *GetDBClusterOKBodyPXCClusterParams `json:"params,omitempty"` - - // restore - Restore *GetDBClusterOKBodyPXCClusterRestore `json:"restore,omitempty"` - - // template - Template *GetDBClusterOKBodyPXCClusterTemplate `json:"template,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster -func (o *GetDBClusterOKBodyPXCCluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateState(formats); err != nil { - res = append(res, err) - } - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperation(formats); err != nil { - res = append(res, err) - } - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var getDbClusterOkBodyPxcClusterTypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_STATE_INVALID","DB_CLUSTER_STATE_CHANGING","DB_CLUSTER_STATE_READY","DB_CLUSTER_STATE_FAILED","DB_CLUSTER_STATE_DELETING","DB_CLUSTER_STATE_PAUSED","DB_CLUSTER_STATE_UPGRADING"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - getDbClusterOkBodyPxcClusterTypeStatePropEnum = append(getDbClusterOkBodyPxcClusterTypeStatePropEnum, v) - } -} - -const ( - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEINVALID captures enum value "DB_CLUSTER_STATE_INVALID" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEINVALID string = "DB_CLUSTER_STATE_INVALID" - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATECHANGING captures enum value "DB_CLUSTER_STATE_CHANGING" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATECHANGING string = "DB_CLUSTER_STATE_CHANGING" - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEREADY captures enum value "DB_CLUSTER_STATE_READY" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEREADY string = "DB_CLUSTER_STATE_READY" - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEFAILED captures enum value "DB_CLUSTER_STATE_FAILED" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEFAILED string = "DB_CLUSTER_STATE_FAILED" - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEDELETING captures enum value "DB_CLUSTER_STATE_DELETING" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEDELETING string = "DB_CLUSTER_STATE_DELETING" - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEPAUSED captures enum value "DB_CLUSTER_STATE_PAUSED" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEPAUSED string = "DB_CLUSTER_STATE_PAUSED" - - // GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEUPGRADING captures enum value "DB_CLUSTER_STATE_UPGRADING" - GetDBClusterOKBodyPXCClusterStateDBCLUSTERSTATEUPGRADING string = "DB_CLUSTER_STATE_UPGRADING" -) - -// prop value enum -func (o *GetDBClusterOKBodyPXCCluster) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, getDbClusterOkBodyPxcClusterTypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) validateState(formats strfmt.Registry) error { - if swag.IsZero(o.State) { // not required - return nil - } - - // value enum - if err := o.validateStateEnum("getDbClusterOk"+"."+"pxc_cluster"+"."+"state", "body", *o.State); err != nil { - return err - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(o.Operation) { // not required - return nil - } - - if o.Operation != nil { - if err := o.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "operation") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "restore") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PXC cluster based on the context it is used -func (o *GetDBClusterOKBodyPXCCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - if o.Operation != nil { - if err := o.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "operation") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "restore") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCCluster) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCCluster) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCCluster) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCCluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterBackup Backup configuration for a database cluster -swagger:model GetDBClusterOKBodyPXCClusterBackup -*/ -type GetDBClusterOKBodyPXCClusterBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster backup -func (o *GetDBClusterOKBodyPXCClusterBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster backup based on context it is used -func (o *GetDBClusterOKBodyPXCClusterBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterBackup) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterOperation RunningOperation respresents a long-running operation. -swagger:model GetDBClusterOKBodyPXCClusterOperation -*/ -type GetDBClusterOKBodyPXCClusterOperation struct { - // Finished steps of the operaion; can decrease or increase compared to the previous value. - FinishedSteps int32 `json:"finished_steps,omitempty"` - - // Text describing the current operation progress step. - Message string `json:"message,omitempty"` - - // Total steps needed to finish the operation; can decrease or increase compared to the previous value. - TotalSteps int32 `json:"total_steps,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster operation -func (o *GetDBClusterOKBodyPXCClusterOperation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster operation based on context it is used -func (o *GetDBClusterOKBodyPXCClusterOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterOperation) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterOperation) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterOperation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParams PXCClusterParams represents PXC cluster parameters that can be updated. -swagger:model GetDBClusterOKBodyPXCClusterParams -*/ -type GetDBClusterOKBodyPXCClusterParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // backup - Backup *GetDBClusterOKBodyPXCClusterParamsBackup `json:"backup,omitempty"` - - // haproxy - Haproxy *GetDBClusterOKBodyPXCClusterParamsHaproxy `json:"haproxy,omitempty"` - - // proxysql - Proxysql *GetDBClusterOKBodyPXCClusterParamsProxysql `json:"proxysql,omitempty"` - - // pxc - PXC *GetDBClusterOKBodyPXCClusterParamsPXC `json:"pxc,omitempty"` - - // restore - Restore *GetDBClusterOKBodyPXCClusterParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params -func (o *GetDBClusterOKBodyPXCClusterParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - if o.Haproxy != nil { - if err := o.Haproxy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - if o.Proxysql != nil { - if err := o.Proxysql.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PXC cluster params based on the context it is used -func (o *GetDBClusterOKBodyPXCClusterParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { - if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { - if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParams) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParams) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsBackup Backup configuration for a database cluster -swagger:model GetDBClusterOKBodyPXCClusterParamsBackup -*/ -type GetDBClusterOKBodyPXCClusterParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params backup -func (o *GetDBClusterOKBodyPXCClusterParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster params backup based on context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsBackup) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsHaproxy HAProxy container parameters. -// NOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it. -swagger:model GetDBClusterOKBodyPXCClusterParamsHaproxy -*/ -type GetDBClusterOKBodyPXCClusterParamsHaproxy struct { - // Docker image used for HAProxy. - Image string `json:"image,omitempty"` - - // compute resources - ComputeResources *GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params haproxy -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxy) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxy) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PXC cluster params haproxy based on the context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxy) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxy) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxy) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsHaproxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources -*/ -type GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params haproxy compute resources -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster params haproxy compute resources based on context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsHaproxyComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsPXC PXC container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetDBClusterOKBodyPXCClusterParamsPXC -*/ -type GetDBClusterOKBodyPXCClusterParamsPXC struct { - // Docker image used for PXC. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PXC cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PXC cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *GetDBClusterOKBodyPXCClusterParamsPXCComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params PXC -func (o *GetDBClusterOKBodyPXCClusterParamsPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParamsPXC) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PXC cluster params PXC based on the context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParamsPXC) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsPXC) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsPXCComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetDBClusterOKBodyPXCClusterParamsPXCComputeResources -*/ -type GetDBClusterOKBodyPXCClusterParamsPXCComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params PXC compute resources -func (o *GetDBClusterOKBodyPXCClusterParamsPXCComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster params PXC compute resources based on context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsPXCComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsPXCComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsPXCComputeResources) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsPXCComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsProxysql ProxySQL container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetDBClusterOKBodyPXCClusterParamsProxysql -*/ -type GetDBClusterOKBodyPXCClusterParamsProxysql struct { - // Docker image used for ProxySQL. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // compute resources - ComputeResources *GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params proxysql -func (o *GetDBClusterOKBodyPXCClusterParamsProxysql) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParamsProxysql) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get DB cluster OK body PXC cluster params proxysql based on the context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsProxysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetDBClusterOKBodyPXCClusterParamsProxysql) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getDbClusterOk" + "." + "pxc_cluster" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsProxysql) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsProxysql) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsProxysql - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources -*/ -type GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params proxysql compute resources -func (o *GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster params proxysql compute resources based on context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsProxysqlComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model GetDBClusterOKBodyPXCClusterParamsRestore -*/ -type GetDBClusterOKBodyPXCClusterParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster params restore -func (o *GetDBClusterOKBodyPXCClusterParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster params restore based on context it is used -func (o *GetDBClusterOKBodyPXCClusterParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterParamsRestore) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model GetDBClusterOKBodyPXCClusterRestore -*/ -type GetDBClusterOKBodyPXCClusterRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster restore -func (o *GetDBClusterOKBodyPXCClusterRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster restore based on context it is used -func (o *GetDBClusterOKBodyPXCClusterRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterRestore) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetDBClusterOKBodyPXCClusterTemplate get DB cluster OK body PXC cluster template -swagger:model GetDBClusterOKBodyPXCClusterTemplate -*/ -type GetDBClusterOKBodyPXCClusterTemplate struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this get DB cluster OK body PXC cluster template -func (o *GetDBClusterOKBodyPXCClusterTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get DB cluster OK body PXC cluster template based on context it is used -func (o *GetDBClusterOKBodyPXCClusterTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterTemplate) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetDBClusterOKBodyPXCClusterTemplate) UnmarshalBinary(b []byte) error { - var res GetDBClusterOKBodyPXCClusterTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_parameters.go b/api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_parameters.go deleted file mode 100644 index ec41e02f95..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListDBClustersParams creates a new ListDBClustersParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListDBClustersParams() *ListDBClustersParams { - return &ListDBClustersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListDBClustersParamsWithTimeout creates a new ListDBClustersParams object -// with the ability to set a timeout on a request. -func NewListDBClustersParamsWithTimeout(timeout time.Duration) *ListDBClustersParams { - return &ListDBClustersParams{ - timeout: timeout, - } -} - -// NewListDBClustersParamsWithContext creates a new ListDBClustersParams object -// with the ability to set a context for a request. -func NewListDBClustersParamsWithContext(ctx context.Context) *ListDBClustersParams { - return &ListDBClustersParams{ - Context: ctx, - } -} - -// NewListDBClustersParamsWithHTTPClient creates a new ListDBClustersParams object -// with the ability to set a custom HTTPClient for a request. -func NewListDBClustersParamsWithHTTPClient(client *http.Client) *ListDBClustersParams { - return &ListDBClustersParams{ - HTTPClient: client, - } -} - -/* -ListDBClustersParams contains all the parameters to send to the API endpoint - - for the list DB clusters operation. - - Typically these are written to a http.Request. -*/ -type ListDBClustersParams struct { - // Body. - Body ListDBClustersBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list DB clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListDBClustersParams) WithDefaults() *ListDBClustersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list DB clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListDBClustersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list DB clusters params -func (o *ListDBClustersParams) WithTimeout(timeout time.Duration) *ListDBClustersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list DB clusters params -func (o *ListDBClustersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list DB clusters params -func (o *ListDBClustersParams) WithContext(ctx context.Context) *ListDBClustersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list DB clusters params -func (o *ListDBClustersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list DB clusters params -func (o *ListDBClustersParams) WithHTTPClient(client *http.Client) *ListDBClustersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list DB clusters params -func (o *ListDBClustersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list DB clusters params -func (o *ListDBClustersParams) WithBody(body ListDBClustersBody) *ListDBClustersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list DB clusters params -func (o *ListDBClustersParams) SetBody(body ListDBClustersBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListDBClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_responses.go b/api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_responses.go deleted file mode 100644 index 9ae9b9a2bf..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/list_db_clusters_responses.go +++ /dev/null @@ -1,2704 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ListDBClustersReader is a Reader for the ListDBClusters structure. -type ListDBClustersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListDBClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListDBClustersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListDBClustersDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListDBClustersOK creates a ListDBClustersOK with default headers values -func NewListDBClustersOK() *ListDBClustersOK { - return &ListDBClustersOK{} -} - -/* -ListDBClustersOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListDBClustersOK struct { - Payload *ListDBClustersOKBody -} - -func (o *ListDBClustersOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/List][%d] listDbClustersOk %+v", 200, o.Payload) -} - -func (o *ListDBClustersOK) GetPayload() *ListDBClustersOKBody { - return o.Payload -} - -func (o *ListDBClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListDBClustersOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListDBClustersDefault creates a ListDBClustersDefault with default headers values -func NewListDBClustersDefault(code int) *ListDBClustersDefault { - return &ListDBClustersDefault{ - _statusCode: code, - } -} - -/* -ListDBClustersDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListDBClustersDefault struct { - _statusCode int - - Payload *ListDBClustersDefaultBody -} - -// Code gets the status code for the list DB clusters default response -func (o *ListDBClustersDefault) Code() int { - return o._statusCode -} - -func (o *ListDBClustersDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/List][%d] ListDBClusters default %+v", o._statusCode, o.Payload) -} - -func (o *ListDBClustersDefault) GetPayload() *ListDBClustersDefaultBody { - return o.Payload -} - -func (o *ListDBClustersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListDBClustersDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListDBClustersBody list DB clusters body -swagger:model ListDBClustersBody -*/ -type ListDBClustersBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` -} - -// Validate validates this list DB clusters body -func (o *ListDBClustersBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters body based on context it is used -func (o *ListDBClustersBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersBody) UnmarshalBinary(b []byte) error { - var res ListDBClustersBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersDefaultBody list DB clusters default body -swagger:model ListDBClustersDefaultBody -*/ -type ListDBClustersDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListDBClustersDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list DB clusters default body -func (o *ListDBClustersDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListDBClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListDBClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list DB clusters default body based on the context it is used -func (o *ListDBClustersDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListDBClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListDBClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersDefaultBody) UnmarshalBinary(b []byte) error { - var res ListDBClustersDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersDefaultBodyDetailsItems0 list DB clusters default body details items0 -swagger:model ListDBClustersDefaultBodyDetailsItems0 -*/ -type ListDBClustersDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list DB clusters default body details items0 -func (o *ListDBClustersDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters default body details items0 based on context it is used -func (o *ListDBClustersDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListDBClustersDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBody list DB clusters OK body -swagger:model ListDBClustersOKBody -*/ -type ListDBClustersOKBody struct { - // PXC clusters information. - PXCClusters []*ListDBClustersOKBodyPXCClustersItems0 `json:"pxc_clusters"` - - // PSMDB clusters information. - PSMDBClusters []*ListDBClustersOKBodyPSMDBClustersItems0 `json:"psmdb_clusters"` -} - -// Validate validates this list DB clusters OK body -func (o *ListDBClustersOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validatePXCClusters(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePSMDBClusters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBody) validatePXCClusters(formats strfmt.Registry) error { - if swag.IsZero(o.PXCClusters) { // not required - return nil - } - - for i := 0; i < len(o.PXCClusters); i++ { - if swag.IsZero(o.PXCClusters[i]) { // not required - continue - } - - if o.PXCClusters[i] != nil { - if err := o.PXCClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listDbClustersOk" + "." + "pxc_clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listDbClustersOk" + "." + "pxc_clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (o *ListDBClustersOKBody) validatePSMDBClusters(formats strfmt.Registry) error { - if swag.IsZero(o.PSMDBClusters) { // not required - return nil - } - - for i := 0; i < len(o.PSMDBClusters); i++ { - if swag.IsZero(o.PSMDBClusters[i]) { // not required - continue - } - - if o.PSMDBClusters[i] != nil { - if err := o.PSMDBClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listDbClustersOk" + "." + "psmdb_clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listDbClustersOk" + "." + "psmdb_clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body based on the context it is used -func (o *ListDBClustersOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidatePXCClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePSMDBClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBody) contextValidatePXCClusters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.PXCClusters); i++ { - if o.PXCClusters[i] != nil { - if err := o.PXCClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listDbClustersOk" + "." + "pxc_clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listDbClustersOk" + "." + "pxc_clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -func (o *ListDBClustersOKBody) contextValidatePSMDBClusters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.PSMDBClusters); i++ { - if o.PSMDBClusters[i] != nil { - if err := o.PSMDBClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listDbClustersOk" + "." + "psmdb_clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listDbClustersOk" + "." + "psmdb_clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBody) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0 PSMDBCluster represents PSMDB cluster information. -swagger:model ListDBClustersOKBodyPSMDBClustersItems0 -*/ -type ListDBClustersOKBodyPSMDBClustersItems0 struct { - // Cluster name. - Name string `json:"name,omitempty"` - - // DBClusterState represents DB cluster CR state. - // - // - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state. - // - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed. - // - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes. - // - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster. - // - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting. - // - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused. - // - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING. - // It indicates database cluster upgrade is ongoing. - // Enum: [DB_CLUSTER_STATE_INVALID DB_CLUSTER_STATE_CHANGING DB_CLUSTER_STATE_READY DB_CLUSTER_STATE_FAILED DB_CLUSTER_STATE_DELETING DB_CLUSTER_STATE_PAUSED DB_CLUSTER_STATE_UPGRADING] - State *string `json:"state,omitempty"` - - // DB cluster accessible outside of K8s cluster. - Exposed bool `json:"exposed,omitempty"` - - // Installed PSMDB image. - InstalledImage string `json:"installed_image,omitempty"` - - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - AvailableImage string `json:"available_image,omitempty"` - - // Is DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // backup - Backup *ListDBClustersOKBodyPSMDBClustersItems0Backup `json:"backup,omitempty"` - - // operation - Operation *ListDBClustersOKBodyPSMDBClustersItems0Operation `json:"operation,omitempty"` - - // params - Params *ListDBClustersOKBodyPSMDBClustersItems0Params `json:"params,omitempty"` - - // restore - Restore *ListDBClustersOKBodyPSMDBClustersItems0Restore `json:"restore,omitempty"` - - // template - Template *ListDBClustersOKBodyPSMDBClustersItems0Template `json:"template,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 -func (o *ListDBClustersOKBodyPSMDBClustersItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateState(formats); err != nil { - res = append(res, err) - } - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperation(formats); err != nil { - res = append(res, err) - } - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listDbClustersOkBodyPsmdbClustersItems0TypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_STATE_INVALID","DB_CLUSTER_STATE_CHANGING","DB_CLUSTER_STATE_READY","DB_CLUSTER_STATE_FAILED","DB_CLUSTER_STATE_DELETING","DB_CLUSTER_STATE_PAUSED","DB_CLUSTER_STATE_UPGRADING"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listDbClustersOkBodyPsmdbClustersItems0TypeStatePropEnum = append(listDbClustersOkBodyPsmdbClustersItems0TypeStatePropEnum, v) - } -} - -const ( - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEINVALID captures enum value "DB_CLUSTER_STATE_INVALID" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEINVALID string = "DB_CLUSTER_STATE_INVALID" - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATECHANGING captures enum value "DB_CLUSTER_STATE_CHANGING" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATECHANGING string = "DB_CLUSTER_STATE_CHANGING" - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEREADY captures enum value "DB_CLUSTER_STATE_READY" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEREADY string = "DB_CLUSTER_STATE_READY" - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEFAILED captures enum value "DB_CLUSTER_STATE_FAILED" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEFAILED string = "DB_CLUSTER_STATE_FAILED" - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEDELETING captures enum value "DB_CLUSTER_STATE_DELETING" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEDELETING string = "DB_CLUSTER_STATE_DELETING" - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEPAUSED captures enum value "DB_CLUSTER_STATE_PAUSED" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEPAUSED string = "DB_CLUSTER_STATE_PAUSED" - - // ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEUPGRADING captures enum value "DB_CLUSTER_STATE_UPGRADING" - ListDBClustersOKBodyPSMDBClustersItems0StateDBCLUSTERSTATEUPGRADING string = "DB_CLUSTER_STATE_UPGRADING" -) - -// prop value enum -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listDbClustersOkBodyPsmdbClustersItems0TypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateState(formats strfmt.Registry) error { - if swag.IsZero(o.State) { // not required - return nil - } - - // value enum - if err := o.validateStateEnum("state", "body", *o.State); err != nil { - return err - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(o.Operation) { // not required - return nil - } - - if o.Operation != nil { - if err := o.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restore") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PSMDB clusters items0 based on the context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - if o.Operation != nil { - if err := o.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restore") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0Backup Backup configuration for a database cluster -swagger:model ListDBClustersOKBodyPSMDBClustersItems0Backup -*/ -type ListDBClustersOKBodyPSMDBClustersItems0Backup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 backup -func (o *ListDBClustersOKBodyPSMDBClustersItems0Backup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 backup based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0Backup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Backup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Backup) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0Backup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0Operation RunningOperation respresents a long-running operation. -swagger:model ListDBClustersOKBodyPSMDBClustersItems0Operation -*/ -type ListDBClustersOKBodyPSMDBClustersItems0Operation struct { - // Finished steps of the operaion; can decrease or increase compared to the previous value. - FinishedSteps int32 `json:"finished_steps,omitempty"` - - // Text describing the current operation progress step. - Message string `json:"message,omitempty"` - - // Total steps needed to finish the operation; can decrease or increase compared to the previous value. - TotalSteps int32 `json:"total_steps,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 operation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Operation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 operation based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0Operation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Operation) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Operation) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0Operation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0Params PSMDBClusterParams represents PSMDB cluster parameters that can be updated. -swagger:model ListDBClustersOKBodyPSMDBClustersItems0Params -*/ -type ListDBClustersOKBodyPSMDBClustersItems0Params struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // Docker image used for PSMDB. - Image string `json:"image,omitempty"` - - // backup - Backup *ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup `json:"backup,omitempty"` - - // replicaset - Replicaset *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset `json:"replicaset,omitempty"` - - // restore - Restore *ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 params -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateReplicaset(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) validateReplicaset(formats strfmt.Registry) error { - if swag.IsZero(o.Replicaset) { // not required - return nil - } - - if o.Replicaset != nil { - if err := o.Replicaset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PSMDB clusters items0 params based on the context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateReplicaset(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) contextValidateReplicaset(ctx context.Context, formats strfmt.Registry) error { - if o.Replicaset != nil { - if err := o.Replicaset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Params) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0Params - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup Backup configuration for a database cluster -swagger:model ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup -*/ -type ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 params backup -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 params backup based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0ParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset ReplicaSet container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset -*/ -type ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset struct { - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PSMDB cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PSMDB cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 params replicaset -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PSMDB clusters items0 params replicaset based on the context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicaset - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources -*/ -type ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 params replicaset compute resources -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 params replicaset compute resources based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0ParamsReplicasetComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore -*/ -type ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 params restore -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 params restore based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0ParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0Restore Restore represents restoration payload to restore a database cluster from backup -swagger:model ListDBClustersOKBodyPSMDBClustersItems0Restore -*/ -type ListDBClustersOKBodyPSMDBClustersItems0Restore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 restore -func (o *ListDBClustersOKBodyPSMDBClustersItems0Restore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 restore based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0Restore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Restore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Restore) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0Restore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPSMDBClustersItems0Template list DB clusters OK body PSMDB clusters items0 template -swagger:model ListDBClustersOKBodyPSMDBClustersItems0Template -*/ -type ListDBClustersOKBodyPSMDBClustersItems0Template struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this list DB clusters OK body PSMDB clusters items0 template -func (o *ListDBClustersOKBodyPSMDBClustersItems0Template) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PSMDB clusters items0 template based on context it is used -func (o *ListDBClustersOKBodyPSMDBClustersItems0Template) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Template) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPSMDBClustersItems0Template) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPSMDBClustersItems0Template - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0 PXCCluster represents PXC cluster information. -swagger:model ListDBClustersOKBodyPXCClustersItems0 -*/ -type ListDBClustersOKBodyPXCClustersItems0 struct { - // Cluster name. - Name string `json:"name,omitempty"` - - // DBClusterState represents DB cluster CR state. - // - // - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state. - // - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed. - // - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes. - // - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster. - // - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting. - // - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused. - // - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING. - // It indicates database cluster upgrade is ongoing. - // Enum: [DB_CLUSTER_STATE_INVALID DB_CLUSTER_STATE_CHANGING DB_CLUSTER_STATE_READY DB_CLUSTER_STATE_FAILED DB_CLUSTER_STATE_DELETING DB_CLUSTER_STATE_PAUSED DB_CLUSTER_STATE_UPGRADING] - State *string `json:"state,omitempty"` - - // DB cluster accessible outside of K8s cluster. - Exposed bool `json:"exposed,omitempty"` - - // Installed XtraDB image. - InstalledImage string `json:"installed_image,omitempty"` - - // Available database version user can upgrade cluster to, returned as an image. Image tag contains the version. - // If it's empty, no upgrade is available. - AvailableImage string `json:"available_image,omitempty"` - - // Is DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // backup - Backup *ListDBClustersOKBodyPXCClustersItems0Backup `json:"backup,omitempty"` - - // operation - Operation *ListDBClustersOKBodyPXCClustersItems0Operation `json:"operation,omitempty"` - - // params - Params *ListDBClustersOKBodyPXCClustersItems0Params `json:"params,omitempty"` - - // restore - Restore *ListDBClustersOKBodyPXCClustersItems0Restore `json:"restore,omitempty"` - - // template - Template *ListDBClustersOKBodyPXCClustersItems0Template `json:"template,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 -func (o *ListDBClustersOKBodyPXCClustersItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateState(formats); err != nil { - res = append(res, err) - } - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperation(formats); err != nil { - res = append(res, err) - } - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listDbClustersOkBodyPxcClustersItems0TypeStatePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_STATE_INVALID","DB_CLUSTER_STATE_CHANGING","DB_CLUSTER_STATE_READY","DB_CLUSTER_STATE_FAILED","DB_CLUSTER_STATE_DELETING","DB_CLUSTER_STATE_PAUSED","DB_CLUSTER_STATE_UPGRADING"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listDbClustersOkBodyPxcClustersItems0TypeStatePropEnum = append(listDbClustersOkBodyPxcClustersItems0TypeStatePropEnum, v) - } -} - -const ( - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEINVALID captures enum value "DB_CLUSTER_STATE_INVALID" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEINVALID string = "DB_CLUSTER_STATE_INVALID" - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATECHANGING captures enum value "DB_CLUSTER_STATE_CHANGING" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATECHANGING string = "DB_CLUSTER_STATE_CHANGING" - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEREADY captures enum value "DB_CLUSTER_STATE_READY" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEREADY string = "DB_CLUSTER_STATE_READY" - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEFAILED captures enum value "DB_CLUSTER_STATE_FAILED" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEFAILED string = "DB_CLUSTER_STATE_FAILED" - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEDELETING captures enum value "DB_CLUSTER_STATE_DELETING" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEDELETING string = "DB_CLUSTER_STATE_DELETING" - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEPAUSED captures enum value "DB_CLUSTER_STATE_PAUSED" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEPAUSED string = "DB_CLUSTER_STATE_PAUSED" - - // ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEUPGRADING captures enum value "DB_CLUSTER_STATE_UPGRADING" - ListDBClustersOKBodyPXCClustersItems0StateDBCLUSTERSTATEUPGRADING string = "DB_CLUSTER_STATE_UPGRADING" -) - -// prop value enum -func (o *ListDBClustersOKBodyPXCClustersItems0) validateStateEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listDbClustersOkBodyPxcClustersItems0TypeStatePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) validateState(formats strfmt.Registry) error { - if swag.IsZero(o.State) { // not required - return nil - } - - // value enum - if err := o.validateStateEnum("state", "body", *o.State); err != nil { - return err - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(o.Operation) { // not required - return nil - } - - if o.Operation != nil { - if err := o.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restore") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PXC clusters items0 based on the context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - if o.Operation != nil { - if err := o.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("restore") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0Backup Backup configuration for a database cluster -swagger:model ListDBClustersOKBodyPXCClustersItems0Backup -*/ -type ListDBClustersOKBodyPXCClustersItems0Backup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 backup -func (o *ListDBClustersOKBodyPXCClustersItems0Backup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 backup based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0Backup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Backup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Backup) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0Backup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0Operation RunningOperation respresents a long-running operation. -swagger:model ListDBClustersOKBodyPXCClustersItems0Operation -*/ -type ListDBClustersOKBodyPXCClustersItems0Operation struct { - // Finished steps of the operaion; can decrease or increase compared to the previous value. - FinishedSteps int32 `json:"finished_steps,omitempty"` - - // Text describing the current operation progress step. - Message string `json:"message,omitempty"` - - // Total steps needed to finish the operation; can decrease or increase compared to the previous value. - TotalSteps int32 `json:"total_steps,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 operation -func (o *ListDBClustersOKBodyPXCClustersItems0Operation) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 operation based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0Operation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Operation) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Operation) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0Operation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0Params PXCClusterParams represents PXC cluster parameters that can be updated. -swagger:model ListDBClustersOKBodyPXCClustersItems0Params -*/ -type ListDBClustersOKBodyPXCClustersItems0Params struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // backup - Backup *ListDBClustersOKBodyPXCClustersItems0ParamsBackup `json:"backup,omitempty"` - - // haproxy - Haproxy *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy `json:"haproxy,omitempty"` - - // proxysql - Proxysql *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql `json:"proxysql,omitempty"` - - // pxc - PXC *ListDBClustersOKBodyPXCClustersItems0ParamsPXC `json:"pxc,omitempty"` - - // restore - Restore *ListDBClustersOKBodyPXCClustersItems0ParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params -func (o *ListDBClustersOKBodyPXCClustersItems0Params) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - if o.Haproxy != nil { - if err := o.Haproxy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - if o.Proxysql != nil { - if err := o.Proxysql.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PXC clusters items0 params based on the context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0Params) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { - if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { - if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0Params) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Params) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Params) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0Params - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsBackup Backup configuration for a database cluster -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsBackup -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params backup -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 params backup based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsBackup) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy HAProxy container parameters. -// NOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it. -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy struct { - // Docker image used for HAProxy. - Image string `json:"image,omitempty"` - - // compute resources - ComputeResources *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params haproxy -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PXC clusters items0 params haproxy based on the context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsHaproxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params haproxy compute resources -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 params haproxy compute resources based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsHaproxyComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsPXC PXC container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsPXC -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsPXC struct { - // Docker image used for PXC. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PXC cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PXC cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params PXC -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXC) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PXC clusters items0 params PXC based on the context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXC) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXC) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params PXC compute resources -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 params PXC compute resources based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsPXCComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsProxysql ProxySQL container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsProxysql -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsProxysql struct { - // Docker image used for ProxySQL. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // compute resources - ComputeResources *ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params proxysql -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list DB clusters OK body PXC clusters items0 params proxysql based on the context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysql) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsProxysql - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params proxysql compute resources -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 params proxysql compute resources based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsProxysqlComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0ParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model ListDBClustersOKBodyPXCClustersItems0ParamsRestore -*/ -type ListDBClustersOKBodyPXCClustersItems0ParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 params restore -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 params restore based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0ParamsRestore) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0ParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0Restore Restore represents restoration payload to restore a database cluster from backup -swagger:model ListDBClustersOKBodyPXCClustersItems0Restore -*/ -type ListDBClustersOKBodyPXCClustersItems0Restore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 restore -func (o *ListDBClustersOKBodyPXCClustersItems0Restore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 restore based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0Restore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Restore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Restore) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0Restore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListDBClustersOKBodyPXCClustersItems0Template list DB clusters OK body PXC clusters items0 template -swagger:model ListDBClustersOKBodyPXCClustersItems0Template -*/ -type ListDBClustersOKBodyPXCClustersItems0Template struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this list DB clusters OK body PXC clusters items0 template -func (o *ListDBClustersOKBodyPXCClustersItems0Template) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list DB clusters OK body PXC clusters items0 template based on context it is used -func (o *ListDBClustersOKBodyPXCClustersItems0Template) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Template) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListDBClustersOKBodyPXCClustersItems0Template) UnmarshalBinary(b []byte) error { - var res ListDBClustersOKBodyPXCClustersItems0Template - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_parameters.go b/api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_parameters.go deleted file mode 100644 index e1317ba225..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListS3BackupsParams creates a new ListS3BackupsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListS3BackupsParams() *ListS3BackupsParams { - return &ListS3BackupsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListS3BackupsParamsWithTimeout creates a new ListS3BackupsParams object -// with the ability to set a timeout on a request. -func NewListS3BackupsParamsWithTimeout(timeout time.Duration) *ListS3BackupsParams { - return &ListS3BackupsParams{ - timeout: timeout, - } -} - -// NewListS3BackupsParamsWithContext creates a new ListS3BackupsParams object -// with the ability to set a context for a request. -func NewListS3BackupsParamsWithContext(ctx context.Context) *ListS3BackupsParams { - return &ListS3BackupsParams{ - Context: ctx, - } -} - -// NewListS3BackupsParamsWithHTTPClient creates a new ListS3BackupsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListS3BackupsParamsWithHTTPClient(client *http.Client) *ListS3BackupsParams { - return &ListS3BackupsParams{ - HTTPClient: client, - } -} - -/* -ListS3BackupsParams contains all the parameters to send to the API endpoint - - for the list s3 backups operation. - - Typically these are written to a http.Request. -*/ -type ListS3BackupsParams struct { - // Body. - Body ListS3BackupsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list s3 backups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListS3BackupsParams) WithDefaults() *ListS3BackupsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list s3 backups params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListS3BackupsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list s3 backups params -func (o *ListS3BackupsParams) WithTimeout(timeout time.Duration) *ListS3BackupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list s3 backups params -func (o *ListS3BackupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list s3 backups params -func (o *ListS3BackupsParams) WithContext(ctx context.Context) *ListS3BackupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list s3 backups params -func (o *ListS3BackupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list s3 backups params -func (o *ListS3BackupsParams) WithHTTPClient(client *http.Client) *ListS3BackupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list s3 backups params -func (o *ListS3BackupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list s3 backups params -func (o *ListS3BackupsParams) WithBody(body ListS3BackupsBody) *ListS3BackupsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list s3 backups params -func (o *ListS3BackupsParams) SetBody(body ListS3BackupsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListS3BackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_responses.go b/api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_responses.go deleted file mode 100644 index 49479866fe..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/list_s3_backups_responses.go +++ /dev/null @@ -1,432 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListS3BackupsReader is a Reader for the ListS3Backups structure. -type ListS3BackupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListS3BackupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListS3BackupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListS3BackupsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListS3BackupsOK creates a ListS3BackupsOK with default headers values -func NewListS3BackupsOK() *ListS3BackupsOK { - return &ListS3BackupsOK{} -} - -/* -ListS3BackupsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListS3BackupsOK struct { - Payload *ListS3BackupsOKBody -} - -func (o *ListS3BackupsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Backups/List][%d] listS3BackupsOk %+v", 200, o.Payload) -} - -func (o *ListS3BackupsOK) GetPayload() *ListS3BackupsOKBody { - return o.Payload -} - -func (o *ListS3BackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListS3BackupsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListS3BackupsDefault creates a ListS3BackupsDefault with default headers values -func NewListS3BackupsDefault(code int) *ListS3BackupsDefault { - return &ListS3BackupsDefault{ - _statusCode: code, - } -} - -/* -ListS3BackupsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListS3BackupsDefault struct { - _statusCode int - - Payload *ListS3BackupsDefaultBody -} - -// Code gets the status code for the list s3 backups default response -func (o *ListS3BackupsDefault) Code() int { - return o._statusCode -} - -func (o *ListS3BackupsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Backups/List][%d] ListS3Backups default %+v", o._statusCode, o.Payload) -} - -func (o *ListS3BackupsDefault) GetPayload() *ListS3BackupsDefaultBody { - return o.Payload -} - -func (o *ListS3BackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListS3BackupsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListS3BackupsBody list s3 backups body -swagger:model ListS3BackupsBody -*/ -type ListS3BackupsBody struct { - // Backup Location ID to list backups from - LocationID string `json:"location_id,omitempty"` -} - -// Validate validates this list s3 backups body -func (o *ListS3BackupsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list s3 backups body based on context it is used -func (o *ListS3BackupsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListS3BackupsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListS3BackupsBody) UnmarshalBinary(b []byte) error { - var res ListS3BackupsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListS3BackupsDefaultBody list s3 backups default body -swagger:model ListS3BackupsDefaultBody -*/ -type ListS3BackupsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListS3BackupsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list s3 backups default body -func (o *ListS3BackupsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListS3BackupsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListS3Backups default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListS3Backups default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list s3 backups default body based on the context it is used -func (o *ListS3BackupsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListS3BackupsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListS3Backups default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListS3Backups default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListS3BackupsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListS3BackupsDefaultBody) UnmarshalBinary(b []byte) error { - var res ListS3BackupsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListS3BackupsDefaultBodyDetailsItems0 list s3 backups default body details items0 -swagger:model ListS3BackupsDefaultBodyDetailsItems0 -*/ -type ListS3BackupsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list s3 backups default body details items0 -func (o *ListS3BackupsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list s3 backups default body details items0 based on context it is used -func (o *ListS3BackupsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListS3BackupsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListS3BackupsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListS3BackupsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListS3BackupsOKBody list s3 backups OK body -swagger:model ListS3BackupsOKBody -*/ -type ListS3BackupsOKBody struct { - // Backup list. - Backups []*ListS3BackupsOKBodyBackupsItems0 `json:"backups"` -} - -// Validate validates this list s3 backups OK body -func (o *ListS3BackupsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackups(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListS3BackupsOKBody) validateBackups(formats strfmt.Registry) error { - if swag.IsZero(o.Backups) { // not required - return nil - } - - for i := 0; i < len(o.Backups); i++ { - if swag.IsZero(o.Backups[i]) { // not required - continue - } - - if o.Backups[i] != nil { - if err := o.Backups[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listS3BackupsOk" + "." + "backups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listS3BackupsOk" + "." + "backups" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list s3 backups OK body based on the context it is used -func (o *ListS3BackupsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackups(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListS3BackupsOKBody) contextValidateBackups(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Backups); i++ { - if o.Backups[i] != nil { - if err := o.Backups[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listS3BackupsOk" + "." + "backups" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listS3BackupsOk" + "." + "backups" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListS3BackupsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListS3BackupsOKBody) UnmarshalBinary(b []byte) error { - var res ListS3BackupsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListS3BackupsOKBodyBackupsItems0 list s3 backups OK body backups items0 -swagger:model ListS3BackupsOKBodyBackupsItems0 -*/ -type ListS3BackupsOKBodyBackupsItems0 struct { - // Key of a filename on s3. - Key string `json:"key,omitempty"` -} - -// Validate validates this list s3 backups OK body backups items0 -func (o *ListS3BackupsOKBodyBackupsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list s3 backups OK body backups items0 based on context it is used -func (o *ListS3BackupsOKBodyBackupsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListS3BackupsOKBodyBackupsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListS3BackupsOKBodyBackupsItems0) UnmarshalBinary(b []byte) error { - var res ListS3BackupsOKBodyBackupsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/list_secrets_parameters.go b/api/managementpb/dbaas/json/client/db_clusters/list_secrets_parameters.go deleted file mode 100644 index d7c6857780..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/list_secrets_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListSecretsParams creates a new ListSecretsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListSecretsParams() *ListSecretsParams { - return &ListSecretsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListSecretsParamsWithTimeout creates a new ListSecretsParams object -// with the ability to set a timeout on a request. -func NewListSecretsParamsWithTimeout(timeout time.Duration) *ListSecretsParams { - return &ListSecretsParams{ - timeout: timeout, - } -} - -// NewListSecretsParamsWithContext creates a new ListSecretsParams object -// with the ability to set a context for a request. -func NewListSecretsParamsWithContext(ctx context.Context) *ListSecretsParams { - return &ListSecretsParams{ - Context: ctx, - } -} - -// NewListSecretsParamsWithHTTPClient creates a new ListSecretsParams object -// with the ability to set a custom HTTPClient for a request. -func NewListSecretsParamsWithHTTPClient(client *http.Client) *ListSecretsParams { - return &ListSecretsParams{ - HTTPClient: client, - } -} - -/* -ListSecretsParams contains all the parameters to send to the API endpoint - - for the list secrets operation. - - Typically these are written to a http.Request. -*/ -type ListSecretsParams struct { - // Body. - Body ListSecretsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list secrets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSecretsParams) WithDefaults() *ListSecretsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list secrets params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSecretsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list secrets params -func (o *ListSecretsParams) WithTimeout(timeout time.Duration) *ListSecretsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list secrets params -func (o *ListSecretsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list secrets params -func (o *ListSecretsParams) WithContext(ctx context.Context) *ListSecretsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list secrets params -func (o *ListSecretsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list secrets params -func (o *ListSecretsParams) WithHTTPClient(client *http.Client) *ListSecretsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list secrets params -func (o *ListSecretsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list secrets params -func (o *ListSecretsParams) WithBody(body ListSecretsBody) *ListSecretsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list secrets params -func (o *ListSecretsParams) SetBody(body ListSecretsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListSecretsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/list_secrets_responses.go b/api/managementpb/dbaas/json/client/db_clusters/list_secrets_responses.go deleted file mode 100644 index d6d7f3c134..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/list_secrets_responses.go +++ /dev/null @@ -1,432 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListSecretsReader is a Reader for the ListSecrets structure. -type ListSecretsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListSecretsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListSecretsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListSecretsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListSecretsOK creates a ListSecretsOK with default headers values -func NewListSecretsOK() *ListSecretsOK { - return &ListSecretsOK{} -} - -/* -ListSecretsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListSecretsOK struct { - Payload *ListSecretsOKBody -} - -func (o *ListSecretsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Secrets/List][%d] listSecretsOk %+v", 200, o.Payload) -} - -func (o *ListSecretsOK) GetPayload() *ListSecretsOKBody { - return o.Payload -} - -func (o *ListSecretsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListSecretsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListSecretsDefault creates a ListSecretsDefault with default headers values -func NewListSecretsDefault(code int) *ListSecretsDefault { - return &ListSecretsDefault{ - _statusCode: code, - } -} - -/* -ListSecretsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListSecretsDefault struct { - _statusCode int - - Payload *ListSecretsDefaultBody -} - -// Code gets the status code for the list secrets default response -func (o *ListSecretsDefault) Code() int { - return o._statusCode -} - -func (o *ListSecretsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Secrets/List][%d] ListSecrets default %+v", o._statusCode, o.Payload) -} - -func (o *ListSecretsDefault) GetPayload() *ListSecretsDefaultBody { - return o.Payload -} - -func (o *ListSecretsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListSecretsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListSecretsBody list secrets body -swagger:model ListSecretsBody -*/ -type ListSecretsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` -} - -// Validate validates this list secrets body -func (o *ListSecretsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list secrets body based on context it is used -func (o *ListSecretsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecretsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecretsBody) UnmarshalBinary(b []byte) error { - var res ListSecretsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecretsDefaultBody list secrets default body -swagger:model ListSecretsDefaultBody -*/ -type ListSecretsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListSecretsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list secrets default body -func (o *ListSecretsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecretsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListSecrets default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListSecrets default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list secrets default body based on the context it is used -func (o *ListSecretsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecretsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListSecrets default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListSecrets default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecretsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecretsDefaultBody) UnmarshalBinary(b []byte) error { - var res ListSecretsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecretsDefaultBodyDetailsItems0 list secrets default body details items0 -swagger:model ListSecretsDefaultBodyDetailsItems0 -*/ -type ListSecretsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list secrets default body details items0 -func (o *ListSecretsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list secrets default body details items0 based on context it is used -func (o *ListSecretsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecretsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecretsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListSecretsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecretsOKBody list secrets OK body -swagger:model ListSecretsOKBody -*/ -type ListSecretsOKBody struct { - // Secret list. - Secrets []*ListSecretsOKBodySecretsItems0 `json:"secrets"` -} - -// Validate validates this list secrets OK body -func (o *ListSecretsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateSecrets(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecretsOKBody) validateSecrets(formats strfmt.Registry) error { - if swag.IsZero(o.Secrets) { // not required - return nil - } - - for i := 0; i < len(o.Secrets); i++ { - if swag.IsZero(o.Secrets[i]) { // not required - continue - } - - if o.Secrets[i] != nil { - if err := o.Secrets[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listSecretsOk" + "." + "secrets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listSecretsOk" + "." + "secrets" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list secrets OK body based on the context it is used -func (o *ListSecretsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateSecrets(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecretsOKBody) contextValidateSecrets(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Secrets); i++ { - if o.Secrets[i] != nil { - if err := o.Secrets[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listSecretsOk" + "." + "secrets" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listSecretsOk" + "." + "secrets" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecretsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecretsOKBody) UnmarshalBinary(b []byte) error { - var res ListSecretsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecretsOKBodySecretsItems0 list secrets OK body secrets items0 -swagger:model ListSecretsOKBodySecretsItems0 -*/ -type ListSecretsOKBodySecretsItems0 struct { - // Name of a secret - Name string `json:"name,omitempty"` -} - -// Validate validates this list secrets OK body secrets items0 -func (o *ListSecretsOKBodySecretsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list secrets OK body secrets items0 based on context it is used -func (o *ListSecretsOKBodySecretsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecretsOKBodySecretsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecretsOKBodySecretsItems0) UnmarshalBinary(b []byte) error { - var res ListSecretsOKBodySecretsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_parameters.go b/api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_parameters.go deleted file mode 100644 index 43b6755cc5..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewRestartDBClusterParams creates a new RestartDBClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewRestartDBClusterParams() *RestartDBClusterParams { - return &RestartDBClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRestartDBClusterParamsWithTimeout creates a new RestartDBClusterParams object -// with the ability to set a timeout on a request. -func NewRestartDBClusterParamsWithTimeout(timeout time.Duration) *RestartDBClusterParams { - return &RestartDBClusterParams{ - timeout: timeout, - } -} - -// NewRestartDBClusterParamsWithContext creates a new RestartDBClusterParams object -// with the ability to set a context for a request. -func NewRestartDBClusterParamsWithContext(ctx context.Context) *RestartDBClusterParams { - return &RestartDBClusterParams{ - Context: ctx, - } -} - -// NewRestartDBClusterParamsWithHTTPClient creates a new RestartDBClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewRestartDBClusterParamsWithHTTPClient(client *http.Client) *RestartDBClusterParams { - return &RestartDBClusterParams{ - HTTPClient: client, - } -} - -/* -RestartDBClusterParams contains all the parameters to send to the API endpoint - - for the restart DB cluster operation. - - Typically these are written to a http.Request. -*/ -type RestartDBClusterParams struct { - // Body. - Body RestartDBClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the restart DB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RestartDBClusterParams) WithDefaults() *RestartDBClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the restart DB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RestartDBClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the restart DB cluster params -func (o *RestartDBClusterParams) WithTimeout(timeout time.Duration) *RestartDBClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the restart DB cluster params -func (o *RestartDBClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the restart DB cluster params -func (o *RestartDBClusterParams) WithContext(ctx context.Context) *RestartDBClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the restart DB cluster params -func (o *RestartDBClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the restart DB cluster params -func (o *RestartDBClusterParams) WithHTTPClient(client *http.Client) *RestartDBClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the restart DB cluster params -func (o *RestartDBClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the restart DB cluster params -func (o *RestartDBClusterParams) WithBody(body RestartDBClusterBody) *RestartDBClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the restart DB cluster params -func (o *RestartDBClusterParams) SetBody(body RestartDBClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RestartDBClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_responses.go b/api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_responses.go deleted file mode 100644 index 99bd494ffb..0000000000 --- a/api/managementpb/dbaas/json/client/db_clusters/restart_db_cluster_responses.go +++ /dev/null @@ -1,362 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package db_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RestartDBClusterReader is a Reader for the RestartDBCluster structure. -type RestartDBClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RestartDBClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRestartDBClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRestartDBClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewRestartDBClusterOK creates a RestartDBClusterOK with default headers values -func NewRestartDBClusterOK() *RestartDBClusterOK { - return &RestartDBClusterOK{} -} - -/* -RestartDBClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type RestartDBClusterOK struct { - Payload interface{} -} - -func (o *RestartDBClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/Restart][%d] restartDbClusterOk %+v", 200, o.Payload) -} - -func (o *RestartDBClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *RestartDBClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRestartDBClusterDefault creates a RestartDBClusterDefault with default headers values -func NewRestartDBClusterDefault(code int) *RestartDBClusterDefault { - return &RestartDBClusterDefault{ - _statusCode: code, - } -} - -/* -RestartDBClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type RestartDBClusterDefault struct { - _statusCode int - - Payload *RestartDBClusterDefaultBody -} - -// Code gets the status code for the restart DB cluster default response -func (o *RestartDBClusterDefault) Code() int { - return o._statusCode -} - -func (o *RestartDBClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/DBClusters/Restart][%d] RestartDBCluster default %+v", o._statusCode, o.Payload) -} - -func (o *RestartDBClusterDefault) GetPayload() *RestartDBClusterDefaultBody { - return o.Payload -} - -func (o *RestartDBClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RestartDBClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -RestartDBClusterBody restart DB cluster body -swagger:model RestartDBClusterBody -*/ -type RestartDBClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PXC cluster name. - Name string `json:"name,omitempty"` - - // DBClusterType represents database cluster type. - // - // - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type. - // - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type. - // - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type. - // Enum: [DB_CLUSTER_TYPE_INVALID DB_CLUSTER_TYPE_PXC DB_CLUSTER_TYPE_PSMDB] - ClusterType *string `json:"cluster_type,omitempty"` -} - -// Validate validates this restart DB cluster body -func (o *RestartDBClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateClusterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var restartDbClusterBodyTypeClusterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_TYPE_INVALID","DB_CLUSTER_TYPE_PXC","DB_CLUSTER_TYPE_PSMDB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - restartDbClusterBodyTypeClusterTypePropEnum = append(restartDbClusterBodyTypeClusterTypePropEnum, v) - } -} - -const ( - - // RestartDBClusterBodyClusterTypeDBCLUSTERTYPEINVALID captures enum value "DB_CLUSTER_TYPE_INVALID" - RestartDBClusterBodyClusterTypeDBCLUSTERTYPEINVALID string = "DB_CLUSTER_TYPE_INVALID" - - // RestartDBClusterBodyClusterTypeDBCLUSTERTYPEPXC captures enum value "DB_CLUSTER_TYPE_PXC" - RestartDBClusterBodyClusterTypeDBCLUSTERTYPEPXC string = "DB_CLUSTER_TYPE_PXC" - - // RestartDBClusterBodyClusterTypeDBCLUSTERTYPEPSMDB captures enum value "DB_CLUSTER_TYPE_PSMDB" - RestartDBClusterBodyClusterTypeDBCLUSTERTYPEPSMDB string = "DB_CLUSTER_TYPE_PSMDB" -) - -// prop value enum -func (o *RestartDBClusterBody) validateClusterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, restartDbClusterBodyTypeClusterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *RestartDBClusterBody) validateClusterType(formats strfmt.Registry) error { - if swag.IsZero(o.ClusterType) { // not required - return nil - } - - // value enum - if err := o.validateClusterTypeEnum("body"+"."+"cluster_type", "body", *o.ClusterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this restart DB cluster body based on context it is used -func (o *RestartDBClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RestartDBClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RestartDBClusterBody) UnmarshalBinary(b []byte) error { - var res RestartDBClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -RestartDBClusterDefaultBody restart DB cluster default body -swagger:model RestartDBClusterDefaultBody -*/ -type RestartDBClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*RestartDBClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this restart DB cluster default body -func (o *RestartDBClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *RestartDBClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RestartDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RestartDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this restart DB cluster default body based on the context it is used -func (o *RestartDBClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *RestartDBClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RestartDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RestartDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *RestartDBClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RestartDBClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res RestartDBClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -RestartDBClusterDefaultBodyDetailsItems0 restart DB cluster default body details items0 -swagger:model RestartDBClusterDefaultBodyDetailsItems0 -*/ -type RestartDBClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this restart DB cluster default body details items0 -func (o *RestartDBClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this restart DB cluster default body details items0 based on context it is used -func (o *RestartDBClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RestartDBClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RestartDBClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res RestartDBClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_parameters.go b/api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_parameters.go deleted file mode 100644 index ffa4c86bad..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetKubernetesClusterParams creates a new GetKubernetesClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetKubernetesClusterParams() *GetKubernetesClusterParams { - return &GetKubernetesClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetKubernetesClusterParamsWithTimeout creates a new GetKubernetesClusterParams object -// with the ability to set a timeout on a request. -func NewGetKubernetesClusterParamsWithTimeout(timeout time.Duration) *GetKubernetesClusterParams { - return &GetKubernetesClusterParams{ - timeout: timeout, - } -} - -// NewGetKubernetesClusterParamsWithContext creates a new GetKubernetesClusterParams object -// with the ability to set a context for a request. -func NewGetKubernetesClusterParamsWithContext(ctx context.Context) *GetKubernetesClusterParams { - return &GetKubernetesClusterParams{ - Context: ctx, - } -} - -// NewGetKubernetesClusterParamsWithHTTPClient creates a new GetKubernetesClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetKubernetesClusterParamsWithHTTPClient(client *http.Client) *GetKubernetesClusterParams { - return &GetKubernetesClusterParams{ - HTTPClient: client, - } -} - -/* -GetKubernetesClusterParams contains all the parameters to send to the API endpoint - - for the get kubernetes cluster operation. - - Typically these are written to a http.Request. -*/ -type GetKubernetesClusterParams struct { - // Body. - Body GetKubernetesClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get kubernetes cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKubernetesClusterParams) WithDefaults() *GetKubernetesClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get kubernetes cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetKubernetesClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) WithTimeout(timeout time.Duration) *GetKubernetesClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) WithContext(ctx context.Context) *GetKubernetesClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) WithHTTPClient(client *http.Client) *GetKubernetesClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) WithBody(body GetKubernetesClusterBody) *GetKubernetesClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get kubernetes cluster params -func (o *GetKubernetesClusterParams) SetBody(body GetKubernetesClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetKubernetesClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_responses.go b/api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_responses.go deleted file mode 100644 index 28755b99e1..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/get_kubernetes_cluster_responses.go +++ /dev/null @@ -1,423 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetKubernetesClusterReader is a Reader for the GetKubernetesCluster structure. -type GetKubernetesClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetKubernetesClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetKubernetesClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetKubernetesClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetKubernetesClusterOK creates a GetKubernetesClusterOK with default headers values -func NewGetKubernetesClusterOK() *GetKubernetesClusterOK { - return &GetKubernetesClusterOK{} -} - -/* -GetKubernetesClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetKubernetesClusterOK struct { - Payload *GetKubernetesClusterOKBody -} - -func (o *GetKubernetesClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Get][%d] getKubernetesClusterOk %+v", 200, o.Payload) -} - -func (o *GetKubernetesClusterOK) GetPayload() *GetKubernetesClusterOKBody { - return o.Payload -} - -func (o *GetKubernetesClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetKubernetesClusterOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetKubernetesClusterDefault creates a GetKubernetesClusterDefault with default headers values -func NewGetKubernetesClusterDefault(code int) *GetKubernetesClusterDefault { - return &GetKubernetesClusterDefault{ - _statusCode: code, - } -} - -/* -GetKubernetesClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetKubernetesClusterDefault struct { - _statusCode int - - Payload *GetKubernetesClusterDefaultBody -} - -// Code gets the status code for the get kubernetes cluster default response -func (o *GetKubernetesClusterDefault) Code() int { - return o._statusCode -} - -func (o *GetKubernetesClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Get][%d] GetKubernetesCluster default %+v", o._statusCode, o.Payload) -} - -func (o *GetKubernetesClusterDefault) GetPayload() *GetKubernetesClusterDefaultBody { - return o.Payload -} - -func (o *GetKubernetesClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetKubernetesClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetKubernetesClusterBody get kubernetes cluster body -swagger:model GetKubernetesClusterBody -*/ -type GetKubernetesClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` -} - -// Validate validates this get kubernetes cluster body -func (o *GetKubernetesClusterBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get kubernetes cluster body based on context it is used -func (o *GetKubernetesClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetKubernetesClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetKubernetesClusterBody) UnmarshalBinary(b []byte) error { - var res GetKubernetesClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetKubernetesClusterDefaultBody get kubernetes cluster default body -swagger:model GetKubernetesClusterDefaultBody -*/ -type GetKubernetesClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetKubernetesClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get kubernetes cluster default body -func (o *GetKubernetesClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetKubernetesClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get kubernetes cluster default body based on the context it is used -func (o *GetKubernetesClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetKubernetesClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetKubernetesClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetKubernetesClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res GetKubernetesClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetKubernetesClusterDefaultBodyDetailsItems0 get kubernetes cluster default body details items0 -swagger:model GetKubernetesClusterDefaultBodyDetailsItems0 -*/ -type GetKubernetesClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get kubernetes cluster default body details items0 -func (o *GetKubernetesClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get kubernetes cluster default body details items0 based on context it is used -func (o *GetKubernetesClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetKubernetesClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetKubernetesClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetKubernetesClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetKubernetesClusterOKBody get kubernetes cluster OK body -swagger:model GetKubernetesClusterOKBody -*/ -type GetKubernetesClusterOKBody struct { - // kube auth - KubeAuth *GetKubernetesClusterOKBodyKubeAuth `json:"kube_auth,omitempty"` -} - -// Validate validates this get kubernetes cluster OK body -func (o *GetKubernetesClusterOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateKubeAuth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetKubernetesClusterOKBody) validateKubeAuth(formats strfmt.Registry) error { - if swag.IsZero(o.KubeAuth) { // not required - return nil - } - - if o.KubeAuth != nil { - if err := o.KubeAuth.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getKubernetesClusterOk" + "." + "kube_auth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getKubernetesClusterOk" + "." + "kube_auth") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get kubernetes cluster OK body based on the context it is used -func (o *GetKubernetesClusterOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateKubeAuth(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetKubernetesClusterOKBody) contextValidateKubeAuth(ctx context.Context, formats strfmt.Registry) error { - if o.KubeAuth != nil { - if err := o.KubeAuth.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getKubernetesClusterOk" + "." + "kube_auth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getKubernetesClusterOk" + "." + "kube_auth") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetKubernetesClusterOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetKubernetesClusterOKBody) UnmarshalBinary(b []byte) error { - var res GetKubernetesClusterOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetKubernetesClusterOKBodyKubeAuth KubeAuth represents Kubernetes / kubectl authentication and authorization information. -swagger:model GetKubernetesClusterOKBodyKubeAuth -*/ -type GetKubernetesClusterOKBodyKubeAuth struct { - // Kubeconfig file content. - Kubeconfig string `json:"kubeconfig,omitempty"` -} - -// Validate validates this get kubernetes cluster OK body kube auth -func (o *GetKubernetesClusterOKBodyKubeAuth) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get kubernetes cluster OK body kube auth based on context it is used -func (o *GetKubernetesClusterOKBodyKubeAuth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetKubernetesClusterOKBodyKubeAuth) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetKubernetesClusterOKBodyKubeAuth) UnmarshalBinary(b []byte) error { - var res GetKubernetesClusterOKBodyKubeAuth - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/get_resources_parameters.go b/api/managementpb/dbaas/json/client/kubernetes/get_resources_parameters.go deleted file mode 100644 index c973499d64..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/get_resources_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetResourcesParams creates a new GetResourcesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetResourcesParams() *GetResourcesParams { - return &GetResourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetResourcesParamsWithTimeout creates a new GetResourcesParams object -// with the ability to set a timeout on a request. -func NewGetResourcesParamsWithTimeout(timeout time.Duration) *GetResourcesParams { - return &GetResourcesParams{ - timeout: timeout, - } -} - -// NewGetResourcesParamsWithContext creates a new GetResourcesParams object -// with the ability to set a context for a request. -func NewGetResourcesParamsWithContext(ctx context.Context) *GetResourcesParams { - return &GetResourcesParams{ - Context: ctx, - } -} - -// NewGetResourcesParamsWithHTTPClient creates a new GetResourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetResourcesParamsWithHTTPClient(client *http.Client) *GetResourcesParams { - return &GetResourcesParams{ - HTTPClient: client, - } -} - -/* -GetResourcesParams contains all the parameters to send to the API endpoint - - for the get resources operation. - - Typically these are written to a http.Request. -*/ -type GetResourcesParams struct { - // Body. - Body GetResourcesBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get resources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResourcesParams) WithDefaults() *GetResourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get resources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetResourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get resources params -func (o *GetResourcesParams) WithTimeout(timeout time.Duration) *GetResourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get resources params -func (o *GetResourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get resources params -func (o *GetResourcesParams) WithContext(ctx context.Context) *GetResourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get resources params -func (o *GetResourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get resources params -func (o *GetResourcesParams) WithHTTPClient(client *http.Client) *GetResourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get resources params -func (o *GetResourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get resources params -func (o *GetResourcesParams) WithBody(body GetResourcesBody) *GetResourcesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get resources params -func (o *GetResourcesParams) SetBody(body GetResourcesBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetResourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/get_resources_responses.go b/api/managementpb/dbaas/json/client/kubernetes/get_resources_responses.go deleted file mode 100644 index 0c057ab4cd..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/get_resources_responses.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetResourcesReader is a Reader for the GetResources structure. -type GetResourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetResourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetResourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetResourcesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetResourcesOK creates a GetResourcesOK with default headers values -func NewGetResourcesOK() *GetResourcesOK { - return &GetResourcesOK{} -} - -/* -GetResourcesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetResourcesOK struct { - Payload *GetResourcesOKBody -} - -func (o *GetResourcesOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Resources/Get][%d] getResourcesOk %+v", 200, o.Payload) -} - -func (o *GetResourcesOK) GetPayload() *GetResourcesOKBody { - return o.Payload -} - -func (o *GetResourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetResourcesOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetResourcesDefault creates a GetResourcesDefault with default headers values -func NewGetResourcesDefault(code int) *GetResourcesDefault { - return &GetResourcesDefault{ - _statusCode: code, - } -} - -/* -GetResourcesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetResourcesDefault struct { - _statusCode int - - Payload *GetResourcesDefaultBody -} - -// Code gets the status code for the get resources default response -func (o *GetResourcesDefault) Code() int { - return o._statusCode -} - -func (o *GetResourcesDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Resources/Get][%d] GetResources default %+v", o._statusCode, o.Payload) -} - -func (o *GetResourcesDefault) GetPayload() *GetResourcesDefaultBody { - return o.Payload -} - -func (o *GetResourcesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetResourcesDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetResourcesBody get resources body -swagger:model GetResourcesBody -*/ -type GetResourcesBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` -} - -// Validate validates this get resources body -func (o *GetResourcesBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get resources body based on context it is used -func (o *GetResourcesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetResourcesBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetResourcesBody) UnmarshalBinary(b []byte) error { - var res GetResourcesBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetResourcesDefaultBody get resources default body -swagger:model GetResourcesDefaultBody -*/ -type GetResourcesDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetResourcesDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get resources default body -func (o *GetResourcesDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetResourcesDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetResources default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetResources default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get resources default body based on the context it is used -func (o *GetResourcesDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetResourcesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetResources default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetResources default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetResourcesDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetResourcesDefaultBody) UnmarshalBinary(b []byte) error { - var res GetResourcesDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetResourcesDefaultBodyDetailsItems0 get resources default body details items0 -swagger:model GetResourcesDefaultBodyDetailsItems0 -*/ -type GetResourcesDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get resources default body details items0 -func (o *GetResourcesDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get resources default body details items0 based on context it is used -func (o *GetResourcesDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetResourcesDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetResourcesDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetResourcesDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetResourcesOKBody get resources OK body -swagger:model GetResourcesOKBody -*/ -type GetResourcesOKBody struct { - // all - All *GetResourcesOKBodyAll `json:"all,omitempty"` - - // available - Available *GetResourcesOKBodyAvailable `json:"available,omitempty"` -} - -// Validate validates this get resources OK body -func (o *GetResourcesOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateAll(formats); err != nil { - res = append(res, err) - } - - if err := o.validateAvailable(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetResourcesOKBody) validateAll(formats strfmt.Registry) error { - if swag.IsZero(o.All) { // not required - return nil - } - - if o.All != nil { - if err := o.All.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getResourcesOk" + "." + "all") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getResourcesOk" + "." + "all") - } - return err - } - } - - return nil -} - -func (o *GetResourcesOKBody) validateAvailable(formats strfmt.Registry) error { - if swag.IsZero(o.Available) { // not required - return nil - } - - if o.Available != nil { - if err := o.Available.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getResourcesOk" + "." + "available") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getResourcesOk" + "." + "available") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get resources OK body based on the context it is used -func (o *GetResourcesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateAll(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateAvailable(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetResourcesOKBody) contextValidateAll(ctx context.Context, formats strfmt.Registry) error { - if o.All != nil { - if err := o.All.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getResourcesOk" + "." + "all") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getResourcesOk" + "." + "all") - } - return err - } - } - - return nil -} - -func (o *GetResourcesOKBody) contextValidateAvailable(ctx context.Context, formats strfmt.Registry) error { - if o.Available != nil { - if err := o.Available.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getResourcesOk" + "." + "available") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getResourcesOk" + "." + "available") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetResourcesOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetResourcesOKBody) UnmarshalBinary(b []byte) error { - var res GetResourcesOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetResourcesOKBodyAll Resources contains Kubernetes cluster resources. -swagger:model GetResourcesOKBodyAll -*/ -type GetResourcesOKBodyAll struct { - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` - - // CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus. - // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. - CPUm string `json:"cpu_m,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` -} - -// Validate validates this get resources OK body all -func (o *GetResourcesOKBodyAll) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get resources OK body all based on context it is used -func (o *GetResourcesOKBodyAll) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetResourcesOKBodyAll) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetResourcesOKBodyAll) UnmarshalBinary(b []byte) error { - var res GetResourcesOKBodyAll - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetResourcesOKBodyAvailable Resources contains Kubernetes cluster resources. -swagger:model GetResourcesOKBodyAvailable -*/ -type GetResourcesOKBodyAvailable struct { - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` - - // CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus. - // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. - CPUm string `json:"cpu_m,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` -} - -// Validate validates this get resources OK body available -func (o *GetResourcesOKBodyAvailable) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get resources OK body available based on context it is used -func (o *GetResourcesOKBodyAvailable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetResourcesOKBodyAvailable) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetResourcesOKBodyAvailable) UnmarshalBinary(b []byte) error { - var res GetResourcesOKBodyAvailable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/kubernetes_client.go b/api/managementpb/dbaas/json/client/kubernetes/kubernetes_client.go deleted file mode 100644 index 16fd0d9ddd..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/kubernetes_client.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new kubernetes API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for kubernetes API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetKubernetesCluster(params *GetKubernetesClusterParams, opts ...ClientOption) (*GetKubernetesClusterOK, error) - - GetResources(params *GetResourcesParams, opts ...ClientOption) (*GetResourcesOK, error) - - ListKubernetesClusters(params *ListKubernetesClustersParams, opts ...ClientOption) (*ListKubernetesClustersOK, error) - - ListStorageClasses(params *ListStorageClassesParams, opts ...ClientOption) (*ListStorageClassesOK, error) - - RegisterKubernetesCluster(params *RegisterKubernetesClusterParams, opts ...ClientOption) (*RegisterKubernetesClusterOK, error) - - UnregisterKubernetesCluster(params *UnregisterKubernetesClusterParams, opts ...ClientOption) (*UnregisterKubernetesClusterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetKubernetesCluster gets kubernetes cluster return kube auth with kubernetes config -*/ -func (a *Client) GetKubernetesCluster(params *GetKubernetesClusterParams, opts ...ClientOption) (*GetKubernetesClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetKubernetesClusterParams() - } - op := &runtime.ClientOperation{ - ID: "GetKubernetesCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Kubernetes/Get", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetKubernetesClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetKubernetesClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetKubernetesClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetResources gets resources returns all and available resources of a kubernetes cluster n o t e the user defined in kubeconfig for the cluster has to have rights to list and get pods from all namespaces also getting and listing nodes has to be allowed -*/ -func (a *Client) GetResources(params *GetResourcesParams, opts ...ClientOption) (*GetResourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetResourcesParams() - } - op := &runtime.ClientOperation{ - ID: "GetResources", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Kubernetes/Resources/Get", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetResourcesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetResourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetResourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListKubernetesClusters lists kubernetes clusters returns a list of all registered kubernetes clusters -*/ -func (a *Client) ListKubernetesClusters(params *ListKubernetesClustersParams, opts ...ClientOption) (*ListKubernetesClustersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListKubernetesClustersParams() - } - op := &runtime.ClientOperation{ - ID: "ListKubernetesClusters", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Kubernetes/List", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ListKubernetesClustersReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListKubernetesClustersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListKubernetesClustersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -ListStorageClasses lists storage classes returns the names of all storage classes available in a kubernetes cluster -*/ -func (a *Client) ListStorageClasses(params *ListStorageClassesParams, opts ...ClientOption) (*ListStorageClassesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListStorageClassesParams() - } - op := &runtime.ClientOperation{ - ID: "ListStorageClasses", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Kubernetes/StorageClasses/List", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ListStorageClassesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListStorageClassesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListStorageClassesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -RegisterKubernetesCluster registers kubernetes cluster registers an existing kubernetes cluster in PMM -*/ -func (a *Client) RegisterKubernetesCluster(params *RegisterKubernetesClusterParams, opts ...ClientOption) (*RegisterKubernetesClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterKubernetesClusterParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterKubernetesCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Kubernetes/Register", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &RegisterKubernetesClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*RegisterKubernetesClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterKubernetesClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UnregisterKubernetesCluster unregisters kubernetes cluster removes a registered kubernetes cluster from PMM -*/ -func (a *Client) UnregisterKubernetesCluster(params *UnregisterKubernetesClusterParams, opts ...ClientOption) (*UnregisterKubernetesClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUnregisterKubernetesClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UnregisterKubernetesCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Kubernetes/Unregister", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &UnregisterKubernetesClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UnregisterKubernetesClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UnregisterKubernetesClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_parameters.go b/api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_parameters.go deleted file mode 100644 index fc2546bdc7..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_parameters.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListKubernetesClustersParams creates a new ListKubernetesClustersParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListKubernetesClustersParams() *ListKubernetesClustersParams { - return &ListKubernetesClustersParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListKubernetesClustersParamsWithTimeout creates a new ListKubernetesClustersParams object -// with the ability to set a timeout on a request. -func NewListKubernetesClustersParamsWithTimeout(timeout time.Duration) *ListKubernetesClustersParams { - return &ListKubernetesClustersParams{ - timeout: timeout, - } -} - -// NewListKubernetesClustersParamsWithContext creates a new ListKubernetesClustersParams object -// with the ability to set a context for a request. -func NewListKubernetesClustersParamsWithContext(ctx context.Context) *ListKubernetesClustersParams { - return &ListKubernetesClustersParams{ - Context: ctx, - } -} - -// NewListKubernetesClustersParamsWithHTTPClient creates a new ListKubernetesClustersParams object -// with the ability to set a custom HTTPClient for a request. -func NewListKubernetesClustersParamsWithHTTPClient(client *http.Client) *ListKubernetesClustersParams { - return &ListKubernetesClustersParams{ - HTTPClient: client, - } -} - -/* -ListKubernetesClustersParams contains all the parameters to send to the API endpoint - - for the list kubernetes clusters operation. - - Typically these are written to a http.Request. -*/ -type ListKubernetesClustersParams struct { - // Body. - Body interface{} - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list kubernetes clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListKubernetesClustersParams) WithDefaults() *ListKubernetesClustersParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list kubernetes clusters params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListKubernetesClustersParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) WithTimeout(timeout time.Duration) *ListKubernetesClustersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) WithContext(ctx context.Context) *ListKubernetesClustersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) WithHTTPClient(client *http.Client) *ListKubernetesClustersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) WithBody(body interface{}) *ListKubernetesClustersParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list kubernetes clusters params -func (o *ListKubernetesClustersParams) SetBody(body interface{}) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListKubernetesClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_responses.go b/api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_responses.go deleted file mode 100644 index 7a4ccd0ab3..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/list_kubernetes_clusters_responses.go +++ /dev/null @@ -1,1002 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ListKubernetesClustersReader is a Reader for the ListKubernetesClusters structure. -type ListKubernetesClustersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListKubernetesClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListKubernetesClustersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListKubernetesClustersDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListKubernetesClustersOK creates a ListKubernetesClustersOK with default headers values -func NewListKubernetesClustersOK() *ListKubernetesClustersOK { - return &ListKubernetesClustersOK{} -} - -/* -ListKubernetesClustersOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListKubernetesClustersOK struct { - Payload *ListKubernetesClustersOKBody -} - -func (o *ListKubernetesClustersOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/List][%d] listKubernetesClustersOk %+v", 200, o.Payload) -} - -func (o *ListKubernetesClustersOK) GetPayload() *ListKubernetesClustersOKBody { - return o.Payload -} - -func (o *ListKubernetesClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListKubernetesClustersOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListKubernetesClustersDefault creates a ListKubernetesClustersDefault with default headers values -func NewListKubernetesClustersDefault(code int) *ListKubernetesClustersDefault { - return &ListKubernetesClustersDefault{ - _statusCode: code, - } -} - -/* -ListKubernetesClustersDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListKubernetesClustersDefault struct { - _statusCode int - - Payload *ListKubernetesClustersDefaultBody -} - -// Code gets the status code for the list kubernetes clusters default response -func (o *ListKubernetesClustersDefault) Code() int { - return o._statusCode -} - -func (o *ListKubernetesClustersDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/List][%d] ListKubernetesClusters default %+v", o._statusCode, o.Payload) -} - -func (o *ListKubernetesClustersDefault) GetPayload() *ListKubernetesClustersDefaultBody { - return o.Payload -} - -func (o *ListKubernetesClustersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListKubernetesClustersDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListKubernetesClustersDefaultBody list kubernetes clusters default body -swagger:model ListKubernetesClustersDefaultBody -*/ -type ListKubernetesClustersDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListKubernetesClustersDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list kubernetes clusters default body -func (o *ListKubernetesClustersDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListKubernetesClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListKubernetesClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list kubernetes clusters default body based on the context it is used -func (o *ListKubernetesClustersDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListKubernetesClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListKubernetesClusters default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersDefaultBody) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersDefaultBodyDetailsItems0 list kubernetes clusters default body details items0 -swagger:model ListKubernetesClustersDefaultBodyDetailsItems0 -*/ -type ListKubernetesClustersDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list kubernetes clusters default body details items0 -func (o *ListKubernetesClustersDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list kubernetes clusters default body details items0 based on context it is used -func (o *ListKubernetesClustersDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersOKBody list kubernetes clusters OK body -swagger:model ListKubernetesClustersOKBody -*/ -type ListKubernetesClustersOKBody struct { - // Kubernetes clusters. - KubernetesClusters []*ListKubernetesClustersOKBodyKubernetesClustersItems0 `json:"kubernetes_clusters"` -} - -// Validate validates this list kubernetes clusters OK body -func (o *ListKubernetesClustersOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateKubernetesClusters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersOKBody) validateKubernetesClusters(formats strfmt.Registry) error { - if swag.IsZero(o.KubernetesClusters) { // not required - return nil - } - - for i := 0; i < len(o.KubernetesClusters); i++ { - if swag.IsZero(o.KubernetesClusters[i]) { // not required - continue - } - - if o.KubernetesClusters[i] != nil { - if err := o.KubernetesClusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listKubernetesClustersOk" + "." + "kubernetes_clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listKubernetesClustersOk" + "." + "kubernetes_clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list kubernetes clusters OK body based on the context it is used -func (o *ListKubernetesClustersOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateKubernetesClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersOKBody) contextValidateKubernetesClusters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.KubernetesClusters); i++ { - if o.KubernetesClusters[i] != nil { - if err := o.KubernetesClusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listKubernetesClustersOk" + "." + "kubernetes_clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listKubernetesClustersOk" + "." + "kubernetes_clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersOKBody) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersOKBodyKubernetesClustersItems0 Cluster contains public info about Kubernetes cluster. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model ListKubernetesClustersOKBodyKubernetesClustersItems0 -*/ -type ListKubernetesClustersOKBodyKubernetesClustersItems0 struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // KubernetesClusterStatus defines status of Kubernetes cluster. - // - // - KUBERNETES_CLUSTER_STATUS_INVALID: KUBERNETES_CLUSTER_STATUS_INVALID represents unknown state. - // - KUBERNETES_CLUSTER_STATUS_OK: KUBERNETES_CLUSTER_STATUS_OK represents that Kubernetes cluster is accessible. - // - KUBERNETES_CLUSTER_STATUS_UNAVAILABLE: KUBERNETES_CLUSTER_STATUS_UNAVAILABLE represents that Kubernetes cluster is not accessible. - // - KUBERNETES_CLUSTER_STATUS_PROVISIONING: KUBERNETES_CLUSTER_STATUS_PROVISIONING represents that Kubernetes cluster is privisioning. - // Enum: [KUBERNETES_CLUSTER_STATUS_INVALID KUBERNETES_CLUSTER_STATUS_OK KUBERNETES_CLUSTER_STATUS_UNAVAILABLE KUBERNETES_CLUSTER_STATUS_PROVISIONING] - Status *string `json:"status,omitempty"` - - // operators - Operators *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators `json:"operators,omitempty"` -} - -// Validate validates this list kubernetes clusters OK body kubernetes clusters items0 -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateOperators(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listKubernetesClustersOkBodyKubernetesClustersItems0TypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["KUBERNETES_CLUSTER_STATUS_INVALID","KUBERNETES_CLUSTER_STATUS_OK","KUBERNETES_CLUSTER_STATUS_UNAVAILABLE","KUBERNETES_CLUSTER_STATUS_PROVISIONING"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listKubernetesClustersOkBodyKubernetesClustersItems0TypeStatusPropEnum = append(listKubernetesClustersOkBodyKubernetesClustersItems0TypeStatusPropEnum, v) - } -} - -const ( - - // ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSINVALID captures enum value "KUBERNETES_CLUSTER_STATUS_INVALID" - ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSINVALID string = "KUBERNETES_CLUSTER_STATUS_INVALID" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSOK captures enum value "KUBERNETES_CLUSTER_STATUS_OK" - ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSOK string = "KUBERNETES_CLUSTER_STATUS_OK" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSUNAVAILABLE captures enum value "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE" - ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSUNAVAILABLE string = "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSPROVISIONING captures enum value "KUBERNETES_CLUSTER_STATUS_PROVISIONING" - ListKubernetesClustersOKBodyKubernetesClustersItems0StatusKUBERNETESCLUSTERSTATUSPROVISIONING string = "KUBERNETES_CLUSTER_STATUS_PROVISIONING" -) - -// prop value enum -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listKubernetesClustersOkBodyKubernetesClustersItems0TypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) validateOperators(formats strfmt.Registry) error { - if swag.IsZero(o.Operators) { // not required - return nil - } - - if o.Operators != nil { - if err := o.Operators.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list kubernetes clusters OK body kubernetes clusters items0 based on the context it is used -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateOperators(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) contextValidateOperators(ctx context.Context, formats strfmt.Registry) error { - if o.Operators != nil { - if err := o.Operators.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersOKBodyKubernetesClustersItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersOKBodyKubernetesClustersItems0Operators Operators contains list of operators installed in Kubernetes cluster. -swagger:model ListKubernetesClustersOKBodyKubernetesClustersItems0Operators -*/ -type ListKubernetesClustersOKBodyKubernetesClustersItems0Operators struct { - // dbaas - Dbaas *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas `json:"dbaas,omitempty"` - - // psmdb - PSMDB *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB `json:"psmdb,omitempty"` - - // pxc - PXC *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC `json:"pxc,omitempty"` -} - -// Validate validates this list kubernetes clusters OK body kubernetes clusters items0 operators -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDbaas(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePSMDB(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) validateDbaas(formats strfmt.Registry) error { - if swag.IsZero(o.Dbaas) { // not required - return nil - } - - if o.Dbaas != nil { - if err := o.Dbaas.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators" + "." + "dbaas") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators" + "." + "dbaas") - } - return err - } - } - - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) validatePSMDB(formats strfmt.Registry) error { - if swag.IsZero(o.PSMDB) { // not required - return nil - } - - if o.PSMDB != nil { - if err := o.PSMDB.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators" + "." + "psmdb") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators" + "." + "psmdb") - } - return err - } - } - - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators" + "." + "pxc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this list kubernetes clusters OK body kubernetes clusters items0 operators based on the context it is used -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDbaas(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePSMDB(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) contextValidateDbaas(ctx context.Context, formats strfmt.Registry) error { - if o.Dbaas != nil { - if err := o.Dbaas.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators" + "." + "dbaas") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators" + "." + "dbaas") - } - return err - } - } - - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) contextValidatePSMDB(ctx context.Context, formats strfmt.Registry) error { - if o.PSMDB != nil { - if err := o.PSMDB.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators" + "." + "psmdb") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators" + "." + "psmdb") - } - return err - } - } - - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operators" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operators" + "." + "pxc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0Operators) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersOKBodyKubernetesClustersItems0Operators - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas Operator contains all information about operator installed in Kubernetes cluster. -swagger:model ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas -*/ -type ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas struct { - // OperatorsStatus defines status of operators installed in Kubernetes cluster. - // - // - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state. - // - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version. - // - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version. - // - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed. - // Enum: [OPERATORS_STATUS_INVALID OPERATORS_STATUS_OK OPERATORS_STATUS_UNSUPPORTED OPERATORS_STATUS_NOT_INSTALLED] - Status *string `json:"status,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this list kubernetes clusters OK body kubernetes clusters items0 operators dbaas -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsDbaasTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OPERATORS_STATUS_INVALID","OPERATORS_STATUS_OK","OPERATORS_STATUS_UNSUPPORTED","OPERATORS_STATUS_NOT_INSTALLED"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsDbaasTypeStatusPropEnum = append(listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsDbaasTypeStatusPropEnum, v) - } -} - -const ( - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSINVALID captures enum value "OPERATORS_STATUS_INVALID" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSINVALID string = "OPERATORS_STATUS_INVALID" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSOK captures enum value "OPERATORS_STATUS_OK" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSOK string = "OPERATORS_STATUS_OK" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSUNSUPPORTED captures enum value "OPERATORS_STATUS_UNSUPPORTED" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSUNSUPPORTED string = "OPERATORS_STATUS_UNSUPPORTED" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSNOTINSTALLED captures enum value "OPERATORS_STATUS_NOT_INSTALLED" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaasStatusOPERATORSSTATUSNOTINSTALLED string = "OPERATORS_STATUS_NOT_INSTALLED" -) - -// prop value enum -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsDbaasTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("operators"+"."+"dbaas"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list kubernetes clusters OK body kubernetes clusters items0 operators dbaas based on context it is used -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsDbaas - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB Operator contains all information about operator installed in Kubernetes cluster. -swagger:model ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB -*/ -type ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB struct { - // OperatorsStatus defines status of operators installed in Kubernetes cluster. - // - // - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state. - // - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version. - // - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version. - // - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed. - // Enum: [OPERATORS_STATUS_INVALID OPERATORS_STATUS_OK OPERATORS_STATUS_UNSUPPORTED OPERATORS_STATUS_NOT_INSTALLED] - Status *string `json:"status,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this list kubernetes clusters OK body kubernetes clusters items0 operators PSMDB -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPsmdbTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OPERATORS_STATUS_INVALID","OPERATORS_STATUS_OK","OPERATORS_STATUS_UNSUPPORTED","OPERATORS_STATUS_NOT_INSTALLED"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPsmdbTypeStatusPropEnum = append(listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPsmdbTypeStatusPropEnum, v) - } -} - -const ( - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSINVALID captures enum value "OPERATORS_STATUS_INVALID" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSINVALID string = "OPERATORS_STATUS_INVALID" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSOK captures enum value "OPERATORS_STATUS_OK" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSOK string = "OPERATORS_STATUS_OK" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSUNSUPPORTED captures enum value "OPERATORS_STATUS_UNSUPPORTED" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSUNSUPPORTED string = "OPERATORS_STATUS_UNSUPPORTED" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSNOTINSTALLED captures enum value "OPERATORS_STATUS_NOT_INSTALLED" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDBStatusOPERATORSSTATUSNOTINSTALLED string = "OPERATORS_STATUS_NOT_INSTALLED" -) - -// prop value enum -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPsmdbTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("operators"+"."+"psmdb"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list kubernetes clusters OK body kubernetes clusters items0 operators PSMDB based on context it is used -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPSMDB - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC Operator contains all information about operator installed in Kubernetes cluster. -swagger:model ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC -*/ -type ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC struct { - // OperatorsStatus defines status of operators installed in Kubernetes cluster. - // - // - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state. - // - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version. - // - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version. - // - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed. - // Enum: [OPERATORS_STATUS_INVALID OPERATORS_STATUS_OK OPERATORS_STATUS_UNSUPPORTED OPERATORS_STATUS_NOT_INSTALLED] - Status *string `json:"status,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this list kubernetes clusters OK body kubernetes clusters items0 operators PXC -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPxcTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["OPERATORS_STATUS_INVALID","OPERATORS_STATUS_OK","OPERATORS_STATUS_UNSUPPORTED","OPERATORS_STATUS_NOT_INSTALLED"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPxcTypeStatusPropEnum = append(listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPxcTypeStatusPropEnum, v) - } -} - -const ( - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSINVALID captures enum value "OPERATORS_STATUS_INVALID" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSINVALID string = "OPERATORS_STATUS_INVALID" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSOK captures enum value "OPERATORS_STATUS_OK" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSOK string = "OPERATORS_STATUS_OK" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSUNSUPPORTED captures enum value "OPERATORS_STATUS_UNSUPPORTED" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSUNSUPPORTED string = "OPERATORS_STATUS_UNSUPPORTED" - - // ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSNOTINSTALLED captures enum value "OPERATORS_STATUS_NOT_INSTALLED" - ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXCStatusOPERATORSSTATUSNOTINSTALLED string = "OPERATORS_STATUS_NOT_INSTALLED" -) - -// prop value enum -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listKubernetesClustersOkBodyKubernetesClustersItems0OperatorsPxcTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("operators"+"."+"pxc"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list kubernetes clusters OK body kubernetes clusters items0 operators PXC based on context it is used -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC) UnmarshalBinary(b []byte) error { - var res ListKubernetesClustersOKBodyKubernetesClustersItems0OperatorsPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_parameters.go b/api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_parameters.go deleted file mode 100644 index 4b58b8cdfa..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListStorageClassesParams creates a new ListStorageClassesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListStorageClassesParams() *ListStorageClassesParams { - return &ListStorageClassesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListStorageClassesParamsWithTimeout creates a new ListStorageClassesParams object -// with the ability to set a timeout on a request. -func NewListStorageClassesParamsWithTimeout(timeout time.Duration) *ListStorageClassesParams { - return &ListStorageClassesParams{ - timeout: timeout, - } -} - -// NewListStorageClassesParamsWithContext creates a new ListStorageClassesParams object -// with the ability to set a context for a request. -func NewListStorageClassesParamsWithContext(ctx context.Context) *ListStorageClassesParams { - return &ListStorageClassesParams{ - Context: ctx, - } -} - -// NewListStorageClassesParamsWithHTTPClient creates a new ListStorageClassesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListStorageClassesParamsWithHTTPClient(client *http.Client) *ListStorageClassesParams { - return &ListStorageClassesParams{ - HTTPClient: client, - } -} - -/* -ListStorageClassesParams contains all the parameters to send to the API endpoint - - for the list storage classes operation. - - Typically these are written to a http.Request. -*/ -type ListStorageClassesParams struct { - // Body. - Body ListStorageClassesBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list storage classes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListStorageClassesParams) WithDefaults() *ListStorageClassesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list storage classes params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListStorageClassesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list storage classes params -func (o *ListStorageClassesParams) WithTimeout(timeout time.Duration) *ListStorageClassesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list storage classes params -func (o *ListStorageClassesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list storage classes params -func (o *ListStorageClassesParams) WithContext(ctx context.Context) *ListStorageClassesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list storage classes params -func (o *ListStorageClassesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list storage classes params -func (o *ListStorageClassesParams) WithHTTPClient(client *http.Client) *ListStorageClassesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list storage classes params -func (o *ListStorageClassesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list storage classes params -func (o *ListStorageClassesParams) WithBody(body ListStorageClassesBody) *ListStorageClassesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list storage classes params -func (o *ListStorageClassesParams) SetBody(body ListStorageClassesBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListStorageClassesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_responses.go b/api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_responses.go deleted file mode 100644 index fa8509dbec..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/list_storage_classes_responses.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ListStorageClassesReader is a Reader for the ListStorageClasses structure. -type ListStorageClassesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListStorageClassesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListStorageClassesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListStorageClassesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListStorageClassesOK creates a ListStorageClassesOK with default headers values -func NewListStorageClassesOK() *ListStorageClassesOK { - return &ListStorageClassesOK{} -} - -/* -ListStorageClassesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListStorageClassesOK struct { - Payload *ListStorageClassesOKBody -} - -func (o *ListStorageClassesOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/StorageClasses/List][%d] listStorageClassesOk %+v", 200, o.Payload) -} - -func (o *ListStorageClassesOK) GetPayload() *ListStorageClassesOKBody { - return o.Payload -} - -func (o *ListStorageClassesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListStorageClassesOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListStorageClassesDefault creates a ListStorageClassesDefault with default headers values -func NewListStorageClassesDefault(code int) *ListStorageClassesDefault { - return &ListStorageClassesDefault{ - _statusCode: code, - } -} - -/* -ListStorageClassesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListStorageClassesDefault struct { - _statusCode int - - Payload *ListStorageClassesDefaultBody -} - -// Code gets the status code for the list storage classes default response -func (o *ListStorageClassesDefault) Code() int { - return o._statusCode -} - -func (o *ListStorageClassesDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/StorageClasses/List][%d] ListStorageClasses default %+v", o._statusCode, o.Payload) -} - -func (o *ListStorageClassesDefault) GetPayload() *ListStorageClassesDefaultBody { - return o.Payload -} - -func (o *ListStorageClassesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListStorageClassesDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListStorageClassesBody list storage classes body -swagger:model ListStorageClassesBody -*/ -type ListStorageClassesBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` -} - -// Validate validates this list storage classes body -func (o *ListStorageClassesBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list storage classes body based on context it is used -func (o *ListStorageClassesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListStorageClassesBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListStorageClassesBody) UnmarshalBinary(b []byte) error { - var res ListStorageClassesBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListStorageClassesDefaultBody list storage classes default body -swagger:model ListStorageClassesDefaultBody -*/ -type ListStorageClassesDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListStorageClassesDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list storage classes default body -func (o *ListStorageClassesDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListStorageClassesDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListStorageClasses default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListStorageClasses default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list storage classes default body based on the context it is used -func (o *ListStorageClassesDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListStorageClassesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListStorageClasses default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListStorageClasses default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListStorageClassesDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListStorageClassesDefaultBody) UnmarshalBinary(b []byte) error { - var res ListStorageClassesDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListStorageClassesDefaultBodyDetailsItems0 list storage classes default body details items0 -swagger:model ListStorageClassesDefaultBodyDetailsItems0 -*/ -type ListStorageClassesDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list storage classes default body details items0 -func (o *ListStorageClassesDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list storage classes default body details items0 based on context it is used -func (o *ListStorageClassesDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListStorageClassesDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListStorageClassesDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListStorageClassesDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListStorageClassesOKBody list storage classes OK body -swagger:model ListStorageClassesOKBody -*/ -type ListStorageClassesOKBody struct { - // Kubernetes storage classes names. - StorageClasses []string `json:"storage_classes"` -} - -// Validate validates this list storage classes OK body -func (o *ListStorageClassesOKBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list storage classes OK body based on context it is used -func (o *ListStorageClassesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListStorageClassesOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListStorageClassesOKBody) UnmarshalBinary(b []byte) error { - var res ListStorageClassesOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_parameters.go b/api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_parameters.go deleted file mode 100644 index c672e66248..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewRegisterKubernetesClusterParams creates a new RegisterKubernetesClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewRegisterKubernetesClusterParams() *RegisterKubernetesClusterParams { - return &RegisterKubernetesClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewRegisterKubernetesClusterParamsWithTimeout creates a new RegisterKubernetesClusterParams object -// with the ability to set a timeout on a request. -func NewRegisterKubernetesClusterParamsWithTimeout(timeout time.Duration) *RegisterKubernetesClusterParams { - return &RegisterKubernetesClusterParams{ - timeout: timeout, - } -} - -// NewRegisterKubernetesClusterParamsWithContext creates a new RegisterKubernetesClusterParams object -// with the ability to set a context for a request. -func NewRegisterKubernetesClusterParamsWithContext(ctx context.Context) *RegisterKubernetesClusterParams { - return &RegisterKubernetesClusterParams{ - Context: ctx, - } -} - -// NewRegisterKubernetesClusterParamsWithHTTPClient creates a new RegisterKubernetesClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewRegisterKubernetesClusterParamsWithHTTPClient(client *http.Client) *RegisterKubernetesClusterParams { - return &RegisterKubernetesClusterParams{ - HTTPClient: client, - } -} - -/* -RegisterKubernetesClusterParams contains all the parameters to send to the API endpoint - - for the register kubernetes cluster operation. - - Typically these are written to a http.Request. -*/ -type RegisterKubernetesClusterParams struct { - // Body. - Body RegisterKubernetesClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the register kubernetes cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterKubernetesClusterParams) WithDefaults() *RegisterKubernetesClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the register kubernetes cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *RegisterKubernetesClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) WithTimeout(timeout time.Duration) *RegisterKubernetesClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) WithContext(ctx context.Context) *RegisterKubernetesClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) WithHTTPClient(client *http.Client) *RegisterKubernetesClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) WithBody(body RegisterKubernetesClusterBody) *RegisterKubernetesClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the register kubernetes cluster params -func (o *RegisterKubernetesClusterParams) SetBody(body RegisterKubernetesClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *RegisterKubernetesClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_responses.go b/api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_responses.go deleted file mode 100644 index 019fabe844..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/register_kubernetes_cluster_responses.go +++ /dev/null @@ -1,393 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisterKubernetesClusterReader is a Reader for the RegisterKubernetesCluster structure. -type RegisterKubernetesClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *RegisterKubernetesClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewRegisterKubernetesClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewRegisterKubernetesClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewRegisterKubernetesClusterOK creates a RegisterKubernetesClusterOK with default headers values -func NewRegisterKubernetesClusterOK() *RegisterKubernetesClusterOK { - return &RegisterKubernetesClusterOK{} -} - -/* -RegisterKubernetesClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type RegisterKubernetesClusterOK struct { - Payload interface{} -} - -func (o *RegisterKubernetesClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Register][%d] registerKubernetesClusterOk %+v", 200, o.Payload) -} - -func (o *RegisterKubernetesClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *RegisterKubernetesClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewRegisterKubernetesClusterDefault creates a RegisterKubernetesClusterDefault with default headers values -func NewRegisterKubernetesClusterDefault(code int) *RegisterKubernetesClusterDefault { - return &RegisterKubernetesClusterDefault{ - _statusCode: code, - } -} - -/* -RegisterKubernetesClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type RegisterKubernetesClusterDefault struct { - _statusCode int - - Payload *RegisterKubernetesClusterDefaultBody -} - -// Code gets the status code for the register kubernetes cluster default response -func (o *RegisterKubernetesClusterDefault) Code() int { - return o._statusCode -} - -func (o *RegisterKubernetesClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Register][%d] RegisterKubernetesCluster default %+v", o._statusCode, o.Payload) -} - -func (o *RegisterKubernetesClusterDefault) GetPayload() *RegisterKubernetesClusterDefaultBody { - return o.Payload -} - -func (o *RegisterKubernetesClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RegisterKubernetesClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -RegisterKubernetesClusterBody register kubernetes cluster body -swagger:model RegisterKubernetesClusterBody -*/ -type RegisterKubernetesClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // AWS access key id, only needed when registering EKS cluster and kubeconfig does not contain it. - AWSAccessKeyID string `json:"aws_access_key_id,omitempty"` - - // AWS secret access key, only needed when registering EKS cluster and kubeconfig does not contain it. - AWSSecretAccessKey string `json:"aws_secret_access_key,omitempty"` - - // kube auth - KubeAuth *RegisterKubernetesClusterParamsBodyKubeAuth `json:"kube_auth,omitempty"` -} - -// Validate validates this register kubernetes cluster body -func (o *RegisterKubernetesClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateKubeAuth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *RegisterKubernetesClusterBody) validateKubeAuth(formats strfmt.Registry) error { - if swag.IsZero(o.KubeAuth) { // not required - return nil - } - - if o.KubeAuth != nil { - if err := o.KubeAuth.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "kube_auth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "kube_auth") - } - return err - } - } - - return nil -} - -// ContextValidate validate this register kubernetes cluster body based on the context it is used -func (o *RegisterKubernetesClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateKubeAuth(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *RegisterKubernetesClusterBody) contextValidateKubeAuth(ctx context.Context, formats strfmt.Registry) error { - if o.KubeAuth != nil { - if err := o.KubeAuth.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "kube_auth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "kube_auth") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *RegisterKubernetesClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RegisterKubernetesClusterBody) UnmarshalBinary(b []byte) error { - var res RegisterKubernetesClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -RegisterKubernetesClusterDefaultBody register kubernetes cluster default body -swagger:model RegisterKubernetesClusterDefaultBody -*/ -type RegisterKubernetesClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*RegisterKubernetesClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this register kubernetes cluster default body -func (o *RegisterKubernetesClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *RegisterKubernetesClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RegisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RegisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this register kubernetes cluster default body based on the context it is used -func (o *RegisterKubernetesClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *RegisterKubernetesClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("RegisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("RegisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *RegisterKubernetesClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RegisterKubernetesClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res RegisterKubernetesClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -RegisterKubernetesClusterDefaultBodyDetailsItems0 register kubernetes cluster default body details items0 -swagger:model RegisterKubernetesClusterDefaultBodyDetailsItems0 -*/ -type RegisterKubernetesClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this register kubernetes cluster default body details items0 -func (o *RegisterKubernetesClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this register kubernetes cluster default body details items0 based on context it is used -func (o *RegisterKubernetesClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RegisterKubernetesClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RegisterKubernetesClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res RegisterKubernetesClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -RegisterKubernetesClusterParamsBodyKubeAuth KubeAuth represents Kubernetes / kubectl authentication and authorization information. -swagger:model RegisterKubernetesClusterParamsBodyKubeAuth -*/ -type RegisterKubernetesClusterParamsBodyKubeAuth struct { - // Kubeconfig file content. - Kubeconfig string `json:"kubeconfig,omitempty"` -} - -// Validate validates this register kubernetes cluster params body kube auth -func (o *RegisterKubernetesClusterParamsBodyKubeAuth) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this register kubernetes cluster params body kube auth based on context it is used -func (o *RegisterKubernetesClusterParamsBodyKubeAuth) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RegisterKubernetesClusterParamsBodyKubeAuth) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RegisterKubernetesClusterParamsBodyKubeAuth) UnmarshalBinary(b []byte) error { - var res RegisterKubernetesClusterParamsBodyKubeAuth - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_parameters.go b/api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_parameters.go deleted file mode 100644 index bc66be521f..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUnregisterKubernetesClusterParams creates a new UnregisterKubernetesClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUnregisterKubernetesClusterParams() *UnregisterKubernetesClusterParams { - return &UnregisterKubernetesClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUnregisterKubernetesClusterParamsWithTimeout creates a new UnregisterKubernetesClusterParams object -// with the ability to set a timeout on a request. -func NewUnregisterKubernetesClusterParamsWithTimeout(timeout time.Duration) *UnregisterKubernetesClusterParams { - return &UnregisterKubernetesClusterParams{ - timeout: timeout, - } -} - -// NewUnregisterKubernetesClusterParamsWithContext creates a new UnregisterKubernetesClusterParams object -// with the ability to set a context for a request. -func NewUnregisterKubernetesClusterParamsWithContext(ctx context.Context) *UnregisterKubernetesClusterParams { - return &UnregisterKubernetesClusterParams{ - Context: ctx, - } -} - -// NewUnregisterKubernetesClusterParamsWithHTTPClient creates a new UnregisterKubernetesClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUnregisterKubernetesClusterParamsWithHTTPClient(client *http.Client) *UnregisterKubernetesClusterParams { - return &UnregisterKubernetesClusterParams{ - HTTPClient: client, - } -} - -/* -UnregisterKubernetesClusterParams contains all the parameters to send to the API endpoint - - for the unregister kubernetes cluster operation. - - Typically these are written to a http.Request. -*/ -type UnregisterKubernetesClusterParams struct { - // Body. - Body UnregisterKubernetesClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the unregister kubernetes cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterKubernetesClusterParams) WithDefaults() *UnregisterKubernetesClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the unregister kubernetes cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UnregisterKubernetesClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) WithTimeout(timeout time.Duration) *UnregisterKubernetesClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) WithContext(ctx context.Context) *UnregisterKubernetesClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) WithHTTPClient(client *http.Client) *UnregisterKubernetesClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) WithBody(body UnregisterKubernetesClusterBody) *UnregisterKubernetesClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the unregister kubernetes cluster params -func (o *UnregisterKubernetesClusterParams) SetBody(body UnregisterKubernetesClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UnregisterKubernetesClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_responses.go b/api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_responses.go deleted file mode 100644 index 2429e1e295..0000000000 --- a/api/managementpb/dbaas/json/client/kubernetes/unregister_kubernetes_cluster_responses.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package kubernetes - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UnregisterKubernetesClusterReader is a Reader for the UnregisterKubernetesCluster structure. -type UnregisterKubernetesClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UnregisterKubernetesClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUnregisterKubernetesClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUnregisterKubernetesClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUnregisterKubernetesClusterOK creates a UnregisterKubernetesClusterOK with default headers values -func NewUnregisterKubernetesClusterOK() *UnregisterKubernetesClusterOK { - return &UnregisterKubernetesClusterOK{} -} - -/* -UnregisterKubernetesClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type UnregisterKubernetesClusterOK struct { - Payload interface{} -} - -func (o *UnregisterKubernetesClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Unregister][%d] unregisterKubernetesClusterOk %+v", 200, o.Payload) -} - -func (o *UnregisterKubernetesClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *UnregisterKubernetesClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUnregisterKubernetesClusterDefault creates a UnregisterKubernetesClusterDefault with default headers values -func NewUnregisterKubernetesClusterDefault(code int) *UnregisterKubernetesClusterDefault { - return &UnregisterKubernetesClusterDefault{ - _statusCode: code, - } -} - -/* -UnregisterKubernetesClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type UnregisterKubernetesClusterDefault struct { - _statusCode int - - Payload *UnregisterKubernetesClusterDefaultBody -} - -// Code gets the status code for the unregister kubernetes cluster default response -func (o *UnregisterKubernetesClusterDefault) Code() int { - return o._statusCode -} - -func (o *UnregisterKubernetesClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Kubernetes/Unregister][%d] UnregisterKubernetesCluster default %+v", o._statusCode, o.Payload) -} - -func (o *UnregisterKubernetesClusterDefault) GetPayload() *UnregisterKubernetesClusterDefaultBody { - return o.Payload -} - -func (o *UnregisterKubernetesClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UnregisterKubernetesClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -UnregisterKubernetesClusterBody unregister kubernetes cluster body -swagger:model UnregisterKubernetesClusterBody -*/ -type UnregisterKubernetesClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // If true then Kubernetes cluster will be deleted - // even if it contains database clusters. - Force bool `json:"force,omitempty"` -} - -// Validate validates this unregister kubernetes cluster body -func (o *UnregisterKubernetesClusterBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this unregister kubernetes cluster body based on context it is used -func (o *UnregisterKubernetesClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UnregisterKubernetesClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UnregisterKubernetesClusterBody) UnmarshalBinary(b []byte) error { - var res UnregisterKubernetesClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UnregisterKubernetesClusterDefaultBody unregister kubernetes cluster default body -swagger:model UnregisterKubernetesClusterDefaultBody -*/ -type UnregisterKubernetesClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*UnregisterKubernetesClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this unregister kubernetes cluster default body -func (o *UnregisterKubernetesClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UnregisterKubernetesClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("UnregisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("UnregisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this unregister kubernetes cluster default body based on the context it is used -func (o *UnregisterKubernetesClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UnregisterKubernetesClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("UnregisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("UnregisterKubernetesCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UnregisterKubernetesClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UnregisterKubernetesClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res UnregisterKubernetesClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UnregisterKubernetesClusterDefaultBodyDetailsItems0 unregister kubernetes cluster default body details items0 -swagger:model UnregisterKubernetesClusterDefaultBodyDetailsItems0 -*/ -type UnregisterKubernetesClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this unregister kubernetes cluster default body details items0 -func (o *UnregisterKubernetesClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this unregister kubernetes cluster default body details items0 based on context it is used -func (o *UnregisterKubernetesClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UnregisterKubernetesClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UnregisterKubernetesClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res UnregisterKubernetesClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/logs_api/get_logs_parameters.go b/api/managementpb/dbaas/json/client/logs_api/get_logs_parameters.go deleted file mode 100644 index 66f2f1ca9d..0000000000 --- a/api/managementpb/dbaas/json/client/logs_api/get_logs_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package logs_api - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetLogsParams creates a new GetLogsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetLogsParams() *GetLogsParams { - return &GetLogsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetLogsParamsWithTimeout creates a new GetLogsParams object -// with the ability to set a timeout on a request. -func NewGetLogsParamsWithTimeout(timeout time.Duration) *GetLogsParams { - return &GetLogsParams{ - timeout: timeout, - } -} - -// NewGetLogsParamsWithContext creates a new GetLogsParams object -// with the ability to set a context for a request. -func NewGetLogsParamsWithContext(ctx context.Context) *GetLogsParams { - return &GetLogsParams{ - Context: ctx, - } -} - -// NewGetLogsParamsWithHTTPClient creates a new GetLogsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetLogsParamsWithHTTPClient(client *http.Client) *GetLogsParams { - return &GetLogsParams{ - HTTPClient: client, - } -} - -/* -GetLogsParams contains all the parameters to send to the API endpoint - - for the get logs operation. - - Typically these are written to a http.Request. -*/ -type GetLogsParams struct { - // Body. - Body GetLogsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLogsParams) WithDefaults() *GetLogsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get logs params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetLogsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get logs params -func (o *GetLogsParams) WithTimeout(timeout time.Duration) *GetLogsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get logs params -func (o *GetLogsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get logs params -func (o *GetLogsParams) WithContext(ctx context.Context) *GetLogsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get logs params -func (o *GetLogsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get logs params -func (o *GetLogsParams) WithHTTPClient(client *http.Client) *GetLogsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get logs params -func (o *GetLogsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get logs params -func (o *GetLogsParams) WithBody(body GetLogsBody) *GetLogsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get logs params -func (o *GetLogsParams) SetBody(body GetLogsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/logs_api/get_logs_responses.go b/api/managementpb/dbaas/json/client/logs_api/get_logs_responses.go deleted file mode 100644 index 21d5f7525a..0000000000 --- a/api/managementpb/dbaas/json/client/logs_api/get_logs_responses.go +++ /dev/null @@ -1,443 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package logs_api - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetLogsReader is a Reader for the GetLogs structure. -type GetLogsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetLogsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetLogsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetLogsOK creates a GetLogsOK with default headers values -func NewGetLogsOK() *GetLogsOK { - return &GetLogsOK{} -} - -/* -GetLogsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetLogsOK struct { - Payload *GetLogsOKBody -} - -func (o *GetLogsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/GetLogs][%d] getLogsOk %+v", 200, o.Payload) -} - -func (o *GetLogsOK) GetPayload() *GetLogsOKBody { - return o.Payload -} - -func (o *GetLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetLogsDefault creates a GetLogsDefault with default headers values -func NewGetLogsDefault(code int) *GetLogsDefault { - return &GetLogsDefault{ - _statusCode: code, - } -} - -/* -GetLogsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetLogsDefault struct { - _statusCode int - - Payload *GetLogsDefaultBody -} - -// Code gets the status code for the get logs default response -func (o *GetLogsDefault) Code() int { - return o._statusCode -} - -func (o *GetLogsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/GetLogs][%d] GetLogs default %+v", o._statusCode, o.Payload) -} - -func (o *GetLogsDefault) GetPayload() *GetLogsDefaultBody { - return o.Payload -} - -func (o *GetLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetLogsBody get logs body -swagger:model GetLogsBody -*/ -type GetLogsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // DB cluster name. - ClusterName string `json:"cluster_name,omitempty"` -} - -// Validate validates this get logs body -func (o *GetLogsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get logs body based on context it is used -func (o *GetLogsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetLogsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetLogsBody) UnmarshalBinary(b []byte) error { - var res GetLogsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetLogsDefaultBody get logs default body -swagger:model GetLogsDefaultBody -*/ -type GetLogsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetLogsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get logs default body -func (o *GetLogsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetLogsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetLogs default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetLogs default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get logs default body based on the context it is used -func (o *GetLogsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetLogs default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetLogs default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetLogsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetLogsDefaultBody) UnmarshalBinary(b []byte) error { - var res GetLogsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetLogsDefaultBodyDetailsItems0 get logs default body details items0 -swagger:model GetLogsDefaultBodyDetailsItems0 -*/ -type GetLogsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get logs default body details items0 -func (o *GetLogsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get logs default body details items0 based on context it is used -func (o *GetLogsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetLogsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetLogsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetLogsOKBody get logs OK body -swagger:model GetLogsOKBody -*/ -type GetLogsOKBody struct { - // Log represents list of logs. Each entry contains either container's logs or, - // when container field is empty, pod's events. - Logs []*GetLogsOKBodyLogsItems0 `json:"logs"` -} - -// Validate validates this get logs OK body -func (o *GetLogsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateLogs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetLogsOKBody) validateLogs(formats strfmt.Registry) error { - if swag.IsZero(o.Logs) { // not required - return nil - } - - for i := 0; i < len(o.Logs); i++ { - if swag.IsZero(o.Logs[i]) { // not required - continue - } - - if o.Logs[i] != nil { - if err := o.Logs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getLogsOk" + "." + "logs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getLogsOk" + "." + "logs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get logs OK body based on the context it is used -func (o *GetLogsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateLogs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Logs); i++ { - if o.Logs[i] != nil { - if err := o.Logs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getLogsOk" + "." + "logs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getLogsOk" + "." + "logs" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetLogsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetLogsOKBody) UnmarshalBinary(b []byte) error { - var res GetLogsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetLogsOKBodyLogsItems0 Logs contain logs for certain pod's container. If container is an empty -// string, logs contain pod's events. -swagger:model GetLogsOKBodyLogsItems0 -*/ -type GetLogsOKBodyLogsItems0 struct { - // Pod name. - Pod string `json:"pod,omitempty"` - - // Container name. - Container string `json:"container,omitempty"` - - // Content of container's log or pod's events. - Logs []string `json:"logs"` -} - -// Validate validates this get logs OK body logs items0 -func (o *GetLogsOKBodyLogsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get logs OK body logs items0 based on context it is used -func (o *GetLogsOKBodyLogsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetLogsOKBodyLogsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetLogsOKBodyLogsItems0) UnmarshalBinary(b []byte) error { - var res GetLogsOKBodyLogsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/logs_api/logs_api_client.go b/api/managementpb/dbaas/json/client/logs_api/logs_api_client.go deleted file mode 100644 index da9cf3caf6..0000000000 --- a/api/managementpb/dbaas/json/client/logs_api/logs_api_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package logs_api - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new logs api API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for logs api API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - GetLogs(params *GetLogsParams, opts ...ClientOption) (*GetLogsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -GetLogs gets logs gets all logs from db cluster -*/ -func (a *Client) GetLogs(params *GetLogsParams, opts ...ClientOption) (*GetLogsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetLogsParams() - } - op := &runtime.ClientOperation{ - ID: "GetLogs", - Method: "POST", - PathPattern: "/v1/management/DBaaS/GetLogs", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetLogsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetLogsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetLogsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/client/pmm_d_baa_s_api_client.go b/api/managementpb/dbaas/json/client/pmm_d_baa_s_api_client.go deleted file mode 100644 index 6372c4a232..0000000000 --- a/api/managementpb/dbaas/json/client/pmm_d_baa_s_api_client.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package client - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/percona/pmm/api/managementpb/dbaas/json/client/components" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/db_clusters" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/kubernetes" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/logs_api" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/psmdb_clusters" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/pxc_clusters" - "github.com/percona/pmm/api/managementpb/dbaas/json/client/templates" -) - -// Default PMM d baa s API HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http", "https"} - -// NewHTTPClient creates a new PMM d baa s API HTTP client. -func NewHTTPClient(formats strfmt.Registry) *PMMDBaaSAPI { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new PMM d baa s API HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *PMMDBaaSAPI { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new PMM d baa s API client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMDBaaSAPI { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(PMMDBaaSAPI) - cli.Transport = transport - cli.Components = components.New(transport, formats) - cli.DBClusters = db_clusters.New(transport, formats) - cli.Kubernetes = kubernetes.New(transport, formats) - cli.LogsAPI = logs_api.New(transport, formats) - cli.PSMDBClusters = psmdb_clusters.New(transport, formats) - cli.PXCClusters = pxc_clusters.New(transport, formats) - cli.Templates = templates.New(transport, formats) - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// PMMDBaaSAPI is a client for PMM d baa s API -type PMMDBaaSAPI struct { - Components components.ClientService - - DBClusters db_clusters.ClientService - - Kubernetes kubernetes.ClientService - - LogsAPI logs_api.ClientService - - PSMDBClusters psmdb_clusters.ClientService - - PXCClusters pxc_clusters.ClientService - - Templates templates.ClientService - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *PMMDBaaSAPI) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - c.Components.SetTransport(transport) - c.DBClusters.SetTransport(transport) - c.Kubernetes.SetTransport(transport) - c.LogsAPI.SetTransport(transport) - c.PSMDBClusters.SetTransport(transport) - c.PXCClusters.SetTransport(transport) - c.Templates.SetTransport(transport) -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_parameters.go b/api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_parameters.go deleted file mode 100644 index 0998427faa..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewCreatePSMDBClusterParams creates a new CreatePSMDBClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreatePSMDBClusterParams() *CreatePSMDBClusterParams { - return &CreatePSMDBClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePSMDBClusterParamsWithTimeout creates a new CreatePSMDBClusterParams object -// with the ability to set a timeout on a request. -func NewCreatePSMDBClusterParamsWithTimeout(timeout time.Duration) *CreatePSMDBClusterParams { - return &CreatePSMDBClusterParams{ - timeout: timeout, - } -} - -// NewCreatePSMDBClusterParamsWithContext creates a new CreatePSMDBClusterParams object -// with the ability to set a context for a request. -func NewCreatePSMDBClusterParamsWithContext(ctx context.Context) *CreatePSMDBClusterParams { - return &CreatePSMDBClusterParams{ - Context: ctx, - } -} - -// NewCreatePSMDBClusterParamsWithHTTPClient creates a new CreatePSMDBClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreatePSMDBClusterParamsWithHTTPClient(client *http.Client) *CreatePSMDBClusterParams { - return &CreatePSMDBClusterParams{ - HTTPClient: client, - } -} - -/* -CreatePSMDBClusterParams contains all the parameters to send to the API endpoint - - for the create PSMDB cluster operation. - - Typically these are written to a http.Request. -*/ -type CreatePSMDBClusterParams struct { - // Body. - Body CreatePSMDBClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create PSMDB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePSMDBClusterParams) WithDefaults() *CreatePSMDBClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create PSMDB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePSMDBClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) WithTimeout(timeout time.Duration) *CreatePSMDBClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) WithContext(ctx context.Context) *CreatePSMDBClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) WithHTTPClient(client *http.Client) *CreatePSMDBClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) WithBody(body CreatePSMDBClusterBody) *CreatePSMDBClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create PSMDB cluster params -func (o *CreatePSMDBClusterParams) SetBody(body CreatePSMDBClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePSMDBClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_responses.go b/api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_responses.go deleted file mode 100644 index eff9cb0717..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/create_psmdb_cluster_responses.go +++ /dev/null @@ -1,863 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreatePSMDBClusterReader is a Reader for the CreatePSMDBCluster structure. -type CreatePSMDBClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePSMDBClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreatePSMDBClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreatePSMDBClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreatePSMDBClusterOK creates a CreatePSMDBClusterOK with default headers values -func NewCreatePSMDBClusterOK() *CreatePSMDBClusterOK { - return &CreatePSMDBClusterOK{} -} - -/* -CreatePSMDBClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CreatePSMDBClusterOK struct { - Payload interface{} -} - -func (o *CreatePSMDBClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBCluster/Create][%d] createPsmdbClusterOk %+v", 200, o.Payload) -} - -func (o *CreatePSMDBClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *CreatePSMDBClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreatePSMDBClusterDefault creates a CreatePSMDBClusterDefault with default headers values -func NewCreatePSMDBClusterDefault(code int) *CreatePSMDBClusterDefault { - return &CreatePSMDBClusterDefault{ - _statusCode: code, - } -} - -/* -CreatePSMDBClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CreatePSMDBClusterDefault struct { - _statusCode int - - Payload *CreatePSMDBClusterDefaultBody -} - -// Code gets the status code for the create PSMDB cluster default response -func (o *CreatePSMDBClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreatePSMDBClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBCluster/Create][%d] CreatePSMDBCluster default %+v", o._statusCode, o.Payload) -} - -func (o *CreatePSMDBClusterDefault) GetPayload() *CreatePSMDBClusterDefaultBody { - return o.Payload -} - -func (o *CreatePSMDBClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreatePSMDBClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -CreatePSMDBClusterBody create PSMDB cluster body -swagger:model CreatePSMDBClusterBody -*/ -type CreatePSMDBClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PSMDB cluster name. - // a DNS-1035 label must consist of lower case alphanumeric characters or '-', - // start with an alphabetic character, and end with an alphanumeric character - // (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?') - Name string `json:"name,omitempty"` - - // Make DB cluster accessible outside of K8s cluster. - Expose bool `json:"expose,omitempty"` - - // Make DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // params - Params *CreatePSMDBClusterParamsBodyParams `json:"params,omitempty"` - - // template - Template *CreatePSMDBClusterParamsBodyTemplate `json:"template,omitempty"` -} - -// Validate validates this create PSMDB cluster body -func (o *CreatePSMDBClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *CreatePSMDBClusterBody) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PSMDB cluster body based on the context it is used -func (o *CreatePSMDBClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *CreatePSMDBClusterBody) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterBody) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterDefaultBody create PSMDB cluster default body -swagger:model CreatePSMDBClusterDefaultBody -*/ -type CreatePSMDBClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*CreatePSMDBClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this create PSMDB cluster default body -func (o *CreatePSMDBClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("CreatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("CreatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create PSMDB cluster default body based on the context it is used -func (o *CreatePSMDBClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("CreatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("CreatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterDefaultBodyDetailsItems0 create PSMDB cluster default body details items0 -swagger:model CreatePSMDBClusterDefaultBodyDetailsItems0 -*/ -type CreatePSMDBClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this create PSMDB cluster default body details items0 -func (o *CreatePSMDBClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PSMDB cluster default body details items0 based on context it is used -func (o *CreatePSMDBClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterParamsBodyParams PSMDBClusterParams represents PSMDB cluster parameters that can be updated. -swagger:model CreatePSMDBClusterParamsBodyParams -*/ -type CreatePSMDBClusterParamsBodyParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // Docker image used for PSMDB. - Image string `json:"image,omitempty"` - - // backup - Backup *CreatePSMDBClusterParamsBodyParamsBackup `json:"backup,omitempty"` - - // replicaset - Replicaset *CreatePSMDBClusterParamsBodyParamsReplicaset `json:"replicaset,omitempty"` - - // restore - Restore *CreatePSMDBClusterParamsBodyParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this create PSMDB cluster params body params -func (o *CreatePSMDBClusterParamsBodyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateReplicaset(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParams) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParams) validateReplicaset(formats strfmt.Registry) error { - if swag.IsZero(o.Replicaset) { // not required - return nil - } - - if o.Replicaset != nil { - if err := o.Replicaset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParams) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PSMDB cluster params body params based on the context it is used -func (o *CreatePSMDBClusterParamsBodyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateReplicaset(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParams) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParams) contextValidateReplicaset(ctx context.Context, formats strfmt.Registry) error { - if o.Replicaset != nil { - if err := o.Replicaset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParams) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParams) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterParamsBodyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterParamsBodyParamsBackup Backup configuration for a database cluster -swagger:model CreatePSMDBClusterParamsBodyParamsBackup -*/ -type CreatePSMDBClusterParamsBodyParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this create PSMDB cluster params body params backup -func (o *CreatePSMDBClusterParamsBodyParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PSMDB cluster params body params backup based on context it is used -func (o *CreatePSMDBClusterParamsBodyParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsBackup) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterParamsBodyParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterParamsBodyParamsReplicaset ReplicaSet container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model CreatePSMDBClusterParamsBodyParamsReplicaset -*/ -type CreatePSMDBClusterParamsBodyParamsReplicaset struct { - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PSMDB cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PSMDB cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this create PSMDB cluster params body params replicaset -func (o *CreatePSMDBClusterParamsBodyParamsReplicaset) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParamsReplicaset) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PSMDB cluster params body params replicaset based on the context it is used -func (o *CreatePSMDBClusterParamsBodyParamsReplicaset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePSMDBClusterParamsBodyParamsReplicaset) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsReplicaset) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsReplicaset) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterParamsBodyParamsReplicaset - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources -*/ -type CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this create PSMDB cluster params body params replicaset compute resources -func (o *CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PSMDB cluster params body params replicaset compute resources based on context it is used -func (o *CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterParamsBodyParamsReplicasetComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterParamsBodyParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model CreatePSMDBClusterParamsBodyParamsRestore -*/ -type CreatePSMDBClusterParamsBodyParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this create PSMDB cluster params body params restore -func (o *CreatePSMDBClusterParamsBodyParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PSMDB cluster params body params restore based on context it is used -func (o *CreatePSMDBClusterParamsBodyParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyParamsRestore) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterParamsBodyParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePSMDBClusterParamsBodyTemplate create PSMDB cluster params body template -swagger:model CreatePSMDBClusterParamsBodyTemplate -*/ -type CreatePSMDBClusterParamsBodyTemplate struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this create PSMDB cluster params body template -func (o *CreatePSMDBClusterParamsBodyTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PSMDB cluster params body template based on context it is used -func (o *CreatePSMDBClusterParamsBodyTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyTemplate) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePSMDBClusterParamsBodyTemplate) UnmarshalBinary(b []byte) error { - var res CreatePSMDBClusterParamsBodyTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_parameters.go b/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_parameters.go deleted file mode 100644 index f51b6e79fc..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPSMDBClusterCredentialsParams creates a new GetPSMDBClusterCredentialsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPSMDBClusterCredentialsParams() *GetPSMDBClusterCredentialsParams { - return &GetPSMDBClusterCredentialsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPSMDBClusterCredentialsParamsWithTimeout creates a new GetPSMDBClusterCredentialsParams object -// with the ability to set a timeout on a request. -func NewGetPSMDBClusterCredentialsParamsWithTimeout(timeout time.Duration) *GetPSMDBClusterCredentialsParams { - return &GetPSMDBClusterCredentialsParams{ - timeout: timeout, - } -} - -// NewGetPSMDBClusterCredentialsParamsWithContext creates a new GetPSMDBClusterCredentialsParams object -// with the ability to set a context for a request. -func NewGetPSMDBClusterCredentialsParamsWithContext(ctx context.Context) *GetPSMDBClusterCredentialsParams { - return &GetPSMDBClusterCredentialsParams{ - Context: ctx, - } -} - -// NewGetPSMDBClusterCredentialsParamsWithHTTPClient creates a new GetPSMDBClusterCredentialsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPSMDBClusterCredentialsParamsWithHTTPClient(client *http.Client) *GetPSMDBClusterCredentialsParams { - return &GetPSMDBClusterCredentialsParams{ - HTTPClient: client, - } -} - -/* -GetPSMDBClusterCredentialsParams contains all the parameters to send to the API endpoint - - for the get PSMDB cluster credentials operation. - - Typically these are written to a http.Request. -*/ -type GetPSMDBClusterCredentialsParams struct { - // Body. - Body GetPSMDBClusterCredentialsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get PSMDB cluster credentials params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPSMDBClusterCredentialsParams) WithDefaults() *GetPSMDBClusterCredentialsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get PSMDB cluster credentials params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPSMDBClusterCredentialsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) WithTimeout(timeout time.Duration) *GetPSMDBClusterCredentialsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) WithContext(ctx context.Context) *GetPSMDBClusterCredentialsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) WithHTTPClient(client *http.Client) *GetPSMDBClusterCredentialsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) WithBody(body GetPSMDBClusterCredentialsBody) *GetPSMDBClusterCredentialsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get PSMDB cluster credentials params -func (o *GetPSMDBClusterCredentialsParams) SetBody(body GetPSMDBClusterCredentialsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPSMDBClusterCredentialsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_responses.go b/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_responses.go deleted file mode 100644 index 0c53037935..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_credentials_responses.go +++ /dev/null @@ -1,439 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetPSMDBClusterCredentialsReader is a Reader for the GetPSMDBClusterCredentials structure. -type GetPSMDBClusterCredentialsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPSMDBClusterCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPSMDBClusterCredentialsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPSMDBClusterCredentialsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPSMDBClusterCredentialsOK creates a GetPSMDBClusterCredentialsOK with default headers values -func NewGetPSMDBClusterCredentialsOK() *GetPSMDBClusterCredentialsOK { - return &GetPSMDBClusterCredentialsOK{} -} - -/* -GetPSMDBClusterCredentialsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetPSMDBClusterCredentialsOK struct { - Payload *GetPSMDBClusterCredentialsOKBody -} - -func (o *GetPSMDBClusterCredentialsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBClusters/GetCredentials][%d] getPsmdbClusterCredentialsOk %+v", 200, o.Payload) -} - -func (o *GetPSMDBClusterCredentialsOK) GetPayload() *GetPSMDBClusterCredentialsOKBody { - return o.Payload -} - -func (o *GetPSMDBClusterCredentialsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPSMDBClusterCredentialsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPSMDBClusterCredentialsDefault creates a GetPSMDBClusterCredentialsDefault with default headers values -func NewGetPSMDBClusterCredentialsDefault(code int) *GetPSMDBClusterCredentialsDefault { - return &GetPSMDBClusterCredentialsDefault{ - _statusCode: code, - } -} - -/* -GetPSMDBClusterCredentialsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetPSMDBClusterCredentialsDefault struct { - _statusCode int - - Payload *GetPSMDBClusterCredentialsDefaultBody -} - -// Code gets the status code for the get PSMDB cluster credentials default response -func (o *GetPSMDBClusterCredentialsDefault) Code() int { - return o._statusCode -} - -func (o *GetPSMDBClusterCredentialsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBClusters/GetCredentials][%d] GetPSMDBClusterCredentials default %+v", o._statusCode, o.Payload) -} - -func (o *GetPSMDBClusterCredentialsDefault) GetPayload() *GetPSMDBClusterCredentialsDefaultBody { - return o.Payload -} - -func (o *GetPSMDBClusterCredentialsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPSMDBClusterCredentialsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetPSMDBClusterCredentialsBody get PSMDB cluster credentials body -swagger:model GetPSMDBClusterCredentialsBody -*/ -type GetPSMDBClusterCredentialsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PSMDB cluster name. - Name string `json:"name,omitempty"` -} - -// Validate validates this get PSMDB cluster credentials body -func (o *GetPSMDBClusterCredentialsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster credentials body based on context it is used -func (o *GetPSMDBClusterCredentialsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterCredentialsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterCredentialsDefaultBody get PSMDB cluster credentials default body -swagger:model GetPSMDBClusterCredentialsDefaultBody -*/ -type GetPSMDBClusterCredentialsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetPSMDBClusterCredentialsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get PSMDB cluster credentials default body -func (o *GetPSMDBClusterCredentialsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterCredentialsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPSMDBClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPSMDBClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster credentials default body based on the context it is used -func (o *GetPSMDBClusterCredentialsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterCredentialsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPSMDBClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPSMDBClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsDefaultBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterCredentialsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterCredentialsDefaultBodyDetailsItems0 get PSMDB cluster credentials default body details items0 -swagger:model GetPSMDBClusterCredentialsDefaultBodyDetailsItems0 -*/ -type GetPSMDBClusterCredentialsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get PSMDB cluster credentials default body details items0 -func (o *GetPSMDBClusterCredentialsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster credentials default body details items0 based on context it is used -func (o *GetPSMDBClusterCredentialsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterCredentialsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterCredentialsOKBody get PSMDB cluster credentials OK body -swagger:model GetPSMDBClusterCredentialsOKBody -*/ -type GetPSMDBClusterCredentialsOKBody struct { - // connection credentials - ConnectionCredentials *GetPSMDBClusterCredentialsOKBodyConnectionCredentials `json:"connection_credentials,omitempty"` -} - -// Validate validates this get PSMDB cluster credentials OK body -func (o *GetPSMDBClusterCredentialsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateConnectionCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterCredentialsOKBody) validateConnectionCredentials(formats strfmt.Registry) error { - if swag.IsZero(o.ConnectionCredentials) { // not required - return nil - } - - if o.ConnectionCredentials != nil { - if err := o.ConnectionCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPsmdbClusterCredentialsOk" + "." + "connection_credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPsmdbClusterCredentialsOk" + "." + "connection_credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster credentials OK body based on the context it is used -func (o *GetPSMDBClusterCredentialsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateConnectionCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterCredentialsOKBody) contextValidateConnectionCredentials(ctx context.Context, formats strfmt.Registry) error { - if o.ConnectionCredentials != nil { - if err := o.ConnectionCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPsmdbClusterCredentialsOk" + "." + "connection_credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPsmdbClusterCredentialsOk" + "." + "connection_credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsOKBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterCredentialsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterCredentialsOKBodyConnectionCredentials PSMDBCredentials is a credentials to connect to PSMDB. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetPSMDBClusterCredentialsOKBodyConnectionCredentials -*/ -type GetPSMDBClusterCredentialsOKBodyConnectionCredentials struct { - // MongoDB username. - Username string `json:"username,omitempty"` - - // MongoDB password. - Password string `json:"password,omitempty"` - - // MongoDB host. - Host string `json:"host,omitempty"` - - // MongoDB port. - Port int32 `json:"port,omitempty"` - - // Replicaset name. - Replicaset string `json:"replicaset,omitempty"` -} - -// Validate validates this get PSMDB cluster credentials OK body connection credentials -func (o *GetPSMDBClusterCredentialsOKBodyConnectionCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster credentials OK body connection credentials based on context it is used -func (o *GetPSMDBClusterCredentialsOKBodyConnectionCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsOKBodyConnectionCredentials) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterCredentialsOKBodyConnectionCredentials) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterCredentialsOKBodyConnectionCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_parameters.go b/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_parameters.go deleted file mode 100644 index 74b6e68f61..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPSMDBClusterResourcesParams creates a new GetPSMDBClusterResourcesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPSMDBClusterResourcesParams() *GetPSMDBClusterResourcesParams { - return &GetPSMDBClusterResourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPSMDBClusterResourcesParamsWithTimeout creates a new GetPSMDBClusterResourcesParams object -// with the ability to set a timeout on a request. -func NewGetPSMDBClusterResourcesParamsWithTimeout(timeout time.Duration) *GetPSMDBClusterResourcesParams { - return &GetPSMDBClusterResourcesParams{ - timeout: timeout, - } -} - -// NewGetPSMDBClusterResourcesParamsWithContext creates a new GetPSMDBClusterResourcesParams object -// with the ability to set a context for a request. -func NewGetPSMDBClusterResourcesParamsWithContext(ctx context.Context) *GetPSMDBClusterResourcesParams { - return &GetPSMDBClusterResourcesParams{ - Context: ctx, - } -} - -// NewGetPSMDBClusterResourcesParamsWithHTTPClient creates a new GetPSMDBClusterResourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPSMDBClusterResourcesParamsWithHTTPClient(client *http.Client) *GetPSMDBClusterResourcesParams { - return &GetPSMDBClusterResourcesParams{ - HTTPClient: client, - } -} - -/* -GetPSMDBClusterResourcesParams contains all the parameters to send to the API endpoint - - for the get PSMDB cluster resources operation. - - Typically these are written to a http.Request. -*/ -type GetPSMDBClusterResourcesParams struct { - // Body. - Body GetPSMDBClusterResourcesBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get PSMDB cluster resources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPSMDBClusterResourcesParams) WithDefaults() *GetPSMDBClusterResourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get PSMDB cluster resources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPSMDBClusterResourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) WithTimeout(timeout time.Duration) *GetPSMDBClusterResourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) WithContext(ctx context.Context) *GetPSMDBClusterResourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) WithHTTPClient(client *http.Client) *GetPSMDBClusterResourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) WithBody(body GetPSMDBClusterResourcesBody) *GetPSMDBClusterResourcesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get PSMDB cluster resources params -func (o *GetPSMDBClusterResourcesParams) SetBody(body GetPSMDBClusterResourcesBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPSMDBClusterResourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_responses.go b/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_responses.go deleted file mode 100644 index 930f0a3b19..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/get_psmdb_cluster_resources_responses.go +++ /dev/null @@ -1,895 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetPSMDBClusterResourcesReader is a Reader for the GetPSMDBClusterResources structure. -type GetPSMDBClusterResourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPSMDBClusterResourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPSMDBClusterResourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPSMDBClusterResourcesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPSMDBClusterResourcesOK creates a GetPSMDBClusterResourcesOK with default headers values -func NewGetPSMDBClusterResourcesOK() *GetPSMDBClusterResourcesOK { - return &GetPSMDBClusterResourcesOK{} -} - -/* -GetPSMDBClusterResourcesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetPSMDBClusterResourcesOK struct { - Payload *GetPSMDBClusterResourcesOKBody -} - -func (o *GetPSMDBClusterResourcesOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBCluster/Resources/Get][%d] getPsmdbClusterResourcesOk %+v", 200, o.Payload) -} - -func (o *GetPSMDBClusterResourcesOK) GetPayload() *GetPSMDBClusterResourcesOKBody { - return o.Payload -} - -func (o *GetPSMDBClusterResourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPSMDBClusterResourcesOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPSMDBClusterResourcesDefault creates a GetPSMDBClusterResourcesDefault with default headers values -func NewGetPSMDBClusterResourcesDefault(code int) *GetPSMDBClusterResourcesDefault { - return &GetPSMDBClusterResourcesDefault{ - _statusCode: code, - } -} - -/* -GetPSMDBClusterResourcesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetPSMDBClusterResourcesDefault struct { - _statusCode int - - Payload *GetPSMDBClusterResourcesDefaultBody -} - -// Code gets the status code for the get PSMDB cluster resources default response -func (o *GetPSMDBClusterResourcesDefault) Code() int { - return o._statusCode -} - -func (o *GetPSMDBClusterResourcesDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBCluster/Resources/Get][%d] GetPSMDBClusterResources default %+v", o._statusCode, o.Payload) -} - -func (o *GetPSMDBClusterResourcesDefault) GetPayload() *GetPSMDBClusterResourcesDefaultBody { - return o.Payload -} - -func (o *GetPSMDBClusterResourcesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPSMDBClusterResourcesDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetPSMDBClusterResourcesBody get PSMDB cluster resources body -swagger:model GetPSMDBClusterResourcesBody -*/ -type GetPSMDBClusterResourcesBody struct { - // params - Params *GetPSMDBClusterResourcesParamsBodyParams `json:"params,omitempty"` -} - -// Validate validates this get PSMDB cluster resources body -func (o *GetPSMDBClusterResourcesBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster resources body based on the context it is used -func (o *GetPSMDBClusterResourcesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesDefaultBody get PSMDB cluster resources default body -swagger:model GetPSMDBClusterResourcesDefaultBody -*/ -type GetPSMDBClusterResourcesDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetPSMDBClusterResourcesDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get PSMDB cluster resources default body -func (o *GetPSMDBClusterResourcesDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPSMDBClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPSMDBClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster resources default body based on the context it is used -func (o *GetPSMDBClusterResourcesDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPSMDBClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPSMDBClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesDefaultBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesDefaultBodyDetailsItems0 get PSMDB cluster resources default body details items0 -swagger:model GetPSMDBClusterResourcesDefaultBodyDetailsItems0 -*/ -type GetPSMDBClusterResourcesDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get PSMDB cluster resources default body details items0 -func (o *GetPSMDBClusterResourcesDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster resources default body details items0 based on context it is used -func (o *GetPSMDBClusterResourcesDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesOKBody get PSMDB cluster resources OK body -swagger:model GetPSMDBClusterResourcesOKBody -*/ -type GetPSMDBClusterResourcesOKBody struct { - // expected - Expected *GetPSMDBClusterResourcesOKBodyExpected `json:"expected,omitempty"` -} - -// Validate validates this get PSMDB cluster resources OK body -func (o *GetPSMDBClusterResourcesOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateExpected(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesOKBody) validateExpected(formats strfmt.Registry) error { - if swag.IsZero(o.Expected) { // not required - return nil - } - - if o.Expected != nil { - if err := o.Expected.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPsmdbClusterResourcesOk" + "." + "expected") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPsmdbClusterResourcesOk" + "." + "expected") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster resources OK body based on the context it is used -func (o *GetPSMDBClusterResourcesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateExpected(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesOKBody) contextValidateExpected(ctx context.Context, formats strfmt.Registry) error { - if o.Expected != nil { - if err := o.Expected.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPsmdbClusterResourcesOk" + "." + "expected") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPsmdbClusterResourcesOk" + "." + "expected") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesOKBody) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesOKBodyExpected Resources contains Kubernetes cluster resources. -swagger:model GetPSMDBClusterResourcesOKBodyExpected -*/ -type GetPSMDBClusterResourcesOKBodyExpected struct { - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` - - // CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus. - // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. - CPUm string `json:"cpu_m,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` -} - -// Validate validates this get PSMDB cluster resources OK body expected -func (o *GetPSMDBClusterResourcesOKBodyExpected) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster resources OK body expected based on context it is used -func (o *GetPSMDBClusterResourcesOKBodyExpected) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesOKBodyExpected) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesOKBodyExpected) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesOKBodyExpected - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesParamsBodyParams PSMDBClusterParams represents PSMDB cluster parameters that can be updated. -swagger:model GetPSMDBClusterResourcesParamsBodyParams -*/ -type GetPSMDBClusterResourcesParamsBodyParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // Docker image used for PSMDB. - Image string `json:"image,omitempty"` - - // backup - Backup *GetPSMDBClusterResourcesParamsBodyParamsBackup `json:"backup,omitempty"` - - // replicaset - Replicaset *GetPSMDBClusterResourcesParamsBodyParamsReplicaset `json:"replicaset,omitempty"` - - // restore - Restore *GetPSMDBClusterResourcesParamsBodyParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this get PSMDB cluster resources params body params -func (o *GetPSMDBClusterResourcesParamsBodyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateReplicaset(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParams) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParams) validateReplicaset(formats strfmt.Registry) error { - if swag.IsZero(o.Replicaset) { // not required - return nil - } - - if o.Replicaset != nil { - if err := o.Replicaset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParams) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster resources params body params based on the context it is used -func (o *GetPSMDBClusterResourcesParamsBodyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateReplicaset(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParams) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParams) contextValidateReplicaset(ctx context.Context, formats strfmt.Registry) error { - if o.Replicaset != nil { - if err := o.Replicaset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParams) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParams) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesParamsBodyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesParamsBodyParamsBackup Backup configuration for a database cluster -swagger:model GetPSMDBClusterResourcesParamsBodyParamsBackup -*/ -type GetPSMDBClusterResourcesParamsBodyParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this get PSMDB cluster resources params body params backup -func (o *GetPSMDBClusterResourcesParamsBodyParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster resources params body params backup based on context it is used -func (o *GetPSMDBClusterResourcesParamsBodyParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsBackup) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesParamsBodyParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesParamsBodyParamsReplicaset ReplicaSet container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetPSMDBClusterResourcesParamsBodyParamsReplicaset -*/ -type GetPSMDBClusterResourcesParamsBodyParamsReplicaset struct { - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PSMDB cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PSMDB cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get PSMDB cluster resources params body params replicaset -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicaset) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicaset) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PSMDB cluster resources params body params replicaset based on the context it is used -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicaset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicaset) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicaset) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicaset) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesParamsBodyParamsReplicaset - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources -*/ -type GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get PSMDB cluster resources params body params replicaset compute resources -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster resources params body params replicaset compute resources based on context it is used -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesParamsBodyParamsReplicasetComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPSMDBClusterResourcesParamsBodyParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model GetPSMDBClusterResourcesParamsBodyParamsRestore -*/ -type GetPSMDBClusterResourcesParamsBodyParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this get PSMDB cluster resources params body params restore -func (o *GetPSMDBClusterResourcesParamsBodyParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PSMDB cluster resources params body params restore based on context it is used -func (o *GetPSMDBClusterResourcesParamsBodyParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPSMDBClusterResourcesParamsBodyParamsRestore) UnmarshalBinary(b []byte) error { - var res GetPSMDBClusterResourcesParamsBodyParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/psmdb_clusters_client.go b/api/managementpb/dbaas/json/client/psmdb_clusters/psmdb_clusters_client.go deleted file mode 100644 index d4987b997f..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/psmdb_clusters_client.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new psmdb clusters API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for psmdb clusters API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreatePSMDBCluster(params *CreatePSMDBClusterParams, opts ...ClientOption) (*CreatePSMDBClusterOK, error) - - GetPSMDBClusterCredentials(params *GetPSMDBClusterCredentialsParams, opts ...ClientOption) (*GetPSMDBClusterCredentialsOK, error) - - GetPSMDBClusterResources(params *GetPSMDBClusterResourcesParams, opts ...ClientOption) (*GetPSMDBClusterResourcesOK, error) - - UpdatePSMDBCluster(params *UpdatePSMDBClusterParams, opts ...ClientOption) (*UpdatePSMDBClusterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreatePSMDBCluster creates PSMDB cluster creates a new PSMDB cluster -*/ -func (a *Client) CreatePSMDBCluster(params *CreatePSMDBClusterParams, opts ...ClientOption) (*CreatePSMDBClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreatePSMDBClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreatePSMDBCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PSMDBCluster/Create", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &CreatePSMDBClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreatePSMDBClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreatePSMDBClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPSMDBClusterCredentials gets PSMDB cluster credentials returns a PSMDB cluster credentials by cluster name -*/ -func (a *Client) GetPSMDBClusterCredentials(params *GetPSMDBClusterCredentialsParams, opts ...ClientOption) (*GetPSMDBClusterCredentialsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPSMDBClusterCredentialsParams() - } - op := &runtime.ClientOperation{ - ID: "GetPSMDBClusterCredentials", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PSMDBClusters/GetCredentials", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetPSMDBClusterCredentialsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPSMDBClusterCredentialsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPSMDBClusterCredentialsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPSMDBClusterResources gets PSMDB cluster resources returns expected resources to be consumed by the cluster -*/ -func (a *Client) GetPSMDBClusterResources(params *GetPSMDBClusterResourcesParams, opts ...ClientOption) (*GetPSMDBClusterResourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPSMDBClusterResourcesParams() - } - op := &runtime.ClientOperation{ - ID: "GetPSMDBClusterResources", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PSMDBCluster/Resources/Get", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetPSMDBClusterResourcesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPSMDBClusterResourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPSMDBClusterResourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdatePSMDBCluster updates PSMDB cluster updates existing PSMDB cluster -*/ -func (a *Client) UpdatePSMDBCluster(params *UpdatePSMDBClusterParams, opts ...ClientOption) (*UpdatePSMDBClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdatePSMDBClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdatePSMDBCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PSMDBCluster/Update", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &UpdatePSMDBClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdatePSMDBClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdatePSMDBClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_parameters.go b/api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_parameters.go deleted file mode 100644 index 23c76e1316..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUpdatePSMDBClusterParams creates a new UpdatePSMDBClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdatePSMDBClusterParams() *UpdatePSMDBClusterParams { - return &UpdatePSMDBClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdatePSMDBClusterParamsWithTimeout creates a new UpdatePSMDBClusterParams object -// with the ability to set a timeout on a request. -func NewUpdatePSMDBClusterParamsWithTimeout(timeout time.Duration) *UpdatePSMDBClusterParams { - return &UpdatePSMDBClusterParams{ - timeout: timeout, - } -} - -// NewUpdatePSMDBClusterParamsWithContext creates a new UpdatePSMDBClusterParams object -// with the ability to set a context for a request. -func NewUpdatePSMDBClusterParamsWithContext(ctx context.Context) *UpdatePSMDBClusterParams { - return &UpdatePSMDBClusterParams{ - Context: ctx, - } -} - -// NewUpdatePSMDBClusterParamsWithHTTPClient creates a new UpdatePSMDBClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdatePSMDBClusterParamsWithHTTPClient(client *http.Client) *UpdatePSMDBClusterParams { - return &UpdatePSMDBClusterParams{ - HTTPClient: client, - } -} - -/* -UpdatePSMDBClusterParams contains all the parameters to send to the API endpoint - - for the update PSMDB cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdatePSMDBClusterParams struct { - // Body. - Body UpdatePSMDBClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update PSMDB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePSMDBClusterParams) WithDefaults() *UpdatePSMDBClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update PSMDB cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePSMDBClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) WithTimeout(timeout time.Duration) *UpdatePSMDBClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) WithContext(ctx context.Context) *UpdatePSMDBClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) WithHTTPClient(client *http.Client) *UpdatePSMDBClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) WithBody(body UpdatePSMDBClusterBody) *UpdatePSMDBClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update PSMDB cluster params -func (o *UpdatePSMDBClusterParams) SetBody(body UpdatePSMDBClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdatePSMDBClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_responses.go b/api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_responses.go deleted file mode 100644 index 8e6b13e24c..0000000000 --- a/api/managementpb/dbaas/json/client/psmdb_clusters/update_psmdb_cluster_responses.go +++ /dev/null @@ -1,684 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package psmdb_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdatePSMDBClusterReader is a Reader for the UpdatePSMDBCluster structure. -type UpdatePSMDBClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdatePSMDBClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdatePSMDBClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdatePSMDBClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUpdatePSMDBClusterOK creates a UpdatePSMDBClusterOK with default headers values -func NewUpdatePSMDBClusterOK() *UpdatePSMDBClusterOK { - return &UpdatePSMDBClusterOK{} -} - -/* -UpdatePSMDBClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type UpdatePSMDBClusterOK struct { - Payload interface{} -} - -func (o *UpdatePSMDBClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBCluster/Update][%d] updatePsmdbClusterOk %+v", 200, o.Payload) -} - -func (o *UpdatePSMDBClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *UpdatePSMDBClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdatePSMDBClusterDefault creates a UpdatePSMDBClusterDefault with default headers values -func NewUpdatePSMDBClusterDefault(code int) *UpdatePSMDBClusterDefault { - return &UpdatePSMDBClusterDefault{ - _statusCode: code, - } -} - -/* -UpdatePSMDBClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type UpdatePSMDBClusterDefault struct { - _statusCode int - - Payload *UpdatePSMDBClusterDefaultBody -} - -// Code gets the status code for the update PSMDB cluster default response -func (o *UpdatePSMDBClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdatePSMDBClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PSMDBCluster/Update][%d] UpdatePSMDBCluster default %+v", o._statusCode, o.Payload) -} - -func (o *UpdatePSMDBClusterDefault) GetPayload() *UpdatePSMDBClusterDefaultBody { - return o.Payload -} - -func (o *UpdatePSMDBClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdatePSMDBClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -UpdatePSMDBClusterBody update PSMDB cluster body -swagger:model UpdatePSMDBClusterBody -*/ -type UpdatePSMDBClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PSMDB cluster name. - Name string `json:"name,omitempty"` - - // Make DB cluster accessible outside of K8s cluster. - Expose bool `json:"expose,omitempty"` - - // Make DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // params - Params *UpdatePSMDBClusterParamsBodyParams `json:"params,omitempty"` - - // template - Template *UpdatePSMDBClusterParamsBodyTemplate `json:"template,omitempty"` -} - -// Validate validates this update PSMDB cluster body -func (o *UpdatePSMDBClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *UpdatePSMDBClusterBody) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PSMDB cluster body based on the context it is used -func (o *UpdatePSMDBClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *UpdatePSMDBClusterBody) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterBody) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePSMDBClusterDefaultBody update PSMDB cluster default body -swagger:model UpdatePSMDBClusterDefaultBody -*/ -type UpdatePSMDBClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*UpdatePSMDBClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this update PSMDB cluster default body -func (o *UpdatePSMDBClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("UpdatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("UpdatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update PSMDB cluster default body based on the context it is used -func (o *UpdatePSMDBClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("UpdatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("UpdatePSMDBCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePSMDBClusterDefaultBodyDetailsItems0 update PSMDB cluster default body details items0 -swagger:model UpdatePSMDBClusterDefaultBodyDetailsItems0 -*/ -type UpdatePSMDBClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this update PSMDB cluster default body details items0 -func (o *UpdatePSMDBClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PSMDB cluster default body details items0 based on context it is used -func (o *UpdatePSMDBClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePSMDBClusterParamsBodyParams UpdatePSMDBClusterParams represents PSMDB cluster parameters that can be updated. -swagger:model UpdatePSMDBClusterParamsBodyParams -*/ -type UpdatePSMDBClusterParamsBodyParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // Suspend cluster `pause: true`. - Suspend bool `json:"suspend,omitempty"` - - // Resume cluster `pause: false`. - Resume bool `json:"resume,omitempty"` - - // PSMDB image to use. If it's the same image but with different version tag, upgrade of database cluster to version - // in given tag is triggered. If entirely different image is given, error is returned. - Image string `json:"image,omitempty"` - - // replicaset - Replicaset *UpdatePSMDBClusterParamsBodyParamsReplicaset `json:"replicaset,omitempty"` -} - -// Validate validates this update PSMDB cluster params body params -func (o *UpdatePSMDBClusterParamsBodyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateReplicaset(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterParamsBodyParams) validateReplicaset(formats strfmt.Registry) error { - if swag.IsZero(o.Replicaset) { // not required - return nil - } - - if o.Replicaset != nil { - if err := o.Replicaset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PSMDB cluster params body params based on the context it is used -func (o *UpdatePSMDBClusterParamsBodyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateReplicaset(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterParamsBodyParams) contextValidateReplicaset(ctx context.Context, formats strfmt.Registry) error { - if o.Replicaset != nil { - if err := o.Replicaset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyParams) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterParamsBodyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePSMDBClusterParamsBodyParamsReplicaset ReplicaSet container parameters. -swagger:model UpdatePSMDBClusterParamsBodyParamsReplicaset -*/ -type UpdatePSMDBClusterParamsBodyParamsReplicaset struct { - // Configuration for PSMDB cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PSMDB cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this update PSMDB cluster params body params replicaset -func (o *UpdatePSMDBClusterParamsBodyParamsReplicaset) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterParamsBodyParamsReplicaset) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PSMDB cluster params body params replicaset based on the context it is used -func (o *UpdatePSMDBClusterParamsBodyParamsReplicaset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePSMDBClusterParamsBodyParamsReplicaset) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "replicaset" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyParamsReplicaset) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyParamsReplicaset) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterParamsBodyParamsReplicaset - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources -*/ -type UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this update PSMDB cluster params body params replicaset compute resources -func (o *UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PSMDB cluster params body params replicaset compute resources based on context it is used -func (o *UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterParamsBodyParamsReplicasetComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePSMDBClusterParamsBodyTemplate update PSMDB cluster params body template -swagger:model UpdatePSMDBClusterParamsBodyTemplate -*/ -type UpdatePSMDBClusterParamsBodyTemplate struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this update PSMDB cluster params body template -func (o *UpdatePSMDBClusterParamsBodyTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PSMDB cluster params body template based on context it is used -func (o *UpdatePSMDBClusterParamsBodyTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyTemplate) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePSMDBClusterParamsBodyTemplate) UnmarshalBinary(b []byte) error { - var res UpdatePSMDBClusterParamsBodyTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_parameters.go b/api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_parameters.go deleted file mode 100644 index 7beb33eddb..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewCreatePXCClusterParams creates a new CreatePXCClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreatePXCClusterParams() *CreatePXCClusterParams { - return &CreatePXCClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreatePXCClusterParamsWithTimeout creates a new CreatePXCClusterParams object -// with the ability to set a timeout on a request. -func NewCreatePXCClusterParamsWithTimeout(timeout time.Duration) *CreatePXCClusterParams { - return &CreatePXCClusterParams{ - timeout: timeout, - } -} - -// NewCreatePXCClusterParamsWithContext creates a new CreatePXCClusterParams object -// with the ability to set a context for a request. -func NewCreatePXCClusterParamsWithContext(ctx context.Context) *CreatePXCClusterParams { - return &CreatePXCClusterParams{ - Context: ctx, - } -} - -// NewCreatePXCClusterParamsWithHTTPClient creates a new CreatePXCClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreatePXCClusterParamsWithHTTPClient(client *http.Client) *CreatePXCClusterParams { - return &CreatePXCClusterParams{ - HTTPClient: client, - } -} - -/* -CreatePXCClusterParams contains all the parameters to send to the API endpoint - - for the create PXC cluster operation. - - Typically these are written to a http.Request. -*/ -type CreatePXCClusterParams struct { - // Body. - Body CreatePXCClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create PXC cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePXCClusterParams) WithDefaults() *CreatePXCClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create PXC cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreatePXCClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create PXC cluster params -func (o *CreatePXCClusterParams) WithTimeout(timeout time.Duration) *CreatePXCClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create PXC cluster params -func (o *CreatePXCClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create PXC cluster params -func (o *CreatePXCClusterParams) WithContext(ctx context.Context) *CreatePXCClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create PXC cluster params -func (o *CreatePXCClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create PXC cluster params -func (o *CreatePXCClusterParams) WithHTTPClient(client *http.Client) *CreatePXCClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create PXC cluster params -func (o *CreatePXCClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create PXC cluster params -func (o *CreatePXCClusterParams) WithBody(body CreatePXCClusterBody) *CreatePXCClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create PXC cluster params -func (o *CreatePXCClusterParams) SetBody(body CreatePXCClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreatePXCClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_responses.go b/api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_responses.go deleted file mode 100644 index 00c257a18e..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/create_pxc_cluster_responses.go +++ /dev/null @@ -1,1222 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreatePXCClusterReader is a Reader for the CreatePXCCluster structure. -type CreatePXCClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreatePXCClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreatePXCClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreatePXCClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreatePXCClusterOK creates a CreatePXCClusterOK with default headers values -func NewCreatePXCClusterOK() *CreatePXCClusterOK { - return &CreatePXCClusterOK{} -} - -/* -CreatePXCClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type CreatePXCClusterOK struct { - Payload interface{} -} - -func (o *CreatePXCClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCCluster/Create][%d] createPxcClusterOk %+v", 200, o.Payload) -} - -func (o *CreatePXCClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *CreatePXCClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreatePXCClusterDefault creates a CreatePXCClusterDefault with default headers values -func NewCreatePXCClusterDefault(code int) *CreatePXCClusterDefault { - return &CreatePXCClusterDefault{ - _statusCode: code, - } -} - -/* -CreatePXCClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type CreatePXCClusterDefault struct { - _statusCode int - - Payload *CreatePXCClusterDefaultBody -} - -// Code gets the status code for the create PXC cluster default response -func (o *CreatePXCClusterDefault) Code() int { - return o._statusCode -} - -func (o *CreatePXCClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCCluster/Create][%d] CreatePXCCluster default %+v", o._statusCode, o.Payload) -} - -func (o *CreatePXCClusterDefault) GetPayload() *CreatePXCClusterDefaultBody { - return o.Payload -} - -func (o *CreatePXCClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreatePXCClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -CreatePXCClusterBody create PXC cluster body -swagger:model CreatePXCClusterBody -*/ -type CreatePXCClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PXC cluster name. - // a DNS-1035 label must consist of lower case alphanumeric characters or '-', - // start with an alphabetic character, and end with an alphanumeric character - // (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?') - Name string `json:"name,omitempty"` - - // Make DB cluster accessible outside of K8s cluster. - Expose bool `json:"expose,omitempty"` - - // Make DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // params - Params *CreatePXCClusterParamsBodyParams `json:"params,omitempty"` - - // template - Template *CreatePXCClusterParamsBodyTemplate `json:"template,omitempty"` -} - -// Validate validates this create PXC cluster body -func (o *CreatePXCClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterBody) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PXC cluster body based on the context it is used -func (o *CreatePXCClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterBody) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterBody) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterDefaultBody create PXC cluster default body -swagger:model CreatePXCClusterDefaultBody -*/ -type CreatePXCClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*CreatePXCClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this create PXC cluster default body -func (o *CreatePXCClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("CreatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("CreatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this create PXC cluster default body based on the context it is used -func (o *CreatePXCClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("CreatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("CreatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterDefaultBodyDetailsItems0 create PXC cluster default body details items0 -swagger:model CreatePXCClusterDefaultBodyDetailsItems0 -*/ -type CreatePXCClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this create PXC cluster default body details items0 -func (o *CreatePXCClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster default body details items0 based on context it is used -func (o *CreatePXCClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParams PXCClusterParams represents PXC cluster parameters that can be updated. -swagger:model CreatePXCClusterParamsBodyParams -*/ -type CreatePXCClusterParamsBodyParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // backup - Backup *CreatePXCClusterParamsBodyParamsBackup `json:"backup,omitempty"` - - // haproxy - Haproxy *CreatePXCClusterParamsBodyParamsHaproxy `json:"haproxy,omitempty"` - - // proxysql - Proxysql *CreatePXCClusterParamsBodyParamsProxysql `json:"proxysql,omitempty"` - - // pxc - PXC *CreatePXCClusterParamsBodyParamsPXC `json:"pxc,omitempty"` - - // restore - Restore *CreatePXCClusterParamsBodyParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this create PXC cluster params body params -func (o *CreatePXCClusterParamsBodyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - if o.Haproxy != nil { - if err := o.Haproxy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - if o.Proxysql != nil { - if err := o.Proxysql.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PXC cluster params body params based on the context it is used -func (o *CreatePXCClusterParamsBodyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { - if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { - if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *CreatePXCClusterParamsBodyParams) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParams) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsBackup Backup configuration for a database cluster -swagger:model CreatePXCClusterParamsBodyParamsBackup -*/ -type CreatePXCClusterParamsBodyParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this create PXC cluster params body params backup -func (o *CreatePXCClusterParamsBodyParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster params body params backup based on context it is used -func (o *CreatePXCClusterParamsBodyParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsBackup) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsHaproxy HAProxy container parameters. -// NOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it. -swagger:model CreatePXCClusterParamsBodyParamsHaproxy -*/ -type CreatePXCClusterParamsBodyParamsHaproxy struct { - // Docker image used for HAProxy. - Image string `json:"image,omitempty"` - - // compute resources - ComputeResources *CreatePXCClusterParamsBodyParamsHaproxyComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this create PXC cluster params body params haproxy -func (o *CreatePXCClusterParamsBodyParamsHaproxy) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParamsHaproxy) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PXC cluster params body params haproxy based on the context it is used -func (o *CreatePXCClusterParamsBodyParamsHaproxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParamsHaproxy) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsHaproxy) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsHaproxy) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsHaproxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsHaproxyComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model CreatePXCClusterParamsBodyParamsHaproxyComputeResources -*/ -type CreatePXCClusterParamsBodyParamsHaproxyComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this create PXC cluster params body params haproxy compute resources -func (o *CreatePXCClusterParamsBodyParamsHaproxyComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster params body params haproxy compute resources based on context it is used -func (o *CreatePXCClusterParamsBodyParamsHaproxyComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsHaproxyComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsHaproxyComputeResources) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsHaproxyComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsPXC PXC container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model CreatePXCClusterParamsBodyParamsPXC -*/ -type CreatePXCClusterParamsBodyParamsPXC struct { - // Docker image used for PXC. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PXC cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PXC cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *CreatePXCClusterParamsBodyParamsPXCComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this create PXC cluster params body params PXC -func (o *CreatePXCClusterParamsBodyParamsPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParamsPXC) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PXC cluster params body params PXC based on the context it is used -func (o *CreatePXCClusterParamsBodyParamsPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParamsPXC) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsPXC) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsPXCComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model CreatePXCClusterParamsBodyParamsPXCComputeResources -*/ -type CreatePXCClusterParamsBodyParamsPXCComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this create PXC cluster params body params PXC compute resources -func (o *CreatePXCClusterParamsBodyParamsPXCComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster params body params PXC compute resources based on context it is used -func (o *CreatePXCClusterParamsBodyParamsPXCComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsPXCComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsPXCComputeResources) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsPXCComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsProxysql ProxySQL container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model CreatePXCClusterParamsBodyParamsProxysql -*/ -type CreatePXCClusterParamsBodyParamsProxysql struct { - // Docker image used for ProxySQL. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // compute resources - ComputeResources *CreatePXCClusterParamsBodyParamsProxysqlComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this create PXC cluster params body params proxysql -func (o *CreatePXCClusterParamsBodyParamsProxysql) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParamsProxysql) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this create PXC cluster params body params proxysql based on the context it is used -func (o *CreatePXCClusterParamsBodyParamsProxysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *CreatePXCClusterParamsBodyParamsProxysql) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsProxysql) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsProxysql) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsProxysql - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsProxysqlComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model CreatePXCClusterParamsBodyParamsProxysqlComputeResources -*/ -type CreatePXCClusterParamsBodyParamsProxysqlComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this create PXC cluster params body params proxysql compute resources -func (o *CreatePXCClusterParamsBodyParamsProxysqlComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster params body params proxysql compute resources based on context it is used -func (o *CreatePXCClusterParamsBodyParamsProxysqlComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsProxysqlComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsProxysqlComputeResources) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsProxysqlComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model CreatePXCClusterParamsBodyParamsRestore -*/ -type CreatePXCClusterParamsBodyParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this create PXC cluster params body params restore -func (o *CreatePXCClusterParamsBodyParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster params body params restore based on context it is used -func (o *CreatePXCClusterParamsBodyParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyParamsRestore) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -CreatePXCClusterParamsBodyTemplate create PXC cluster params body template -swagger:model CreatePXCClusterParamsBodyTemplate -*/ -type CreatePXCClusterParamsBodyTemplate struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this create PXC cluster params body template -func (o *CreatePXCClusterParamsBodyTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create PXC cluster params body template based on context it is used -func (o *CreatePXCClusterParamsBodyTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyTemplate) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *CreatePXCClusterParamsBodyTemplate) UnmarshalBinary(b []byte) error { - var res CreatePXCClusterParamsBodyTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_parameters.go b/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_parameters.go deleted file mode 100644 index 7c4d2afb1e..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPXCClusterCredentialsParams creates a new GetPXCClusterCredentialsParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPXCClusterCredentialsParams() *GetPXCClusterCredentialsParams { - return &GetPXCClusterCredentialsParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPXCClusterCredentialsParamsWithTimeout creates a new GetPXCClusterCredentialsParams object -// with the ability to set a timeout on a request. -func NewGetPXCClusterCredentialsParamsWithTimeout(timeout time.Duration) *GetPXCClusterCredentialsParams { - return &GetPXCClusterCredentialsParams{ - timeout: timeout, - } -} - -// NewGetPXCClusterCredentialsParamsWithContext creates a new GetPXCClusterCredentialsParams object -// with the ability to set a context for a request. -func NewGetPXCClusterCredentialsParamsWithContext(ctx context.Context) *GetPXCClusterCredentialsParams { - return &GetPXCClusterCredentialsParams{ - Context: ctx, - } -} - -// NewGetPXCClusterCredentialsParamsWithHTTPClient creates a new GetPXCClusterCredentialsParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPXCClusterCredentialsParamsWithHTTPClient(client *http.Client) *GetPXCClusterCredentialsParams { - return &GetPXCClusterCredentialsParams{ - HTTPClient: client, - } -} - -/* -GetPXCClusterCredentialsParams contains all the parameters to send to the API endpoint - - for the get PXC cluster credentials operation. - - Typically these are written to a http.Request. -*/ -type GetPXCClusterCredentialsParams struct { - // Body. - Body GetPXCClusterCredentialsBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get PXC cluster credentials params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPXCClusterCredentialsParams) WithDefaults() *GetPXCClusterCredentialsParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get PXC cluster credentials params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPXCClusterCredentialsParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) WithTimeout(timeout time.Duration) *GetPXCClusterCredentialsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) WithContext(ctx context.Context) *GetPXCClusterCredentialsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) WithHTTPClient(client *http.Client) *GetPXCClusterCredentialsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) WithBody(body GetPXCClusterCredentialsBody) *GetPXCClusterCredentialsParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get PXC cluster credentials params -func (o *GetPXCClusterCredentialsParams) SetBody(body GetPXCClusterCredentialsBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPXCClusterCredentialsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_responses.go b/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_responses.go deleted file mode 100644 index 6273b03f15..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_credentials_responses.go +++ /dev/null @@ -1,435 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetPXCClusterCredentialsReader is a Reader for the GetPXCClusterCredentials structure. -type GetPXCClusterCredentialsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPXCClusterCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPXCClusterCredentialsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPXCClusterCredentialsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPXCClusterCredentialsOK creates a GetPXCClusterCredentialsOK with default headers values -func NewGetPXCClusterCredentialsOK() *GetPXCClusterCredentialsOK { - return &GetPXCClusterCredentialsOK{} -} - -/* -GetPXCClusterCredentialsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetPXCClusterCredentialsOK struct { - Payload *GetPXCClusterCredentialsOKBody -} - -func (o *GetPXCClusterCredentialsOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCClusters/GetCredentials][%d] getPxcClusterCredentialsOk %+v", 200, o.Payload) -} - -func (o *GetPXCClusterCredentialsOK) GetPayload() *GetPXCClusterCredentialsOKBody { - return o.Payload -} - -func (o *GetPXCClusterCredentialsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPXCClusterCredentialsOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPXCClusterCredentialsDefault creates a GetPXCClusterCredentialsDefault with default headers values -func NewGetPXCClusterCredentialsDefault(code int) *GetPXCClusterCredentialsDefault { - return &GetPXCClusterCredentialsDefault{ - _statusCode: code, - } -} - -/* -GetPXCClusterCredentialsDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetPXCClusterCredentialsDefault struct { - _statusCode int - - Payload *GetPXCClusterCredentialsDefaultBody -} - -// Code gets the status code for the get PXC cluster credentials default response -func (o *GetPXCClusterCredentialsDefault) Code() int { - return o._statusCode -} - -func (o *GetPXCClusterCredentialsDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCClusters/GetCredentials][%d] GetPXCClusterCredentials default %+v", o._statusCode, o.Payload) -} - -func (o *GetPXCClusterCredentialsDefault) GetPayload() *GetPXCClusterCredentialsDefaultBody { - return o.Payload -} - -func (o *GetPXCClusterCredentialsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPXCClusterCredentialsDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetPXCClusterCredentialsBody get PXC cluster credentials body -swagger:model GetPXCClusterCredentialsBody -*/ -type GetPXCClusterCredentialsBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PXC cluster name. - Name string `json:"name,omitempty"` -} - -// Validate validates this get PXC cluster credentials body -func (o *GetPXCClusterCredentialsBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster credentials body based on context it is used -func (o *GetPXCClusterCredentialsBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterCredentialsBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterCredentialsBody) UnmarshalBinary(b []byte) error { - var res GetPXCClusterCredentialsBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterCredentialsDefaultBody get PXC cluster credentials default body -swagger:model GetPXCClusterCredentialsDefaultBody -*/ -type GetPXCClusterCredentialsDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetPXCClusterCredentialsDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get PXC cluster credentials default body -func (o *GetPXCClusterCredentialsDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterCredentialsDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPXCClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPXCClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PXC cluster credentials default body based on the context it is used -func (o *GetPXCClusterCredentialsDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterCredentialsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPXCClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPXCClusterCredentials default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterCredentialsDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterCredentialsDefaultBody) UnmarshalBinary(b []byte) error { - var res GetPXCClusterCredentialsDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterCredentialsDefaultBodyDetailsItems0 get PXC cluster credentials default body details items0 -swagger:model GetPXCClusterCredentialsDefaultBodyDetailsItems0 -*/ -type GetPXCClusterCredentialsDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get PXC cluster credentials default body details items0 -func (o *GetPXCClusterCredentialsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster credentials default body details items0 based on context it is used -func (o *GetPXCClusterCredentialsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterCredentialsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterCredentialsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetPXCClusterCredentialsDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterCredentialsOKBody get PXC cluster credentials OK body -swagger:model GetPXCClusterCredentialsOKBody -*/ -type GetPXCClusterCredentialsOKBody struct { - // connection credentials - ConnectionCredentials *GetPXCClusterCredentialsOKBodyConnectionCredentials `json:"connection_credentials,omitempty"` -} - -// Validate validates this get PXC cluster credentials OK body -func (o *GetPXCClusterCredentialsOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateConnectionCredentials(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterCredentialsOKBody) validateConnectionCredentials(formats strfmt.Registry) error { - if swag.IsZero(o.ConnectionCredentials) { // not required - return nil - } - - if o.ConnectionCredentials != nil { - if err := o.ConnectionCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPxcClusterCredentialsOk" + "." + "connection_credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPxcClusterCredentialsOk" + "." + "connection_credentials") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster credentials OK body based on the context it is used -func (o *GetPXCClusterCredentialsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateConnectionCredentials(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterCredentialsOKBody) contextValidateConnectionCredentials(ctx context.Context, formats strfmt.Registry) error { - if o.ConnectionCredentials != nil { - if err := o.ConnectionCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPxcClusterCredentialsOk" + "." + "connection_credentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPxcClusterCredentialsOk" + "." + "connection_credentials") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterCredentialsOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterCredentialsOKBody) UnmarshalBinary(b []byte) error { - var res GetPXCClusterCredentialsOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterCredentialsOKBodyConnectionCredentials PXCClusterConnectionCredentials is cluster connection credentials. -swagger:model GetPXCClusterCredentialsOKBodyConnectionCredentials -*/ -type GetPXCClusterCredentialsOKBodyConnectionCredentials struct { - // PXC username. - Username string `json:"username,omitempty"` - - // PXC password. - Password string `json:"password,omitempty"` - - // PXC host. - Host string `json:"host,omitempty"` - - // PXC port. - Port int32 `json:"port,omitempty"` -} - -// Validate validates this get PXC cluster credentials OK body connection credentials -func (o *GetPXCClusterCredentialsOKBodyConnectionCredentials) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster credentials OK body connection credentials based on context it is used -func (o *GetPXCClusterCredentialsOKBodyConnectionCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterCredentialsOKBodyConnectionCredentials) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterCredentialsOKBodyConnectionCredentials) UnmarshalBinary(b []byte) error { - var res GetPXCClusterCredentialsOKBodyConnectionCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_parameters.go b/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_parameters.go deleted file mode 100644 index 12e6ed514f..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewGetPXCClusterResourcesParams creates a new GetPXCClusterResourcesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewGetPXCClusterResourcesParams() *GetPXCClusterResourcesParams { - return &GetPXCClusterResourcesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewGetPXCClusterResourcesParamsWithTimeout creates a new GetPXCClusterResourcesParams object -// with the ability to set a timeout on a request. -func NewGetPXCClusterResourcesParamsWithTimeout(timeout time.Duration) *GetPXCClusterResourcesParams { - return &GetPXCClusterResourcesParams{ - timeout: timeout, - } -} - -// NewGetPXCClusterResourcesParamsWithContext creates a new GetPXCClusterResourcesParams object -// with the ability to set a context for a request. -func NewGetPXCClusterResourcesParamsWithContext(ctx context.Context) *GetPXCClusterResourcesParams { - return &GetPXCClusterResourcesParams{ - Context: ctx, - } -} - -// NewGetPXCClusterResourcesParamsWithHTTPClient creates a new GetPXCClusterResourcesParams object -// with the ability to set a custom HTTPClient for a request. -func NewGetPXCClusterResourcesParamsWithHTTPClient(client *http.Client) *GetPXCClusterResourcesParams { - return &GetPXCClusterResourcesParams{ - HTTPClient: client, - } -} - -/* -GetPXCClusterResourcesParams contains all the parameters to send to the API endpoint - - for the get PXC cluster resources operation. - - Typically these are written to a http.Request. -*/ -type GetPXCClusterResourcesParams struct { - // Body. - Body GetPXCClusterResourcesBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the get PXC cluster resources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPXCClusterResourcesParams) WithDefaults() *GetPXCClusterResourcesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the get PXC cluster resources params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *GetPXCClusterResourcesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) WithTimeout(timeout time.Duration) *GetPXCClusterResourcesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) WithContext(ctx context.Context) *GetPXCClusterResourcesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) WithHTTPClient(client *http.Client) *GetPXCClusterResourcesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) WithBody(body GetPXCClusterResourcesBody) *GetPXCClusterResourcesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the get PXC cluster resources params -func (o *GetPXCClusterResourcesParams) SetBody(body GetPXCClusterResourcesBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *GetPXCClusterResourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_responses.go b/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_responses.go deleted file mode 100644 index 18085c7e9f..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/get_pxc_cluster_resources_responses.go +++ /dev/null @@ -1,1254 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetPXCClusterResourcesReader is a Reader for the GetPXCClusterResources structure. -type GetPXCClusterResourcesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetPXCClusterResourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetPXCClusterResourcesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetPXCClusterResourcesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewGetPXCClusterResourcesOK creates a GetPXCClusterResourcesOK with default headers values -func NewGetPXCClusterResourcesOK() *GetPXCClusterResourcesOK { - return &GetPXCClusterResourcesOK{} -} - -/* -GetPXCClusterResourcesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type GetPXCClusterResourcesOK struct { - Payload *GetPXCClusterResourcesOKBody -} - -func (o *GetPXCClusterResourcesOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCCluster/Resources/Get][%d] getPxcClusterResourcesOk %+v", 200, o.Payload) -} - -func (o *GetPXCClusterResourcesOK) GetPayload() *GetPXCClusterResourcesOKBody { - return o.Payload -} - -func (o *GetPXCClusterResourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPXCClusterResourcesOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetPXCClusterResourcesDefault creates a GetPXCClusterResourcesDefault with default headers values -func NewGetPXCClusterResourcesDefault(code int) *GetPXCClusterResourcesDefault { - return &GetPXCClusterResourcesDefault{ - _statusCode: code, - } -} - -/* -GetPXCClusterResourcesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type GetPXCClusterResourcesDefault struct { - _statusCode int - - Payload *GetPXCClusterResourcesDefaultBody -} - -// Code gets the status code for the get PXC cluster resources default response -func (o *GetPXCClusterResourcesDefault) Code() int { - return o._statusCode -} - -func (o *GetPXCClusterResourcesDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCCluster/Resources/Get][%d] GetPXCClusterResources default %+v", o._statusCode, o.Payload) -} - -func (o *GetPXCClusterResourcesDefault) GetPayload() *GetPXCClusterResourcesDefaultBody { - return o.Payload -} - -func (o *GetPXCClusterResourcesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetPXCClusterResourcesDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -GetPXCClusterResourcesBody get PXC cluster resources body -swagger:model GetPXCClusterResourcesBody -*/ -type GetPXCClusterResourcesBody struct { - // params - Params *GetPXCClusterResourcesParamsBodyParams `json:"params,omitempty"` -} - -// Validate validates this get PXC cluster resources body -func (o *GetPXCClusterResourcesBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources body based on the context it is used -func (o *GetPXCClusterResourcesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesBody) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesDefaultBody get PXC cluster resources default body -swagger:model GetPXCClusterResourcesDefaultBody -*/ -type GetPXCClusterResourcesDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*GetPXCClusterResourcesDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this get PXC cluster resources default body -func (o *GetPXCClusterResourcesDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPXCClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPXCClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources default body based on the context it is used -func (o *GetPXCClusterResourcesDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("GetPXCClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("GetPXCClusterResources default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesDefaultBody) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesDefaultBodyDetailsItems0 get PXC cluster resources default body details items0 -swagger:model GetPXCClusterResourcesDefaultBodyDetailsItems0 -*/ -type GetPXCClusterResourcesDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this get PXC cluster resources default body details items0 -func (o *GetPXCClusterResourcesDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources default body details items0 based on context it is used -func (o *GetPXCClusterResourcesDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesOKBody get PXC cluster resources OK body -swagger:model GetPXCClusterResourcesOKBody -*/ -type GetPXCClusterResourcesOKBody struct { - // expected - Expected *GetPXCClusterResourcesOKBodyExpected `json:"expected,omitempty"` -} - -// Validate validates this get PXC cluster resources OK body -func (o *GetPXCClusterResourcesOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateExpected(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesOKBody) validateExpected(formats strfmt.Registry) error { - if swag.IsZero(o.Expected) { // not required - return nil - } - - if o.Expected != nil { - if err := o.Expected.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPxcClusterResourcesOk" + "." + "expected") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPxcClusterResourcesOk" + "." + "expected") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources OK body based on the context it is used -func (o *GetPXCClusterResourcesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateExpected(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesOKBody) contextValidateExpected(ctx context.Context, formats strfmt.Registry) error { - if o.Expected != nil { - if err := o.Expected.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("getPxcClusterResourcesOk" + "." + "expected") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("getPxcClusterResourcesOk" + "." + "expected") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesOKBody) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesOKBodyExpected Resources contains Kubernetes cluster resources. -swagger:model GetPXCClusterResourcesOKBodyExpected -*/ -type GetPXCClusterResourcesOKBodyExpected struct { - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` - - // CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus. - // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu. - CPUm string `json:"cpu_m,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` -} - -// Validate validates this get PXC cluster resources OK body expected -func (o *GetPXCClusterResourcesOKBodyExpected) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources OK body expected based on context it is used -func (o *GetPXCClusterResourcesOKBodyExpected) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesOKBodyExpected) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesOKBodyExpected) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesOKBodyExpected - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParams PXCClusterParams represents PXC cluster parameters that can be updated. -swagger:model GetPXCClusterResourcesParamsBodyParams -*/ -type GetPXCClusterResourcesParamsBodyParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // backup - Backup *GetPXCClusterResourcesParamsBodyParamsBackup `json:"backup,omitempty"` - - // haproxy - Haproxy *GetPXCClusterResourcesParamsBodyParamsHaproxy `json:"haproxy,omitempty"` - - // proxysql - Proxysql *GetPXCClusterResourcesParamsBodyParamsProxysql `json:"proxysql,omitempty"` - - // pxc - PXC *GetPXCClusterResourcesParamsBodyParamsPXC `json:"pxc,omitempty"` - - // restore - Restore *GetPXCClusterResourcesParamsBodyParamsRestore `json:"restore,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params -func (o *GetPXCClusterResourcesParamsBodyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateBackup(formats); err != nil { - res = append(res, err) - } - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if err := o.validateRestore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) validateBackup(formats strfmt.Registry) error { - if swag.IsZero(o.Backup) { // not required - return nil - } - - if o.Backup != nil { - if err := o.Backup.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - if o.Haproxy != nil { - if err := o.Haproxy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - if o.Proxysql != nil { - if err := o.Proxysql.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) validateRestore(formats strfmt.Registry) error { - if swag.IsZero(o.Restore) { // not required - return nil - } - - if o.Restore != nil { - if err := o.Restore.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources params body params based on the context it is used -func (o *GetPXCClusterResourcesParamsBodyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateBackup(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateRestore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) contextValidateBackup(ctx context.Context, formats strfmt.Registry) error { - if o.Backup != nil { - if err := o.Backup.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "backup") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "backup") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { - if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { - if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParams) contextValidateRestore(ctx context.Context, formats strfmt.Registry) error { - if o.Restore != nil { - if err := o.Restore.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "restore") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "restore") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParams) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsBackup Backup configuration for a database cluster -swagger:model GetPXCClusterResourcesParamsBodyParamsBackup -*/ -type GetPXCClusterResourcesParamsBodyParamsBackup struct { - // Backup Location id of stored backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Keep copies represents how many copies should retain. - KeepCopies int32 `json:"keep_copies,omitempty"` - - // Cron expression represents cron expression - CronExpression string `json:"cron_expression,omitempty"` - - // Service acccount used for backups - ServiceAccount string `json:"service_account,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params backup -func (o *GetPXCClusterResourcesParamsBodyParamsBackup) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources params body params backup based on context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsBackup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsBackup) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsBackup) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsBackup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsHaproxy HAProxy container parameters. -// NOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it. -swagger:model GetPXCClusterResourcesParamsBodyParamsHaproxy -*/ -type GetPXCClusterResourcesParamsBodyParamsHaproxy struct { - // Docker image used for HAProxy. - Image string `json:"image,omitempty"` - - // compute resources - ComputeResources *GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params haproxy -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxy) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxy) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources params body params haproxy based on the context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxy) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxy) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxy) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsHaproxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources -*/ -type GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params haproxy compute resources -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources params body params haproxy compute resources based on context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsHaproxyComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsPXC PXC container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetPXCClusterResourcesParamsBodyParamsPXC -*/ -type GetPXCClusterResourcesParamsBodyParamsPXC struct { - // Docker image used for PXC. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // Configuration for PXC cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PXC cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *GetPXCClusterResourcesParamsBodyParamsPXCComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params PXC -func (o *GetPXCClusterResourcesParamsBodyParamsPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParamsPXC) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources params body params PXC based on the context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParamsPXC) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsPXC) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsPXCComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetPXCClusterResourcesParamsBodyParamsPXCComputeResources -*/ -type GetPXCClusterResourcesParamsBodyParamsPXCComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params PXC compute resources -func (o *GetPXCClusterResourcesParamsBodyParamsPXCComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources params body params PXC compute resources based on context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsPXCComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsPXCComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsPXCComputeResources) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsPXCComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsProxysql ProxySQL container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -swagger:model GetPXCClusterResourcesParamsBodyParamsProxysql -*/ -type GetPXCClusterResourcesParamsBodyParamsProxysql struct { - // Docker image used for ProxySQL. - Image string `json:"image,omitempty"` - - // Disk size in bytes. - DiskSize string `json:"disk_size,omitempty"` - - // compute resources - ComputeResources *GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params proxysql -func (o *GetPXCClusterResourcesParamsBodyParamsProxysql) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParamsProxysql) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this get PXC cluster resources params body params proxysql based on the context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsProxysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *GetPXCClusterResourcesParamsBodyParamsProxysql) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsProxysql) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsProxysql) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsProxysql - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources -*/ -type GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params proxysql compute resources -func (o *GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources params body params proxysql compute resources based on context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsProxysqlComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -GetPXCClusterResourcesParamsBodyParamsRestore Restore represents restoration payload to restore a database cluster from backup -swagger:model GetPXCClusterResourcesParamsBodyParamsRestore -*/ -type GetPXCClusterResourcesParamsBodyParamsRestore struct { - // Backup location in PMM. - LocationID string `json:"location_id,omitempty"` - - // Destination filename. - Destination string `json:"destination,omitempty"` - - // K8s Secrets name. - SecretsName string `json:"secrets_name,omitempty"` -} - -// Validate validates this get PXC cluster resources params body params restore -func (o *GetPXCClusterResourcesParamsBodyParamsRestore) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this get PXC cluster resources params body params restore based on context it is used -func (o *GetPXCClusterResourcesParamsBodyParamsRestore) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsRestore) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *GetPXCClusterResourcesParamsBodyParamsRestore) UnmarshalBinary(b []byte) error { - var res GetPXCClusterResourcesParamsBodyParamsRestore - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/pxc_clusters_client.go b/api/managementpb/dbaas/json/client/pxc_clusters/pxc_clusters_client.go deleted file mode 100644 index 42f0d9fa72..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/pxc_clusters_client.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new pxc clusters API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for pxc clusters API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - CreatePXCCluster(params *CreatePXCClusterParams, opts ...ClientOption) (*CreatePXCClusterOK, error) - - GetPXCClusterCredentials(params *GetPXCClusterCredentialsParams, opts ...ClientOption) (*GetPXCClusterCredentialsOK, error) - - GetPXCClusterResources(params *GetPXCClusterResourcesParams, opts ...ClientOption) (*GetPXCClusterResourcesOK, error) - - UpdatePXCCluster(params *UpdatePXCClusterParams, opts ...ClientOption) (*UpdatePXCClusterOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -CreatePXCCluster creates PXC cluster creates a new PXC cluster -*/ -func (a *Client) CreatePXCCluster(params *CreatePXCClusterParams, opts ...ClientOption) (*CreatePXCClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreatePXCClusterParams() - } - op := &runtime.ClientOperation{ - ID: "CreatePXCCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PXCCluster/Create", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &CreatePXCClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreatePXCClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreatePXCClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPXCClusterCredentials gets PXC cluster credentials returns a PXC cluster credentials by cluster name -*/ -func (a *Client) GetPXCClusterCredentials(params *GetPXCClusterCredentialsParams, opts ...ClientOption) (*GetPXCClusterCredentialsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPXCClusterCredentialsParams() - } - op := &runtime.ClientOperation{ - ID: "GetPXCClusterCredentials", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PXCClusters/GetCredentials", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetPXCClusterCredentialsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPXCClusterCredentialsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPXCClusterCredentialsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetPXCClusterResources gets PXC cluster resources returns expected resources to be consumed by the cluster -*/ -func (a *Client) GetPXCClusterResources(params *GetPXCClusterResourcesParams, opts ...ClientOption) (*GetPXCClusterResourcesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetPXCClusterResourcesParams() - } - op := &runtime.ClientOperation{ - ID: "GetPXCClusterResources", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PXCCluster/Resources/Get", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &GetPXCClusterResourcesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*GetPXCClusterResourcesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetPXCClusterResourcesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -UpdatePXCCluster updates PXC cluster updates existing PXC cluster -*/ -func (a *Client) UpdatePXCCluster(params *UpdatePXCClusterParams, opts ...ClientOption) (*UpdatePXCClusterOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdatePXCClusterParams() - } - op := &runtime.ClientOperation{ - ID: "UpdatePXCCluster", - Method: "POST", - PathPattern: "/v1/management/DBaaS/PXCCluster/Update", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &UpdatePXCClusterReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdatePXCClusterOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdatePXCClusterDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_parameters.go b/api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_parameters.go deleted file mode 100644 index 61a4122345..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUpdatePXCClusterParams creates a new UpdatePXCClusterParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdatePXCClusterParams() *UpdatePXCClusterParams { - return &UpdatePXCClusterParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdatePXCClusterParamsWithTimeout creates a new UpdatePXCClusterParams object -// with the ability to set a timeout on a request. -func NewUpdatePXCClusterParamsWithTimeout(timeout time.Duration) *UpdatePXCClusterParams { - return &UpdatePXCClusterParams{ - timeout: timeout, - } -} - -// NewUpdatePXCClusterParamsWithContext creates a new UpdatePXCClusterParams object -// with the ability to set a context for a request. -func NewUpdatePXCClusterParamsWithContext(ctx context.Context) *UpdatePXCClusterParams { - return &UpdatePXCClusterParams{ - Context: ctx, - } -} - -// NewUpdatePXCClusterParamsWithHTTPClient creates a new UpdatePXCClusterParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdatePXCClusterParamsWithHTTPClient(client *http.Client) *UpdatePXCClusterParams { - return &UpdatePXCClusterParams{ - HTTPClient: client, - } -} - -/* -UpdatePXCClusterParams contains all the parameters to send to the API endpoint - - for the update PXC cluster operation. - - Typically these are written to a http.Request. -*/ -type UpdatePXCClusterParams struct { - // Body. - Body UpdatePXCClusterBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update PXC cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePXCClusterParams) WithDefaults() *UpdatePXCClusterParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update PXC cluster params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdatePXCClusterParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update PXC cluster params -func (o *UpdatePXCClusterParams) WithTimeout(timeout time.Duration) *UpdatePXCClusterParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update PXC cluster params -func (o *UpdatePXCClusterParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update PXC cluster params -func (o *UpdatePXCClusterParams) WithContext(ctx context.Context) *UpdatePXCClusterParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update PXC cluster params -func (o *UpdatePXCClusterParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update PXC cluster params -func (o *UpdatePXCClusterParams) WithHTTPClient(client *http.Client) *UpdatePXCClusterParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update PXC cluster params -func (o *UpdatePXCClusterParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update PXC cluster params -func (o *UpdatePXCClusterParams) WithBody(body UpdatePXCClusterBody) *UpdatePXCClusterParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update PXC cluster params -func (o *UpdatePXCClusterParams) SetBody(body UpdatePXCClusterBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdatePXCClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_responses.go b/api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_responses.go deleted file mode 100644 index 592abcab9e..0000000000 --- a/api/managementpb/dbaas/json/client/pxc_clusters/update_pxc_cluster_responses.go +++ /dev/null @@ -1,1032 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pxc_clusters - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdatePXCClusterReader is a Reader for the UpdatePXCCluster structure. -type UpdatePXCClusterReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdatePXCClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdatePXCClusterOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUpdatePXCClusterDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUpdatePXCClusterOK creates a UpdatePXCClusterOK with default headers values -func NewUpdatePXCClusterOK() *UpdatePXCClusterOK { - return &UpdatePXCClusterOK{} -} - -/* -UpdatePXCClusterOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type UpdatePXCClusterOK struct { - Payload interface{} -} - -func (o *UpdatePXCClusterOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCCluster/Update][%d] updatePxcClusterOk %+v", 200, o.Payload) -} - -func (o *UpdatePXCClusterOK) GetPayload() interface{} { - return o.Payload -} - -func (o *UpdatePXCClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdatePXCClusterDefault creates a UpdatePXCClusterDefault with default headers values -func NewUpdatePXCClusterDefault(code int) *UpdatePXCClusterDefault { - return &UpdatePXCClusterDefault{ - _statusCode: code, - } -} - -/* -UpdatePXCClusterDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type UpdatePXCClusterDefault struct { - _statusCode int - - Payload *UpdatePXCClusterDefaultBody -} - -// Code gets the status code for the update PXC cluster default response -func (o *UpdatePXCClusterDefault) Code() int { - return o._statusCode -} - -func (o *UpdatePXCClusterDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/PXCCluster/Update][%d] UpdatePXCCluster default %+v", o._statusCode, o.Payload) -} - -func (o *UpdatePXCClusterDefault) GetPayload() *UpdatePXCClusterDefaultBody { - return o.Payload -} - -func (o *UpdatePXCClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdatePXCClusterDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -UpdatePXCClusterBody update PXC cluster body -swagger:model UpdatePXCClusterBody -*/ -type UpdatePXCClusterBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // PXC cluster name. - Name string `json:"name,omitempty"` - - // Make DB cluster accessible outside of K8s cluster. - Expose bool `json:"expose,omitempty"` - - // Make DB cluster accessible via public internet. - InternetFacing bool `json:"internet_facing,omitempty"` - - // Apply IP source ranges against the cluster. - SourceRanges []string `json:"source_ranges"` - - // params - Params *UpdatePXCClusterParamsBodyParams `json:"params,omitempty"` - - // template - Template *UpdatePXCClusterParamsBodyTemplate `json:"template,omitempty"` -} - -// Validate validates this update PXC cluster body -func (o *UpdatePXCClusterBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if err := o.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - if o.Params != nil { - if err := o.Params.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *UpdatePXCClusterBody) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(o.Template) { // not required - return nil - } - - if o.Template != nil { - if err := o.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PXC cluster body based on the context it is used -func (o *UpdatePXCClusterBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - if o.Params != nil { - if err := o.Params.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params") - } - return err - } - } - - return nil -} - -func (o *UpdatePXCClusterBody) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - if o.Template != nil { - if err := o.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterBody) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterDefaultBody update PXC cluster default body -swagger:model UpdatePXCClusterDefaultBody -*/ -type UpdatePXCClusterDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*UpdatePXCClusterDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this update PXC cluster default body -func (o *UpdatePXCClusterDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("UpdatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("UpdatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this update PXC cluster default body based on the context it is used -func (o *UpdatePXCClusterDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("UpdatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("UpdatePXCCluster default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterDefaultBody) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterDefaultBodyDetailsItems0 update PXC cluster default body details items0 -swagger:model UpdatePXCClusterDefaultBodyDetailsItems0 -*/ -type UpdatePXCClusterDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this update PXC cluster default body details items0 -func (o *UpdatePXCClusterDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PXC cluster default body details items0 based on context it is used -func (o *UpdatePXCClusterDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParams UpdatePXCClusterParams represents PXC cluster parameters that can be updated. -swagger:model UpdatePXCClusterParamsBodyParams -*/ -type UpdatePXCClusterParamsBodyParams struct { - // Cluster size. - ClusterSize int32 `json:"cluster_size,omitempty"` - - // Suspend cluster `pause: true`. - Suspend bool `json:"suspend,omitempty"` - - // Resume cluster `pause: false`. - Resume bool `json:"resume,omitempty"` - - // haproxy - Haproxy *UpdatePXCClusterParamsBodyParamsHaproxy `json:"haproxy,omitempty"` - - // proxysql - Proxysql *UpdatePXCClusterParamsBodyParamsProxysql `json:"proxysql,omitempty"` - - // pxc - PXC *UpdatePXCClusterParamsBodyParamsPXC `json:"pxc,omitempty"` -} - -// Validate validates this update PXC cluster params body params -func (o *UpdatePXCClusterParamsBodyParams) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateHaproxy(formats); err != nil { - res = append(res, err) - } - - if err := o.validateProxysql(formats); err != nil { - res = append(res, err) - } - - if err := o.validatePXC(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParams) validateHaproxy(formats strfmt.Registry) error { - if swag.IsZero(o.Haproxy) { // not required - return nil - } - - if o.Haproxy != nil { - if err := o.Haproxy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *UpdatePXCClusterParamsBodyParams) validateProxysql(formats strfmt.Registry) error { - if swag.IsZero(o.Proxysql) { // not required - return nil - } - - if o.Proxysql != nil { - if err := o.Proxysql.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *UpdatePXCClusterParamsBodyParams) validatePXC(formats strfmt.Registry) error { - if swag.IsZero(o.PXC) { // not required - return nil - } - - if o.PXC != nil { - if err := o.PXC.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PXC cluster params body params based on the context it is used -func (o *UpdatePXCClusterParamsBodyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateHaproxy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateProxysql(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidatePXC(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParams) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { - if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy") - } - return err - } - } - - return nil -} - -func (o *UpdatePXCClusterParamsBodyParams) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { - if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql") - } - return err - } - } - - return nil -} - -func (o *UpdatePXCClusterParamsBodyParams) contextValidatePXC(ctx context.Context, formats strfmt.Registry) error { - if o.PXC != nil { - if err := o.PXC.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParams) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParams) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParams - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParamsHaproxy HAProxy container parameters. -swagger:model UpdatePXCClusterParamsBodyParamsHaproxy -*/ -type UpdatePXCClusterParamsBodyParamsHaproxy struct { - // compute resources - ComputeResources *UpdatePXCClusterParamsBodyParamsHaproxyComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this update PXC cluster params body params haproxy -func (o *UpdatePXCClusterParamsBodyParamsHaproxy) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParamsHaproxy) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PXC cluster params body params haproxy based on the context it is used -func (o *UpdatePXCClusterParamsBodyParamsHaproxy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParamsHaproxy) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "haproxy" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsHaproxy) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsHaproxy) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParamsHaproxy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParamsHaproxyComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model UpdatePXCClusterParamsBodyParamsHaproxyComputeResources -*/ -type UpdatePXCClusterParamsBodyParamsHaproxyComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this update PXC cluster params body params haproxy compute resources -func (o *UpdatePXCClusterParamsBodyParamsHaproxyComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PXC cluster params body params haproxy compute resources based on context it is used -func (o *UpdatePXCClusterParamsBodyParamsHaproxyComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsHaproxyComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsHaproxyComputeResources) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParamsHaproxyComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParamsPXC PXC container parameters. -swagger:model UpdatePXCClusterParamsBodyParamsPXC -*/ -type UpdatePXCClusterParamsBodyParamsPXC struct { - // Image to use. If it's the same image but with different version tag, upgrade of database cluster to version - // in given tag is triggered. If entirely different image is given, error is returned. - Image string `json:"image,omitempty"` - - // Configuration for PXC cluster - Configuration string `json:"configuration,omitempty"` - - // Storage Class for PXC cluster. - StorageClass string `json:"storage_class,omitempty"` - - // compute resources - ComputeResources *UpdatePXCClusterParamsBodyParamsPXCComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this update PXC cluster params body params PXC -func (o *UpdatePXCClusterParamsBodyParamsPXC) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParamsPXC) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PXC cluster params body params PXC based on the context it is used -func (o *UpdatePXCClusterParamsBodyParamsPXC) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParamsPXC) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "pxc" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsPXC) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsPXC) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParamsPXC - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParamsPXCComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model UpdatePXCClusterParamsBodyParamsPXCComputeResources -*/ -type UpdatePXCClusterParamsBodyParamsPXCComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this update PXC cluster params body params PXC compute resources -func (o *UpdatePXCClusterParamsBodyParamsPXCComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PXC cluster params body params PXC compute resources based on context it is used -func (o *UpdatePXCClusterParamsBodyParamsPXCComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsPXCComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsPXCComputeResources) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParamsPXCComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParamsProxysql ProxySQL container parameters. -swagger:model UpdatePXCClusterParamsBodyParamsProxysql -*/ -type UpdatePXCClusterParamsBodyParamsProxysql struct { - // compute resources - ComputeResources *UpdatePXCClusterParamsBodyParamsProxysqlComputeResources `json:"compute_resources,omitempty"` -} - -// Validate validates this update PXC cluster params body params proxysql -func (o *UpdatePXCClusterParamsBodyParamsProxysql) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateComputeResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParamsProxysql) validateComputeResources(formats strfmt.Registry) error { - if swag.IsZero(o.ComputeResources) { // not required - return nil - } - - if o.ComputeResources != nil { - if err := o.ComputeResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update PXC cluster params body params proxysql based on the context it is used -func (o *UpdatePXCClusterParamsBodyParamsProxysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateComputeResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdatePXCClusterParamsBodyParamsProxysql) contextValidateComputeResources(ctx context.Context, formats strfmt.Registry) error { - if o.ComputeResources != nil { - if err := o.ComputeResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + "proxysql" + "." + "compute_resources") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsProxysql) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsProxysql) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParamsProxysql - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyParamsProxysqlComputeResources ComputeResources represents container computer resources requests or limits. -swagger:model UpdatePXCClusterParamsBodyParamsProxysqlComputeResources -*/ -type UpdatePXCClusterParamsBodyParamsProxysqlComputeResources struct { - // CPUs in milliCPUs; 1000m = 1 vCPU. - CPUm int32 `json:"cpu_m,omitempty"` - - // Memory in bytes. - MemoryBytes string `json:"memory_bytes,omitempty"` -} - -// Validate validates this update PXC cluster params body params proxysql compute resources -func (o *UpdatePXCClusterParamsBodyParamsProxysqlComputeResources) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PXC cluster params body params proxysql compute resources based on context it is used -func (o *UpdatePXCClusterParamsBodyParamsProxysqlComputeResources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsProxysqlComputeResources) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyParamsProxysqlComputeResources) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyParamsProxysqlComputeResources - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -UpdatePXCClusterParamsBodyTemplate update PXC cluster params body template -swagger:model UpdatePXCClusterParamsBodyTemplate -*/ -type UpdatePXCClusterParamsBodyTemplate struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this update PXC cluster params body template -func (o *UpdatePXCClusterParamsBodyTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this update PXC cluster params body template based on context it is used -func (o *UpdatePXCClusterParamsBodyTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyTemplate) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdatePXCClusterParamsBodyTemplate) UnmarshalBinary(b []byte) error { - var res UpdatePXCClusterParamsBodyTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/templates/list_templates_parameters.go b/api/managementpb/dbaas/json/client/templates/list_templates_parameters.go deleted file mode 100644 index 1c089951ab..0000000000 --- a/api/managementpb/dbaas/json/client/templates/list_templates_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package templates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListTemplatesParams creates a new ListTemplatesParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListTemplatesParams() *ListTemplatesParams { - return &ListTemplatesParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListTemplatesParamsWithTimeout creates a new ListTemplatesParams object -// with the ability to set a timeout on a request. -func NewListTemplatesParamsWithTimeout(timeout time.Duration) *ListTemplatesParams { - return &ListTemplatesParams{ - timeout: timeout, - } -} - -// NewListTemplatesParamsWithContext creates a new ListTemplatesParams object -// with the ability to set a context for a request. -func NewListTemplatesParamsWithContext(ctx context.Context) *ListTemplatesParams { - return &ListTemplatesParams{ - Context: ctx, - } -} - -// NewListTemplatesParamsWithHTTPClient creates a new ListTemplatesParams object -// with the ability to set a custom HTTPClient for a request. -func NewListTemplatesParamsWithHTTPClient(client *http.Client) *ListTemplatesParams { - return &ListTemplatesParams{ - HTTPClient: client, - } -} - -/* -ListTemplatesParams contains all the parameters to send to the API endpoint - - for the list templates operation. - - Typically these are written to a http.Request. -*/ -type ListTemplatesParams struct { - // Body. - Body ListTemplatesBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list templates params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTemplatesParams) WithDefaults() *ListTemplatesParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list templates params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListTemplatesParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list templates params -func (o *ListTemplatesParams) WithTimeout(timeout time.Duration) *ListTemplatesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list templates params -func (o *ListTemplatesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list templates params -func (o *ListTemplatesParams) WithContext(ctx context.Context) *ListTemplatesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list templates params -func (o *ListTemplatesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list templates params -func (o *ListTemplatesParams) WithHTTPClient(client *http.Client) *ListTemplatesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list templates params -func (o *ListTemplatesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list templates params -func (o *ListTemplatesParams) WithBody(body ListTemplatesBody) *ListTemplatesParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list templates params -func (o *ListTemplatesParams) SetBody(body ListTemplatesBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/managementpb/dbaas/json/client/templates/list_templates_responses.go b/api/managementpb/dbaas/json/client/templates/list_templates_responses.go deleted file mode 100644 index 38746d2456..0000000000 --- a/api/managementpb/dbaas/json/client/templates/list_templates_responses.go +++ /dev/null @@ -1,499 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package templates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ListTemplatesReader is a Reader for the ListTemplates structure. -type ListTemplatesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListTemplatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListTemplatesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListTemplatesDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListTemplatesOK creates a ListTemplatesOK with default headers values -func NewListTemplatesOK() *ListTemplatesOK { - return &ListTemplatesOK{} -} - -/* -ListTemplatesOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListTemplatesOK struct { - Payload *ListTemplatesOKBody -} - -func (o *ListTemplatesOK) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Templates/List][%d] listTemplatesOk %+v", 200, o.Payload) -} - -func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody { - return o.Payload -} - -func (o *ListTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListTemplatesOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListTemplatesDefault creates a ListTemplatesDefault with default headers values -func NewListTemplatesDefault(code int) *ListTemplatesDefault { - return &ListTemplatesDefault{ - _statusCode: code, - } -} - -/* -ListTemplatesDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListTemplatesDefault struct { - _statusCode int - - Payload *ListTemplatesDefaultBody -} - -// Code gets the status code for the list templates default response -func (o *ListTemplatesDefault) Code() int { - return o._statusCode -} - -func (o *ListTemplatesDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/DBaaS/Templates/List][%d] ListTemplates default %+v", o._statusCode, o.Payload) -} - -func (o *ListTemplatesDefault) GetPayload() *ListTemplatesDefaultBody { - return o.Payload -} - -func (o *ListTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListTemplatesDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListTemplatesBody list templates body -swagger:model ListTemplatesBody -*/ -type ListTemplatesBody struct { - // Kubernetes cluster name. - KubernetesClusterName string `json:"kubernetes_cluster_name,omitempty"` - - // DBClusterType represents database cluster type. - // - // - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type. - // - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type. - // - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type. - // Enum: [DB_CLUSTER_TYPE_INVALID DB_CLUSTER_TYPE_PXC DB_CLUSTER_TYPE_PSMDB] - ClusterType *string `json:"cluster_type,omitempty"` -} - -// Validate validates this list templates body -func (o *ListTemplatesBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateClusterType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listTemplatesBodyTypeClusterTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["DB_CLUSTER_TYPE_INVALID","DB_CLUSTER_TYPE_PXC","DB_CLUSTER_TYPE_PSMDB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listTemplatesBodyTypeClusterTypePropEnum = append(listTemplatesBodyTypeClusterTypePropEnum, v) - } -} - -const ( - - // ListTemplatesBodyClusterTypeDBCLUSTERTYPEINVALID captures enum value "DB_CLUSTER_TYPE_INVALID" - ListTemplatesBodyClusterTypeDBCLUSTERTYPEINVALID string = "DB_CLUSTER_TYPE_INVALID" - - // ListTemplatesBodyClusterTypeDBCLUSTERTYPEPXC captures enum value "DB_CLUSTER_TYPE_PXC" - ListTemplatesBodyClusterTypeDBCLUSTERTYPEPXC string = "DB_CLUSTER_TYPE_PXC" - - // ListTemplatesBodyClusterTypeDBCLUSTERTYPEPSMDB captures enum value "DB_CLUSTER_TYPE_PSMDB" - ListTemplatesBodyClusterTypeDBCLUSTERTYPEPSMDB string = "DB_CLUSTER_TYPE_PSMDB" -) - -// prop value enum -func (o *ListTemplatesBody) validateClusterTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listTemplatesBodyTypeClusterTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListTemplatesBody) validateClusterType(formats strfmt.Registry) error { - if swag.IsZero(o.ClusterType) { // not required - return nil - } - - // value enum - if err := o.validateClusterTypeEnum("body"+"."+"cluster_type", "body", *o.ClusterType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list templates body based on context it is used -func (o *ListTemplatesBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListTemplatesBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListTemplatesBody) UnmarshalBinary(b []byte) error { - var res ListTemplatesBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListTemplatesDefaultBody list templates default body -swagger:model ListTemplatesDefaultBody -*/ -type ListTemplatesDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListTemplatesDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list templates default body -func (o *ListTemplatesDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListTemplatesDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListTemplates default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListTemplates default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list templates default body based on the context it is used -func (o *ListTemplatesDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListTemplates default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListTemplates default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListTemplatesDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListTemplatesDefaultBody) UnmarshalBinary(b []byte) error { - var res ListTemplatesDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListTemplatesDefaultBodyDetailsItems0 list templates default body details items0 -swagger:model ListTemplatesDefaultBodyDetailsItems0 -*/ -type ListTemplatesDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list templates default body details items0 -func (o *ListTemplatesDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list templates default body details items0 based on context it is used -func (o *ListTemplatesDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListTemplatesDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListTemplatesDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListTemplatesOKBody list templates OK body -swagger:model ListTemplatesOKBody -*/ -type ListTemplatesOKBody struct { - // templates - Templates []*ListTemplatesOKBodyTemplatesItems0 `json:"templates"` -} - -// Validate validates this list templates OK body -func (o *ListTemplatesOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateTemplates(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListTemplatesOKBody) validateTemplates(formats strfmt.Registry) error { - if swag.IsZero(o.Templates) { // not required - return nil - } - - for i := 0; i < len(o.Templates); i++ { - if swag.IsZero(o.Templates[i]) { // not required - continue - } - - if o.Templates[i] != nil { - if err := o.Templates[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listTemplatesOk" + "." + "templates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listTemplatesOk" + "." + "templates" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list templates OK body based on the context it is used -func (o *ListTemplatesOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateTemplates(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Templates); i++ { - if o.Templates[i] != nil { - if err := o.Templates[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listTemplatesOk" + "." + "templates" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listTemplatesOk" + "." + "templates" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListTemplatesOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListTemplatesOKBody) UnmarshalBinary(b []byte) error { - var res ListTemplatesOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListTemplatesOKBodyTemplatesItems0 list templates OK body templates items0 -swagger:model ListTemplatesOKBodyTemplatesItems0 -*/ -type ListTemplatesOKBodyTemplatesItems0 struct { - // Template CR name. - Name string `json:"name,omitempty"` - - // Template CR kind. - Kind string `json:"kind,omitempty"` -} - -// Validate validates this list templates OK body templates items0 -func (o *ListTemplatesOKBodyTemplatesItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list templates OK body templates items0 based on context it is used -func (o *ListTemplatesOKBodyTemplatesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListTemplatesOKBodyTemplatesItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListTemplatesOKBodyTemplatesItems0) UnmarshalBinary(b []byte) error { - var res ListTemplatesOKBodyTemplatesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/managementpb/dbaas/json/client/templates/templates_client.go b/api/managementpb/dbaas/json/client/templates/templates_client.go deleted file mode 100644 index a26de103cd..0000000000 --- a/api/managementpb/dbaas/json/client/templates/templates_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package templates - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new templates API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for templates API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - ListTemplates(params *ListTemplatesParams, opts ...ClientOption) (*ListTemplatesOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -ListTemplates lists templates returns a list of all registered templates -*/ -func (a *Client) ListTemplates(params *ListTemplatesParams, opts ...ClientOption) (*ListTemplatesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListTemplatesParams() - } - op := &runtime.ClientOperation{ - ID: "ListTemplates", - Method: "POST", - PathPattern: "/v1/management/DBaaS/Templates/List", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &ListTemplatesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListTemplatesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListTemplatesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/managementpb/dbaas/json/dbaas.json b/api/managementpb/dbaas/json/dbaas.json deleted file mode 100644 index 2dc661b9c2..0000000000 --- a/api/managementpb/dbaas/json/dbaas.json +++ /dev/null @@ -1,5187 +0,0 @@ -{ - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "https", - "http" - ], - "swagger": "2.0", - "info": { - "title": "PMM DBaaS API", - "version": "v1beta1" - }, - "paths": { - "/v1/management/DBaaS/Backups/List": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "ListS3Backups lists backups stored on s3.", - "operationId": "ListS3Backups", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "location_id": { - "type": "string", - "title": "Backup Location ID to list backups from", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "backups": { - "description": "Backup list.", - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "description": "Key of a filename on s3.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/ChangePSMDB": { - "post": { - "tags": [ - "Components" - ], - "summary": "ChangePSMDBComponents manages PSMDB related components.", - "operationId": "ChangePSMDBComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "mongod": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - }, - "version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/ChangePXC": { - "post": { - "tags": [ - "Components" - ], - "summary": "ChangePXCComponents manages PXC related components.", - "operationId": "ChangePXCComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "haproxy": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - }, - "version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "proxysql": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - }, - "version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "pxc": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - }, - "version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/CheckForOperatorUpdate": { - "post": { - "tags": [ - "Components" - ], - "summary": "CheckForOperatorUpdate checks if a new version of an operator is available.", - "operationId": "CheckForOperatorUpdate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "cluster_to_components": { - "description": "The cluster name is used as a key for this map, value contains components and their inforamtion about update.", - "type": "object", - "additionalProperties": { - "description": "ComponentsUpdateInformation contains info about components and their available latest versions.", - "type": "object", - "properties": { - "component_to_update_information": { - "description": "component_to_update_information stores, under the name of the component, information about the update.\n\"pxc-operator\", \"psmdb-operator\" are names used by backend for our operators.", - "type": "object", - "additionalProperties": { - "description": "ComponentUpdateInformation contains version we can update to for certain component.", - "type": "object", - "properties": { - "available_version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/GetPSMDB": { - "post": { - "tags": [ - "Components" - ], - "summary": "GetPSMDBComponents returns list of available components for PSMDB Clusters.", - "operationId": "GetPSMDBComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "db_version": { - "description": "Version of DB.", - "type": "string", - "x-order": 1 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "description": "OperatorVersion contains information about operator and components matrix.", - "type": "object", - "properties": { - "matrix": { - "description": "Matrix contains all available components.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 5 - }, - "haproxy": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 4 - }, - "log_collector": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 7 - }, - "mongod": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 0 - }, - "operator": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 6 - }, - "pmm": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 2 - }, - "proxysql": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 3 - }, - "pxc": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "operator": { - "type": "string", - "x-order": 1 - }, - "product": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/GetPXC": { - "post": { - "tags": [ - "Components" - ], - "summary": "GetPXCComponents returns list of available components for PXC Clusters.", - "operationId": "GetPXCComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "db_version": { - "description": "Version of DB.", - "type": "string", - "x-order": 1 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "description": "OperatorVersion contains information about operator and components matrix.", - "type": "object", - "properties": { - "matrix": { - "description": "Matrix contains all available components.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 5 - }, - "haproxy": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 4 - }, - "log_collector": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 7 - }, - "mongod": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 0 - }, - "operator": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 6 - }, - "pmm": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 2 - }, - "proxysql": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 3 - }, - "pxc": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "image_path": { - "type": "string", - "x-order": 0 - }, - "status": { - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "operator": { - "type": "string", - "x-order": 1 - }, - "product": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/InstallOperator": { - "post": { - "tags": [ - "Components" - ], - "summary": "InstallOperator installs given operator in given version.", - "operationId": "InstallOperator", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "operator_type": { - "description": "operator_type tells what operator we are interested in updating.", - "type": "string", - "x-order": 1 - }, - "version": { - "description": "version tells what version of the operator we should update to.", - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Delete": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "DeleteDBCluster deletes DB cluster.", - "operationId": "DeleteDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 2 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Get": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "GetDBCluster returns parameters used to create a database cluster", - "operationId": "GetDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "psmdb_cluster": { - "description": "PSMDBCluster represents PSMDB cluster information.", - "type": "object", - "properties": { - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed PSMDB image.", - "type": "string", - "x-order": 5 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 11 - } - }, - "x-order": 1 - }, - "pxc_cluster": { - "description": "PXCCluster represents PXC cluster information.", - "type": "object", - "properties": { - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed XtraDB image.", - "type": "string", - "x-order": 5 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 2 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 11 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/List": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "ListDBClusters returns a list of DB clusters.", - "operationId": "ListDBClusters", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "psmdb_clusters": { - "description": "PSMDB clusters information.", - "type": "array", - "items": { - "description": "PSMDBCluster represents PSMDB cluster information.", - "type": "object", - "properties": { - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed PSMDB image.", - "type": "string", - "x-order": 5 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 11 - } - } - }, - "x-order": 1 - }, - "pxc_clusters": { - "description": "PXC clusters information.", - "type": "array", - "items": { - "description": "PXCCluster represents PXC cluster information.", - "type": "object", - "properties": { - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed XtraDB image.", - "type": "string", - "x-order": 5 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 2 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 11 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Restart": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "RestartDBCluster restarts DB cluster.", - "operationId": "RestartDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 2 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/GetLogs": { - "post": { - "tags": [ - "LogsAPI" - ], - "summary": "GetLogs gets all logs from db cluster.", - "operationId": "GetLogs", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "cluster_name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "logs": { - "description": "Log represents list of logs. Each entry contains either container's logs or,\nwhen container field is empty, pod's events.", - "type": "array", - "items": { - "description": "Logs contain logs for certain pod's container. If container is an empty\nstring, logs contain pod's events.", - "type": "object", - "properties": { - "container": { - "description": "Container name.", - "type": "string", - "x-order": 1 - }, - "logs": { - "description": "Content of container's log or pod's events.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 2 - }, - "pod": { - "description": "Pod name.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Get": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "GetKubernetesCluster return KubeAuth with Kubernetes config.", - "operationId": "GetKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "kube_auth": { - "description": "KubeAuth represents Kubernetes / kubectl authentication and authorization information.", - "type": "object", - "properties": { - "kubeconfig": { - "description": "Kubeconfig file content.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/List": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "ListKubernetesClusters returns a list of all registered Kubernetes clusters.", - "operationId": "ListKubernetesClusters", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "kubernetes_clusters": { - "description": "Kubernetes clusters.", - "type": "array", - "items": { - "description": "Cluster contains public info about Kubernetes cluster.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "operators": { - "description": "Operators contains list of operators installed in Kubernetes cluster.", - "type": "object", - "properties": { - "dbaas": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 2 - }, - "psmdb": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 1 - }, - "pxc": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 1 - }, - "status": { - "description": "KubernetesClusterStatus defines status of Kubernetes cluster.\n\n - KUBERNETES_CLUSTER_STATUS_INVALID: KUBERNETES_CLUSTER_STATUS_INVALID represents unknown state.\n - KUBERNETES_CLUSTER_STATUS_OK: KUBERNETES_CLUSTER_STATUS_OK represents that Kubernetes cluster is accessible.\n - KUBERNETES_CLUSTER_STATUS_UNAVAILABLE: KUBERNETES_CLUSTER_STATUS_UNAVAILABLE represents that Kubernetes cluster is not accessible.\n - KUBERNETES_CLUSTER_STATUS_PROVISIONING: KUBERNETES_CLUSTER_STATUS_PROVISIONING represents that Kubernetes cluster is privisioning.", - "type": "string", - "default": "KUBERNETES_CLUSTER_STATUS_INVALID", - "enum": [ - "KUBERNETES_CLUSTER_STATUS_INVALID", - "KUBERNETES_CLUSTER_STATUS_OK", - "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE", - "KUBERNETES_CLUSTER_STATUS_PROVISIONING" - ], - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Register": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM.", - "operationId": "RegisterKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "aws_access_key_id": { - "description": "AWS access key id, only needed when registering EKS cluster and kubeconfig does not contain it.", - "type": "string", - "x-order": 2 - }, - "aws_secret_access_key": { - "description": "AWS secret access key, only needed when registering EKS cluster and kubeconfig does not contain it.", - "type": "string", - "x-order": 3 - }, - "kube_auth": { - "description": "KubeAuth represents Kubernetes / kubectl authentication and authorization information.", - "type": "object", - "properties": { - "kubeconfig": { - "description": "Kubeconfig file content.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 1 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Resources/Get": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "GetResources returns all and available resources of a Kubernetes cluster.\nNOTE: The user defined in kubeconfig for the cluster has to have rights to\n list and get Pods from all Namespaces. Also getting and listing Nodes\n has to be allowed.", - "operationId": "GetResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "all": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - } - }, - "x-order": 0 - }, - "available": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/StorageClasses/List": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster.", - "operationId": "ListStorageClasses", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "storage_classes": { - "description": "Kubernetes storage classes names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Unregister": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM.", - "operationId": "UnregisterKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "force": { - "description": "If true then Kubernetes cluster will be deleted\neven if it contains database clusters.", - "type": "boolean", - "x-order": 1 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Create": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "CreatePSMDBCluster creates a new PSMDB cluster.", - "operationId": "CreatePSMDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "PSMDB cluster name.\na DNS-1035 label must consist of lower case alphanumeric characters or '-',\nstart with an alphabetic character, and end with an alphanumeric character\n(e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')", - "x-order": 1 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 2 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Resources/Get": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "GetPSMDBClusterResources returns expected resources to be consumed by the cluster.", - "operationId": "GetPSMDBClusterResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "expected": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Update": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "UpdatePSMDBCluster updates existing PSMDB cluster.", - "operationId": "UpdatePSMDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PSMDB cluster name.", - "type": "string", - "x-order": 1 - }, - "params": { - "description": "UpdatePSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "image": { - "description": "PSMDB image to use. If it's the same image but with different version tag, upgrade of database cluster to version\nin given tag is triggered. If entirely different image is given, error is returned.", - "type": "string", - "x-order": 4 - }, - "replicaset": { - "description": "ReplicaSet container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 1 - }, - "resume": { - "description": "Resume cluster `pause: false`.", - "type": "boolean", - "x-order": 3 - }, - "suspend": { - "description": "Suspend cluster `pause: true`.", - "type": "boolean", - "x-order": 2 - } - }, - "x-order": 2 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBClusters/GetCredentials": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name.", - "operationId": "GetPSMDBClusterCredentials", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PSMDB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "connection_credentials": { - "description": "PSMDBCredentials is a credentials to connect to PSMDB.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "host": { - "description": "MongoDB host.", - "type": "string", - "x-order": 2 - }, - "password": { - "description": "MongoDB password.", - "type": "string", - "x-order": 1 - }, - "port": { - "description": "MongoDB port.", - "type": "integer", - "format": "int32", - "x-order": 3 - }, - "replicaset": { - "description": "Replicaset name.", - "type": "string", - "x-order": 4 - }, - "username": { - "description": "MongoDB username.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Create": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "CreatePXCCluster creates a new PXC cluster.", - "operationId": "CreatePXCCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "PXC cluster name.\na DNS-1035 label must consist of lower case alphanumeric characters or '-',\nstart with an alphabetic character, and end with an alphanumeric character\n(e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')", - "x-order": 1 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 2 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 2 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Resources/Get": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "GetPXCClusterResources returns expected resources to be consumed by the cluster.", - "operationId": "GetPXCClusterResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 3 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 2 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "expected": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Update": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "UpdatePXCCluster updates existing PXC cluster.", - "operationId": "UpdatePXCCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - }, - "params": { - "description": "UpdatePXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "haproxy": { - "description": "HAProxy container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 5 - }, - "proxysql": { - "description": "ProxySQL container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 2 - }, - "pxc": { - "description": "PXC container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 2 - }, - "image": { - "description": "Image to use. If it's the same image but with different version tag, upgrade of database cluster to version\nin given tag is triggered. If entirely different image is given, error is returned.", - "type": "string", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "resume": { - "description": "Resume cluster `pause: false`.", - "type": "boolean", - "x-order": 4 - }, - "suspend": { - "description": "Suspend cluster `pause: true`.", - "type": "boolean", - "x-order": 3 - } - }, - "x-order": 2 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCClusters/GetCredentials": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "GetPXCClusterCredentials returns a PXC cluster credentials by cluster name.", - "operationId": "GetPXCClusterCredentials", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "connection_credentials": { - "description": "PXCClusterConnectionCredentials is cluster connection credentials.", - "type": "object", - "properties": { - "host": { - "description": "PXC host.", - "type": "string", - "x-order": 2 - }, - "password": { - "description": "PXC password.", - "type": "string", - "x-order": 1 - }, - "port": { - "description": "PXC port.", - "type": "integer", - "format": "int32", - "x-order": 3 - }, - "username": { - "description": "PXC username.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Secrets/List": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "ListSecrets returns a list of secrets from k8s", - "operationId": "ListSecrets", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "secrets": { - "description": "Secret list.", - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name of a secret", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Templates/List": { - "post": { - "tags": [ - "Templates" - ], - "summary": "ListTemplates returns a list of all registered templates.", - "operationId": "ListTemplates", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 1 - }, - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - }, - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - } - }, - "tags": [ - { - "name": "Components" - }, - { - "name": "DBClusters" - }, - { - "name": "Kubernetes" - }, - { - "name": "LogsAPI" - }, - { - "name": "PSMDBClusters" - }, - { - "name": "PXCClusters" - }, - { - "name": "Templates" - } - ] -} \ No newline at end of file diff --git a/api/managementpb/dbaas/json/header.json b/api/managementpb/dbaas/json/header.json deleted file mode 100644 index 38cb8b73ce..0000000000 --- a/api/managementpb/dbaas/json/header.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "PMM DBaaS API", - "version": "v1beta1" - }, - "schemes": [ - "https", - "http" - ] -} diff --git a/api/managementpb/dbaas/kubernetes.pb.go b/api/managementpb/dbaas/kubernetes.pb.go deleted file mode 100644 index 9151332ae2..0000000000 --- a/api/managementpb/dbaas/kubernetes.pb.go +++ /dev/null @@ -1,1411 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/kubernetes.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// KubernetesClusterStatus defines status of Kubernetes cluster. -type KubernetesClusterStatus int32 - -const ( - // KUBERNETES_CLUSTER_STATUS_INVALID represents unknown state. - KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_INVALID KubernetesClusterStatus = 0 - // KUBERNETES_CLUSTER_STATUS_OK represents that Kubernetes cluster is accessible. - KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_OK KubernetesClusterStatus = 1 - // KUBERNETES_CLUSTER_STATUS_UNAVAILABLE represents that Kubernetes cluster is not accessible. - KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_UNAVAILABLE KubernetesClusterStatus = 2 - // KUBERNETES_CLUSTER_STATUS_PROVISIONING represents that Kubernetes cluster is privisioning. - KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_PROVISIONING KubernetesClusterStatus = 4 -) - -// Enum value maps for KubernetesClusterStatus. -var ( - KubernetesClusterStatus_name = map[int32]string{ - 0: "KUBERNETES_CLUSTER_STATUS_INVALID", - 1: "KUBERNETES_CLUSTER_STATUS_OK", - 2: "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE", - 4: "KUBERNETES_CLUSTER_STATUS_PROVISIONING", - } - KubernetesClusterStatus_value = map[string]int32{ - "KUBERNETES_CLUSTER_STATUS_INVALID": 0, - "KUBERNETES_CLUSTER_STATUS_OK": 1, - "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE": 2, - "KUBERNETES_CLUSTER_STATUS_PROVISIONING": 4, - } -) - -func (x KubernetesClusterStatus) Enum() *KubernetesClusterStatus { - p := new(KubernetesClusterStatus) - *p = x - return p -} - -func (x KubernetesClusterStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (KubernetesClusterStatus) Descriptor() protoreflect.EnumDescriptor { - return file_managementpb_dbaas_kubernetes_proto_enumTypes[0].Descriptor() -} - -func (KubernetesClusterStatus) Type() protoreflect.EnumType { - return &file_managementpb_dbaas_kubernetes_proto_enumTypes[0] -} - -func (x KubernetesClusterStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use KubernetesClusterStatus.Descriptor instead. -func (KubernetesClusterStatus) EnumDescriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{0} -} - -// KubeAuth represents Kubernetes / kubectl authentication and authorization information. -type KubeAuth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubeconfig file content. - Kubeconfig string `protobuf:"bytes,1,opt,name=kubeconfig,proto3" json:"kubeconfig,omitempty"` -} - -func (x *KubeAuth) Reset() { - *x = KubeAuth{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KubeAuth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KubeAuth) ProtoMessage() {} - -func (x *KubeAuth) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 KubeAuth.ProtoReflect.Descriptor instead. -func (*KubeAuth) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{0} -} - -func (x *KubeAuth) GetKubeconfig() string { - if x != nil { - return x.Kubeconfig - } - return "" -} - -// Operator contains all information about operator installed in Kubernetes cluster. -type Operator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status OperatorsStatus `protobuf:"varint,1,opt,name=status,proto3,enum=dbaas.v1beta1.OperatorsStatus" json:"status,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *Operator) Reset() { - *x = Operator{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Operator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Operator) ProtoMessage() {} - -func (x *Operator) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 Operator.ProtoReflect.Descriptor instead. -func (*Operator) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{1} -} - -func (x *Operator) GetStatus() OperatorsStatus { - if x != nil { - return x.Status - } - return OperatorsStatus_OPERATORS_STATUS_INVALID -} - -func (x *Operator) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -// Operators contains list of operators installed in Kubernetes cluster. -type Operators struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Percona PXC Cluster Operator. - Pxc *Operator `protobuf:"bytes,1,opt,name=pxc,proto3" json:"pxc,omitempty"` - // Percona Server for MongoDB Operator. - Psmdb *Operator `protobuf:"bytes,2,opt,name=psmdb,proto3" json:"psmdb,omitempty"` - // DBaaS operator. - Dbaas *Operator `protobuf:"bytes,3,opt,name=dbaas,proto3" json:"dbaas,omitempty"` -} - -func (x *Operators) Reset() { - *x = Operators{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Operators) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Operators) ProtoMessage() {} - -func (x *Operators) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 Operators.ProtoReflect.Descriptor instead. -func (*Operators) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{2} -} - -func (x *Operators) GetPxc() *Operator { - if x != nil { - return x.Pxc - } - return nil -} - -func (x *Operators) GetPsmdb() *Operator { - if x != nil { - return x.Psmdb - } - return nil -} - -func (x *Operators) GetDbaas() *Operator { - if x != nil { - return x.Dbaas - } - return nil -} - -type ListKubernetesClustersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListKubernetesClustersRequest) Reset() { - *x = ListKubernetesClustersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKubernetesClustersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKubernetesClustersRequest) ProtoMessage() {} - -func (x *ListKubernetesClustersRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 ListKubernetesClustersRequest.ProtoReflect.Descriptor instead. -func (*ListKubernetesClustersRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{3} -} - -type ListKubernetesClustersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes clusters. - KubernetesClusters []*ListKubernetesClustersResponse_Cluster `protobuf:"bytes,1,rep,name=kubernetes_clusters,json=kubernetesClusters,proto3" json:"kubernetes_clusters,omitempty"` -} - -func (x *ListKubernetesClustersResponse) Reset() { - *x = ListKubernetesClustersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKubernetesClustersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKubernetesClustersResponse) ProtoMessage() {} - -func (x *ListKubernetesClustersResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 ListKubernetesClustersResponse.ProtoReflect.Descriptor instead. -func (*ListKubernetesClustersResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{4} -} - -func (x *ListKubernetesClustersResponse) GetKubernetesClusters() []*ListKubernetesClustersResponse_Cluster { - if x != nil { - return x.KubernetesClusters - } - return nil -} - -type RegisterKubernetesClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // Kubernetes auth. - KubeAuth *KubeAuth `protobuf:"bytes,2,opt,name=kube_auth,json=kubeAuth,proto3" json:"kube_auth,omitempty"` - // AWS access key id, only needed when registering EKS cluster and kubeconfig does not contain it. - AwsAccessKeyId string `protobuf:"bytes,3,opt,name=aws_access_key_id,json=awsAccessKeyId,proto3" json:"aws_access_key_id,omitempty"` - // AWS secret access key, only needed when registering EKS cluster and kubeconfig does not contain it. - AwsSecretAccessKey string `protobuf:"bytes,4,opt,name=aws_secret_access_key,json=awsSecretAccessKey,proto3" json:"aws_secret_access_key,omitempty"` -} - -func (x *RegisterKubernetesClusterRequest) Reset() { - *x = RegisterKubernetesClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterKubernetesClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterKubernetesClusterRequest) ProtoMessage() {} - -func (x *RegisterKubernetesClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 RegisterKubernetesClusterRequest.ProtoReflect.Descriptor instead. -func (*RegisterKubernetesClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{5} -} - -func (x *RegisterKubernetesClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *RegisterKubernetesClusterRequest) GetKubeAuth() *KubeAuth { - if x != nil { - return x.KubeAuth - } - return nil -} - -func (x *RegisterKubernetesClusterRequest) GetAwsAccessKeyId() string { - if x != nil { - return x.AwsAccessKeyId - } - return "" -} - -func (x *RegisterKubernetesClusterRequest) GetAwsSecretAccessKey() string { - if x != nil { - return x.AwsSecretAccessKey - } - return "" -} - -type RegisterKubernetesClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RegisterKubernetesClusterResponse) Reset() { - *x = RegisterKubernetesClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterKubernetesClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterKubernetesClusterResponse) ProtoMessage() {} - -func (x *RegisterKubernetesClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 RegisterKubernetesClusterResponse.ProtoReflect.Descriptor instead. -func (*RegisterKubernetesClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{6} -} - -type UnregisterKubernetesClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // If true then Kubernetes cluster will be deleted - // even if it contains database clusters. - Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` -} - -func (x *UnregisterKubernetesClusterRequest) Reset() { - *x = UnregisterKubernetesClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnregisterKubernetesClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnregisterKubernetesClusterRequest) ProtoMessage() {} - -func (x *UnregisterKubernetesClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 UnregisterKubernetesClusterRequest.ProtoReflect.Descriptor instead. -func (*UnregisterKubernetesClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{7} -} - -func (x *UnregisterKubernetesClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *UnregisterKubernetesClusterRequest) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -type UnregisterKubernetesClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UnregisterKubernetesClusterResponse) Reset() { - *x = UnregisterKubernetesClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnregisterKubernetesClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnregisterKubernetesClusterResponse) ProtoMessage() {} - -func (x *UnregisterKubernetesClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 UnregisterKubernetesClusterResponse.ProtoReflect.Descriptor instead. -func (*UnregisterKubernetesClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{8} -} - -type GetKubernetesClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` -} - -func (x *GetKubernetesClusterRequest) Reset() { - *x = GetKubernetesClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetKubernetesClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetKubernetesClusterRequest) ProtoMessage() {} - -func (x *GetKubernetesClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 GetKubernetesClusterRequest.ProtoReflect.Descriptor instead. -func (*GetKubernetesClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{9} -} - -func (x *GetKubernetesClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -type GetKubernetesClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes auth. - KubeAuth *KubeAuth `protobuf:"bytes,1,opt,name=kube_auth,json=kubeAuth,proto3" json:"kube_auth,omitempty"` -} - -func (x *GetKubernetesClusterResponse) Reset() { - *x = GetKubernetesClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetKubernetesClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetKubernetesClusterResponse) ProtoMessage() {} - -func (x *GetKubernetesClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 GetKubernetesClusterResponse.ProtoReflect.Descriptor instead. -func (*GetKubernetesClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{10} -} - -func (x *GetKubernetesClusterResponse) GetKubeAuth() *KubeAuth { - if x != nil { - return x.KubeAuth - } - return nil -} - -type GetResourcesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` -} - -func (x *GetResourcesRequest) Reset() { - *x = GetResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourcesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourcesRequest) ProtoMessage() {} - -func (x *GetResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 GetResourcesRequest.ProtoReflect.Descriptor instead. -func (*GetResourcesRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{11} -} - -func (x *GetResourcesRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -type GetResourcesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The total amount of resources of the Kubernetes cluster. - All *Resources `protobuf:"bytes,1,opt,name=all,proto3" json:"all,omitempty"` - // The amount of resources that is available for consumption by future Kubernetes workloads. - Available *Resources `protobuf:"bytes,2,opt,name=available,proto3" json:"available,omitempty"` -} - -func (x *GetResourcesResponse) Reset() { - *x = GetResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourcesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourcesResponse) ProtoMessage() {} - -func (x *GetResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 GetResourcesResponse.ProtoReflect.Descriptor instead. -func (*GetResourcesResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{12} -} - -func (x *GetResourcesResponse) GetAll() *Resources { - if x != nil { - return x.All - } - return nil -} - -func (x *GetResourcesResponse) GetAvailable() *Resources { - if x != nil { - return x.Available - } - return nil -} - -type ListStorageClassesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` -} - -func (x *ListStorageClassesRequest) Reset() { - *x = ListStorageClassesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListStorageClassesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStorageClassesRequest) ProtoMessage() {} - -func (x *ListStorageClassesRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 ListStorageClassesRequest.ProtoReflect.Descriptor instead. -func (*ListStorageClassesRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{13} -} - -func (x *ListStorageClassesRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -type ListStorageClassesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes storage classes names. - StorageClasses []string `protobuf:"bytes,1,rep,name=storage_classes,json=storageClasses,proto3" json:"storage_classes,omitempty"` -} - -func (x *ListStorageClassesResponse) Reset() { - *x = ListStorageClassesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListStorageClassesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListStorageClassesResponse) ProtoMessage() {} - -func (x *ListStorageClassesResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 ListStorageClassesResponse.ProtoReflect.Descriptor instead. -func (*ListStorageClassesResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{14} -} - -func (x *ListStorageClassesResponse) GetStorageClasses() []string { - if x != nil { - return x.StorageClasses - } - return nil -} - -// Cluster contains public info about Kubernetes cluster. -// TODO Do not use inner messages in all public APIs (for consistency). -type ListKubernetesClustersResponse_Cluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // Installed operators. - Operators *Operators `protobuf:"bytes,2,opt,name=operators,proto3" json:"operators,omitempty"` - // Status of Kubernetes cluster. - Status KubernetesClusterStatus `protobuf:"varint,3,opt,name=status,proto3,enum=dbaas.v1beta1.KubernetesClusterStatus" json:"status,omitempty"` -} - -func (x *ListKubernetesClustersResponse_Cluster) Reset() { - *x = ListKubernetesClustersResponse_Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_kubernetes_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKubernetesClustersResponse_Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKubernetesClustersResponse_Cluster) ProtoMessage() {} - -func (x *ListKubernetesClustersResponse_Cluster) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_kubernetes_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 ListKubernetesClustersResponse_Cluster.ProtoReflect.Descriptor instead. -func (*ListKubernetesClustersResponse_Cluster) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_kubernetes_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *ListKubernetesClustersResponse_Cluster) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *ListKubernetesClustersResponse_Cluster) GetOperators() *Operators { - if x != nil { - return x.Operators - } - return nil -} - -func (x *ListKubernetesClustersResponse_Cluster) GetStatus() KubernetesClusterStatus { - if x != nil { - return x.Status - } - return KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_INVALID -} - -var File_managementpb_dbaas_kubernetes_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_kubernetes_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 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, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x08, 0x4b, - 0x75, 0x62, 0x65, 0x41, 0x75, 0x74, 0x68, 0x12, 0x27, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0x5c, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x94, - 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x03, - 0x70, 0x78, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x03, 0x70, 0x78, 0x63, 0x12, 0x2d, 0x0a, 0x05, 0x70, 0x73, 0x6d, 0x64, 0x62, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x05, 0x70, 0x73, 0x6d, 0x64, 0x62, 0x12, 0x2d, 0x0a, 0x05, 0x64, 0x62, 0x61, 0x61, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x05, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc4, 0x02, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x4b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x6b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x12, 0x6b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x1a, 0xb9, 0x01, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, - 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x81, 0x02, - 0x0a, 0x20, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x6b, 0x75, 0x62, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x41, 0x75, 0x74, 0x68, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6b, 0x75, 0x62, 0x65, 0x41, - 0x75, 0x74, 0x68, 0x12, 0x29, 0x0a, 0x11, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x77, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x31, - 0x0a, 0x15, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, - 0x77, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, - 0x79, 0x22, 0x23, 0x0a, 0x21, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7b, 0x0a, 0x22, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x23, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x1c, 0x47, 0x65, - 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6b, 0x75, - 0x62, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4b, 0x75, - 0x62, 0x65, 0x41, 0x75, 0x74, 0x68, 0x52, 0x08, 0x6b, 0x75, 0x62, 0x65, 0x41, 0x75, 0x74, 0x68, - 0x22, 0x56, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2a, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x36, 0x0a, 0x09, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x61, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x22, 0x5c, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x2a, 0xb9, 0x01, 0x0a, 0x17, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x21, 0x4b, 0x55, 0x42, 0x45, 0x52, 0x4e, 0x45, - 0x54, 0x45, 0x53, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, - 0x4b, 0x55, 0x42, 0x45, 0x52, 0x4e, 0x45, 0x54, 0x45, 0x53, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x29, - 0x0a, 0x25, 0x4b, 0x55, 0x42, 0x45, 0x52, 0x4e, 0x45, 0x54, 0x45, 0x53, 0x5f, 0x43, 0x4c, 0x55, - 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x41, 0x56, - 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x2a, 0x0a, 0x26, 0x4b, 0x55, 0x42, - 0x45, 0x52, 0x4e, 0x45, 0x54, 0x45, 0x53, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, - 0x49, 0x4e, 0x47, 0x10, 0x04, 0x32, 0x8b, 0x08, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0xb3, 0x01, - 0x0a, 0x19, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2f, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, - 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x12, 0xbb, 0x01, 0x0a, 0x1b, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x31, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x4b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x9f, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, - 0x42, 0x61, 0x61, 0x53, 0x2f, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, - 0x47, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x4b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12, 0xa9, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x01, 0x2a, 0x22, 0x33, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, - 0x42, 0x61, 0x61, 0x53, 0x2f, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2f, - 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x2f, 0x4c, - 0x69, 0x73, 0x74, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, - 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, - 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x19, 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, - 0x61, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_kubernetes_proto_rawDescOnce sync.Once - file_managementpb_dbaas_kubernetes_proto_rawDescData = file_managementpb_dbaas_kubernetes_proto_rawDesc -) - -func file_managementpb_dbaas_kubernetes_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_kubernetes_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_kubernetes_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_kubernetes_proto_rawDescData) - }) - return file_managementpb_dbaas_kubernetes_proto_rawDescData -} - -var ( - file_managementpb_dbaas_kubernetes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_dbaas_kubernetes_proto_msgTypes = make([]protoimpl.MessageInfo, 16) - file_managementpb_dbaas_kubernetes_proto_goTypes = []interface{}{ - (KubernetesClusterStatus)(0), // 0: dbaas.v1beta1.KubernetesClusterStatus - (*KubeAuth)(nil), // 1: dbaas.v1beta1.KubeAuth - (*Operator)(nil), // 2: dbaas.v1beta1.Operator - (*Operators)(nil), // 3: dbaas.v1beta1.Operators - (*ListKubernetesClustersRequest)(nil), // 4: dbaas.v1beta1.ListKubernetesClustersRequest - (*ListKubernetesClustersResponse)(nil), // 5: dbaas.v1beta1.ListKubernetesClustersResponse - (*RegisterKubernetesClusterRequest)(nil), // 6: dbaas.v1beta1.RegisterKubernetesClusterRequest - (*RegisterKubernetesClusterResponse)(nil), // 7: dbaas.v1beta1.RegisterKubernetesClusterResponse - (*UnregisterKubernetesClusterRequest)(nil), // 8: dbaas.v1beta1.UnregisterKubernetesClusterRequest - (*UnregisterKubernetesClusterResponse)(nil), // 9: dbaas.v1beta1.UnregisterKubernetesClusterResponse - (*GetKubernetesClusterRequest)(nil), // 10: dbaas.v1beta1.GetKubernetesClusterRequest - (*GetKubernetesClusterResponse)(nil), // 11: dbaas.v1beta1.GetKubernetesClusterResponse - (*GetResourcesRequest)(nil), // 12: dbaas.v1beta1.GetResourcesRequest - (*GetResourcesResponse)(nil), // 13: dbaas.v1beta1.GetResourcesResponse - (*ListStorageClassesRequest)(nil), // 14: dbaas.v1beta1.ListStorageClassesRequest - (*ListStorageClassesResponse)(nil), // 15: dbaas.v1beta1.ListStorageClassesResponse - (*ListKubernetesClustersResponse_Cluster)(nil), // 16: dbaas.v1beta1.ListKubernetesClustersResponse.Cluster - (OperatorsStatus)(0), // 17: dbaas.v1beta1.OperatorsStatus - (*Resources)(nil), // 18: dbaas.v1beta1.Resources - } -) - -var file_managementpb_dbaas_kubernetes_proto_depIdxs = []int32{ - 17, // 0: dbaas.v1beta1.Operator.status:type_name -> dbaas.v1beta1.OperatorsStatus - 2, // 1: dbaas.v1beta1.Operators.pxc:type_name -> dbaas.v1beta1.Operator - 2, // 2: dbaas.v1beta1.Operators.psmdb:type_name -> dbaas.v1beta1.Operator - 2, // 3: dbaas.v1beta1.Operators.dbaas:type_name -> dbaas.v1beta1.Operator - 16, // 4: dbaas.v1beta1.ListKubernetesClustersResponse.kubernetes_clusters:type_name -> dbaas.v1beta1.ListKubernetesClustersResponse.Cluster - 1, // 5: dbaas.v1beta1.RegisterKubernetesClusterRequest.kube_auth:type_name -> dbaas.v1beta1.KubeAuth - 1, // 6: dbaas.v1beta1.GetKubernetesClusterResponse.kube_auth:type_name -> dbaas.v1beta1.KubeAuth - 18, // 7: dbaas.v1beta1.GetResourcesResponse.all:type_name -> dbaas.v1beta1.Resources - 18, // 8: dbaas.v1beta1.GetResourcesResponse.available:type_name -> dbaas.v1beta1.Resources - 3, // 9: dbaas.v1beta1.ListKubernetesClustersResponse.Cluster.operators:type_name -> dbaas.v1beta1.Operators - 0, // 10: dbaas.v1beta1.ListKubernetesClustersResponse.Cluster.status:type_name -> dbaas.v1beta1.KubernetesClusterStatus - 4, // 11: dbaas.v1beta1.Kubernetes.ListKubernetesClusters:input_type -> dbaas.v1beta1.ListKubernetesClustersRequest - 6, // 12: dbaas.v1beta1.Kubernetes.RegisterKubernetesCluster:input_type -> dbaas.v1beta1.RegisterKubernetesClusterRequest - 8, // 13: dbaas.v1beta1.Kubernetes.UnregisterKubernetesCluster:input_type -> dbaas.v1beta1.UnregisterKubernetesClusterRequest - 10, // 14: dbaas.v1beta1.Kubernetes.GetKubernetesCluster:input_type -> dbaas.v1beta1.GetKubernetesClusterRequest - 12, // 15: dbaas.v1beta1.Kubernetes.GetResources:input_type -> dbaas.v1beta1.GetResourcesRequest - 14, // 16: dbaas.v1beta1.Kubernetes.ListStorageClasses:input_type -> dbaas.v1beta1.ListStorageClassesRequest - 5, // 17: dbaas.v1beta1.Kubernetes.ListKubernetesClusters:output_type -> dbaas.v1beta1.ListKubernetesClustersResponse - 7, // 18: dbaas.v1beta1.Kubernetes.RegisterKubernetesCluster:output_type -> dbaas.v1beta1.RegisterKubernetesClusterResponse - 9, // 19: dbaas.v1beta1.Kubernetes.UnregisterKubernetesCluster:output_type -> dbaas.v1beta1.UnregisterKubernetesClusterResponse - 11, // 20: dbaas.v1beta1.Kubernetes.GetKubernetesCluster:output_type -> dbaas.v1beta1.GetKubernetesClusterResponse - 13, // 21: dbaas.v1beta1.Kubernetes.GetResources:output_type -> dbaas.v1beta1.GetResourcesResponse - 15, // 22: dbaas.v1beta1.Kubernetes.ListStorageClasses:output_type -> dbaas.v1beta1.ListStorageClassesResponse - 17, // [17:23] is the sub-list for method output_type - 11, // [11:17] 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_managementpb_dbaas_kubernetes_proto_init() } -func file_managementpb_dbaas_kubernetes_proto_init() { - if File_managementpb_dbaas_kubernetes_proto != nil { - return - } - file_managementpb_dbaas_dbaas_proto_init() - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_kubernetes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KubeAuth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Operator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Operators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKubernetesClustersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKubernetesClustersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterKubernetesClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterKubernetesClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnregisterKubernetesClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnregisterKubernetesClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKubernetesClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKubernetesClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStorageClassesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListStorageClassesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_kubernetes_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKubernetesClustersResponse_Cluster); 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_managementpb_dbaas_kubernetes_proto_rawDesc, - NumEnums: 1, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_kubernetes_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_kubernetes_proto_depIdxs, - EnumInfos: file_managementpb_dbaas_kubernetes_proto_enumTypes, - MessageInfos: file_managementpb_dbaas_kubernetes_proto_msgTypes, - }.Build() - File_managementpb_dbaas_kubernetes_proto = out.File - file_managementpb_dbaas_kubernetes_proto_rawDesc = nil - file_managementpb_dbaas_kubernetes_proto_goTypes = nil - file_managementpb_dbaas_kubernetes_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/kubernetes.pb.gw.go b/api/managementpb/dbaas/kubernetes.pb.gw.go deleted file mode 100644 index 6e48eb285c..0000000000 --- a/api/managementpb/dbaas/kubernetes.pb.gw.go +++ /dev/null @@ -1,572 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/kubernetes.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_Kubernetes_ListKubernetesClusters_0(ctx context.Context, marshaler runtime.Marshaler, client KubernetesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListKubernetesClustersRequest - 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.ListKubernetesClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Kubernetes_ListKubernetesClusters_0(ctx context.Context, marshaler runtime.Marshaler, server KubernetesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListKubernetesClustersRequest - 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.ListKubernetesClusters(ctx, &protoReq) - return msg, metadata, err -} - -func request_Kubernetes_RegisterKubernetesCluster_0(ctx context.Context, marshaler runtime.Marshaler, client KubernetesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RegisterKubernetesClusterRequest - 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.RegisterKubernetesCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Kubernetes_RegisterKubernetesCluster_0(ctx context.Context, marshaler runtime.Marshaler, server KubernetesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RegisterKubernetesClusterRequest - 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.RegisterKubernetesCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_Kubernetes_UnregisterKubernetesCluster_0(ctx context.Context, marshaler runtime.Marshaler, client KubernetesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnregisterKubernetesClusterRequest - 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.UnregisterKubernetesCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Kubernetes_UnregisterKubernetesCluster_0(ctx context.Context, marshaler runtime.Marshaler, server KubernetesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnregisterKubernetesClusterRequest - 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.UnregisterKubernetesCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_Kubernetes_GetKubernetesCluster_0(ctx context.Context, marshaler runtime.Marshaler, client KubernetesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetKubernetesClusterRequest - 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.GetKubernetesCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Kubernetes_GetKubernetesCluster_0(ctx context.Context, marshaler runtime.Marshaler, server KubernetesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetKubernetesClusterRequest - 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.GetKubernetesCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_Kubernetes_GetResources_0(ctx context.Context, marshaler runtime.Marshaler, client KubernetesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourcesRequest - 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.GetResources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Kubernetes_GetResources_0(ctx context.Context, marshaler runtime.Marshaler, server KubernetesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourcesRequest - 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.GetResources(ctx, &protoReq) - return msg, metadata, err -} - -func request_Kubernetes_ListStorageClasses_0(ctx context.Context, marshaler runtime.Marshaler, client KubernetesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListStorageClassesRequest - 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.ListStorageClasses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Kubernetes_ListStorageClasses_0(ctx context.Context, marshaler runtime.Marshaler, server KubernetesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListStorageClassesRequest - 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.ListStorageClasses(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterKubernetesHandlerServer registers the http handlers for service Kubernetes to "mux". -// UnaryRPC :call KubernetesServer 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 RegisterKubernetesHandlerFromEndpoint instead. -func RegisterKubernetesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KubernetesServer) error { - mux.Handle("POST", pattern_Kubernetes_ListKubernetesClusters_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, "/dbaas.v1beta1.Kubernetes/ListKubernetesClusters", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Kubernetes_ListKubernetesClusters_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_Kubernetes_ListKubernetesClusters_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_RegisterKubernetesCluster_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, "/dbaas.v1beta1.Kubernetes/RegisterKubernetesCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Register")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Kubernetes_RegisterKubernetesCluster_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_Kubernetes_RegisterKubernetesCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_UnregisterKubernetesCluster_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, "/dbaas.v1beta1.Kubernetes/UnregisterKubernetesCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Unregister")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Kubernetes_UnregisterKubernetesCluster_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_Kubernetes_UnregisterKubernetesCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_GetKubernetesCluster_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, "/dbaas.v1beta1.Kubernetes/GetKubernetesCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Kubernetes_GetKubernetesCluster_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_Kubernetes_GetKubernetesCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_GetResources_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, "/dbaas.v1beta1.Kubernetes/GetResources", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Resources/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Kubernetes_GetResources_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_Kubernetes_GetResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_ListStorageClasses_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, "/dbaas.v1beta1.Kubernetes/ListStorageClasses", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/StorageClasses/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Kubernetes_ListStorageClasses_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_Kubernetes_ListStorageClasses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterKubernetesHandlerFromEndpoint is same as RegisterKubernetesHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterKubernetesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterKubernetesHandler(ctx, mux, conn) -} - -// RegisterKubernetesHandler registers the http handlers for service Kubernetes to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterKubernetesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterKubernetesHandlerClient(ctx, mux, NewKubernetesClient(conn)) -} - -// RegisterKubernetesHandlerClient registers the http handlers for service Kubernetes -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KubernetesClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KubernetesClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "KubernetesClient" to call the correct interceptors. -func RegisterKubernetesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KubernetesClient) error { - mux.Handle("POST", pattern_Kubernetes_ListKubernetesClusters_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, "/dbaas.v1beta1.Kubernetes/ListKubernetesClusters", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Kubernetes_ListKubernetesClusters_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Kubernetes_ListKubernetesClusters_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_RegisterKubernetesCluster_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, "/dbaas.v1beta1.Kubernetes/RegisterKubernetesCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Register")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Kubernetes_RegisterKubernetesCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Kubernetes_RegisterKubernetesCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_UnregisterKubernetesCluster_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, "/dbaas.v1beta1.Kubernetes/UnregisterKubernetesCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Unregister")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Kubernetes_UnregisterKubernetesCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Kubernetes_UnregisterKubernetesCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_GetKubernetesCluster_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, "/dbaas.v1beta1.Kubernetes/GetKubernetesCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Kubernetes_GetKubernetesCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Kubernetes_GetKubernetesCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_GetResources_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, "/dbaas.v1beta1.Kubernetes/GetResources", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/Resources/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Kubernetes_GetResources_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Kubernetes_GetResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_Kubernetes_ListStorageClasses_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, "/dbaas.v1beta1.Kubernetes/ListStorageClasses", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Kubernetes/StorageClasses/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Kubernetes_ListStorageClasses_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Kubernetes_ListStorageClasses_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var ( - pattern_Kubernetes_ListKubernetesClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Kubernetes", "List"}, "")) - - pattern_Kubernetes_RegisterKubernetesCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Kubernetes", "Register"}, "")) - - pattern_Kubernetes_UnregisterKubernetesCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Kubernetes", "Unregister"}, "")) - - pattern_Kubernetes_GetKubernetesCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Kubernetes", "Get"}, "")) - - pattern_Kubernetes_GetResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "management", "DBaaS", "Kubernetes", "Resources", "Get"}, "")) - - pattern_Kubernetes_ListStorageClasses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "management", "DBaaS", "Kubernetes", "StorageClasses", "List"}, "")) -) - -var ( - forward_Kubernetes_ListKubernetesClusters_0 = runtime.ForwardResponseMessage - - forward_Kubernetes_RegisterKubernetesCluster_0 = runtime.ForwardResponseMessage - - forward_Kubernetes_UnregisterKubernetesCluster_0 = runtime.ForwardResponseMessage - - forward_Kubernetes_GetKubernetesCluster_0 = runtime.ForwardResponseMessage - - forward_Kubernetes_GetResources_0 = runtime.ForwardResponseMessage - - forward_Kubernetes_ListStorageClasses_0 = runtime.ForwardResponseMessage -) diff --git a/api/managementpb/dbaas/kubernetes.pb.validate.go b/api/managementpb/dbaas/kubernetes.pb.validate.go deleted file mode 100644 index e3393c2291..0000000000 --- a/api/managementpb/dbaas/kubernetes.pb.validate.go +++ /dev/null @@ -1,2036 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/kubernetes.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on KubeAuth with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *KubeAuth) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on KubeAuth with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in KubeAuthMultiError, or nil -// if none found. -func (m *KubeAuth) ValidateAll() error { - return m.validate(true) -} - -func (m *KubeAuth) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubeconfig()) < 1 { - err := KubeAuthValidationError{ - field: "Kubeconfig", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return KubeAuthMultiError(errors) - } - - return nil -} - -// KubeAuthMultiError is an error wrapping multiple validation errors returned -// by KubeAuth.ValidateAll() if the designated constraints aren't met. -type KubeAuthMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m KubeAuthMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m KubeAuthMultiError) AllErrors() []error { return m } - -// KubeAuthValidationError is the validation error returned by -// KubeAuth.Validate if the designated constraints aren't met. -type KubeAuthValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e KubeAuthValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e KubeAuthValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e KubeAuthValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e KubeAuthValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e KubeAuthValidationError) ErrorName() string { return "KubeAuthValidationError" } - -// Error satisfies the builtin error interface -func (e KubeAuthValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sKubeAuth.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = KubeAuthValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = KubeAuthValidationError{} - -// Validate checks the field values on Operator with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Operator) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Operator with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in OperatorMultiError, or nil -// if none found. -func (m *Operator) ValidateAll() error { - return m.validate(true) -} - -func (m *Operator) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Status - - // no validation rules for Version - - if len(errors) > 0 { - return OperatorMultiError(errors) - } - - return nil -} - -// OperatorMultiError is an error wrapping multiple validation errors returned -// by Operator.ValidateAll() if the designated constraints aren't met. -type OperatorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OperatorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OperatorMultiError) AllErrors() []error { return m } - -// OperatorValidationError is the validation error returned by -// Operator.Validate if the designated constraints aren't met. -type OperatorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OperatorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OperatorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OperatorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OperatorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OperatorValidationError) ErrorName() string { return "OperatorValidationError" } - -// Error satisfies the builtin error interface -func (e OperatorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOperator.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OperatorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OperatorValidationError{} - -// Validate checks the field values on Operators with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Operators) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Operators with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in OperatorsMultiError, or nil -// if none found. -func (m *Operators) ValidateAll() error { - return m.validate(true) -} - -func (m *Operators) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetPxc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperatorsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperatorsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPxc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperatorsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPsmdb()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperatorsValidationError{ - field: "Psmdb", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperatorsValidationError{ - field: "Psmdb", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPsmdb()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperatorsValidationError{ - field: "Psmdb", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetDbaas()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OperatorsValidationError{ - field: "Dbaas", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OperatorsValidationError{ - field: "Dbaas", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDbaas()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OperatorsValidationError{ - field: "Dbaas", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return OperatorsMultiError(errors) - } - - return nil -} - -// OperatorsMultiError is an error wrapping multiple validation errors returned -// by Operators.ValidateAll() if the designated constraints aren't met. -type OperatorsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OperatorsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OperatorsMultiError) AllErrors() []error { return m } - -// OperatorsValidationError is the validation error returned by -// Operators.Validate if the designated constraints aren't met. -type OperatorsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OperatorsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OperatorsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OperatorsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OperatorsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OperatorsValidationError) ErrorName() string { return "OperatorsValidationError" } - -// Error satisfies the builtin error interface -func (e OperatorsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOperators.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OperatorsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OperatorsValidationError{} - -// Validate checks the field values on ListKubernetesClustersRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListKubernetesClustersRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListKubernetesClustersRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// ListKubernetesClustersRequestMultiError, or nil if none found. -func (m *ListKubernetesClustersRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListKubernetesClustersRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ListKubernetesClustersRequestMultiError(errors) - } - - return nil -} - -// ListKubernetesClustersRequestMultiError is an error wrapping multiple -// validation errors returned by ListKubernetesClustersRequest.ValidateAll() -// if the designated constraints aren't met. -type ListKubernetesClustersRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListKubernetesClustersRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListKubernetesClustersRequestMultiError) AllErrors() []error { return m } - -// ListKubernetesClustersRequestValidationError is the validation error -// returned by ListKubernetesClustersRequest.Validate if the designated -// constraints aren't met. -type ListKubernetesClustersRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListKubernetesClustersRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListKubernetesClustersRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListKubernetesClustersRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListKubernetesClustersRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListKubernetesClustersRequestValidationError) ErrorName() string { - return "ListKubernetesClustersRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListKubernetesClustersRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListKubernetesClustersRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListKubernetesClustersRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListKubernetesClustersRequestValidationError{} - -// Validate checks the field values on ListKubernetesClustersResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListKubernetesClustersResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListKubernetesClustersResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// ListKubernetesClustersResponseMultiError, or nil if none found. -func (m *ListKubernetesClustersResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListKubernetesClustersResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetKubernetesClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListKubernetesClustersResponseValidationError{ - field: fmt.Sprintf("KubernetesClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListKubernetesClustersResponseValidationError{ - field: fmt.Sprintf("KubernetesClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListKubernetesClustersResponseValidationError{ - field: fmt.Sprintf("KubernetesClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListKubernetesClustersResponseMultiError(errors) - } - - return nil -} - -// ListKubernetesClustersResponseMultiError is an error wrapping multiple -// validation errors returned by ListKubernetesClustersResponse.ValidateAll() -// if the designated constraints aren't met. -type ListKubernetesClustersResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListKubernetesClustersResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListKubernetesClustersResponseMultiError) AllErrors() []error { return m } - -// ListKubernetesClustersResponseValidationError is the validation error -// returned by ListKubernetesClustersResponse.Validate if the designated -// constraints aren't met. -type ListKubernetesClustersResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListKubernetesClustersResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListKubernetesClustersResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListKubernetesClustersResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListKubernetesClustersResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListKubernetesClustersResponseValidationError) ErrorName() string { - return "ListKubernetesClustersResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListKubernetesClustersResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListKubernetesClustersResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListKubernetesClustersResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListKubernetesClustersResponseValidationError{} - -// Validate checks the field values on RegisterKubernetesClusterRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RegisterKubernetesClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegisterKubernetesClusterRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RegisterKubernetesClusterRequestMultiError, or nil if none found. -func (m *RegisterKubernetesClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *RegisterKubernetesClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := RegisterKubernetesClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetKubeAuth() == nil { - err := RegisterKubernetesClusterRequestValidationError{ - field: "KubeAuth", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetKubeAuth()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RegisterKubernetesClusterRequestValidationError{ - field: "KubeAuth", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RegisterKubernetesClusterRequestValidationError{ - field: "KubeAuth", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKubeAuth()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RegisterKubernetesClusterRequestValidationError{ - field: "KubeAuth", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AwsAccessKeyId - - // no validation rules for AwsSecretAccessKey - - if len(errors) > 0 { - return RegisterKubernetesClusterRequestMultiError(errors) - } - - return nil -} - -// RegisterKubernetesClusterRequestMultiError is an error wrapping multiple -// validation errors returned by -// RegisterKubernetesClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type RegisterKubernetesClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegisterKubernetesClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegisterKubernetesClusterRequestMultiError) AllErrors() []error { return m } - -// RegisterKubernetesClusterRequestValidationError is the validation error -// returned by RegisterKubernetesClusterRequest.Validate if the designated -// constraints aren't met. -type RegisterKubernetesClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegisterKubernetesClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegisterKubernetesClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegisterKubernetesClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegisterKubernetesClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegisterKubernetesClusterRequestValidationError) ErrorName() string { - return "RegisterKubernetesClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e RegisterKubernetesClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegisterKubernetesClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegisterKubernetesClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegisterKubernetesClusterRequestValidationError{} - -// Validate checks the field values on RegisterKubernetesClusterResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RegisterKubernetesClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RegisterKubernetesClusterResponse -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RegisterKubernetesClusterResponseMultiError, or nil if none found. -func (m *RegisterKubernetesClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *RegisterKubernetesClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RegisterKubernetesClusterResponseMultiError(errors) - } - - return nil -} - -// RegisterKubernetesClusterResponseMultiError is an error wrapping multiple -// validation errors returned by -// RegisterKubernetesClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type RegisterKubernetesClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RegisterKubernetesClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RegisterKubernetesClusterResponseMultiError) AllErrors() []error { return m } - -// RegisterKubernetesClusterResponseValidationError is the validation error -// returned by RegisterKubernetesClusterResponse.Validate if the designated -// constraints aren't met. -type RegisterKubernetesClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RegisterKubernetesClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RegisterKubernetesClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RegisterKubernetesClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RegisterKubernetesClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RegisterKubernetesClusterResponseValidationError) ErrorName() string { - return "RegisterKubernetesClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e RegisterKubernetesClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRegisterKubernetesClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RegisterKubernetesClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RegisterKubernetesClusterResponseValidationError{} - -// Validate checks the field values on UnregisterKubernetesClusterRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *UnregisterKubernetesClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UnregisterKubernetesClusterRequest -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// UnregisterKubernetesClusterRequestMultiError, or nil if none found. -func (m *UnregisterKubernetesClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UnregisterKubernetesClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := UnregisterKubernetesClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Force - - if len(errors) > 0 { - return UnregisterKubernetesClusterRequestMultiError(errors) - } - - return nil -} - -// UnregisterKubernetesClusterRequestMultiError is an error wrapping multiple -// validation errors returned by -// UnregisterKubernetesClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type UnregisterKubernetesClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UnregisterKubernetesClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UnregisterKubernetesClusterRequestMultiError) AllErrors() []error { return m } - -// UnregisterKubernetesClusterRequestValidationError is the validation error -// returned by UnregisterKubernetesClusterRequest.Validate if the designated -// constraints aren't met. -type UnregisterKubernetesClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UnregisterKubernetesClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UnregisterKubernetesClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UnregisterKubernetesClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UnregisterKubernetesClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UnregisterKubernetesClusterRequestValidationError) ErrorName() string { - return "UnregisterKubernetesClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UnregisterKubernetesClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUnregisterKubernetesClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UnregisterKubernetesClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UnregisterKubernetesClusterRequestValidationError{} - -// Validate checks the field values on UnregisterKubernetesClusterResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *UnregisterKubernetesClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UnregisterKubernetesClusterResponse -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// UnregisterKubernetesClusterResponseMultiError, or nil if none found. -func (m *UnregisterKubernetesClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *UnregisterKubernetesClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return UnregisterKubernetesClusterResponseMultiError(errors) - } - - return nil -} - -// UnregisterKubernetesClusterResponseMultiError is an error wrapping multiple -// validation errors returned by -// UnregisterKubernetesClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type UnregisterKubernetesClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UnregisterKubernetesClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UnregisterKubernetesClusterResponseMultiError) AllErrors() []error { return m } - -// UnregisterKubernetesClusterResponseValidationError is the validation error -// returned by UnregisterKubernetesClusterResponse.Validate if the designated -// constraints aren't met. -type UnregisterKubernetesClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UnregisterKubernetesClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UnregisterKubernetesClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UnregisterKubernetesClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UnregisterKubernetesClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UnregisterKubernetesClusterResponseValidationError) ErrorName() string { - return "UnregisterKubernetesClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e UnregisterKubernetesClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUnregisterKubernetesClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UnregisterKubernetesClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UnregisterKubernetesClusterResponseValidationError{} - -// Validate checks the field values on GetKubernetesClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetKubernetesClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetKubernetesClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetKubernetesClusterRequestMultiError, or nil if none found. -func (m *GetKubernetesClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetKubernetesClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := GetKubernetesClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GetKubernetesClusterRequestMultiError(errors) - } - - return nil -} - -// GetKubernetesClusterRequestMultiError is an error wrapping multiple -// validation errors returned by GetKubernetesClusterRequest.ValidateAll() if -// the designated constraints aren't met. -type GetKubernetesClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetKubernetesClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetKubernetesClusterRequestMultiError) AllErrors() []error { return m } - -// GetKubernetesClusterRequestValidationError is the validation error returned -// by GetKubernetesClusterRequest.Validate if the designated constraints -// aren't met. -type GetKubernetesClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetKubernetesClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetKubernetesClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetKubernetesClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetKubernetesClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetKubernetesClusterRequestValidationError) ErrorName() string { - return "GetKubernetesClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetKubernetesClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetKubernetesClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetKubernetesClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetKubernetesClusterRequestValidationError{} - -// Validate checks the field values on GetKubernetesClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetKubernetesClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetKubernetesClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetKubernetesClusterResponseMultiError, or nil if none found. -func (m *GetKubernetesClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetKubernetesClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetKubeAuth()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetKubernetesClusterResponseValidationError{ - field: "KubeAuth", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetKubernetesClusterResponseValidationError{ - field: "KubeAuth", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKubeAuth()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetKubernetesClusterResponseValidationError{ - field: "KubeAuth", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetKubernetesClusterResponseMultiError(errors) - } - - return nil -} - -// GetKubernetesClusterResponseMultiError is an error wrapping multiple -// validation errors returned by GetKubernetesClusterResponse.ValidateAll() if -// the designated constraints aren't met. -type GetKubernetesClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetKubernetesClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetKubernetesClusterResponseMultiError) AllErrors() []error { return m } - -// GetKubernetesClusterResponseValidationError is the validation error returned -// by GetKubernetesClusterResponse.Validate if the designated constraints -// aren't met. -type GetKubernetesClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetKubernetesClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetKubernetesClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetKubernetesClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetKubernetesClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetKubernetesClusterResponseValidationError) ErrorName() string { - return "GetKubernetesClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetKubernetesClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetKubernetesClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetKubernetesClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetKubernetesClusterResponseValidationError{} - -// Validate checks the field values on GetResourcesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetResourcesRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetResourcesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetResourcesRequestMultiError, or nil if none found. -func (m *GetResourcesRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetResourcesRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := GetResourcesRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GetResourcesRequestMultiError(errors) - } - - return nil -} - -// GetResourcesRequestMultiError is an error wrapping multiple validation -// errors returned by GetResourcesRequest.ValidateAll() if the designated -// constraints aren't met. -type GetResourcesRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetResourcesRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetResourcesRequestMultiError) AllErrors() []error { return m } - -// GetResourcesRequestValidationError is the validation error returned by -// GetResourcesRequest.Validate if the designated constraints aren't met. -type GetResourcesRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetResourcesRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetResourcesRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetResourcesRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetResourcesRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetResourcesRequestValidationError) ErrorName() string { - return "GetResourcesRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetResourcesRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetResourcesRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetResourcesRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetResourcesRequestValidationError{} - -// Validate checks the field values on GetResourcesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetResourcesResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetResourcesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetResourcesResponseMultiError, or nil if none found. -func (m *GetResourcesResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetResourcesResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetAll()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetResourcesResponseValidationError{ - field: "All", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetResourcesResponseValidationError{ - field: "All", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAll()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetResourcesResponseValidationError{ - field: "All", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetAvailable()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetResourcesResponseValidationError{ - field: "Available", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetResourcesResponseValidationError{ - field: "Available", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAvailable()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetResourcesResponseValidationError{ - field: "Available", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetResourcesResponseMultiError(errors) - } - - return nil -} - -// GetResourcesResponseMultiError is an error wrapping multiple validation -// errors returned by GetResourcesResponse.ValidateAll() if the designated -// constraints aren't met. -type GetResourcesResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetResourcesResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetResourcesResponseMultiError) AllErrors() []error { return m } - -// GetResourcesResponseValidationError is the validation error returned by -// GetResourcesResponse.Validate if the designated constraints aren't met. -type GetResourcesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetResourcesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetResourcesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetResourcesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetResourcesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetResourcesResponseValidationError) ErrorName() string { - return "GetResourcesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetResourcesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetResourcesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetResourcesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetResourcesResponseValidationError{} - -// Validate checks the field values on ListStorageClassesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListStorageClassesRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListStorageClassesRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListStorageClassesRequestMultiError, or nil if none found. -func (m *ListStorageClassesRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListStorageClassesRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := ListStorageClassesRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ListStorageClassesRequestMultiError(errors) - } - - return nil -} - -// ListStorageClassesRequestMultiError is an error wrapping multiple validation -// errors returned by ListStorageClassesRequest.ValidateAll() if the -// designated constraints aren't met. -type ListStorageClassesRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListStorageClassesRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListStorageClassesRequestMultiError) AllErrors() []error { return m } - -// ListStorageClassesRequestValidationError is the validation error returned by -// ListStorageClassesRequest.Validate if the designated constraints aren't met. -type ListStorageClassesRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListStorageClassesRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListStorageClassesRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListStorageClassesRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListStorageClassesRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListStorageClassesRequestValidationError) ErrorName() string { - return "ListStorageClassesRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListStorageClassesRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListStorageClassesRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListStorageClassesRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListStorageClassesRequestValidationError{} - -// Validate checks the field values on ListStorageClassesResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListStorageClassesResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListStorageClassesResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListStorageClassesResponseMultiError, or nil if none found. -func (m *ListStorageClassesResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListStorageClassesResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ListStorageClassesResponseMultiError(errors) - } - - return nil -} - -// ListStorageClassesResponseMultiError is an error wrapping multiple -// validation errors returned by ListStorageClassesResponse.ValidateAll() if -// the designated constraints aren't met. -type ListStorageClassesResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListStorageClassesResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListStorageClassesResponseMultiError) AllErrors() []error { return m } - -// ListStorageClassesResponseValidationError is the validation error returned -// by ListStorageClassesResponse.Validate if the designated constraints aren't met. -type ListStorageClassesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListStorageClassesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListStorageClassesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListStorageClassesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListStorageClassesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListStorageClassesResponseValidationError) ErrorName() string { - return "ListStorageClassesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListStorageClassesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListStorageClassesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListStorageClassesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListStorageClassesResponseValidationError{} - -// Validate checks the field values on ListKubernetesClustersResponse_Cluster -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *ListKubernetesClustersResponse_Cluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// ListKubernetesClustersResponse_Cluster with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// ListKubernetesClustersResponse_ClusterMultiError, or nil if none found. -func (m *ListKubernetesClustersResponse_Cluster) ValidateAll() error { - return m.validate(true) -} - -func (m *ListKubernetesClustersResponse_Cluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for KubernetesClusterName - - if all { - switch v := interface{}(m.GetOperators()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListKubernetesClustersResponse_ClusterValidationError{ - field: "Operators", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListKubernetesClustersResponse_ClusterValidationError{ - field: "Operators", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOperators()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListKubernetesClustersResponse_ClusterValidationError{ - field: "Operators", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Status - - if len(errors) > 0 { - return ListKubernetesClustersResponse_ClusterMultiError(errors) - } - - return nil -} - -// ListKubernetesClustersResponse_ClusterMultiError is an error wrapping -// multiple validation errors returned by -// ListKubernetesClustersResponse_Cluster.ValidateAll() if the designated -// constraints aren't met. -type ListKubernetesClustersResponse_ClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListKubernetesClustersResponse_ClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListKubernetesClustersResponse_ClusterMultiError) AllErrors() []error { return m } - -// ListKubernetesClustersResponse_ClusterValidationError is the validation -// error returned by ListKubernetesClustersResponse_Cluster.Validate if the -// designated constraints aren't met. -type ListKubernetesClustersResponse_ClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListKubernetesClustersResponse_ClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListKubernetesClustersResponse_ClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListKubernetesClustersResponse_ClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListKubernetesClustersResponse_ClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListKubernetesClustersResponse_ClusterValidationError) ErrorName() string { - return "ListKubernetesClustersResponse_ClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e ListKubernetesClustersResponse_ClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListKubernetesClustersResponse_Cluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListKubernetesClustersResponse_ClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListKubernetesClustersResponse_ClusterValidationError{} diff --git a/api/managementpb/dbaas/kubernetes.proto b/api/managementpb/dbaas/kubernetes.proto deleted file mode 100644 index 5a1185bed5..0000000000 --- a/api/managementpb/dbaas/kubernetes.proto +++ /dev/null @@ -1,164 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "managementpb/dbaas/dbaas.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// KubeAuth represents Kubernetes / kubectl authentication and authorization information. -message KubeAuth { - // Kubeconfig file content. - string kubeconfig = 1 [(validate.rules).string.min_len = 1]; -} - -// KubernetesClusterStatus defines status of Kubernetes cluster. -enum KubernetesClusterStatus { - // KUBERNETES_CLUSTER_STATUS_INVALID represents unknown state. - KUBERNETES_CLUSTER_STATUS_INVALID = 0; - // KUBERNETES_CLUSTER_STATUS_OK represents that Kubernetes cluster is accessible. - KUBERNETES_CLUSTER_STATUS_OK = 1; - // KUBERNETES_CLUSTER_STATUS_UNAVAILABLE represents that Kubernetes cluster is not accessible. - KUBERNETES_CLUSTER_STATUS_UNAVAILABLE = 2; - // KUBERNETES_CLUSTER_STATUS_PROVISIONING represents that Kubernetes cluster is privisioning. - KUBERNETES_CLUSTER_STATUS_PROVISIONING = 4; -} - -// Operator contains all information about operator installed in Kubernetes cluster. -message Operator { - OperatorsStatus status = 1; - string version = 2; -} - -// Operators contains list of operators installed in Kubernetes cluster. -message Operators { - // Percona PXC Cluster Operator. - Operator pxc = 1; - // Percona Server for MongoDB Operator. - Operator psmdb = 2; - // DBaaS operator. - Operator dbaas = 3; -} - -message ListKubernetesClustersRequest {} - -message ListKubernetesClustersResponse { - // Cluster contains public info about Kubernetes cluster. - // TODO Do not use inner messages in all public APIs (for consistency). - message Cluster { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1; - // Installed operators. - Operators operators = 2; - // Status of Kubernetes cluster. - KubernetesClusterStatus status = 3; - } - // Kubernetes clusters. - repeated Cluster kubernetes_clusters = 1; -} - -message RegisterKubernetesClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // Kubernetes auth. - KubeAuth kube_auth = 2 [(validate.rules).message.required = true]; - // AWS access key id, only needed when registering EKS cluster and kubeconfig does not contain it. - string aws_access_key_id = 3; - // AWS secret access key, only needed when registering EKS cluster and kubeconfig does not contain it. - string aws_secret_access_key = 4; -} - -message RegisterKubernetesClusterResponse {} - -message UnregisterKubernetesClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // If true then Kubernetes cluster will be deleted - // even if it contains database clusters. - bool force = 2; -} - -message UnregisterKubernetesClusterResponse {} - -message GetKubernetesClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; -} - -message GetKubernetesClusterResponse { - // Kubernetes auth. - KubeAuth kube_auth = 1; -} - -message GetResourcesRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; -} - -message GetResourcesResponse { - // The total amount of resources of the Kubernetes cluster. - Resources all = 1; - // The amount of resources that is available for consumption by future Kubernetes workloads. - Resources available = 2; -} - -message ListStorageClassesRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; -} - -message ListStorageClassesResponse { - // Kubernetes storage classes names. - repeated string storage_classes = 1; -} - -// Kubernetes service provides public methods for managing Kubernetes clusters. -service Kubernetes { - // ListKubernetesClusters returns a list of all registered Kubernetes clusters. - rpc ListKubernetesClusters(ListKubernetesClustersRequest) returns (ListKubernetesClustersResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Kubernetes/List" - body: "*" - }; - } - // RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM. - rpc RegisterKubernetesCluster(RegisterKubernetesClusterRequest) returns (RegisterKubernetesClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Kubernetes/Register" - body: "*" - }; - } - // UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM. - rpc UnregisterKubernetesCluster(UnregisterKubernetesClusterRequest) returns (UnregisterKubernetesClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Kubernetes/Unregister" - body: "*" - }; - } - // GetKubernetesCluster return KubeAuth with Kubernetes config. - rpc GetKubernetesCluster(GetKubernetesClusterRequest) returns (GetKubernetesClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Kubernetes/Get" - body: "*" - }; - } - // GetResources returns all and available resources of a Kubernetes cluster. - // NOTE: The user defined in kubeconfig for the cluster has to have rights to - // list and get Pods from all Namespaces. Also getting and listing Nodes - // has to be allowed. - rpc GetResources(GetResourcesRequest) returns (GetResourcesResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Kubernetes/Resources/Get" - body: "*" - }; - } - // ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster. - rpc ListStorageClasses(ListStorageClassesRequest) returns (ListStorageClassesResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Kubernetes/StorageClasses/List" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/kubernetes_grpc.pb.go b/api/managementpb/dbaas/kubernetes_grpc.pb.go deleted file mode 100644 index a622af13ca..0000000000 --- a/api/managementpb/dbaas/kubernetes_grpc.pb.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/kubernetes.proto - -package dbaasv1beta1 - -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 - -const ( - Kubernetes_ListKubernetesClusters_FullMethodName = "/dbaas.v1beta1.Kubernetes/ListKubernetesClusters" - Kubernetes_RegisterKubernetesCluster_FullMethodName = "/dbaas.v1beta1.Kubernetes/RegisterKubernetesCluster" - Kubernetes_UnregisterKubernetesCluster_FullMethodName = "/dbaas.v1beta1.Kubernetes/UnregisterKubernetesCluster" - Kubernetes_GetKubernetesCluster_FullMethodName = "/dbaas.v1beta1.Kubernetes/GetKubernetesCluster" - Kubernetes_GetResources_FullMethodName = "/dbaas.v1beta1.Kubernetes/GetResources" - Kubernetes_ListStorageClasses_FullMethodName = "/dbaas.v1beta1.Kubernetes/ListStorageClasses" -) - -// KubernetesClient is the client API for Kubernetes 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 KubernetesClient interface { - // ListKubernetesClusters returns a list of all registered Kubernetes clusters. - ListKubernetesClusters(ctx context.Context, in *ListKubernetesClustersRequest, opts ...grpc.CallOption) (*ListKubernetesClustersResponse, error) - // RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM. - RegisterKubernetesCluster(ctx context.Context, in *RegisterKubernetesClusterRequest, opts ...grpc.CallOption) (*RegisterKubernetesClusterResponse, error) - // UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM. - UnregisterKubernetesCluster(ctx context.Context, in *UnregisterKubernetesClusterRequest, opts ...grpc.CallOption) (*UnregisterKubernetesClusterResponse, error) - // GetKubernetesCluster return KubeAuth with Kubernetes config. - GetKubernetesCluster(ctx context.Context, in *GetKubernetesClusterRequest, opts ...grpc.CallOption) (*GetKubernetesClusterResponse, error) - // GetResources returns all and available resources of a Kubernetes cluster. - // NOTE: The user defined in kubeconfig for the cluster has to have rights to - // - // list and get Pods from all Namespaces. Also getting and listing Nodes - // has to be allowed. - GetResources(ctx context.Context, in *GetResourcesRequest, opts ...grpc.CallOption) (*GetResourcesResponse, error) - // ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster. - ListStorageClasses(ctx context.Context, in *ListStorageClassesRequest, opts ...grpc.CallOption) (*ListStorageClassesResponse, error) -} - -type kubernetesClient struct { - cc grpc.ClientConnInterface -} - -func NewKubernetesClient(cc grpc.ClientConnInterface) KubernetesClient { - return &kubernetesClient{cc} -} - -func (c *kubernetesClient) ListKubernetesClusters(ctx context.Context, in *ListKubernetesClustersRequest, opts ...grpc.CallOption) (*ListKubernetesClustersResponse, error) { - out := new(ListKubernetesClustersResponse) - err := c.cc.Invoke(ctx, Kubernetes_ListKubernetesClusters_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kubernetesClient) RegisterKubernetesCluster(ctx context.Context, in *RegisterKubernetesClusterRequest, opts ...grpc.CallOption) (*RegisterKubernetesClusterResponse, error) { - out := new(RegisterKubernetesClusterResponse) - err := c.cc.Invoke(ctx, Kubernetes_RegisterKubernetesCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kubernetesClient) UnregisterKubernetesCluster(ctx context.Context, in *UnregisterKubernetesClusterRequest, opts ...grpc.CallOption) (*UnregisterKubernetesClusterResponse, error) { - out := new(UnregisterKubernetesClusterResponse) - err := c.cc.Invoke(ctx, Kubernetes_UnregisterKubernetesCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kubernetesClient) GetKubernetesCluster(ctx context.Context, in *GetKubernetesClusterRequest, opts ...grpc.CallOption) (*GetKubernetesClusterResponse, error) { - out := new(GetKubernetesClusterResponse) - err := c.cc.Invoke(ctx, Kubernetes_GetKubernetesCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kubernetesClient) GetResources(ctx context.Context, in *GetResourcesRequest, opts ...grpc.CallOption) (*GetResourcesResponse, error) { - out := new(GetResourcesResponse) - err := c.cc.Invoke(ctx, Kubernetes_GetResources_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kubernetesClient) ListStorageClasses(ctx context.Context, in *ListStorageClassesRequest, opts ...grpc.CallOption) (*ListStorageClassesResponse, error) { - out := new(ListStorageClassesResponse) - err := c.cc.Invoke(ctx, Kubernetes_ListStorageClasses_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KubernetesServer is the server API for Kubernetes service. -// All implementations must embed UnimplementedKubernetesServer -// for forward compatibility -type KubernetesServer interface { - // ListKubernetesClusters returns a list of all registered Kubernetes clusters. - ListKubernetesClusters(context.Context, *ListKubernetesClustersRequest) (*ListKubernetesClustersResponse, error) - // RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM. - RegisterKubernetesCluster(context.Context, *RegisterKubernetesClusterRequest) (*RegisterKubernetesClusterResponse, error) - // UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM. - UnregisterKubernetesCluster(context.Context, *UnregisterKubernetesClusterRequest) (*UnregisterKubernetesClusterResponse, error) - // GetKubernetesCluster return KubeAuth with Kubernetes config. - GetKubernetesCluster(context.Context, *GetKubernetesClusterRequest) (*GetKubernetesClusterResponse, error) - // GetResources returns all and available resources of a Kubernetes cluster. - // NOTE: The user defined in kubeconfig for the cluster has to have rights to - // - // list and get Pods from all Namespaces. Also getting and listing Nodes - // has to be allowed. - GetResources(context.Context, *GetResourcesRequest) (*GetResourcesResponse, error) - // ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster. - ListStorageClasses(context.Context, *ListStorageClassesRequest) (*ListStorageClassesResponse, error) - mustEmbedUnimplementedKubernetesServer() -} - -// UnimplementedKubernetesServer must be embedded to have forward compatible implementations. -type UnimplementedKubernetesServer struct{} - -func (UnimplementedKubernetesServer) ListKubernetesClusters(context.Context, *ListKubernetesClustersRequest) (*ListKubernetesClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListKubernetesClusters not implemented") -} - -func (UnimplementedKubernetesServer) RegisterKubernetesCluster(context.Context, *RegisterKubernetesClusterRequest) (*RegisterKubernetesClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterKubernetesCluster not implemented") -} - -func (UnimplementedKubernetesServer) UnregisterKubernetesCluster(context.Context, *UnregisterKubernetesClusterRequest) (*UnregisterKubernetesClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnregisterKubernetesCluster not implemented") -} - -func (UnimplementedKubernetesServer) GetKubernetesCluster(context.Context, *GetKubernetesClusterRequest) (*GetKubernetesClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetKubernetesCluster not implemented") -} - -func (UnimplementedKubernetesServer) GetResources(context.Context, *GetResourcesRequest) (*GetResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResources not implemented") -} - -func (UnimplementedKubernetesServer) ListStorageClasses(context.Context, *ListStorageClassesRequest) (*ListStorageClassesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListStorageClasses not implemented") -} -func (UnimplementedKubernetesServer) mustEmbedUnimplementedKubernetesServer() {} - -// UnsafeKubernetesServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to KubernetesServer will -// result in compilation errors. -type UnsafeKubernetesServer interface { - mustEmbedUnimplementedKubernetesServer() -} - -func RegisterKubernetesServer(s grpc.ServiceRegistrar, srv KubernetesServer) { - s.RegisterService(&Kubernetes_ServiceDesc, srv) -} - -func _Kubernetes_ListKubernetesClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListKubernetesClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KubernetesServer).ListKubernetesClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Kubernetes_ListKubernetesClusters_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KubernetesServer).ListKubernetesClusters(ctx, req.(*ListKubernetesClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Kubernetes_RegisterKubernetesCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterKubernetesClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KubernetesServer).RegisterKubernetesCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Kubernetes_RegisterKubernetesCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KubernetesServer).RegisterKubernetesCluster(ctx, req.(*RegisterKubernetesClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Kubernetes_UnregisterKubernetesCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnregisterKubernetesClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KubernetesServer).UnregisterKubernetesCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Kubernetes_UnregisterKubernetesCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KubernetesServer).UnregisterKubernetesCluster(ctx, req.(*UnregisterKubernetesClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Kubernetes_GetKubernetesCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetKubernetesClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KubernetesServer).GetKubernetesCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Kubernetes_GetKubernetesCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KubernetesServer).GetKubernetesCluster(ctx, req.(*GetKubernetesClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Kubernetes_GetResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KubernetesServer).GetResources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Kubernetes_GetResources_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KubernetesServer).GetResources(ctx, req.(*GetResourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Kubernetes_ListStorageClasses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListStorageClassesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KubernetesServer).ListStorageClasses(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Kubernetes_ListStorageClasses_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KubernetesServer).ListStorageClasses(ctx, req.(*ListStorageClassesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Kubernetes_ServiceDesc is the grpc.ServiceDesc for Kubernetes service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Kubernetes_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.Kubernetes", - HandlerType: (*KubernetesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListKubernetesClusters", - Handler: _Kubernetes_ListKubernetesClusters_Handler, - }, - { - MethodName: "RegisterKubernetesCluster", - Handler: _Kubernetes_RegisterKubernetesCluster_Handler, - }, - { - MethodName: "UnregisterKubernetesCluster", - Handler: _Kubernetes_UnregisterKubernetesCluster_Handler, - }, - { - MethodName: "GetKubernetesCluster", - Handler: _Kubernetes_GetKubernetesCluster_Handler, - }, - { - MethodName: "GetResources", - Handler: _Kubernetes_GetResources_Handler, - }, - { - MethodName: "ListStorageClasses", - Handler: _Kubernetes_ListStorageClasses_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/kubernetes.proto", -} diff --git a/api/managementpb/dbaas/logs.pb.go b/api/managementpb/dbaas/logs.pb.go deleted file mode 100644 index e24145f79e..0000000000 --- a/api/managementpb/dbaas/logs.pb.go +++ /dev/null @@ -1,341 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/logs.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// Logs contain logs for certain pod's container. If container is an empty -// string, logs contain pod's events. -type Logs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Pod name. - Pod string `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"` - // Container name. - Container string `protobuf:"bytes,2,opt,name=container,proto3" json:"container,omitempty"` - // Content of container's log or pod's events. - Logs []string `protobuf:"bytes,3,rep,name=logs,proto3" json:"logs,omitempty"` -} - -func (x *Logs) Reset() { - *x = Logs{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_logs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Logs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Logs) ProtoMessage() {} - -func (x *Logs) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_logs_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 Logs.ProtoReflect.Descriptor instead. -func (*Logs) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_logs_proto_rawDescGZIP(), []int{0} -} - -func (x *Logs) GetPod() string { - if x != nil { - return x.Pod - } - return "" -} - -func (x *Logs) GetContainer() string { - if x != nil { - return x.Container - } - return "" -} - -func (x *Logs) GetLogs() []string { - if x != nil { - return x.Logs - } - return nil -} - -type GetLogsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // DB cluster name. - ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` -} - -func (x *GetLogsRequest) Reset() { - *x = GetLogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_logs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLogsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLogsRequest) ProtoMessage() {} - -func (x *GetLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_logs_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 GetLogsRequest.ProtoReflect.Descriptor instead. -func (*GetLogsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_logs_proto_rawDescGZIP(), []int{1} -} - -func (x *GetLogsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *GetLogsRequest) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -type GetLogsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Log represents list of logs. Each entry contains either container's logs or, - // when container field is empty, pod's events. - Logs []*Logs `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` -} - -func (x *GetLogsResponse) Reset() { - *x = GetLogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_logs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLogsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLogsResponse) ProtoMessage() {} - -func (x *GetLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_logs_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 GetLogsResponse.ProtoReflect.Descriptor instead. -func (*GetLogsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_logs_proto_rawDescGZIP(), []int{2} -} - -func (x *GetLogsResponse) GetLogs() []*Logs { - if x != nil { - return x.Logs - } - return nil -} - -var File_managementpb_dbaas_logs_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_logs_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x04, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x10, 0x0a, - 0x03, 0x70, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x6f, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, - 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, - 0x73, 0x22, 0x7d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0x3a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x32, 0x7c, 0x0a, 0x07, - 0x4c, 0x6f, 0x67, 0x73, 0x41, 0x50, 0x49, 0x12, 0x71, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, - 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, - 0x61, 0x53, 0x2f, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x42, 0xaf, 0x01, 0x0a, 0x11, 0x63, - 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x09, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, - 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, - 0x02, 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x19, 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, - 0x61, 0x61, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_logs_proto_rawDescOnce sync.Once - file_managementpb_dbaas_logs_proto_rawDescData = file_managementpb_dbaas_logs_proto_rawDesc -) - -func file_managementpb_dbaas_logs_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_logs_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_logs_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_logs_proto_rawDescData) - }) - return file_managementpb_dbaas_logs_proto_rawDescData -} - -var ( - file_managementpb_dbaas_logs_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_dbaas_logs_proto_goTypes = []interface{}{ - (*Logs)(nil), // 0: dbaas.v1beta1.Logs - (*GetLogsRequest)(nil), // 1: dbaas.v1beta1.GetLogsRequest - (*GetLogsResponse)(nil), // 2: dbaas.v1beta1.GetLogsResponse - } -) - -var file_managementpb_dbaas_logs_proto_depIdxs = []int32{ - 0, // 0: dbaas.v1beta1.GetLogsResponse.logs:type_name -> dbaas.v1beta1.Logs - 1, // 1: dbaas.v1beta1.LogsAPI.GetLogs:input_type -> dbaas.v1beta1.GetLogsRequest - 2, // 2: dbaas.v1beta1.LogsAPI.GetLogs:output_type -> dbaas.v1beta1.GetLogsResponse - 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_managementpb_dbaas_logs_proto_init() } -func file_managementpb_dbaas_logs_proto_init() { - if File_managementpb_dbaas_logs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_logs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Logs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_logs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_logs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLogsResponse); 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_managementpb_dbaas_logs_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_logs_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_logs_proto_depIdxs, - MessageInfos: file_managementpb_dbaas_logs_proto_msgTypes, - }.Build() - File_managementpb_dbaas_logs_proto = out.File - file_managementpb_dbaas_logs_proto_rawDesc = nil - file_managementpb_dbaas_logs_proto_goTypes = nil - file_managementpb_dbaas_logs_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/logs.pb.gw.go b/api/managementpb/dbaas/logs.pb.gw.go deleted file mode 100644 index e6161d8e30..0000000000 --- a/api/managementpb/dbaas/logs.pb.gw.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/logs.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_LogsAPI_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client LogsAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLogsRequest - 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.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_LogsAPI_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server LogsAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLogsRequest - 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.GetLogs(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterLogsAPIHandlerServer registers the http handlers for service LogsAPI to "mux". -// UnaryRPC :call LogsAPIServer 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 RegisterLogsAPIHandlerFromEndpoint instead. -func RegisterLogsAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LogsAPIServer) error { - mux.Handle("POST", pattern_LogsAPI_GetLogs_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, "/dbaas.v1beta1.LogsAPI/GetLogs", runtime.WithHTTPPathPattern("/v1/management/DBaaS/GetLogs")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LogsAPI_GetLogs_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_LogsAPI_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterLogsAPIHandlerFromEndpoint is same as RegisterLogsAPIHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterLogsAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterLogsAPIHandler(ctx, mux, conn) -} - -// RegisterLogsAPIHandler registers the http handlers for service LogsAPI to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterLogsAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterLogsAPIHandlerClient(ctx, mux, NewLogsAPIClient(conn)) -} - -// RegisterLogsAPIHandlerClient registers the http handlers for service LogsAPI -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LogsAPIClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LogsAPIClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "LogsAPIClient" to call the correct interceptors. -func RegisterLogsAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LogsAPIClient) error { - mux.Handle("POST", pattern_LogsAPI_GetLogs_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, "/dbaas.v1beta1.LogsAPI/GetLogs", runtime.WithHTTPPathPattern("/v1/management/DBaaS/GetLogs")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LogsAPI_GetLogs_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_LogsAPI_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var pattern_LogsAPI_GetLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "DBaaS", "GetLogs"}, "")) - -var forward_LogsAPI_GetLogs_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/dbaas/logs.pb.validate.go b/api/managementpb/dbaas/logs.pb.validate.go deleted file mode 100644 index 667deacae0..0000000000 --- a/api/managementpb/dbaas/logs.pb.validate.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/logs.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Logs with the rules defined in the proto -// definition for this message. If any rules are violated, the first error -// encountered is returned, or nil if there are no violations. -func (m *Logs) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Logs with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in LogsMultiError, or nil if none found. -func (m *Logs) ValidateAll() error { - return m.validate(true) -} - -func (m *Logs) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Pod - - // no validation rules for Container - - if len(errors) > 0 { - return LogsMultiError(errors) - } - - return nil -} - -// LogsMultiError is an error wrapping multiple validation errors returned by -// Logs.ValidateAll() if the designated constraints aren't met. -type LogsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LogsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LogsMultiError) AllErrors() []error { return m } - -// LogsValidationError is the validation error returned by Logs.Validate if the -// designated constraints aren't met. -type LogsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LogsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LogsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LogsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LogsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LogsValidationError) ErrorName() string { return "LogsValidationError" } - -// Error satisfies the builtin error interface -func (e LogsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLogs.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LogsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LogsValidationError{} - -// Validate checks the field values on GetLogsRequest with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GetLogsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetLogsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in GetLogsRequestMultiError, -// or nil if none found. -func (m *GetLogsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetLogsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := GetLogsRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetClusterName()) < 1 { - err := GetLogsRequestValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GetLogsRequestMultiError(errors) - } - - return nil -} - -// GetLogsRequestMultiError is an error wrapping multiple validation errors -// returned by GetLogsRequest.ValidateAll() if the designated constraints -// aren't met. -type GetLogsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetLogsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetLogsRequestMultiError) AllErrors() []error { return m } - -// GetLogsRequestValidationError is the validation error returned by -// GetLogsRequest.Validate if the designated constraints aren't met. -type GetLogsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetLogsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetLogsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetLogsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetLogsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetLogsRequestValidationError) ErrorName() string { return "GetLogsRequestValidationError" } - -// Error satisfies the builtin error interface -func (e GetLogsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetLogsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetLogsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetLogsRequestValidationError{} - -// Validate checks the field values on GetLogsResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *GetLogsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetLogsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetLogsResponseMultiError, or nil if none found. -func (m *GetLogsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetLogsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetLogs() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetLogsResponseValidationError{ - field: fmt.Sprintf("Logs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetLogsResponseValidationError{ - field: fmt.Sprintf("Logs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetLogsResponseValidationError{ - field: fmt.Sprintf("Logs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return GetLogsResponseMultiError(errors) - } - - return nil -} - -// GetLogsResponseMultiError is an error wrapping multiple validation errors -// returned by GetLogsResponse.ValidateAll() if the designated constraints -// aren't met. -type GetLogsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetLogsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetLogsResponseMultiError) AllErrors() []error { return m } - -// GetLogsResponseValidationError is the validation error returned by -// GetLogsResponse.Validate if the designated constraints aren't met. -type GetLogsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetLogsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetLogsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetLogsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetLogsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetLogsResponseValidationError) ErrorName() string { return "GetLogsResponseValidationError" } - -// Error satisfies the builtin error interface -func (e GetLogsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetLogsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetLogsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetLogsResponseValidationError{} diff --git a/api/managementpb/dbaas/logs.proto b/api/managementpb/dbaas/logs.proto deleted file mode 100644 index d9d153530d..0000000000 --- a/api/managementpb/dbaas/logs.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// Logs contain logs for certain pod's container. If container is an empty -// string, logs contain pod's events. -message Logs { - // Pod name. - string pod = 1; - // Container name. - string container = 2; - // Content of container's log or pod's events. - repeated string logs = 3; -} - -message GetLogsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // DB cluster name. - string cluster_name = 2 [(validate.rules).string.min_len = 1]; -} - -message GetLogsResponse { - // Log represents list of logs. Each entry contains either container's logs or, - // when container field is empty, pod's events. - repeated Logs logs = 1; -} - -// LogsAPI provides APIs for reading logs. -service LogsAPI { - // GetLogs gets all logs from db cluster. - rpc GetLogs(GetLogsRequest) returns (GetLogsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/GetLogs" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/logs_grpc.pb.go b/api/managementpb/dbaas/logs_grpc.pb.go deleted file mode 100644 index 217d7a0dfb..0000000000 --- a/api/managementpb/dbaas/logs_grpc.pb.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/logs.proto - -package dbaasv1beta1 - -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 - -const ( - LogsAPI_GetLogs_FullMethodName = "/dbaas.v1beta1.LogsAPI/GetLogs" -) - -// LogsAPIClient is the client API for LogsAPI 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 LogsAPIClient interface { - // GetLogs gets all logs from db cluster. - GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error) -} - -type logsAPIClient struct { - cc grpc.ClientConnInterface -} - -func NewLogsAPIClient(cc grpc.ClientConnInterface) LogsAPIClient { - return &logsAPIClient{cc} -} - -func (c *logsAPIClient) GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error) { - out := new(GetLogsResponse) - err := c.cc.Invoke(ctx, LogsAPI_GetLogs_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LogsAPIServer is the server API for LogsAPI service. -// All implementations must embed UnimplementedLogsAPIServer -// for forward compatibility -type LogsAPIServer interface { - // GetLogs gets all logs from db cluster. - GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) - mustEmbedUnimplementedLogsAPIServer() -} - -// UnimplementedLogsAPIServer must be embedded to have forward compatible implementations. -type UnimplementedLogsAPIServer struct{} - -func (UnimplementedLogsAPIServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") -} -func (UnimplementedLogsAPIServer) mustEmbedUnimplementedLogsAPIServer() {} - -// UnsafeLogsAPIServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to LogsAPIServer will -// result in compilation errors. -type UnsafeLogsAPIServer interface { - mustEmbedUnimplementedLogsAPIServer() -} - -func RegisterLogsAPIServer(s grpc.ServiceRegistrar, srv LogsAPIServer) { - s.RegisterService(&LogsAPI_ServiceDesc, srv) -} - -func _LogsAPI_GetLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLogsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LogsAPIServer).GetLogs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: LogsAPI_GetLogs_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LogsAPIServer).GetLogs(ctx, req.(*GetLogsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// LogsAPI_ServiceDesc is the grpc.ServiceDesc for LogsAPI service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var LogsAPI_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.LogsAPI", - HandlerType: (*LogsAPIServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetLogs", - Handler: _LogsAPI_GetLogs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/logs.proto", -} diff --git a/api/managementpb/dbaas/psmdb_clusters.pb.go b/api/managementpb/dbaas/psmdb_clusters.pb.go deleted file mode 100644 index 4dda99c751..0000000000 --- a/api/managementpb/dbaas/psmdb_clusters.pb.go +++ /dev/null @@ -1,1373 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/psmdb_clusters.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// PSMDBClusterParams represents PSMDB cluster parameters that can be updated. -type PSMDBClusterParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster size. - ClusterSize int32 `protobuf:"varint,1,opt,name=cluster_size,json=clusterSize,proto3" json:"cluster_size,omitempty"` - // ReplicaSet container parameters. - Replicaset *PSMDBClusterParams_ReplicaSet `protobuf:"bytes,2,opt,name=replicaset,proto3" json:"replicaset,omitempty"` - // Docker image used for PSMDB. - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - // Backup configuration parameters. - Backup *Backup `protobuf:"bytes,4,opt,name=backup,proto3" json:"backup,omitempty"` - // Restore configuration parameters. - Restore *Restore `protobuf:"bytes,5,opt,name=restore,proto3" json:"restore,omitempty"` -} - -func (x *PSMDBClusterParams) Reset() { - *x = PSMDBClusterParams{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PSMDBClusterParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PSMDBClusterParams) ProtoMessage() {} - -func (x *PSMDBClusterParams) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 PSMDBClusterParams.ProtoReflect.Descriptor instead. -func (*PSMDBClusterParams) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{0} -} - -func (x *PSMDBClusterParams) GetClusterSize() int32 { - if x != nil { - return x.ClusterSize - } - return 0 -} - -func (x *PSMDBClusterParams) GetReplicaset() *PSMDBClusterParams_ReplicaSet { - if x != nil { - return x.Replicaset - } - return nil -} - -func (x *PSMDBClusterParams) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *PSMDBClusterParams) GetBackup() *Backup { - if x != nil { - return x.Backup - } - return nil -} - -func (x *PSMDBClusterParams) GetRestore() *Restore { - if x != nil { - return x.Restore - } - return nil -} - -type GetPSMDBClusterCredentialsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PSMDB cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetPSMDBClusterCredentialsRequest) Reset() { - *x = GetPSMDBClusterCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBClusterCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBClusterCredentialsRequest) ProtoMessage() {} - -func (x *GetPSMDBClusterCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 GetPSMDBClusterCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetPSMDBClusterCredentialsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{1} -} - -func (x *GetPSMDBClusterCredentialsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *GetPSMDBClusterCredentialsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type GetPSMDBClusterCredentialsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectionCredentials *GetPSMDBClusterCredentialsResponse_PSMDBCredentials `protobuf:"bytes,1,opt,name=connection_credentials,json=connectionCredentials,proto3" json:"connection_credentials,omitempty"` -} - -func (x *GetPSMDBClusterCredentialsResponse) Reset() { - *x = GetPSMDBClusterCredentialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBClusterCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBClusterCredentialsResponse) ProtoMessage() {} - -func (x *GetPSMDBClusterCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 GetPSMDBClusterCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetPSMDBClusterCredentialsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{2} -} - -func (x *GetPSMDBClusterCredentialsResponse) GetConnectionCredentials() *GetPSMDBClusterCredentialsResponse_PSMDBCredentials { - if x != nil { - return x.ConnectionCredentials - } - return nil -} - -type CreatePSMDBClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PSMDB cluster name. - // a DNS-1035 label must consist of lower case alphanumeric characters or '-', - // start with an alphabetic character, and end with an alphanumeric character - // (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?') - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Cluster parameters. - Params *PSMDBClusterParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` - // Make DB cluster accessible outside of K8s cluster. - Expose bool `protobuf:"varint,4,opt,name=expose,proto3" json:"expose,omitempty"` - // Make DB cluster accessible via public internet. - InternetFacing bool `protobuf:"varint,5,opt,name=internet_facing,json=internetFacing,proto3" json:"internet_facing,omitempty"` - // Apply IP source ranges against the cluster. - SourceRanges []string `protobuf:"bytes,6,rep,name=source_ranges,json=sourceRanges,proto3" json:"source_ranges,omitempty"` - // Configuration template. - Template *Template `protobuf:"bytes,7,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *CreatePSMDBClusterRequest) Reset() { - *x = CreatePSMDBClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePSMDBClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePSMDBClusterRequest) ProtoMessage() {} - -func (x *CreatePSMDBClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 CreatePSMDBClusterRequest.ProtoReflect.Descriptor instead. -func (*CreatePSMDBClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{3} -} - -func (x *CreatePSMDBClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *CreatePSMDBClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreatePSMDBClusterRequest) GetParams() *PSMDBClusterParams { - if x != nil { - return x.Params - } - return nil -} - -func (x *CreatePSMDBClusterRequest) GetExpose() bool { - if x != nil { - return x.Expose - } - return false -} - -func (x *CreatePSMDBClusterRequest) GetInternetFacing() bool { - if x != nil { - return x.InternetFacing - } - return false -} - -func (x *CreatePSMDBClusterRequest) GetSourceRanges() []string { - if x != nil { - return x.SourceRanges - } - return nil -} - -func (x *CreatePSMDBClusterRequest) GetTemplate() *Template { - if x != nil { - return x.Template - } - return nil -} - -type CreatePSMDBClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreatePSMDBClusterResponse) Reset() { - *x = CreatePSMDBClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePSMDBClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePSMDBClusterResponse) ProtoMessage() {} - -func (x *CreatePSMDBClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 CreatePSMDBClusterResponse.ProtoReflect.Descriptor instead. -func (*CreatePSMDBClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{4} -} - -type UpdatePSMDBClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PSMDB cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Cluster parameters. - Params *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` - // Make DB cluster accessible outside of K8s cluster. - Expose bool `protobuf:"varint,4,opt,name=expose,proto3" json:"expose,omitempty"` - // Make DB cluster accessible via public internet. - InternetFacing bool `protobuf:"varint,5,opt,name=internet_facing,json=internetFacing,proto3" json:"internet_facing,omitempty"` - // Apply IP source ranges against the cluster. - SourceRanges []string `protobuf:"bytes,6,rep,name=source_ranges,json=sourceRanges,proto3" json:"source_ranges,omitempty"` - // Configuration template. - Template *Template `protobuf:"bytes,7,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *UpdatePSMDBClusterRequest) Reset() { - *x = UpdatePSMDBClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePSMDBClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePSMDBClusterRequest) ProtoMessage() {} - -func (x *UpdatePSMDBClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 UpdatePSMDBClusterRequest.ProtoReflect.Descriptor instead. -func (*UpdatePSMDBClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdatePSMDBClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *UpdatePSMDBClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UpdatePSMDBClusterRequest) GetParams() *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams { - if x != nil { - return x.Params - } - return nil -} - -func (x *UpdatePSMDBClusterRequest) GetExpose() bool { - if x != nil { - return x.Expose - } - return false -} - -func (x *UpdatePSMDBClusterRequest) GetInternetFacing() bool { - if x != nil { - return x.InternetFacing - } - return false -} - -func (x *UpdatePSMDBClusterRequest) GetSourceRanges() []string { - if x != nil { - return x.SourceRanges - } - return nil -} - -func (x *UpdatePSMDBClusterRequest) GetTemplate() *Template { - if x != nil { - return x.Template - } - return nil -} - -type UpdatePSMDBClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdatePSMDBClusterResponse) Reset() { - *x = UpdatePSMDBClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePSMDBClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePSMDBClusterResponse) ProtoMessage() {} - -func (x *UpdatePSMDBClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 UpdatePSMDBClusterResponse.ProtoReflect.Descriptor instead. -func (*UpdatePSMDBClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{6} -} - -type GetPSMDBClusterResourcesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster parameters. - Params *PSMDBClusterParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *GetPSMDBClusterResourcesRequest) Reset() { - *x = GetPSMDBClusterResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBClusterResourcesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBClusterResourcesRequest) ProtoMessage() {} - -func (x *GetPSMDBClusterResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 GetPSMDBClusterResourcesRequest.ProtoReflect.Descriptor instead. -func (*GetPSMDBClusterResourcesRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{7} -} - -func (x *GetPSMDBClusterResourcesRequest) GetParams() *PSMDBClusterParams { - if x != nil { - return x.Params - } - return nil -} - -type GetPSMDBClusterResourcesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Expected resources to be consumed by the cluster. - Expected *Resources `protobuf:"bytes,1,opt,name=expected,proto3" json:"expected,omitempty"` -} - -func (x *GetPSMDBClusterResourcesResponse) Reset() { - *x = GetPSMDBClusterResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBClusterResourcesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBClusterResourcesResponse) ProtoMessage() {} - -func (x *GetPSMDBClusterResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 GetPSMDBClusterResourcesResponse.ProtoReflect.Descriptor instead. -func (*GetPSMDBClusterResourcesResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{8} -} - -func (x *GetPSMDBClusterResourcesResponse) GetExpected() *Resources { - if x != nil { - return x.Expected - } - return nil -} - -// ReplicaSet container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -type PSMDBClusterParams_ReplicaSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` - // Disk size in bytes. - DiskSize int64 `protobuf:"varint,2,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` - // Configuration for PSMDB cluster - Configuration string `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` - // Storage Class for PSMDB cluster. - StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` -} - -func (x *PSMDBClusterParams_ReplicaSet) Reset() { - *x = PSMDBClusterParams_ReplicaSet{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PSMDBClusterParams_ReplicaSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PSMDBClusterParams_ReplicaSet) ProtoMessage() {} - -func (x *PSMDBClusterParams_ReplicaSet) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 PSMDBClusterParams_ReplicaSet.ProtoReflect.Descriptor instead. -func (*PSMDBClusterParams_ReplicaSet) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *PSMDBClusterParams_ReplicaSet) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -func (x *PSMDBClusterParams_ReplicaSet) GetDiskSize() int64 { - if x != nil { - return x.DiskSize - } - return 0 -} - -func (x *PSMDBClusterParams_ReplicaSet) GetConfiguration() string { - if x != nil { - return x.Configuration - } - return "" -} - -func (x *PSMDBClusterParams_ReplicaSet) GetStorageClass() string { - if x != nil { - return x.StorageClass - } - return "" -} - -// PSMDBCredentials is a credentials to connect to PSMDB. -// TODO Do not use inner messages in all public APIs (for consistency). -type GetPSMDBClusterCredentialsResponse_PSMDBCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // MongoDB username. - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // MongoDB password. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // MongoDB host. - Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` - // MongoDB port. - Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` - // Replicaset name. - Replicaset string `protobuf:"bytes,5,opt,name=replicaset,proto3" json:"replicaset,omitempty"` -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) Reset() { - *x = GetPSMDBClusterCredentialsResponse_PSMDBCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPSMDBClusterCredentialsResponse_PSMDBCredentials) ProtoMessage() {} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 GetPSMDBClusterCredentialsResponse_PSMDBCredentials.ProtoReflect.Descriptor instead. -func (*GetPSMDBClusterCredentialsResponse_PSMDBCredentials) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - -func (x *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) GetReplicaset() string { - if x != nil { - return x.Replicaset - } - return "" -} - -// UpdatePSMDBClusterParams represents PSMDB cluster parameters that can be updated. -type UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster size. - ClusterSize int32 `protobuf:"varint,1,opt,name=cluster_size,json=clusterSize,proto3" json:"cluster_size,omitempty"` - // ReplicaSet container parameters. - Replicaset *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet `protobuf:"bytes,2,opt,name=replicaset,proto3" json:"replicaset,omitempty"` - // Suspend cluster `pause: true`. - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend,omitempty"` - // Resume cluster `pause: false`. - Resume bool `protobuf:"varint,4,opt,name=resume,proto3" json:"resume,omitempty"` - // PSMDB image to use. If it's the same image but with different version tag, upgrade of database cluster to version - // in given tag is triggered. If entirely different image is given, error is returned. - Image string `protobuf:"bytes,5,opt,name=image,proto3" json:"image,omitempty"` -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) Reset() { - *x = UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) ProtoMessage() {} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams.ProtoReflect.Descriptor instead. -func (*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) GetClusterSize() int32 { - if x != nil { - return x.ClusterSize - } - return 0 -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) GetReplicaset() *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet { - if x != nil { - return x.Replicaset - } - return nil -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) GetSuspend() bool { - if x != nil { - return x.Suspend - } - return false -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) GetResume() bool { - if x != nil { - return x.Resume - } - return false -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -// ReplicaSet container parameters. -type UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` - // Configuration for PSMDB cluster - Configuration string `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` - // Storage Class for PSMDB cluster. - StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) Reset() { - *x = UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) ProtoMessage() {} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_psmdb_clusters_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 UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet.ProtoReflect.Descriptor instead. -func (*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP(), []int{5, 0, 0} -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) GetConfiguration() string { - if x != nil { - return x.Configuration - } - return "" -} - -func (x *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) GetStorageClass() string { - if x != nil { - return x.StorageClass - } - return "" -} - -var File_managementpb_dbaas_psmdb_clusters_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_psmdb_clusters_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x70, 0x73, 0x6d, 0x64, 0x62, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x03, 0x0a, 0x12, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x4c, 0x0a, - 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x65, 0x74, 0x52, - 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x1a, 0xc2, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x65, - 0x74, 0x12, 0x4c, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, - 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x0d, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, - 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, - 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb4, 0x02, 0x0a, 0x22, - 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x79, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x92, 0x01, - 0x0a, 0x10, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x65, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, - 0x65, 0x74, 0x22, 0xc6, 0x02, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, - 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x46, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x06, 0x0a, 0x19, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x59, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, - 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x46, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x9b, 0x03, 0x0a, 0x18, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x6c, 0x0a, 0x0a, 0x72, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x4c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x65, 0x74, 0x52, 0x0a, 0x72, - 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x73, - 0x70, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x73, 0x70, - 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x1a, 0xa5, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x65, 0x74, - 0x12, 0x4c, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x24, - 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x53, - 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x53, 0x4d, 0x44, 0x42, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x58, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, - 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x65, 0x78, 0x70, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x32, - 0xcd, 0x05, 0x0a, 0x0d, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0xbf, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x12, 0x30, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x01, 0x2a, - 0x22, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x53, - 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, - 0x2f, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x53, 0x4d, 0x44, - 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, - 0x53, 0x2f, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, - 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, - 0x42, 0x61, 0x61, 0x53, 0x2f, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x42, - 0xb8, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x12, 0x50, 0x73, 0x6d, 0x64, 0x62, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, - 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0d, - 0x44, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, - 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, - 0x44, 0x62, 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, 0x61, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_psmdb_clusters_proto_rawDescOnce sync.Once - file_managementpb_dbaas_psmdb_clusters_proto_rawDescData = file_managementpb_dbaas_psmdb_clusters_proto_rawDesc -) - -func file_managementpb_dbaas_psmdb_clusters_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_psmdb_clusters_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_psmdb_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_psmdb_clusters_proto_rawDescData) - }) - return file_managementpb_dbaas_psmdb_clusters_proto_rawDescData -} - -var ( - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_managementpb_dbaas_psmdb_clusters_proto_goTypes = []interface{}{ - (*PSMDBClusterParams)(nil), // 0: dbaas.v1beta1.PSMDBClusterParams - (*GetPSMDBClusterCredentialsRequest)(nil), // 1: dbaas.v1beta1.GetPSMDBClusterCredentialsRequest - (*GetPSMDBClusterCredentialsResponse)(nil), // 2: dbaas.v1beta1.GetPSMDBClusterCredentialsResponse - (*CreatePSMDBClusterRequest)(nil), // 3: dbaas.v1beta1.CreatePSMDBClusterRequest - (*CreatePSMDBClusterResponse)(nil), // 4: dbaas.v1beta1.CreatePSMDBClusterResponse - (*UpdatePSMDBClusterRequest)(nil), // 5: dbaas.v1beta1.UpdatePSMDBClusterRequest - (*UpdatePSMDBClusterResponse)(nil), // 6: dbaas.v1beta1.UpdatePSMDBClusterResponse - (*GetPSMDBClusterResourcesRequest)(nil), // 7: dbaas.v1beta1.GetPSMDBClusterResourcesRequest - (*GetPSMDBClusterResourcesResponse)(nil), // 8: dbaas.v1beta1.GetPSMDBClusterResourcesResponse - (*PSMDBClusterParams_ReplicaSet)(nil), // 9: dbaas.v1beta1.PSMDBClusterParams.ReplicaSet - (*GetPSMDBClusterCredentialsResponse_PSMDBCredentials)(nil), // 10: dbaas.v1beta1.GetPSMDBClusterCredentialsResponse.PSMDBCredentials - (*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams)(nil), // 11: dbaas.v1beta1.UpdatePSMDBClusterRequest.UpdatePSMDBClusterParams - (*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet)(nil), // 12: dbaas.v1beta1.UpdatePSMDBClusterRequest.UpdatePSMDBClusterParams.ReplicaSet - (*Backup)(nil), // 13: dbaas.v1beta1.Backup - (*Restore)(nil), // 14: dbaas.v1beta1.Restore - (*Template)(nil), // 15: dbaas.v1beta1.Template - (*Resources)(nil), // 16: dbaas.v1beta1.Resources - (*ComputeResources)(nil), // 17: dbaas.v1beta1.ComputeResources - } -) - -var file_managementpb_dbaas_psmdb_clusters_proto_depIdxs = []int32{ - 9, // 0: dbaas.v1beta1.PSMDBClusterParams.replicaset:type_name -> dbaas.v1beta1.PSMDBClusterParams.ReplicaSet - 13, // 1: dbaas.v1beta1.PSMDBClusterParams.backup:type_name -> dbaas.v1beta1.Backup - 14, // 2: dbaas.v1beta1.PSMDBClusterParams.restore:type_name -> dbaas.v1beta1.Restore - 10, // 3: dbaas.v1beta1.GetPSMDBClusterCredentialsResponse.connection_credentials:type_name -> dbaas.v1beta1.GetPSMDBClusterCredentialsResponse.PSMDBCredentials - 0, // 4: dbaas.v1beta1.CreatePSMDBClusterRequest.params:type_name -> dbaas.v1beta1.PSMDBClusterParams - 15, // 5: dbaas.v1beta1.CreatePSMDBClusterRequest.template:type_name -> dbaas.v1beta1.Template - 11, // 6: dbaas.v1beta1.UpdatePSMDBClusterRequest.params:type_name -> dbaas.v1beta1.UpdatePSMDBClusterRequest.UpdatePSMDBClusterParams - 15, // 7: dbaas.v1beta1.UpdatePSMDBClusterRequest.template:type_name -> dbaas.v1beta1.Template - 0, // 8: dbaas.v1beta1.GetPSMDBClusterResourcesRequest.params:type_name -> dbaas.v1beta1.PSMDBClusterParams - 16, // 9: dbaas.v1beta1.GetPSMDBClusterResourcesResponse.expected:type_name -> dbaas.v1beta1.Resources - 17, // 10: dbaas.v1beta1.PSMDBClusterParams.ReplicaSet.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 12, // 11: dbaas.v1beta1.UpdatePSMDBClusterRequest.UpdatePSMDBClusterParams.replicaset:type_name -> dbaas.v1beta1.UpdatePSMDBClusterRequest.UpdatePSMDBClusterParams.ReplicaSet - 17, // 12: dbaas.v1beta1.UpdatePSMDBClusterRequest.UpdatePSMDBClusterParams.ReplicaSet.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 1, // 13: dbaas.v1beta1.PSMDBClusters.GetPSMDBClusterCredentials:input_type -> dbaas.v1beta1.GetPSMDBClusterCredentialsRequest - 3, // 14: dbaas.v1beta1.PSMDBClusters.CreatePSMDBCluster:input_type -> dbaas.v1beta1.CreatePSMDBClusterRequest - 5, // 15: dbaas.v1beta1.PSMDBClusters.UpdatePSMDBCluster:input_type -> dbaas.v1beta1.UpdatePSMDBClusterRequest - 7, // 16: dbaas.v1beta1.PSMDBClusters.GetPSMDBClusterResources:input_type -> dbaas.v1beta1.GetPSMDBClusterResourcesRequest - 2, // 17: dbaas.v1beta1.PSMDBClusters.GetPSMDBClusterCredentials:output_type -> dbaas.v1beta1.GetPSMDBClusterCredentialsResponse - 4, // 18: dbaas.v1beta1.PSMDBClusters.CreatePSMDBCluster:output_type -> dbaas.v1beta1.CreatePSMDBClusterResponse - 6, // 19: dbaas.v1beta1.PSMDBClusters.UpdatePSMDBCluster:output_type -> dbaas.v1beta1.UpdatePSMDBClusterResponse - 8, // 20: dbaas.v1beta1.PSMDBClusters.GetPSMDBClusterResources:output_type -> dbaas.v1beta1.GetPSMDBClusterResourcesResponse - 17, // [17:21] is the sub-list for method output_type - 13, // [13:17] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_managementpb_dbaas_psmdb_clusters_proto_init() } -func file_managementpb_dbaas_psmdb_clusters_proto_init() { - if File_managementpb_dbaas_psmdb_clusters_proto != nil { - return - } - file_managementpb_dbaas_dbaas_proto_init() - file_managementpb_dbaas_templates_proto_init() - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PSMDBClusterParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBClusterCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBClusterCredentialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePSMDBClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePSMDBClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePSMDBClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePSMDBClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBClusterResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBClusterResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PSMDBClusterParams_ReplicaSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPSMDBClusterCredentialsResponse_PSMDBCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_psmdb_clusters_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet); 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_managementpb_dbaas_psmdb_clusters_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_psmdb_clusters_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_psmdb_clusters_proto_depIdxs, - MessageInfos: file_managementpb_dbaas_psmdb_clusters_proto_msgTypes, - }.Build() - File_managementpb_dbaas_psmdb_clusters_proto = out.File - file_managementpb_dbaas_psmdb_clusters_proto_rawDesc = nil - file_managementpb_dbaas_psmdb_clusters_proto_goTypes = nil - file_managementpb_dbaas_psmdb_clusters_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/psmdb_clusters.pb.gw.go b/api/managementpb/dbaas/psmdb_clusters.pb.gw.go deleted file mode 100644 index 74d5c1eb87..0000000000 --- a/api/managementpb/dbaas/psmdb_clusters.pb.gw.go +++ /dev/null @@ -1,410 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/psmdb_clusters.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_PSMDBClusters_GetPSMDBClusterCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client PSMDBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPSMDBClusterCredentialsRequest - 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.GetPSMDBClusterCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PSMDBClusters_GetPSMDBClusterCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server PSMDBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPSMDBClusterCredentialsRequest - 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.GetPSMDBClusterCredentials(ctx, &protoReq) - return msg, metadata, err -} - -func request_PSMDBClusters_CreatePSMDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, client PSMDBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePSMDBClusterRequest - 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.CreatePSMDBCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PSMDBClusters_CreatePSMDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, server PSMDBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePSMDBClusterRequest - 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.CreatePSMDBCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_PSMDBClusters_UpdatePSMDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, client PSMDBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePSMDBClusterRequest - 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.UpdatePSMDBCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PSMDBClusters_UpdatePSMDBCluster_0(ctx context.Context, marshaler runtime.Marshaler, server PSMDBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePSMDBClusterRequest - 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.UpdatePSMDBCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_PSMDBClusters_GetPSMDBClusterResources_0(ctx context.Context, marshaler runtime.Marshaler, client PSMDBClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPSMDBClusterResourcesRequest - 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.GetPSMDBClusterResources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PSMDBClusters_GetPSMDBClusterResources_0(ctx context.Context, marshaler runtime.Marshaler, server PSMDBClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPSMDBClusterResourcesRequest - 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.GetPSMDBClusterResources(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterPSMDBClustersHandlerServer registers the http handlers for service PSMDBClusters to "mux". -// UnaryRPC :call PSMDBClustersServer 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 RegisterPSMDBClustersHandlerFromEndpoint instead. -func RegisterPSMDBClustersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PSMDBClustersServer) error { - mux.Handle("POST", pattern_PSMDBClusters_GetPSMDBClusterCredentials_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, "/dbaas.v1beta1.PSMDBClusters/GetPSMDBClusterCredentials", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBClusters/GetCredentials")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PSMDBClusters_GetPSMDBClusterCredentials_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_PSMDBClusters_GetPSMDBClusterCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PSMDBClusters_CreatePSMDBCluster_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, "/dbaas.v1beta1.PSMDBClusters/CreatePSMDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBCluster/Create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PSMDBClusters_CreatePSMDBCluster_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_PSMDBClusters_CreatePSMDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PSMDBClusters_UpdatePSMDBCluster_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, "/dbaas.v1beta1.PSMDBClusters/UpdatePSMDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBCluster/Update")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PSMDBClusters_UpdatePSMDBCluster_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_PSMDBClusters_UpdatePSMDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PSMDBClusters_GetPSMDBClusterResources_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, "/dbaas.v1beta1.PSMDBClusters/GetPSMDBClusterResources", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBCluster/Resources/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PSMDBClusters_GetPSMDBClusterResources_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_PSMDBClusters_GetPSMDBClusterResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterPSMDBClustersHandlerFromEndpoint is same as RegisterPSMDBClustersHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPSMDBClustersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterPSMDBClustersHandler(ctx, mux, conn) -} - -// RegisterPSMDBClustersHandler registers the http handlers for service PSMDBClusters to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterPSMDBClustersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPSMDBClustersHandlerClient(ctx, mux, NewPSMDBClustersClient(conn)) -} - -// RegisterPSMDBClustersHandlerClient registers the http handlers for service PSMDBClusters -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PSMDBClustersClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PSMDBClustersClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PSMDBClustersClient" to call the correct interceptors. -func RegisterPSMDBClustersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PSMDBClustersClient) error { - mux.Handle("POST", pattern_PSMDBClusters_GetPSMDBClusterCredentials_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, "/dbaas.v1beta1.PSMDBClusters/GetPSMDBClusterCredentials", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBClusters/GetCredentials")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PSMDBClusters_GetPSMDBClusterCredentials_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PSMDBClusters_GetPSMDBClusterCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PSMDBClusters_CreatePSMDBCluster_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, "/dbaas.v1beta1.PSMDBClusters/CreatePSMDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBCluster/Create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PSMDBClusters_CreatePSMDBCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PSMDBClusters_CreatePSMDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PSMDBClusters_UpdatePSMDBCluster_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, "/dbaas.v1beta1.PSMDBClusters/UpdatePSMDBCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBCluster/Update")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PSMDBClusters_UpdatePSMDBCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PSMDBClusters_UpdatePSMDBCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PSMDBClusters_GetPSMDBClusterResources_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, "/dbaas.v1beta1.PSMDBClusters/GetPSMDBClusterResources", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PSMDBCluster/Resources/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PSMDBClusters_GetPSMDBClusterResources_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PSMDBClusters_GetPSMDBClusterResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var ( - pattern_PSMDBClusters_GetPSMDBClusterCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "PSMDBClusters", "GetCredentials"}, "")) - - pattern_PSMDBClusters_CreatePSMDBCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "PSMDBCluster", "Create"}, "")) - - pattern_PSMDBClusters_UpdatePSMDBCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "PSMDBCluster", "Update"}, "")) - - pattern_PSMDBClusters_GetPSMDBClusterResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "management", "DBaaS", "PSMDBCluster", "Resources", "Get"}, "")) -) - -var ( - forward_PSMDBClusters_GetPSMDBClusterCredentials_0 = runtime.ForwardResponseMessage - - forward_PSMDBClusters_CreatePSMDBCluster_0 = runtime.ForwardResponseMessage - - forward_PSMDBClusters_UpdatePSMDBCluster_0 = runtime.ForwardResponseMessage - - forward_PSMDBClusters_GetPSMDBClusterResources_0 = runtime.ForwardResponseMessage -) diff --git a/api/managementpb/dbaas/psmdb_clusters.pb.validate.go b/api/managementpb/dbaas/psmdb_clusters.pb.validate.go deleted file mode 100644 index 0e5e6983f5..0000000000 --- a/api/managementpb/dbaas/psmdb_clusters.pb.validate.go +++ /dev/null @@ -1,1887 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/psmdb_clusters.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on PSMDBClusterParams with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PSMDBClusterParams) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PSMDBClusterParams with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PSMDBClusterParamsMultiError, or nil if none found. -func (m *PSMDBClusterParams) ValidateAll() error { - return m.validate(true) -} - -func (m *PSMDBClusterParams) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ClusterSize - - if all { - switch v := interface{}(m.GetReplicaset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterParamsValidationError{ - field: "Replicaset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterParamsValidationError{ - field: "Replicaset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetReplicaset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterParamsValidationError{ - field: "Replicaset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Image - - if all { - switch v := interface{}(m.GetBackup()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterParamsValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterParamsValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBackup()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterParamsValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRestore()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterParamsValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterParamsValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRestore()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterParamsValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return PSMDBClusterParamsMultiError(errors) - } - - return nil -} - -// PSMDBClusterParamsMultiError is an error wrapping multiple validation errors -// returned by PSMDBClusterParams.ValidateAll() if the designated constraints -// aren't met. -type PSMDBClusterParamsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PSMDBClusterParamsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PSMDBClusterParamsMultiError) AllErrors() []error { return m } - -// PSMDBClusterParamsValidationError is the validation error returned by -// PSMDBClusterParams.Validate if the designated constraints aren't met. -type PSMDBClusterParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PSMDBClusterParamsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PSMDBClusterParamsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PSMDBClusterParamsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PSMDBClusterParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PSMDBClusterParamsValidationError) ErrorName() string { - return "PSMDBClusterParamsValidationError" -} - -// Error satisfies the builtin error interface -func (e PSMDBClusterParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPSMDBClusterParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PSMDBClusterParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PSMDBClusterParamsValidationError{} - -// Validate checks the field values on GetPSMDBClusterCredentialsRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *GetPSMDBClusterCredentialsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPSMDBClusterCredentialsRequest -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// GetPSMDBClusterCredentialsRequestMultiError, or nil if none found. -func (m *GetPSMDBClusterCredentialsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBClusterCredentialsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := GetPSMDBClusterCredentialsRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := GetPSMDBClusterCredentialsRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GetPSMDBClusterCredentialsRequestMultiError(errors) - } - - return nil -} - -// GetPSMDBClusterCredentialsRequestMultiError is an error wrapping multiple -// validation errors returned by -// GetPSMDBClusterCredentialsRequest.ValidateAll() if the designated -// constraints aren't met. -type GetPSMDBClusterCredentialsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBClusterCredentialsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBClusterCredentialsRequestMultiError) AllErrors() []error { return m } - -// GetPSMDBClusterCredentialsRequestValidationError is the validation error -// returned by GetPSMDBClusterCredentialsRequest.Validate if the designated -// constraints aren't met. -type GetPSMDBClusterCredentialsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBClusterCredentialsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPSMDBClusterCredentialsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPSMDBClusterCredentialsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPSMDBClusterCredentialsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBClusterCredentialsRequestValidationError) ErrorName() string { - return "GetPSMDBClusterCredentialsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBClusterCredentialsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBClusterCredentialsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBClusterCredentialsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBClusterCredentialsRequestValidationError{} - -// Validate checks the field values on GetPSMDBClusterCredentialsResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *GetPSMDBClusterCredentialsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPSMDBClusterCredentialsResponse -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// GetPSMDBClusterCredentialsResponseMultiError, or nil if none found. -func (m *GetPSMDBClusterCredentialsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBClusterCredentialsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetConnectionCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPSMDBClusterCredentialsResponseValidationError{ - field: "ConnectionCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPSMDBClusterCredentialsResponseValidationError{ - field: "ConnectionCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPSMDBClusterCredentialsResponseValidationError{ - field: "ConnectionCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetPSMDBClusterCredentialsResponseMultiError(errors) - } - - return nil -} - -// GetPSMDBClusterCredentialsResponseMultiError is an error wrapping multiple -// validation errors returned by -// GetPSMDBClusterCredentialsResponse.ValidateAll() if the designated -// constraints aren't met. -type GetPSMDBClusterCredentialsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBClusterCredentialsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBClusterCredentialsResponseMultiError) AllErrors() []error { return m } - -// GetPSMDBClusterCredentialsResponseValidationError is the validation error -// returned by GetPSMDBClusterCredentialsResponse.Validate if the designated -// constraints aren't met. -type GetPSMDBClusterCredentialsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBClusterCredentialsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPSMDBClusterCredentialsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPSMDBClusterCredentialsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPSMDBClusterCredentialsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBClusterCredentialsResponseValidationError) ErrorName() string { - return "GetPSMDBClusterCredentialsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBClusterCredentialsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBClusterCredentialsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBClusterCredentialsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBClusterCredentialsResponseValidationError{} - -// Validate checks the field values on CreatePSMDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreatePSMDBClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreatePSMDBClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreatePSMDBClusterRequestMultiError, or nil if none found. -func (m *CreatePSMDBClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CreatePSMDBClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := CreatePSMDBClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CreatePSMDBClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CreatePSMDBClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CreatePSMDBClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Expose - - // no validation rules for InternetFacing - - if all { - switch v := interface{}(m.GetTemplate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CreatePSMDBClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CreatePSMDBClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CreatePSMDBClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CreatePSMDBClusterRequestMultiError(errors) - } - - return nil -} - -// CreatePSMDBClusterRequestMultiError is an error wrapping multiple validation -// errors returned by CreatePSMDBClusterRequest.ValidateAll() if the -// designated constraints aren't met. -type CreatePSMDBClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreatePSMDBClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreatePSMDBClusterRequestMultiError) AllErrors() []error { return m } - -// CreatePSMDBClusterRequestValidationError is the validation error returned by -// CreatePSMDBClusterRequest.Validate if the designated constraints aren't met. -type CreatePSMDBClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreatePSMDBClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreatePSMDBClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreatePSMDBClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreatePSMDBClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreatePSMDBClusterRequestValidationError) ErrorName() string { - return "CreatePSMDBClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CreatePSMDBClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreatePSMDBClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreatePSMDBClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreatePSMDBClusterRequestValidationError{} - -// Validate checks the field values on CreatePSMDBClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreatePSMDBClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreatePSMDBClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreatePSMDBClusterResponseMultiError, or nil if none found. -func (m *CreatePSMDBClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *CreatePSMDBClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return CreatePSMDBClusterResponseMultiError(errors) - } - - return nil -} - -// CreatePSMDBClusterResponseMultiError is an error wrapping multiple -// validation errors returned by CreatePSMDBClusterResponse.ValidateAll() if -// the designated constraints aren't met. -type CreatePSMDBClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreatePSMDBClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreatePSMDBClusterResponseMultiError) AllErrors() []error { return m } - -// CreatePSMDBClusterResponseValidationError is the validation error returned -// by CreatePSMDBClusterResponse.Validate if the designated constraints aren't met. -type CreatePSMDBClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreatePSMDBClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreatePSMDBClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreatePSMDBClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreatePSMDBClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreatePSMDBClusterResponseValidationError) ErrorName() string { - return "CreatePSMDBClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e CreatePSMDBClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreatePSMDBClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreatePSMDBClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreatePSMDBClusterResponseValidationError{} - -// Validate checks the field values on UpdatePSMDBClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePSMDBClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdatePSMDBClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePSMDBClusterRequestMultiError, or nil if none found. -func (m *UpdatePSMDBClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePSMDBClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := UpdatePSMDBClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := UpdatePSMDBClusterRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePSMDBClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Expose - - // no validation rules for InternetFacing - - if all { - switch v := interface{}(m.GetTemplate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePSMDBClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpdatePSMDBClusterRequestMultiError(errors) - } - - return nil -} - -// UpdatePSMDBClusterRequestMultiError is an error wrapping multiple validation -// errors returned by UpdatePSMDBClusterRequest.ValidateAll() if the -// designated constraints aren't met. -type UpdatePSMDBClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePSMDBClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePSMDBClusterRequestMultiError) AllErrors() []error { return m } - -// UpdatePSMDBClusterRequestValidationError is the validation error returned by -// UpdatePSMDBClusterRequest.Validate if the designated constraints aren't met. -type UpdatePSMDBClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePSMDBClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdatePSMDBClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdatePSMDBClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdatePSMDBClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePSMDBClusterRequestValidationError) ErrorName() string { - return "UpdatePSMDBClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePSMDBClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePSMDBClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePSMDBClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePSMDBClusterRequestValidationError{} - -// Validate checks the field values on UpdatePSMDBClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePSMDBClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdatePSMDBClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePSMDBClusterResponseMultiError, or nil if none found. -func (m *UpdatePSMDBClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePSMDBClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return UpdatePSMDBClusterResponseMultiError(errors) - } - - return nil -} - -// UpdatePSMDBClusterResponseMultiError is an error wrapping multiple -// validation errors returned by UpdatePSMDBClusterResponse.ValidateAll() if -// the designated constraints aren't met. -type UpdatePSMDBClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePSMDBClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePSMDBClusterResponseMultiError) AllErrors() []error { return m } - -// UpdatePSMDBClusterResponseValidationError is the validation error returned -// by UpdatePSMDBClusterResponse.Validate if the designated constraints aren't met. -type UpdatePSMDBClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePSMDBClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdatePSMDBClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdatePSMDBClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdatePSMDBClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePSMDBClusterResponseValidationError) ErrorName() string { - return "UpdatePSMDBClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePSMDBClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePSMDBClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePSMDBClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePSMDBClusterResponseValidationError{} - -// Validate checks the field values on GetPSMDBClusterResourcesRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPSMDBClusterResourcesRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPSMDBClusterResourcesRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GetPSMDBClusterResourcesRequestMultiError, or nil if none found. -func (m *GetPSMDBClusterResourcesRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBClusterResourcesRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPSMDBClusterResourcesRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPSMDBClusterResourcesRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPSMDBClusterResourcesRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetPSMDBClusterResourcesRequestMultiError(errors) - } - - return nil -} - -// GetPSMDBClusterResourcesRequestMultiError is an error wrapping multiple -// validation errors returned by GetPSMDBClusterResourcesRequest.ValidateAll() -// if the designated constraints aren't met. -type GetPSMDBClusterResourcesRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBClusterResourcesRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBClusterResourcesRequestMultiError) AllErrors() []error { return m } - -// GetPSMDBClusterResourcesRequestValidationError is the validation error -// returned by GetPSMDBClusterResourcesRequest.Validate if the designated -// constraints aren't met. -type GetPSMDBClusterResourcesRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBClusterResourcesRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPSMDBClusterResourcesRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPSMDBClusterResourcesRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPSMDBClusterResourcesRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBClusterResourcesRequestValidationError) ErrorName() string { - return "GetPSMDBClusterResourcesRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBClusterResourcesRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBClusterResourcesRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBClusterResourcesRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBClusterResourcesRequestValidationError{} - -// Validate checks the field values on GetPSMDBClusterResourcesResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *GetPSMDBClusterResourcesResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPSMDBClusterResourcesResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GetPSMDBClusterResourcesResponseMultiError, or nil if none found. -func (m *GetPSMDBClusterResourcesResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBClusterResourcesResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetExpected()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPSMDBClusterResourcesResponseValidationError{ - field: "Expected", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPSMDBClusterResourcesResponseValidationError{ - field: "Expected", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpected()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPSMDBClusterResourcesResponseValidationError{ - field: "Expected", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetPSMDBClusterResourcesResponseMultiError(errors) - } - - return nil -} - -// GetPSMDBClusterResourcesResponseMultiError is an error wrapping multiple -// validation errors returned by -// GetPSMDBClusterResourcesResponse.ValidateAll() if the designated -// constraints aren't met. -type GetPSMDBClusterResourcesResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBClusterResourcesResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBClusterResourcesResponseMultiError) AllErrors() []error { return m } - -// GetPSMDBClusterResourcesResponseValidationError is the validation error -// returned by GetPSMDBClusterResourcesResponse.Validate if the designated -// constraints aren't met. -type GetPSMDBClusterResourcesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBClusterResourcesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPSMDBClusterResourcesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPSMDBClusterResourcesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPSMDBClusterResourcesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBClusterResourcesResponseValidationError) ErrorName() string { - return "GetPSMDBClusterResourcesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBClusterResourcesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBClusterResourcesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBClusterResourcesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBClusterResourcesResponseValidationError{} - -// Validate checks the field values on PSMDBClusterParams_ReplicaSet with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PSMDBClusterParams_ReplicaSet) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PSMDBClusterParams_ReplicaSet with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// PSMDBClusterParams_ReplicaSetMultiError, or nil if none found. -func (m *PSMDBClusterParams_ReplicaSet) ValidateAll() error { - return m.validate(true) -} - -func (m *PSMDBClusterParams_ReplicaSet) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PSMDBClusterParams_ReplicaSetValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PSMDBClusterParams_ReplicaSetValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PSMDBClusterParams_ReplicaSetValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DiskSize - - // no validation rules for Configuration - - // no validation rules for StorageClass - - if len(errors) > 0 { - return PSMDBClusterParams_ReplicaSetMultiError(errors) - } - - return nil -} - -// PSMDBClusterParams_ReplicaSetMultiError is an error wrapping multiple -// validation errors returned by PSMDBClusterParams_ReplicaSet.ValidateAll() -// if the designated constraints aren't met. -type PSMDBClusterParams_ReplicaSetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PSMDBClusterParams_ReplicaSetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PSMDBClusterParams_ReplicaSetMultiError) AllErrors() []error { return m } - -// PSMDBClusterParams_ReplicaSetValidationError is the validation error -// returned by PSMDBClusterParams_ReplicaSet.Validate if the designated -// constraints aren't met. -type PSMDBClusterParams_ReplicaSetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PSMDBClusterParams_ReplicaSetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PSMDBClusterParams_ReplicaSetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PSMDBClusterParams_ReplicaSetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PSMDBClusterParams_ReplicaSetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PSMDBClusterParams_ReplicaSetValidationError) ErrorName() string { - return "PSMDBClusterParams_ReplicaSetValidationError" -} - -// Error satisfies the builtin error interface -func (e PSMDBClusterParams_ReplicaSetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPSMDBClusterParams_ReplicaSet.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PSMDBClusterParams_ReplicaSetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PSMDBClusterParams_ReplicaSetValidationError{} - -// Validate checks the field values on -// GetPSMDBClusterCredentialsResponse_PSMDBCredentials with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// GetPSMDBClusterCredentialsResponse_PSMDBCredentials with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// GetPSMDBClusterCredentialsResponse_PSMDBCredentialsMultiError, or nil if -// none found. -func (m *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPSMDBClusterCredentialsResponse_PSMDBCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Username - - // no validation rules for Password - - // no validation rules for Host - - // no validation rules for Port - - // no validation rules for Replicaset - - if len(errors) > 0 { - return GetPSMDBClusterCredentialsResponse_PSMDBCredentialsMultiError(errors) - } - - return nil -} - -// GetPSMDBClusterCredentialsResponse_PSMDBCredentialsMultiError is an error -// wrapping multiple validation errors returned by -// GetPSMDBClusterCredentialsResponse_PSMDBCredentials.ValidateAll() if the -// designated constraints aren't met. -type GetPSMDBClusterCredentialsResponse_PSMDBCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPSMDBClusterCredentialsResponse_PSMDBCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPSMDBClusterCredentialsResponse_PSMDBCredentialsMultiError) AllErrors() []error { return m } - -// GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError is the -// validation error returned by -// GetPSMDBClusterCredentialsResponse_PSMDBCredentials.Validate if the -// designated constraints aren't met. -type GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError) ErrorName() string { - return "GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPSMDBClusterCredentialsResponse_PSMDBCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPSMDBClusterCredentialsResponse_PSMDBCredentialsValidationError{} - -// Validate checks the field values on -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsMultiError, or nil if -// none found. -func (m *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ClusterSize - - if all { - switch v := interface{}(m.GetReplicaset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError{ - field: "Replicaset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError{ - field: "Replicaset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetReplicaset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError{ - field: "Replicaset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Suspend - - // no validation rules for Resume - - // no validation rules for Image - - if len(errors) > 0 { - return UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsMultiError(errors) - } - - return nil -} - -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsMultiError is an error -// wrapping multiple validation errors returned by -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams.ValidateAll() if the -// designated constraints aren't met. -type UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsMultiError) AllErrors() []error { return m } - -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError is the -// validation error returned by -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams.Validate if the -// designated constraints aren't met. -type UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError) ErrorName() string { - return "UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePSMDBClusterRequest_UpdatePSMDBClusterParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePSMDBClusterRequest_UpdatePSMDBClusterParamsValidationError{} - -// Validate checks the field values on -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetMultiError, or -// nil if none found. -func (m *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Configuration - - // no validation rules for StorageClass - - if len(errors) > 0 { - return UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetMultiError(errors) - } - - return nil -} - -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetMultiError is -// an error wrapping multiple validation errors returned by -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet.ValidateAll() -// if the designated constraints aren't met. -type UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetMultiError) AllErrors() []error { - return m -} - -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError -// is the validation error returned by -// UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet.Validate if -// the designated constraints aren't met. -type UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError) ErrorName() string { - return "UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSetValidationError{} diff --git a/api/managementpb/dbaas/psmdb_clusters.proto b/api/managementpb/dbaas/psmdb_clusters.proto deleted file mode 100644 index 73e95d9ae6..0000000000 --- a/api/managementpb/dbaas/psmdb_clusters.proto +++ /dev/null @@ -1,167 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "managementpb/dbaas/dbaas.proto"; -import "managementpb/dbaas/templates.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// PSMDBClusterParams represents PSMDB cluster parameters that can be updated. -message PSMDBClusterParams { - // ReplicaSet container parameters. - // TODO Do not use inner messages in all public APIs (for consistency). - message ReplicaSet { - // Requested compute resources. - ComputeResources compute_resources = 1; - // Disk size in bytes. - int64 disk_size = 2; - // Configuration for PSMDB cluster - string configuration = 4; - // Storage Class for PSMDB cluster. - string storage_class = 5; - } - // Cluster size. - int32 cluster_size = 1; - // ReplicaSet container parameters. - ReplicaSet replicaset = 2; - // Docker image used for PSMDB. - string image = 3; - // Backup configuration parameters. - Backup backup = 4; - // Restore configuration parameters. - Restore restore = 5; -} - -message GetPSMDBClusterCredentialsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PSMDB cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; -} - -message GetPSMDBClusterCredentialsResponse { - // PSMDBCredentials is a credentials to connect to PSMDB. - // TODO Do not use inner messages in all public APIs (for consistency). - message PSMDBCredentials { - // MongoDB username. - string username = 1; - // MongoDB password. - string password = 2; - // MongoDB host. - string host = 3; - // MongoDB port. - int32 port = 4; - // Replicaset name. - string replicaset = 5; - } - PSMDBCredentials connection_credentials = 1; -} - -message CreatePSMDBClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PSMDB cluster name. - // a DNS-1035 label must consist of lower case alphanumeric characters or '-', - // start with an alphabetic character, and end with an alphanumeric character - // (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?') - string name = 2; - // Cluster parameters. - PSMDBClusterParams params = 3; - // Make DB cluster accessible outside of K8s cluster. - bool expose = 4; - // Make DB cluster accessible via public internet. - bool internet_facing = 5; - // Apply IP source ranges against the cluster. - repeated string source_ranges = 6; - // Configuration template. - Template template = 7; -} - -message CreatePSMDBClusterResponse {} - -message UpdatePSMDBClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PSMDB cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; - // UpdatePSMDBClusterParams represents PSMDB cluster parameters that can be updated. - message UpdatePSMDBClusterParams { - // ReplicaSet container parameters. - message ReplicaSet { - // Requested compute resources. - ComputeResources compute_resources = 1; - // Configuration for PSMDB cluster - string configuration = 4; - // Storage Class for PSMDB cluster. - string storage_class = 5; - } - // Cluster size. - int32 cluster_size = 1; - // ReplicaSet container parameters. - ReplicaSet replicaset = 2; - // Suspend cluster `pause: true`. - bool suspend = 3; - // Resume cluster `pause: false`. - bool resume = 4; - // PSMDB image to use. If it's the same image but with different version tag, upgrade of database cluster to version - // in given tag is triggered. If entirely different image is given, error is returned. - string image = 5; - } - // Cluster parameters. - UpdatePSMDBClusterParams params = 3; - // Make DB cluster accessible outside of K8s cluster. - bool expose = 4; - // Make DB cluster accessible via public internet. - bool internet_facing = 5; - // Apply IP source ranges against the cluster. - repeated string source_ranges = 6; - // Configuration template. - Template template = 7; -} - -message UpdatePSMDBClusterResponse {} - -message GetPSMDBClusterResourcesRequest { - // Cluster parameters. - PSMDBClusterParams params = 1; -} - -message GetPSMDBClusterResourcesResponse { - // Expected resources to be consumed by the cluster. - Resources expected = 1; -} - -// PSMDBClusters service provides public methods for managing PSMDB clusters. -service PSMDBClusters { - // GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name. - rpc GetPSMDBClusterCredentials(GetPSMDBClusterCredentialsRequest) returns (GetPSMDBClusterCredentialsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PSMDBClusters/GetCredentials" - body: "*" - }; - } - // CreatePSMDBCluster creates a new PSMDB cluster. - rpc CreatePSMDBCluster(CreatePSMDBClusterRequest) returns (CreatePSMDBClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PSMDBCluster/Create" - body: "*" - }; - } - // UpdatePSMDBCluster updates existing PSMDB cluster. - rpc UpdatePSMDBCluster(UpdatePSMDBClusterRequest) returns (UpdatePSMDBClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PSMDBCluster/Update" - body: "*" - }; - } - // GetPSMDBClusterResources returns expected resources to be consumed by the cluster. - rpc GetPSMDBClusterResources(GetPSMDBClusterResourcesRequest) returns (GetPSMDBClusterResourcesResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PSMDBCluster/Resources/Get" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/psmdb_clusters_grpc.pb.go b/api/managementpb/dbaas/psmdb_clusters_grpc.pb.go deleted file mode 100644 index b30b23926f..0000000000 --- a/api/managementpb/dbaas/psmdb_clusters_grpc.pb.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/psmdb_clusters.proto - -package dbaasv1beta1 - -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 - -const ( - PSMDBClusters_GetPSMDBClusterCredentials_FullMethodName = "/dbaas.v1beta1.PSMDBClusters/GetPSMDBClusterCredentials" - PSMDBClusters_CreatePSMDBCluster_FullMethodName = "/dbaas.v1beta1.PSMDBClusters/CreatePSMDBCluster" - PSMDBClusters_UpdatePSMDBCluster_FullMethodName = "/dbaas.v1beta1.PSMDBClusters/UpdatePSMDBCluster" - PSMDBClusters_GetPSMDBClusterResources_FullMethodName = "/dbaas.v1beta1.PSMDBClusters/GetPSMDBClusterResources" -) - -// PSMDBClustersClient is the client API for PSMDBClusters 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 PSMDBClustersClient interface { - // GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name. - GetPSMDBClusterCredentials(ctx context.Context, in *GetPSMDBClusterCredentialsRequest, opts ...grpc.CallOption) (*GetPSMDBClusterCredentialsResponse, error) - // CreatePSMDBCluster creates a new PSMDB cluster. - CreatePSMDBCluster(ctx context.Context, in *CreatePSMDBClusterRequest, opts ...grpc.CallOption) (*CreatePSMDBClusterResponse, error) - // UpdatePSMDBCluster updates existing PSMDB cluster. - UpdatePSMDBCluster(ctx context.Context, in *UpdatePSMDBClusterRequest, opts ...grpc.CallOption) (*UpdatePSMDBClusterResponse, error) - // GetPSMDBClusterResources returns expected resources to be consumed by the cluster. - GetPSMDBClusterResources(ctx context.Context, in *GetPSMDBClusterResourcesRequest, opts ...grpc.CallOption) (*GetPSMDBClusterResourcesResponse, error) -} - -type pSMDBClustersClient struct { - cc grpc.ClientConnInterface -} - -func NewPSMDBClustersClient(cc grpc.ClientConnInterface) PSMDBClustersClient { - return &pSMDBClustersClient{cc} -} - -func (c *pSMDBClustersClient) GetPSMDBClusterCredentials(ctx context.Context, in *GetPSMDBClusterCredentialsRequest, opts ...grpc.CallOption) (*GetPSMDBClusterCredentialsResponse, error) { - out := new(GetPSMDBClusterCredentialsResponse) - err := c.cc.Invoke(ctx, PSMDBClusters_GetPSMDBClusterCredentials_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pSMDBClustersClient) CreatePSMDBCluster(ctx context.Context, in *CreatePSMDBClusterRequest, opts ...grpc.CallOption) (*CreatePSMDBClusterResponse, error) { - out := new(CreatePSMDBClusterResponse) - err := c.cc.Invoke(ctx, PSMDBClusters_CreatePSMDBCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pSMDBClustersClient) UpdatePSMDBCluster(ctx context.Context, in *UpdatePSMDBClusterRequest, opts ...grpc.CallOption) (*UpdatePSMDBClusterResponse, error) { - out := new(UpdatePSMDBClusterResponse) - err := c.cc.Invoke(ctx, PSMDBClusters_UpdatePSMDBCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pSMDBClustersClient) GetPSMDBClusterResources(ctx context.Context, in *GetPSMDBClusterResourcesRequest, opts ...grpc.CallOption) (*GetPSMDBClusterResourcesResponse, error) { - out := new(GetPSMDBClusterResourcesResponse) - err := c.cc.Invoke(ctx, PSMDBClusters_GetPSMDBClusterResources_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PSMDBClustersServer is the server API for PSMDBClusters service. -// All implementations must embed UnimplementedPSMDBClustersServer -// for forward compatibility -type PSMDBClustersServer interface { - // GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name. - GetPSMDBClusterCredentials(context.Context, *GetPSMDBClusterCredentialsRequest) (*GetPSMDBClusterCredentialsResponse, error) - // CreatePSMDBCluster creates a new PSMDB cluster. - CreatePSMDBCluster(context.Context, *CreatePSMDBClusterRequest) (*CreatePSMDBClusterResponse, error) - // UpdatePSMDBCluster updates existing PSMDB cluster. - UpdatePSMDBCluster(context.Context, *UpdatePSMDBClusterRequest) (*UpdatePSMDBClusterResponse, error) - // GetPSMDBClusterResources returns expected resources to be consumed by the cluster. - GetPSMDBClusterResources(context.Context, *GetPSMDBClusterResourcesRequest) (*GetPSMDBClusterResourcesResponse, error) - mustEmbedUnimplementedPSMDBClustersServer() -} - -// UnimplementedPSMDBClustersServer must be embedded to have forward compatible implementations. -type UnimplementedPSMDBClustersServer struct{} - -func (UnimplementedPSMDBClustersServer) GetPSMDBClusterCredentials(context.Context, *GetPSMDBClusterCredentialsRequest) (*GetPSMDBClusterCredentialsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPSMDBClusterCredentials not implemented") -} - -func (UnimplementedPSMDBClustersServer) CreatePSMDBCluster(context.Context, *CreatePSMDBClusterRequest) (*CreatePSMDBClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePSMDBCluster not implemented") -} - -func (UnimplementedPSMDBClustersServer) UpdatePSMDBCluster(context.Context, *UpdatePSMDBClusterRequest) (*UpdatePSMDBClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePSMDBCluster not implemented") -} - -func (UnimplementedPSMDBClustersServer) GetPSMDBClusterResources(context.Context, *GetPSMDBClusterResourcesRequest) (*GetPSMDBClusterResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPSMDBClusterResources not implemented") -} -func (UnimplementedPSMDBClustersServer) mustEmbedUnimplementedPSMDBClustersServer() {} - -// UnsafePSMDBClustersServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PSMDBClustersServer will -// result in compilation errors. -type UnsafePSMDBClustersServer interface { - mustEmbedUnimplementedPSMDBClustersServer() -} - -func RegisterPSMDBClustersServer(s grpc.ServiceRegistrar, srv PSMDBClustersServer) { - s.RegisterService(&PSMDBClusters_ServiceDesc, srv) -} - -func _PSMDBClusters_GetPSMDBClusterCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPSMDBClusterCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PSMDBClustersServer).GetPSMDBClusterCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PSMDBClusters_GetPSMDBClusterCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PSMDBClustersServer).GetPSMDBClusterCredentials(ctx, req.(*GetPSMDBClusterCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PSMDBClusters_CreatePSMDBCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePSMDBClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PSMDBClustersServer).CreatePSMDBCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PSMDBClusters_CreatePSMDBCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PSMDBClustersServer).CreatePSMDBCluster(ctx, req.(*CreatePSMDBClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PSMDBClusters_UpdatePSMDBCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatePSMDBClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PSMDBClustersServer).UpdatePSMDBCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PSMDBClusters_UpdatePSMDBCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PSMDBClustersServer).UpdatePSMDBCluster(ctx, req.(*UpdatePSMDBClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PSMDBClusters_GetPSMDBClusterResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPSMDBClusterResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PSMDBClustersServer).GetPSMDBClusterResources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PSMDBClusters_GetPSMDBClusterResources_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PSMDBClustersServer).GetPSMDBClusterResources(ctx, req.(*GetPSMDBClusterResourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// PSMDBClusters_ServiceDesc is the grpc.ServiceDesc for PSMDBClusters service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var PSMDBClusters_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.PSMDBClusters", - HandlerType: (*PSMDBClustersServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetPSMDBClusterCredentials", - Handler: _PSMDBClusters_GetPSMDBClusterCredentials_Handler, - }, - { - MethodName: "CreatePSMDBCluster", - Handler: _PSMDBClusters_CreatePSMDBCluster_Handler, - }, - { - MethodName: "UpdatePSMDBCluster", - Handler: _PSMDBClusters_UpdatePSMDBCluster_Handler, - }, - { - MethodName: "GetPSMDBClusterResources", - Handler: _PSMDBClusters_GetPSMDBClusterResources_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/psmdb_clusters.proto", -} diff --git a/api/managementpb/dbaas/pxc_clusters.pb.go b/api/managementpb/dbaas/pxc_clusters.pb.go deleted file mode 100644 index ec34b22c58..0000000000 --- a/api/managementpb/dbaas/pxc_clusters.pb.go +++ /dev/null @@ -1,1792 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/pxc_clusters.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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) -) - -// PXCBackupState represents PXC backup CR state. -type PXCBackupState int32 - -const ( - // PXC_BACKUP_STATE_INVALID represents unknown state. - PXCBackupState_PXC_BACKUP_STATE_INVALID PXCBackupState = 0 - // PXC_BACKUP_STATE_RUNNING represents running backup. - PXCBackupState_PXC_BACKUP_STATE_RUNNING PXCBackupState = 1 - // PXC_BACKUP_STATE_SUCCEEDED represents succeeded backup. - PXCBackupState_PXC_BACKUP_STATE_SUCCEEDED PXCBackupState = 2 - // PXC_BACKUP_STATE_FAILED represents failed backup. - PXCBackupState_PXC_BACKUP_STATE_FAILED PXCBackupState = 3 -) - -// Enum value maps for PXCBackupState. -var ( - PXCBackupState_name = map[int32]string{ - 0: "PXC_BACKUP_STATE_INVALID", - 1: "PXC_BACKUP_STATE_RUNNING", - 2: "PXC_BACKUP_STATE_SUCCEEDED", - 3: "PXC_BACKUP_STATE_FAILED", - } - PXCBackupState_value = map[string]int32{ - "PXC_BACKUP_STATE_INVALID": 0, - "PXC_BACKUP_STATE_RUNNING": 1, - "PXC_BACKUP_STATE_SUCCEEDED": 2, - "PXC_BACKUP_STATE_FAILED": 3, - } -) - -func (x PXCBackupState) Enum() *PXCBackupState { - p := new(PXCBackupState) - *p = x - return p -} - -func (x PXCBackupState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PXCBackupState) Descriptor() protoreflect.EnumDescriptor { - return file_managementpb_dbaas_pxc_clusters_proto_enumTypes[0].Descriptor() -} - -func (PXCBackupState) Type() protoreflect.EnumType { - return &file_managementpb_dbaas_pxc_clusters_proto_enumTypes[0] -} - -func (x PXCBackupState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PXCBackupState.Descriptor instead. -func (PXCBackupState) EnumDescriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{0} -} - -// PXCClusterParams represents PXC cluster parameters that can be updated. -type PXCClusterParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster size. - ClusterSize int32 `protobuf:"varint,1,opt,name=cluster_size,json=clusterSize,proto3" json:"cluster_size,omitempty"` - // PXC container parameters. - Pxc *PXCClusterParams_PXC `protobuf:"bytes,2,opt,name=pxc,proto3" json:"pxc,omitempty"` - // NOTE: Only one of fields proxysql or haproxy has to be set, we check this in the code. - // ProxySQL container parameters. - Proxysql *PXCClusterParams_ProxySQL `protobuf:"bytes,3,opt,name=proxysql,proto3" json:"proxysql,omitempty"` - // HAProxy container parameters. - Haproxy *PXCClusterParams_HAProxy `protobuf:"bytes,4,opt,name=haproxy,proto3" json:"haproxy,omitempty"` - // Backup configuration parameters. - Backup *Backup `protobuf:"bytes,5,opt,name=backup,proto3" json:"backup,omitempty"` - // Restore configuration parameters. - Restore *Restore `protobuf:"bytes,6,opt,name=restore,proto3" json:"restore,omitempty"` -} - -func (x *PXCClusterParams) Reset() { - *x = PXCClusterParams{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PXCClusterParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PXCClusterParams) ProtoMessage() {} - -func (x *PXCClusterParams) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 PXCClusterParams.ProtoReflect.Descriptor instead. -func (*PXCClusterParams) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{0} -} - -func (x *PXCClusterParams) GetClusterSize() int32 { - if x != nil { - return x.ClusterSize - } - return 0 -} - -func (x *PXCClusterParams) GetPxc() *PXCClusterParams_PXC { - if x != nil { - return x.Pxc - } - return nil -} - -func (x *PXCClusterParams) GetProxysql() *PXCClusterParams_ProxySQL { - if x != nil { - return x.Proxysql - } - return nil -} - -func (x *PXCClusterParams) GetHaproxy() *PXCClusterParams_HAProxy { - if x != nil { - return x.Haproxy - } - return nil -} - -func (x *PXCClusterParams) GetBackup() *Backup { - if x != nil { - return x.Backup - } - return nil -} - -func (x *PXCClusterParams) GetRestore() *Restore { - if x != nil { - return x.Restore - } - return nil -} - -type GetPXCClusterCredentialsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PXC cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetPXCClusterCredentialsRequest) Reset() { - *x = GetPXCClusterCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPXCClusterCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPXCClusterCredentialsRequest) ProtoMessage() {} - -func (x *GetPXCClusterCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 GetPXCClusterCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetPXCClusterCredentialsRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{1} -} - -func (x *GetPXCClusterCredentialsRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *GetPXCClusterCredentialsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// PXCClusterConnectionCredentials is cluster connection credentials. -type PXCClusterConnectionCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // PXC username. - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // PXC password. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // PXC host. - Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` - // PXC port. - Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` -} - -func (x *PXCClusterConnectionCredentials) Reset() { - *x = PXCClusterConnectionCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PXCClusterConnectionCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PXCClusterConnectionCredentials) ProtoMessage() {} - -func (x *PXCClusterConnectionCredentials) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 PXCClusterConnectionCredentials.ProtoReflect.Descriptor instead. -func (*PXCClusterConnectionCredentials) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{2} -} - -func (x *PXCClusterConnectionCredentials) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *PXCClusterConnectionCredentials) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *PXCClusterConnectionCredentials) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *PXCClusterConnectionCredentials) GetPort() int32 { - if x != nil { - return x.Port - } - return 0 -} - -type GetPXCClusterCredentialsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster connection credentials. - ConnectionCredentials *PXCClusterConnectionCredentials `protobuf:"bytes,1,opt,name=connection_credentials,json=connectionCredentials,proto3" json:"connection_credentials,omitempty"` -} - -func (x *GetPXCClusterCredentialsResponse) Reset() { - *x = GetPXCClusterCredentialsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPXCClusterCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPXCClusterCredentialsResponse) ProtoMessage() {} - -func (x *GetPXCClusterCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 GetPXCClusterCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetPXCClusterCredentialsResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{3} -} - -func (x *GetPXCClusterCredentialsResponse) GetConnectionCredentials() *PXCClusterConnectionCredentials { - if x != nil { - return x.ConnectionCredentials - } - return nil -} - -type CreatePXCClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PXC cluster name. - // a DNS-1035 label must consist of lower case alphanumeric characters or '-', - // start with an alphabetic character, and end with an alphanumeric character - // (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?') - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Cluster parameters. - Params *PXCClusterParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` - // Make DB cluster accessible outside of K8s cluster. - Expose bool `protobuf:"varint,4,opt,name=expose,proto3" json:"expose,omitempty"` - // Make DB cluster accessible via public internet. - InternetFacing bool `protobuf:"varint,5,opt,name=internet_facing,json=internetFacing,proto3" json:"internet_facing,omitempty"` - // Apply IP source ranges against the cluster. - SourceRanges []string `protobuf:"bytes,6,rep,name=source_ranges,json=sourceRanges,proto3" json:"source_ranges,omitempty"` - // Configuration template. - Template *Template `protobuf:"bytes,7,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *CreatePXCClusterRequest) Reset() { - *x = CreatePXCClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePXCClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePXCClusterRequest) ProtoMessage() {} - -func (x *CreatePXCClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 CreatePXCClusterRequest.ProtoReflect.Descriptor instead. -func (*CreatePXCClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{4} -} - -func (x *CreatePXCClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *CreatePXCClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CreatePXCClusterRequest) GetParams() *PXCClusterParams { - if x != nil { - return x.Params - } - return nil -} - -func (x *CreatePXCClusterRequest) GetExpose() bool { - if x != nil { - return x.Expose - } - return false -} - -func (x *CreatePXCClusterRequest) GetInternetFacing() bool { - if x != nil { - return x.InternetFacing - } - return false -} - -func (x *CreatePXCClusterRequest) GetSourceRanges() []string { - if x != nil { - return x.SourceRanges - } - return nil -} - -func (x *CreatePXCClusterRequest) GetTemplate() *Template { - if x != nil { - return x.Template - } - return nil -} - -type CreatePXCClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreatePXCClusterResponse) Reset() { - *x = CreatePXCClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreatePXCClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePXCClusterResponse) ProtoMessage() {} - -func (x *CreatePXCClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 CreatePXCClusterResponse.ProtoReflect.Descriptor instead. -func (*CreatePXCClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{5} -} - -type UpdatePXCClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // PXC cluster name. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Cluster parameters. - Params *UpdatePXCClusterRequest_UpdatePXCClusterParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` - // Make DB cluster accessible outside of K8s cluster. - Expose bool `protobuf:"varint,4,opt,name=expose,proto3" json:"expose,omitempty"` - // Make DB cluster accessible via public internet. - InternetFacing bool `protobuf:"varint,5,opt,name=internet_facing,json=internetFacing,proto3" json:"internet_facing,omitempty"` - // Apply IP source ranges against the cluster. - SourceRanges []string `protobuf:"bytes,6,rep,name=source_ranges,json=sourceRanges,proto3" json:"source_ranges,omitempty"` - // Configuration template. - Template *Template `protobuf:"bytes,7,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *UpdatePXCClusterRequest) Reset() { - *x = UpdatePXCClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePXCClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePXCClusterRequest) ProtoMessage() {} - -func (x *UpdatePXCClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 UpdatePXCClusterRequest.ProtoReflect.Descriptor instead. -func (*UpdatePXCClusterRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdatePXCClusterRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *UpdatePXCClusterRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *UpdatePXCClusterRequest) GetParams() *UpdatePXCClusterRequest_UpdatePXCClusterParams { - if x != nil { - return x.Params - } - return nil -} - -func (x *UpdatePXCClusterRequest) GetExpose() bool { - if x != nil { - return x.Expose - } - return false -} - -func (x *UpdatePXCClusterRequest) GetInternetFacing() bool { - if x != nil { - return x.InternetFacing - } - return false -} - -func (x *UpdatePXCClusterRequest) GetSourceRanges() []string { - if x != nil { - return x.SourceRanges - } - return nil -} - -func (x *UpdatePXCClusterRequest) GetTemplate() *Template { - if x != nil { - return x.Template - } - return nil -} - -type UpdatePXCClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdatePXCClusterResponse) Reset() { - *x = UpdatePXCClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePXCClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePXCClusterResponse) ProtoMessage() {} - -func (x *UpdatePXCClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 UpdatePXCClusterResponse.ProtoReflect.Descriptor instead. -func (*UpdatePXCClusterResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{7} -} - -type GetPXCClusterResourcesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster parameters. - Params *PXCClusterParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *GetPXCClusterResourcesRequest) Reset() { - *x = GetPXCClusterResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPXCClusterResourcesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPXCClusterResourcesRequest) ProtoMessage() {} - -func (x *GetPXCClusterResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 GetPXCClusterResourcesRequest.ProtoReflect.Descriptor instead. -func (*GetPXCClusterResourcesRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{8} -} - -func (x *GetPXCClusterResourcesRequest) GetParams() *PXCClusterParams { - if x != nil { - return x.Params - } - return nil -} - -type GetPXCClusterResourcesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Expected resources to be consumed by the cluster. - Expected *Resources `protobuf:"bytes,1,opt,name=expected,proto3" json:"expected,omitempty"` -} - -func (x *GetPXCClusterResourcesResponse) Reset() { - *x = GetPXCClusterResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPXCClusterResourcesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPXCClusterResourcesResponse) ProtoMessage() {} - -func (x *GetPXCClusterResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 GetPXCClusterResourcesResponse.ProtoReflect.Descriptor instead. -func (*GetPXCClusterResourcesResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{9} -} - -func (x *GetPXCClusterResourcesResponse) GetExpected() *Resources { - if x != nil { - return x.Expected - } - return nil -} - -// PXC container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -type PXCClusterParams_PXC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Docker image used for PXC. - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` - // Disk size in bytes. - DiskSize int64 `protobuf:"varint,2,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` - // Configuration for PXC cluster - Configuration string `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` - // Storage Class for PXC cluster. - StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` -} - -func (x *PXCClusterParams_PXC) Reset() { - *x = PXCClusterParams_PXC{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PXCClusterParams_PXC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PXCClusterParams_PXC) ProtoMessage() {} - -func (x *PXCClusterParams_PXC) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 PXCClusterParams_PXC.ProtoReflect.Descriptor instead. -func (*PXCClusterParams_PXC) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *PXCClusterParams_PXC) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *PXCClusterParams_PXC) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -func (x *PXCClusterParams_PXC) GetDiskSize() int64 { - if x != nil { - return x.DiskSize - } - return 0 -} - -func (x *PXCClusterParams_PXC) GetConfiguration() string { - if x != nil { - return x.Configuration - } - return "" -} - -func (x *PXCClusterParams_PXC) GetStorageClass() string { - if x != nil { - return x.StorageClass - } - return "" -} - -// ProxySQL container parameters. -// TODO Do not use inner messages in all public APIs (for consistency). -type PXCClusterParams_ProxySQL struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Docker image used for ProxySQL. - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` - // Disk size in bytes. - DiskSize int64 `protobuf:"varint,2,opt,name=disk_size,json=diskSize,proto3" json:"disk_size,omitempty"` -} - -func (x *PXCClusterParams_ProxySQL) Reset() { - *x = PXCClusterParams_ProxySQL{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PXCClusterParams_ProxySQL) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PXCClusterParams_ProxySQL) ProtoMessage() {} - -func (x *PXCClusterParams_ProxySQL) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 PXCClusterParams_ProxySQL.ProtoReflect.Descriptor instead. -func (*PXCClusterParams_ProxySQL) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *PXCClusterParams_ProxySQL) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *PXCClusterParams_ProxySQL) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -func (x *PXCClusterParams_ProxySQL) GetDiskSize() int64 { - if x != nil { - return x.DiskSize - } - return 0 -} - -// HAProxy container parameters. -// NOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it. -type PXCClusterParams_HAProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Docker image used for HAProxy. - Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,2,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` -} - -func (x *PXCClusterParams_HAProxy) Reset() { - *x = PXCClusterParams_HAProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PXCClusterParams_HAProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PXCClusterParams_HAProxy) ProtoMessage() {} - -func (x *PXCClusterParams_HAProxy) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 PXCClusterParams_HAProxy.ProtoReflect.Descriptor instead. -func (*PXCClusterParams_HAProxy) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *PXCClusterParams_HAProxy) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *PXCClusterParams_HAProxy) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -// UpdatePXCClusterParams represents PXC cluster parameters that can be updated. -type UpdatePXCClusterRequest_UpdatePXCClusterParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Cluster size. - ClusterSize int32 `protobuf:"varint,1,opt,name=cluster_size,json=clusterSize,proto3" json:"cluster_size,omitempty"` - // PXC container parameters. - Pxc *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC `protobuf:"bytes,2,opt,name=pxc,proto3" json:"pxc,omitempty"` - // ProxySQL container parameters. - Proxysql *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL `protobuf:"bytes,3,opt,name=proxysql,proto3" json:"proxysql,omitempty"` - // Suspend cluster `pause: true`. - Suspend bool `protobuf:"varint,4,opt,name=suspend,proto3" json:"suspend,omitempty"` - // Resume cluster `pause: false`. - Resume bool `protobuf:"varint,5,opt,name=resume,proto3" json:"resume,omitempty"` - // HAProxy container parameters. - Haproxy *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy `protobuf:"bytes,6,opt,name=haproxy,proto3" json:"haproxy,omitempty"` -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) Reset() { - *x = UpdatePXCClusterRequest_UpdatePXCClusterParams{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams) ProtoMessage() {} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 UpdatePXCClusterRequest_UpdatePXCClusterParams.ProtoReflect.Descriptor instead. -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) GetClusterSize() int32 { - if x != nil { - return x.ClusterSize - } - return 0 -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) GetPxc() *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC { - if x != nil { - return x.Pxc - } - return nil -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) GetProxysql() *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL { - if x != nil { - return x.Proxysql - } - return nil -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) GetSuspend() bool { - if x != nil { - return x.Suspend - } - return false -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) GetResume() bool { - if x != nil { - return x.Resume - } - return false -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams) GetHaproxy() *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy { - if x != nil { - return x.Haproxy - } - return nil -} - -// PXC container parameters. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` - // Image to use. If it's the same image but with different version tag, upgrade of database cluster to version - // in given tag is triggered. If entirely different image is given, error is returned. - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - // Configuration for PXC cluster - Configuration string `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` - // Storage Class for PXC cluster. - StorageClass string `protobuf:"bytes,5,opt,name=storage_class,json=storageClass,proto3" json:"storage_class,omitempty"` -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) Reset() { - *x = UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) ProtoMessage() {} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC.ProtoReflect.Descriptor instead. -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{6, 0, 0} -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) GetConfiguration() string { - if x != nil { - return x.Configuration - } - return "" -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) GetStorageClass() string { - if x != nil { - return x.StorageClass - } - return "" -} - -// ProxySQL container parameters. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) Reset() { - *x = UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) ProtoMessage() {} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL.ProtoReflect.Descriptor instead. -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{6, 0, 1} -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -// HAProxy container parameters. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Requested compute resources. - ComputeResources *ComputeResources `protobuf:"bytes,1,opt,name=compute_resources,json=computeResources,proto3" json:"compute_resources,omitempty"` -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) Reset() { - *x = UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_pxc_clusters_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) ProtoMessage() {} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_pxc_clusters_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 UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy.ProtoReflect.Descriptor instead. -func (*UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP(), []int{6, 0, 2} -} - -func (x *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) GetComputeResources() *ComputeResources { - if x != nil { - return x.ComputeResources - } - return nil -} - -var File_managementpb_dbaas_pxc_clusters_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_pxc_clusters_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x70, 0x78, 0x63, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa7, 0x06, 0x0a, 0x10, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x35, 0x0a, 0x03, 0x70, 0x78, 0x63, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x58, 0x43, 0x52, 0x03, 0x70, 0x78, 0x63, - 0x12, 0x44, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x41, 0x0a, 0x07, 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x52, 0x07, 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, - 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x30, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0xd1, 0x01, 0x0a, 0x03, 0x50, - 0x58, 0x43, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x4c, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x1a, 0x8b, - 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x4c, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, - 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x6d, 0x0a, 0x07, - 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x4c, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x1f, 0x47, - 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, - 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x81, 0x01, 0x0a, - 0x1f, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x22, 0x89, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x22, 0xc2, 0x02, 0x0a, - 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x58, - 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x46, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdd, 0x08, - 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, - 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x5f, 0x66, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x46, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, - 0x23, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0xf1, 0x05, 0x0a, 0x16, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x53, 0x0a, 0x03, 0x70, 0x78, 0x63, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x58, 0x43, 0x52, 0x03, 0x70, 0x78, 0x63, 0x12, 0x62, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6d, 0x65, 0x12, 0x5f, 0x0a, 0x07, 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x07, 0x68, 0x61, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x1a, 0xb4, 0x01, 0x0a, 0x03, 0x50, 0x58, 0x43, 0x12, 0x4c, 0x0a, 0x11, 0x63, - 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, - 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x1a, 0x58, 0x0a, 0x08, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x4c, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, - 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x1a, 0x57, 0x0a, 0x07, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, - 0x4c, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x1a, 0x0a, - 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x1d, 0x47, 0x65, 0x74, - 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x62, 0x61, - 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x58, 0x43, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x56, 0x0a, - 0x1e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x08, 0x65, 0x78, 0x70, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x2a, 0x89, 0x01, 0x0a, 0x0e, 0x50, 0x58, 0x43, 0x42, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x58, 0x43, 0x5f, - 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x58, 0x43, 0x5f, 0x42, 0x41, - 0x43, 0x4b, 0x55, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x58, 0x43, 0x5f, 0x42, 0x41, 0x43, 0x4b, - 0x55, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x58, 0x43, 0x5f, 0x42, 0x41, 0x43, 0x4b, - 0x55, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, - 0x03, 0x32, 0xab, 0x05, 0x0a, 0x0b, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x2e, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, - 0x2f, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x47, 0x65, 0x74, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x10, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x26, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, - 0x61, 0x53, 0x2f, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x50, 0x58, 0x43, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0xaf, 0x01, - 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, - 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x50, 0x58, 0x43, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x42, - 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x50, 0x78, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, - 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x62, - 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x62, - 0x61, 0x61, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, 0x61, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_pxc_clusters_proto_rawDescOnce sync.Once - file_managementpb_dbaas_pxc_clusters_proto_rawDescData = file_managementpb_dbaas_pxc_clusters_proto_rawDesc -) - -func file_managementpb_dbaas_pxc_clusters_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_pxc_clusters_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_pxc_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_pxc_clusters_proto_rawDescData) - }) - return file_managementpb_dbaas_pxc_clusters_proto_rawDescData -} - -var ( - file_managementpb_dbaas_pxc_clusters_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_dbaas_pxc_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 17) - file_managementpb_dbaas_pxc_clusters_proto_goTypes = []interface{}{ - (PXCBackupState)(0), // 0: dbaas.v1beta1.PXCBackupState - (*PXCClusterParams)(nil), // 1: dbaas.v1beta1.PXCClusterParams - (*GetPXCClusterCredentialsRequest)(nil), // 2: dbaas.v1beta1.GetPXCClusterCredentialsRequest - (*PXCClusterConnectionCredentials)(nil), // 3: dbaas.v1beta1.PXCClusterConnectionCredentials - (*GetPXCClusterCredentialsResponse)(nil), // 4: dbaas.v1beta1.GetPXCClusterCredentialsResponse - (*CreatePXCClusterRequest)(nil), // 5: dbaas.v1beta1.CreatePXCClusterRequest - (*CreatePXCClusterResponse)(nil), // 6: dbaas.v1beta1.CreatePXCClusterResponse - (*UpdatePXCClusterRequest)(nil), // 7: dbaas.v1beta1.UpdatePXCClusterRequest - (*UpdatePXCClusterResponse)(nil), // 8: dbaas.v1beta1.UpdatePXCClusterResponse - (*GetPXCClusterResourcesRequest)(nil), // 9: dbaas.v1beta1.GetPXCClusterResourcesRequest - (*GetPXCClusterResourcesResponse)(nil), // 10: dbaas.v1beta1.GetPXCClusterResourcesResponse - (*PXCClusterParams_PXC)(nil), // 11: dbaas.v1beta1.PXCClusterParams.PXC - (*PXCClusterParams_ProxySQL)(nil), // 12: dbaas.v1beta1.PXCClusterParams.ProxySQL - (*PXCClusterParams_HAProxy)(nil), // 13: dbaas.v1beta1.PXCClusterParams.HAProxy - (*UpdatePXCClusterRequest_UpdatePXCClusterParams)(nil), // 14: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams - (*UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC)(nil), // 15: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.PXC - (*UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL)(nil), // 16: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.ProxySQL - (*UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy)(nil), // 17: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.HAProxy - (*Backup)(nil), // 18: dbaas.v1beta1.Backup - (*Restore)(nil), // 19: dbaas.v1beta1.Restore - (*Template)(nil), // 20: dbaas.v1beta1.Template - (*Resources)(nil), // 21: dbaas.v1beta1.Resources - (*ComputeResources)(nil), // 22: dbaas.v1beta1.ComputeResources - } -) - -var file_managementpb_dbaas_pxc_clusters_proto_depIdxs = []int32{ - 11, // 0: dbaas.v1beta1.PXCClusterParams.pxc:type_name -> dbaas.v1beta1.PXCClusterParams.PXC - 12, // 1: dbaas.v1beta1.PXCClusterParams.proxysql:type_name -> dbaas.v1beta1.PXCClusterParams.ProxySQL - 13, // 2: dbaas.v1beta1.PXCClusterParams.haproxy:type_name -> dbaas.v1beta1.PXCClusterParams.HAProxy - 18, // 3: dbaas.v1beta1.PXCClusterParams.backup:type_name -> dbaas.v1beta1.Backup - 19, // 4: dbaas.v1beta1.PXCClusterParams.restore:type_name -> dbaas.v1beta1.Restore - 3, // 5: dbaas.v1beta1.GetPXCClusterCredentialsResponse.connection_credentials:type_name -> dbaas.v1beta1.PXCClusterConnectionCredentials - 1, // 6: dbaas.v1beta1.CreatePXCClusterRequest.params:type_name -> dbaas.v1beta1.PXCClusterParams - 20, // 7: dbaas.v1beta1.CreatePXCClusterRequest.template:type_name -> dbaas.v1beta1.Template - 14, // 8: dbaas.v1beta1.UpdatePXCClusterRequest.params:type_name -> dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams - 20, // 9: dbaas.v1beta1.UpdatePXCClusterRequest.template:type_name -> dbaas.v1beta1.Template - 1, // 10: dbaas.v1beta1.GetPXCClusterResourcesRequest.params:type_name -> dbaas.v1beta1.PXCClusterParams - 21, // 11: dbaas.v1beta1.GetPXCClusterResourcesResponse.expected:type_name -> dbaas.v1beta1.Resources - 22, // 12: dbaas.v1beta1.PXCClusterParams.PXC.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 22, // 13: dbaas.v1beta1.PXCClusterParams.ProxySQL.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 22, // 14: dbaas.v1beta1.PXCClusterParams.HAProxy.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 15, // 15: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.pxc:type_name -> dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.PXC - 16, // 16: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.proxysql:type_name -> dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.ProxySQL - 17, // 17: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.haproxy:type_name -> dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.HAProxy - 22, // 18: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.PXC.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 22, // 19: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.ProxySQL.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 22, // 20: dbaas.v1beta1.UpdatePXCClusterRequest.UpdatePXCClusterParams.HAProxy.compute_resources:type_name -> dbaas.v1beta1.ComputeResources - 2, // 21: dbaas.v1beta1.PXCClusters.GetPXCClusterCredentials:input_type -> dbaas.v1beta1.GetPXCClusterCredentialsRequest - 5, // 22: dbaas.v1beta1.PXCClusters.CreatePXCCluster:input_type -> dbaas.v1beta1.CreatePXCClusterRequest - 7, // 23: dbaas.v1beta1.PXCClusters.UpdatePXCCluster:input_type -> dbaas.v1beta1.UpdatePXCClusterRequest - 9, // 24: dbaas.v1beta1.PXCClusters.GetPXCClusterResources:input_type -> dbaas.v1beta1.GetPXCClusterResourcesRequest - 4, // 25: dbaas.v1beta1.PXCClusters.GetPXCClusterCredentials:output_type -> dbaas.v1beta1.GetPXCClusterCredentialsResponse - 6, // 26: dbaas.v1beta1.PXCClusters.CreatePXCCluster:output_type -> dbaas.v1beta1.CreatePXCClusterResponse - 8, // 27: dbaas.v1beta1.PXCClusters.UpdatePXCCluster:output_type -> dbaas.v1beta1.UpdatePXCClusterResponse - 10, // 28: dbaas.v1beta1.PXCClusters.GetPXCClusterResources:output_type -> dbaas.v1beta1.GetPXCClusterResourcesResponse - 25, // [25:29] is the sub-list for method output_type - 21, // [21:25] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_managementpb_dbaas_pxc_clusters_proto_init() } -func file_managementpb_dbaas_pxc_clusters_proto_init() { - if File_managementpb_dbaas_pxc_clusters_proto != nil { - return - } - file_managementpb_dbaas_dbaas_proto_init() - file_managementpb_dbaas_templates_proto_init() - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PXCClusterParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPXCClusterCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PXCClusterConnectionCredentials); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPXCClusterCredentialsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePXCClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePXCClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePXCClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePXCClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPXCClusterResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPXCClusterResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PXCClusterParams_PXC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PXCClusterParams_ProxySQL); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PXCClusterParams_HAProxy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePXCClusterRequest_UpdatePXCClusterParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_pxc_clusters_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy); 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_managementpb_dbaas_pxc_clusters_proto_rawDesc, - NumEnums: 1, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_pxc_clusters_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_pxc_clusters_proto_depIdxs, - EnumInfos: file_managementpb_dbaas_pxc_clusters_proto_enumTypes, - MessageInfos: file_managementpb_dbaas_pxc_clusters_proto_msgTypes, - }.Build() - File_managementpb_dbaas_pxc_clusters_proto = out.File - file_managementpb_dbaas_pxc_clusters_proto_rawDesc = nil - file_managementpb_dbaas_pxc_clusters_proto_goTypes = nil - file_managementpb_dbaas_pxc_clusters_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/pxc_clusters.pb.gw.go b/api/managementpb/dbaas/pxc_clusters.pb.gw.go deleted file mode 100644 index 65165a778a..0000000000 --- a/api/managementpb/dbaas/pxc_clusters.pb.gw.go +++ /dev/null @@ -1,410 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/pxc_clusters.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_PXCClusters_GetPXCClusterCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client PXCClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPXCClusterCredentialsRequest - 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.GetPXCClusterCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PXCClusters_GetPXCClusterCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server PXCClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPXCClusterCredentialsRequest - 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.GetPXCClusterCredentials(ctx, &protoReq) - return msg, metadata, err -} - -func request_PXCClusters_CreatePXCCluster_0(ctx context.Context, marshaler runtime.Marshaler, client PXCClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePXCClusterRequest - 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.CreatePXCCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PXCClusters_CreatePXCCluster_0(ctx context.Context, marshaler runtime.Marshaler, server PXCClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePXCClusterRequest - 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.CreatePXCCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_PXCClusters_UpdatePXCCluster_0(ctx context.Context, marshaler runtime.Marshaler, client PXCClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePXCClusterRequest - 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.UpdatePXCCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PXCClusters_UpdatePXCCluster_0(ctx context.Context, marshaler runtime.Marshaler, server PXCClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePXCClusterRequest - 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.UpdatePXCCluster(ctx, &protoReq) - return msg, metadata, err -} - -func request_PXCClusters_GetPXCClusterResources_0(ctx context.Context, marshaler runtime.Marshaler, client PXCClustersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPXCClusterResourcesRequest - 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.GetPXCClusterResources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_PXCClusters_GetPXCClusterResources_0(ctx context.Context, marshaler runtime.Marshaler, server PXCClustersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPXCClusterResourcesRequest - 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.GetPXCClusterResources(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterPXCClustersHandlerServer registers the http handlers for service PXCClusters to "mux". -// UnaryRPC :call PXCClustersServer 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 RegisterPXCClustersHandlerFromEndpoint instead. -func RegisterPXCClustersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PXCClustersServer) error { - mux.Handle("POST", pattern_PXCClusters_GetPXCClusterCredentials_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, "/dbaas.v1beta1.PXCClusters/GetPXCClusterCredentials", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCClusters/GetCredentials")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PXCClusters_GetPXCClusterCredentials_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_PXCClusters_GetPXCClusterCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PXCClusters_CreatePXCCluster_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, "/dbaas.v1beta1.PXCClusters/CreatePXCCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCCluster/Create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PXCClusters_CreatePXCCluster_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_PXCClusters_CreatePXCCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PXCClusters_UpdatePXCCluster_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, "/dbaas.v1beta1.PXCClusters/UpdatePXCCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCCluster/Update")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PXCClusters_UpdatePXCCluster_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_PXCClusters_UpdatePXCCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PXCClusters_GetPXCClusterResources_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, "/dbaas.v1beta1.PXCClusters/GetPXCClusterResources", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCCluster/Resources/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_PXCClusters_GetPXCClusterResources_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_PXCClusters_GetPXCClusterResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterPXCClustersHandlerFromEndpoint is same as RegisterPXCClustersHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPXCClustersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterPXCClustersHandler(ctx, mux, conn) -} - -// RegisterPXCClustersHandler registers the http handlers for service PXCClusters to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterPXCClustersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPXCClustersHandlerClient(ctx, mux, NewPXCClustersClient(conn)) -} - -// RegisterPXCClustersHandlerClient registers the http handlers for service PXCClusters -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PXCClustersClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PXCClustersClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PXCClustersClient" to call the correct interceptors. -func RegisterPXCClustersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PXCClustersClient) error { - mux.Handle("POST", pattern_PXCClusters_GetPXCClusterCredentials_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, "/dbaas.v1beta1.PXCClusters/GetPXCClusterCredentials", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCClusters/GetCredentials")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PXCClusters_GetPXCClusterCredentials_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PXCClusters_GetPXCClusterCredentials_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PXCClusters_CreatePXCCluster_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, "/dbaas.v1beta1.PXCClusters/CreatePXCCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCCluster/Create")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PXCClusters_CreatePXCCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PXCClusters_CreatePXCCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PXCClusters_UpdatePXCCluster_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, "/dbaas.v1beta1.PXCClusters/UpdatePXCCluster", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCCluster/Update")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PXCClusters_UpdatePXCCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PXCClusters_UpdatePXCCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_PXCClusters_GetPXCClusterResources_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, "/dbaas.v1beta1.PXCClusters/GetPXCClusterResources", runtime.WithHTTPPathPattern("/v1/management/DBaaS/PXCCluster/Resources/Get")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_PXCClusters_GetPXCClusterResources_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_PXCClusters_GetPXCClusterResources_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var ( - pattern_PXCClusters_GetPXCClusterCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "PXCClusters", "GetCredentials"}, "")) - - pattern_PXCClusters_CreatePXCCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "PXCCluster", "Create"}, "")) - - pattern_PXCClusters_UpdatePXCCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "PXCCluster", "Update"}, "")) - - pattern_PXCClusters_GetPXCClusterResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "management", "DBaaS", "PXCCluster", "Resources", "Get"}, "")) -) - -var ( - forward_PXCClusters_GetPXCClusterCredentials_0 = runtime.ForwardResponseMessage - - forward_PXCClusters_CreatePXCCluster_0 = runtime.ForwardResponseMessage - - forward_PXCClusters_UpdatePXCCluster_0 = runtime.ForwardResponseMessage - - forward_PXCClusters_GetPXCClusterResources_0 = runtime.ForwardResponseMessage -) diff --git a/api/managementpb/dbaas/pxc_clusters.pb.validate.go b/api/managementpb/dbaas/pxc_clusters.pb.validate.go deleted file mode 100644 index 31abae0515..0000000000 --- a/api/managementpb/dbaas/pxc_clusters.pb.validate.go +++ /dev/null @@ -1,2547 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/pxc_clusters.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on PXCClusterParams with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *PXCClusterParams) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PXCClusterParams with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PXCClusterParamsMultiError, or nil if none found. -func (m *PXCClusterParams) ValidateAll() error { - return m.validate(true) -} - -func (m *PXCClusterParams) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ClusterSize - - if all { - switch v := interface{}(m.GetPxc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPxc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParamsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetProxysql()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetProxysql()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParamsValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHaproxy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHaproxy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParamsValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetBackup()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBackup()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParamsValidationError{ - field: "Backup", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRestore()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParamsValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRestore()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParamsValidationError{ - field: "Restore", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return PXCClusterParamsMultiError(errors) - } - - return nil -} - -// PXCClusterParamsMultiError is an error wrapping multiple validation errors -// returned by PXCClusterParams.ValidateAll() if the designated constraints -// aren't met. -type PXCClusterParamsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PXCClusterParamsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PXCClusterParamsMultiError) AllErrors() []error { return m } - -// PXCClusterParamsValidationError is the validation error returned by -// PXCClusterParams.Validate if the designated constraints aren't met. -type PXCClusterParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PXCClusterParamsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PXCClusterParamsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PXCClusterParamsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PXCClusterParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PXCClusterParamsValidationError) ErrorName() string { return "PXCClusterParamsValidationError" } - -// Error satisfies the builtin error interface -func (e PXCClusterParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPXCClusterParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PXCClusterParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PXCClusterParamsValidationError{} - -// Validate checks the field values on GetPXCClusterCredentialsRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPXCClusterCredentialsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPXCClusterCredentialsRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GetPXCClusterCredentialsRequestMultiError, or nil if none found. -func (m *GetPXCClusterCredentialsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPXCClusterCredentialsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := GetPXCClusterCredentialsRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := GetPXCClusterCredentialsRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return GetPXCClusterCredentialsRequestMultiError(errors) - } - - return nil -} - -// GetPXCClusterCredentialsRequestMultiError is an error wrapping multiple -// validation errors returned by GetPXCClusterCredentialsRequest.ValidateAll() -// if the designated constraints aren't met. -type GetPXCClusterCredentialsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPXCClusterCredentialsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPXCClusterCredentialsRequestMultiError) AllErrors() []error { return m } - -// GetPXCClusterCredentialsRequestValidationError is the validation error -// returned by GetPXCClusterCredentialsRequest.Validate if the designated -// constraints aren't met. -type GetPXCClusterCredentialsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPXCClusterCredentialsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPXCClusterCredentialsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPXCClusterCredentialsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPXCClusterCredentialsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPXCClusterCredentialsRequestValidationError) ErrorName() string { - return "GetPXCClusterCredentialsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPXCClusterCredentialsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPXCClusterCredentialsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPXCClusterCredentialsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPXCClusterCredentialsRequestValidationError{} - -// Validate checks the field values on PXCClusterConnectionCredentials with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PXCClusterConnectionCredentials) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PXCClusterConnectionCredentials with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// PXCClusterConnectionCredentialsMultiError, or nil if none found. -func (m *PXCClusterConnectionCredentials) ValidateAll() error { - return m.validate(true) -} - -func (m *PXCClusterConnectionCredentials) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Username - - // no validation rules for Password - - // no validation rules for Host - - // no validation rules for Port - - if len(errors) > 0 { - return PXCClusterConnectionCredentialsMultiError(errors) - } - - return nil -} - -// PXCClusterConnectionCredentialsMultiError is an error wrapping multiple -// validation errors returned by PXCClusterConnectionCredentials.ValidateAll() -// if the designated constraints aren't met. -type PXCClusterConnectionCredentialsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PXCClusterConnectionCredentialsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PXCClusterConnectionCredentialsMultiError) AllErrors() []error { return m } - -// PXCClusterConnectionCredentialsValidationError is the validation error -// returned by PXCClusterConnectionCredentials.Validate if the designated -// constraints aren't met. -type PXCClusterConnectionCredentialsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PXCClusterConnectionCredentialsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PXCClusterConnectionCredentialsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PXCClusterConnectionCredentialsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PXCClusterConnectionCredentialsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PXCClusterConnectionCredentialsValidationError) ErrorName() string { - return "PXCClusterConnectionCredentialsValidationError" -} - -// Error satisfies the builtin error interface -func (e PXCClusterConnectionCredentialsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPXCClusterConnectionCredentials.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PXCClusterConnectionCredentialsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PXCClusterConnectionCredentialsValidationError{} - -// Validate checks the field values on GetPXCClusterCredentialsResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *GetPXCClusterCredentialsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPXCClusterCredentialsResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GetPXCClusterCredentialsResponseMultiError, or nil if none found. -func (m *GetPXCClusterCredentialsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPXCClusterCredentialsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetConnectionCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPXCClusterCredentialsResponseValidationError{ - field: "ConnectionCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPXCClusterCredentialsResponseValidationError{ - field: "ConnectionCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPXCClusterCredentialsResponseValidationError{ - field: "ConnectionCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetPXCClusterCredentialsResponseMultiError(errors) - } - - return nil -} - -// GetPXCClusterCredentialsResponseMultiError is an error wrapping multiple -// validation errors returned by -// GetPXCClusterCredentialsResponse.ValidateAll() if the designated -// constraints aren't met. -type GetPXCClusterCredentialsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPXCClusterCredentialsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPXCClusterCredentialsResponseMultiError) AllErrors() []error { return m } - -// GetPXCClusterCredentialsResponseValidationError is the validation error -// returned by GetPXCClusterCredentialsResponse.Validate if the designated -// constraints aren't met. -type GetPXCClusterCredentialsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPXCClusterCredentialsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPXCClusterCredentialsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPXCClusterCredentialsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPXCClusterCredentialsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPXCClusterCredentialsResponseValidationError) ErrorName() string { - return "GetPXCClusterCredentialsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPXCClusterCredentialsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPXCClusterCredentialsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPXCClusterCredentialsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPXCClusterCredentialsResponseValidationError{} - -// Validate checks the field values on CreatePXCClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreatePXCClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreatePXCClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreatePXCClusterRequestMultiError, or nil if none found. -func (m *CreatePXCClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CreatePXCClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := CreatePXCClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CreatePXCClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CreatePXCClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CreatePXCClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Expose - - // no validation rules for InternetFacing - - if all { - switch v := interface{}(m.GetTemplate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CreatePXCClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CreatePXCClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CreatePXCClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CreatePXCClusterRequestMultiError(errors) - } - - return nil -} - -// CreatePXCClusterRequestMultiError is an error wrapping multiple validation -// errors returned by CreatePXCClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type CreatePXCClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreatePXCClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreatePXCClusterRequestMultiError) AllErrors() []error { return m } - -// CreatePXCClusterRequestValidationError is the validation error returned by -// CreatePXCClusterRequest.Validate if the designated constraints aren't met. -type CreatePXCClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreatePXCClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreatePXCClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreatePXCClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreatePXCClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreatePXCClusterRequestValidationError) ErrorName() string { - return "CreatePXCClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CreatePXCClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreatePXCClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreatePXCClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreatePXCClusterRequestValidationError{} - -// Validate checks the field values on CreatePXCClusterResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreatePXCClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreatePXCClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreatePXCClusterResponseMultiError, or nil if none found. -func (m *CreatePXCClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *CreatePXCClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return CreatePXCClusterResponseMultiError(errors) - } - - return nil -} - -// CreatePXCClusterResponseMultiError is an error wrapping multiple validation -// errors returned by CreatePXCClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type CreatePXCClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreatePXCClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreatePXCClusterResponseMultiError) AllErrors() []error { return m } - -// CreatePXCClusterResponseValidationError is the validation error returned by -// CreatePXCClusterResponse.Validate if the designated constraints aren't met. -type CreatePXCClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreatePXCClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreatePXCClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreatePXCClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreatePXCClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreatePXCClusterResponseValidationError) ErrorName() string { - return "CreatePXCClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e CreatePXCClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreatePXCClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreatePXCClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreatePXCClusterResponseValidationError{} - -// Validate checks the field values on UpdatePXCClusterRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePXCClusterRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdatePXCClusterRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePXCClusterRequestMultiError, or nil if none found. -func (m *UpdatePXCClusterRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePXCClusterRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := UpdatePXCClusterRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := UpdatePXCClusterRequestValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Expose - - // no validation rules for InternetFacing - - if all { - switch v := interface{}(m.GetTemplate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTemplate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequestValidationError{ - field: "Template", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpdatePXCClusterRequestMultiError(errors) - } - - return nil -} - -// UpdatePXCClusterRequestMultiError is an error wrapping multiple validation -// errors returned by UpdatePXCClusterRequest.ValidateAll() if the designated -// constraints aren't met. -type UpdatePXCClusterRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePXCClusterRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePXCClusterRequestMultiError) AllErrors() []error { return m } - -// UpdatePXCClusterRequestValidationError is the validation error returned by -// UpdatePXCClusterRequest.Validate if the designated constraints aren't met. -type UpdatePXCClusterRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePXCClusterRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdatePXCClusterRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdatePXCClusterRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdatePXCClusterRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePXCClusterRequestValidationError) ErrorName() string { - return "UpdatePXCClusterRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePXCClusterRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePXCClusterRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePXCClusterRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePXCClusterRequestValidationError{} - -// Validate checks the field values on UpdatePXCClusterResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePXCClusterResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdatePXCClusterResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePXCClusterResponseMultiError, or nil if none found. -func (m *UpdatePXCClusterResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePXCClusterResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return UpdatePXCClusterResponseMultiError(errors) - } - - return nil -} - -// UpdatePXCClusterResponseMultiError is an error wrapping multiple validation -// errors returned by UpdatePXCClusterResponse.ValidateAll() if the designated -// constraints aren't met. -type UpdatePXCClusterResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePXCClusterResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePXCClusterResponseMultiError) AllErrors() []error { return m } - -// UpdatePXCClusterResponseValidationError is the validation error returned by -// UpdatePXCClusterResponse.Validate if the designated constraints aren't met. -type UpdatePXCClusterResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePXCClusterResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdatePXCClusterResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdatePXCClusterResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdatePXCClusterResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePXCClusterResponseValidationError) ErrorName() string { - return "UpdatePXCClusterResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePXCClusterResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePXCClusterResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePXCClusterResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePXCClusterResponseValidationError{} - -// Validate checks the field values on GetPXCClusterResourcesRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPXCClusterResourcesRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPXCClusterResourcesRequest with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GetPXCClusterResourcesRequestMultiError, or nil if none found. -func (m *GetPXCClusterResourcesRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPXCClusterResourcesRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetParams() == nil { - err := GetPXCClusterResourcesRequestValidationError{ - field: "Params", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPXCClusterResourcesRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPXCClusterResourcesRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPXCClusterResourcesRequestValidationError{ - field: "Params", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetPXCClusterResourcesRequestMultiError(errors) - } - - return nil -} - -// GetPXCClusterResourcesRequestMultiError is an error wrapping multiple -// validation errors returned by GetPXCClusterResourcesRequest.ValidateAll() -// if the designated constraints aren't met. -type GetPXCClusterResourcesRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPXCClusterResourcesRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPXCClusterResourcesRequestMultiError) AllErrors() []error { return m } - -// GetPXCClusterResourcesRequestValidationError is the validation error -// returned by GetPXCClusterResourcesRequest.Validate if the designated -// constraints aren't met. -type GetPXCClusterResourcesRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPXCClusterResourcesRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPXCClusterResourcesRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPXCClusterResourcesRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPXCClusterResourcesRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPXCClusterResourcesRequestValidationError) ErrorName() string { - return "GetPXCClusterResourcesRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPXCClusterResourcesRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPXCClusterResourcesRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPXCClusterResourcesRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPXCClusterResourcesRequestValidationError{} - -// Validate checks the field values on GetPXCClusterResourcesResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetPXCClusterResourcesResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetPXCClusterResourcesResponse with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// GetPXCClusterResourcesResponseMultiError, or nil if none found. -func (m *GetPXCClusterResourcesResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetPXCClusterResourcesResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetExpected()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetPXCClusterResourcesResponseValidationError{ - field: "Expected", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetPXCClusterResourcesResponseValidationError{ - field: "Expected", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpected()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetPXCClusterResourcesResponseValidationError{ - field: "Expected", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetPXCClusterResourcesResponseMultiError(errors) - } - - return nil -} - -// GetPXCClusterResourcesResponseMultiError is an error wrapping multiple -// validation errors returned by GetPXCClusterResourcesResponse.ValidateAll() -// if the designated constraints aren't met. -type GetPXCClusterResourcesResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetPXCClusterResourcesResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetPXCClusterResourcesResponseMultiError) AllErrors() []error { return m } - -// GetPXCClusterResourcesResponseValidationError is the validation error -// returned by GetPXCClusterResourcesResponse.Validate if the designated -// constraints aren't met. -type GetPXCClusterResourcesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetPXCClusterResourcesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetPXCClusterResourcesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetPXCClusterResourcesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetPXCClusterResourcesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetPXCClusterResourcesResponseValidationError) ErrorName() string { - return "GetPXCClusterResourcesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetPXCClusterResourcesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetPXCClusterResourcesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetPXCClusterResourcesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetPXCClusterResourcesResponseValidationError{} - -// Validate checks the field values on PXCClusterParams_PXC with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PXCClusterParams_PXC) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PXCClusterParams_PXC with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PXCClusterParams_PXCMultiError, or nil if none found. -func (m *PXCClusterParams_PXC) ValidateAll() error { - return m.validate(true) -} - -func (m *PXCClusterParams_PXC) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Image - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParams_PXCValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParams_PXCValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParams_PXCValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DiskSize - - // no validation rules for Configuration - - // no validation rules for StorageClass - - if len(errors) > 0 { - return PXCClusterParams_PXCMultiError(errors) - } - - return nil -} - -// PXCClusterParams_PXCMultiError is an error wrapping multiple validation -// errors returned by PXCClusterParams_PXC.ValidateAll() if the designated -// constraints aren't met. -type PXCClusterParams_PXCMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PXCClusterParams_PXCMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PXCClusterParams_PXCMultiError) AllErrors() []error { return m } - -// PXCClusterParams_PXCValidationError is the validation error returned by -// PXCClusterParams_PXC.Validate if the designated constraints aren't met. -type PXCClusterParams_PXCValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PXCClusterParams_PXCValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PXCClusterParams_PXCValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PXCClusterParams_PXCValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PXCClusterParams_PXCValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PXCClusterParams_PXCValidationError) ErrorName() string { - return "PXCClusterParams_PXCValidationError" -} - -// Error satisfies the builtin error interface -func (e PXCClusterParams_PXCValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPXCClusterParams_PXC.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PXCClusterParams_PXCValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PXCClusterParams_PXCValidationError{} - -// Validate checks the field values on PXCClusterParams_ProxySQL with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PXCClusterParams_ProxySQL) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PXCClusterParams_ProxySQL with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PXCClusterParams_ProxySQLMultiError, or nil if none found. -func (m *PXCClusterParams_ProxySQL) ValidateAll() error { - return m.validate(true) -} - -func (m *PXCClusterParams_ProxySQL) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Image - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParams_ProxySQLValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParams_ProxySQLValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParams_ProxySQLValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DiskSize - - if len(errors) > 0 { - return PXCClusterParams_ProxySQLMultiError(errors) - } - - return nil -} - -// PXCClusterParams_ProxySQLMultiError is an error wrapping multiple validation -// errors returned by PXCClusterParams_ProxySQL.ValidateAll() if the -// designated constraints aren't met. -type PXCClusterParams_ProxySQLMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PXCClusterParams_ProxySQLMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PXCClusterParams_ProxySQLMultiError) AllErrors() []error { return m } - -// PXCClusterParams_ProxySQLValidationError is the validation error returned by -// PXCClusterParams_ProxySQL.Validate if the designated constraints aren't met. -type PXCClusterParams_ProxySQLValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PXCClusterParams_ProxySQLValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PXCClusterParams_ProxySQLValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PXCClusterParams_ProxySQLValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PXCClusterParams_ProxySQLValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PXCClusterParams_ProxySQLValidationError) ErrorName() string { - return "PXCClusterParams_ProxySQLValidationError" -} - -// Error satisfies the builtin error interface -func (e PXCClusterParams_ProxySQLValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPXCClusterParams_ProxySQL.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PXCClusterParams_ProxySQLValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PXCClusterParams_ProxySQLValidationError{} - -// Validate checks the field values on PXCClusterParams_HAProxy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PXCClusterParams_HAProxy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PXCClusterParams_HAProxy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PXCClusterParams_HAProxyMultiError, or nil if none found. -func (m *PXCClusterParams_HAProxy) ValidateAll() error { - return m.validate(true) -} - -func (m *PXCClusterParams_HAProxy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Image - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PXCClusterParams_HAProxyValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PXCClusterParams_HAProxyValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PXCClusterParams_HAProxyValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return PXCClusterParams_HAProxyMultiError(errors) - } - - return nil -} - -// PXCClusterParams_HAProxyMultiError is an error wrapping multiple validation -// errors returned by PXCClusterParams_HAProxy.ValidateAll() if the designated -// constraints aren't met. -type PXCClusterParams_HAProxyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PXCClusterParams_HAProxyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PXCClusterParams_HAProxyMultiError) AllErrors() []error { return m } - -// PXCClusterParams_HAProxyValidationError is the validation error returned by -// PXCClusterParams_HAProxy.Validate if the designated constraints aren't met. -type PXCClusterParams_HAProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PXCClusterParams_HAProxyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PXCClusterParams_HAProxyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PXCClusterParams_HAProxyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PXCClusterParams_HAProxyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PXCClusterParams_HAProxyValidationError) ErrorName() string { - return "PXCClusterParams_HAProxyValidationError" -} - -// Error satisfies the builtin error interface -func (e PXCClusterParams_HAProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPXCClusterParams_HAProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PXCClusterParams_HAProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PXCClusterParams_HAProxyValidationError{} - -// Validate checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// UpdatePXCClusterRequest_UpdatePXCClusterParamsMultiError, or nil if none found. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ClusterSize - - if all { - switch v := interface{}(m.GetPxc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPxc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Pxc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetProxysql()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetProxysql()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Proxysql", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Suspend - - // no validation rules for Resume - - if all { - switch v := interface{}(m.GetHaproxy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHaproxy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{ - field: "Haproxy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpdatePXCClusterRequest_UpdatePXCClusterParamsMultiError(errors) - } - - return nil -} - -// UpdatePXCClusterRequest_UpdatePXCClusterParamsMultiError is an error -// wrapping multiple validation errors returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams.ValidateAll() if the -// designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParamsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParamsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParamsMultiError) AllErrors() []error { return m } - -// UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError is the -// validation error returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams.Validate if the designated -// constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError) ErrorName() string { - return "UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePXCClusterRequest_UpdatePXCClusterParams.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePXCClusterRequest_UpdatePXCClusterParamsValidationError{} - -// Validate checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCMultiError, or nil if -// none found. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Image - - // no validation rules for Configuration - - // no validation rules for StorageClass - - if len(errors) > 0 { - return UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCMultiError(errors) - } - - return nil -} - -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCMultiError is an error -// wrapping multiple validation errors returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC.ValidateAll() if the -// designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCMultiError) AllErrors() []error { return m } - -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError is the -// validation error returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC.Validate if the -// designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError) ErrorName() string { - return "UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePXCClusterRequest_UpdatePXCClusterParams_PXC.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePXCClusterRequest_UpdatePXCClusterParams_PXCValidationError{} - -// Validate checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLMultiError, or nil -// if none found. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLMultiError(errors) - } - - return nil -} - -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLMultiError is an -// error wrapping multiple validation errors returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL.ValidateAll() if -// the designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLMultiError) AllErrors() []error { - return m -} - -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError is -// the validation error returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL.Validate if the -// designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError) ErrorName() string { - return "UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQLValidationError{} - -// Validate checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyMultiError, or nil if -// none found. -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetComputeResources()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComputeResources()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError{ - field: "ComputeResources", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyMultiError(errors) - } - - return nil -} - -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyMultiError is an error -// wrapping multiple validation errors returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy.ValidateAll() if the -// designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyMultiError) AllErrors() []error { - return m -} - -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError is the -// validation error returned by -// UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy.Validate if the -// designated constraints aren't met. -type UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError) ErrorName() string { - return "UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxyValidationError{} diff --git a/api/managementpb/dbaas/pxc_clusters.proto b/api/managementpb/dbaas/pxc_clusters.proto deleted file mode 100644 index 7883eb8296..0000000000 --- a/api/managementpb/dbaas/pxc_clusters.proto +++ /dev/null @@ -1,215 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "managementpb/dbaas/dbaas.proto"; -import "managementpb/dbaas/templates.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -// PXCBackupState represents PXC backup CR state. -enum PXCBackupState { - // PXC_BACKUP_STATE_INVALID represents unknown state. - PXC_BACKUP_STATE_INVALID = 0; - // PXC_BACKUP_STATE_RUNNING represents running backup. - PXC_BACKUP_STATE_RUNNING = 1; - // PXC_BACKUP_STATE_SUCCEEDED represents succeeded backup. - PXC_BACKUP_STATE_SUCCEEDED = 2; - // PXC_BACKUP_STATE_FAILED represents failed backup. - PXC_BACKUP_STATE_FAILED = 3; -} - -// PXCClusterParams represents PXC cluster parameters that can be updated. -message PXCClusterParams { - // PXC container parameters. - // TODO Do not use inner messages in all public APIs (for consistency). - message PXC { - // Docker image used for PXC. - string image = 3; - // Requested compute resources. - ComputeResources compute_resources = 1; - // Disk size in bytes. - int64 disk_size = 2; - // Configuration for PXC cluster - string configuration = 4; - // Storage Class for PXC cluster. - string storage_class = 5; - } - // ProxySQL container parameters. - // TODO Do not use inner messages in all public APIs (for consistency). - message ProxySQL { - // Docker image used for ProxySQL. - string image = 3; - // Requested compute resources. - ComputeResources compute_resources = 1; - // Disk size in bytes. - int64 disk_size = 2; - } - // HAProxy container parameters. - // NOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it. - message HAProxy { - // Docker image used for HAProxy. - string image = 1; - // Requested compute resources. - ComputeResources compute_resources = 2; - } - // Cluster size. - int32 cluster_size = 1; - // PXC container parameters. - PXC pxc = 2; - // NOTE: Only one of fields proxysql or haproxy has to be set, we check this in the code. - // ProxySQL container parameters. - ProxySQL proxysql = 3; - // HAProxy container parameters. - HAProxy haproxy = 4; - // Backup configuration parameters. - Backup backup = 5; - // Restore configuration parameters. - Restore restore = 6; -} - -message GetPXCClusterCredentialsRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PXC cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; -} - -// PXCClusterConnectionCredentials is cluster connection credentials. -message PXCClusterConnectionCredentials { - // PXC username. - string username = 1; - // PXC password. - string password = 2; - // PXC host. - string host = 3; - // PXC port. - int32 port = 4; -} - -message GetPXCClusterCredentialsResponse { - // Cluster connection credentials. - PXCClusterConnectionCredentials connection_credentials = 1; -} - -message CreatePXCClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PXC cluster name. - // a DNS-1035 label must consist of lower case alphanumeric characters or '-', - // start with an alphabetic character, and end with an alphanumeric character - // (e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?') - string name = 2; - // Cluster parameters. - PXCClusterParams params = 3; - // Make DB cluster accessible outside of K8s cluster. - bool expose = 4; - // Make DB cluster accessible via public internet. - bool internet_facing = 5; - // Apply IP source ranges against the cluster. - repeated string source_ranges = 6; - // Configuration template. - Template template = 7; -} - -message CreatePXCClusterResponse {} - -message UpdatePXCClusterRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // PXC cluster name. - string name = 2 [(validate.rules).string.min_len = 1]; - // UpdatePXCClusterParams represents PXC cluster parameters that can be updated. - message UpdatePXCClusterParams { - // PXC container parameters. - message PXC { - // Requested compute resources. - ComputeResources compute_resources = 1; - // Image to use. If it's the same image but with different version tag, upgrade of database cluster to version - // in given tag is triggered. If entirely different image is given, error is returned. - string image = 2; - // Configuration for PXC cluster - string configuration = 4; - // Storage Class for PXC cluster. - string storage_class = 5; - } - // ProxySQL container parameters. - message ProxySQL { - // Requested compute resources. - ComputeResources compute_resources = 1; - } - // HAProxy container parameters. - message HAProxy { - // Requested compute resources. - ComputeResources compute_resources = 1; - } - // Cluster size. - int32 cluster_size = 1; - // PXC container parameters. - PXC pxc = 2; - // ProxySQL container parameters. - ProxySQL proxysql = 3; - // Suspend cluster `pause: true`. - bool suspend = 4; - // Resume cluster `pause: false`. - bool resume = 5; - // HAProxy container parameters. - HAProxy haproxy = 6; - } - // Cluster parameters. - UpdatePXCClusterParams params = 3; - // Make DB cluster accessible outside of K8s cluster. - bool expose = 4; - // Make DB cluster accessible via public internet. - bool internet_facing = 5; - // Apply IP source ranges against the cluster. - repeated string source_ranges = 6; - // Configuration template. - Template template = 7; -} - -message UpdatePXCClusterResponse {} - -message GetPXCClusterResourcesRequest { - // Cluster parameters. - PXCClusterParams params = 1 [(validate.rules).message.required = true]; -} - -message GetPXCClusterResourcesResponse { - // Expected resources to be consumed by the cluster. - Resources expected = 1; -} - -// PXCClusters service provides public methods for managing PXC clusters. -service PXCClusters { - // GetPXCClusterCredentials returns a PXC cluster credentials by cluster name. - rpc GetPXCClusterCredentials(GetPXCClusterCredentialsRequest) returns (GetPXCClusterCredentialsResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PXCClusters/GetCredentials" - body: "*" - }; - } - // CreatePXCCluster creates a new PXC cluster. - rpc CreatePXCCluster(CreatePXCClusterRequest) returns (CreatePXCClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PXCCluster/Create" - body: "*" - }; - } - // UpdatePXCCluster updates existing PXC cluster. - rpc UpdatePXCCluster(UpdatePXCClusterRequest) returns (UpdatePXCClusterResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PXCCluster/Update" - body: "*" - }; - } - // GetPXCClusterResources returns expected resources to be consumed by the cluster. - rpc GetPXCClusterResources(GetPXCClusterResourcesRequest) returns (GetPXCClusterResourcesResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/PXCCluster/Resources/Get" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/pxc_clusters_grpc.pb.go b/api/managementpb/dbaas/pxc_clusters_grpc.pb.go deleted file mode 100644 index 3ebf99803e..0000000000 --- a/api/managementpb/dbaas/pxc_clusters_grpc.pb.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/pxc_clusters.proto - -package dbaasv1beta1 - -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 - -const ( - PXCClusters_GetPXCClusterCredentials_FullMethodName = "/dbaas.v1beta1.PXCClusters/GetPXCClusterCredentials" - PXCClusters_CreatePXCCluster_FullMethodName = "/dbaas.v1beta1.PXCClusters/CreatePXCCluster" - PXCClusters_UpdatePXCCluster_FullMethodName = "/dbaas.v1beta1.PXCClusters/UpdatePXCCluster" - PXCClusters_GetPXCClusterResources_FullMethodName = "/dbaas.v1beta1.PXCClusters/GetPXCClusterResources" -) - -// PXCClustersClient is the client API for PXCClusters 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 PXCClustersClient interface { - // GetPXCClusterCredentials returns a PXC cluster credentials by cluster name. - GetPXCClusterCredentials(ctx context.Context, in *GetPXCClusterCredentialsRequest, opts ...grpc.CallOption) (*GetPXCClusterCredentialsResponse, error) - // CreatePXCCluster creates a new PXC cluster. - CreatePXCCluster(ctx context.Context, in *CreatePXCClusterRequest, opts ...grpc.CallOption) (*CreatePXCClusterResponse, error) - // UpdatePXCCluster updates existing PXC cluster. - UpdatePXCCluster(ctx context.Context, in *UpdatePXCClusterRequest, opts ...grpc.CallOption) (*UpdatePXCClusterResponse, error) - // GetPXCClusterResources returns expected resources to be consumed by the cluster. - GetPXCClusterResources(ctx context.Context, in *GetPXCClusterResourcesRequest, opts ...grpc.CallOption) (*GetPXCClusterResourcesResponse, error) -} - -type pXCClustersClient struct { - cc grpc.ClientConnInterface -} - -func NewPXCClustersClient(cc grpc.ClientConnInterface) PXCClustersClient { - return &pXCClustersClient{cc} -} - -func (c *pXCClustersClient) GetPXCClusterCredentials(ctx context.Context, in *GetPXCClusterCredentialsRequest, opts ...grpc.CallOption) (*GetPXCClusterCredentialsResponse, error) { - out := new(GetPXCClusterCredentialsResponse) - err := c.cc.Invoke(ctx, PXCClusters_GetPXCClusterCredentials_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pXCClustersClient) CreatePXCCluster(ctx context.Context, in *CreatePXCClusterRequest, opts ...grpc.CallOption) (*CreatePXCClusterResponse, error) { - out := new(CreatePXCClusterResponse) - err := c.cc.Invoke(ctx, PXCClusters_CreatePXCCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pXCClustersClient) UpdatePXCCluster(ctx context.Context, in *UpdatePXCClusterRequest, opts ...grpc.CallOption) (*UpdatePXCClusterResponse, error) { - out := new(UpdatePXCClusterResponse) - err := c.cc.Invoke(ctx, PXCClusters_UpdatePXCCluster_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pXCClustersClient) GetPXCClusterResources(ctx context.Context, in *GetPXCClusterResourcesRequest, opts ...grpc.CallOption) (*GetPXCClusterResourcesResponse, error) { - out := new(GetPXCClusterResourcesResponse) - err := c.cc.Invoke(ctx, PXCClusters_GetPXCClusterResources_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PXCClustersServer is the server API for PXCClusters service. -// All implementations must embed UnimplementedPXCClustersServer -// for forward compatibility -type PXCClustersServer interface { - // GetPXCClusterCredentials returns a PXC cluster credentials by cluster name. - GetPXCClusterCredentials(context.Context, *GetPXCClusterCredentialsRequest) (*GetPXCClusterCredentialsResponse, error) - // CreatePXCCluster creates a new PXC cluster. - CreatePXCCluster(context.Context, *CreatePXCClusterRequest) (*CreatePXCClusterResponse, error) - // UpdatePXCCluster updates existing PXC cluster. - UpdatePXCCluster(context.Context, *UpdatePXCClusterRequest) (*UpdatePXCClusterResponse, error) - // GetPXCClusterResources returns expected resources to be consumed by the cluster. - GetPXCClusterResources(context.Context, *GetPXCClusterResourcesRequest) (*GetPXCClusterResourcesResponse, error) - mustEmbedUnimplementedPXCClustersServer() -} - -// UnimplementedPXCClustersServer must be embedded to have forward compatible implementations. -type UnimplementedPXCClustersServer struct{} - -func (UnimplementedPXCClustersServer) GetPXCClusterCredentials(context.Context, *GetPXCClusterCredentialsRequest) (*GetPXCClusterCredentialsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPXCClusterCredentials not implemented") -} - -func (UnimplementedPXCClustersServer) CreatePXCCluster(context.Context, *CreatePXCClusterRequest) (*CreatePXCClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePXCCluster not implemented") -} - -func (UnimplementedPXCClustersServer) UpdatePXCCluster(context.Context, *UpdatePXCClusterRequest) (*UpdatePXCClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePXCCluster not implemented") -} - -func (UnimplementedPXCClustersServer) GetPXCClusterResources(context.Context, *GetPXCClusterResourcesRequest) (*GetPXCClusterResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPXCClusterResources not implemented") -} -func (UnimplementedPXCClustersServer) mustEmbedUnimplementedPXCClustersServer() {} - -// UnsafePXCClustersServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PXCClustersServer will -// result in compilation errors. -type UnsafePXCClustersServer interface { - mustEmbedUnimplementedPXCClustersServer() -} - -func RegisterPXCClustersServer(s grpc.ServiceRegistrar, srv PXCClustersServer) { - s.RegisterService(&PXCClusters_ServiceDesc, srv) -} - -func _PXCClusters_GetPXCClusterCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPXCClusterCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PXCClustersServer).GetPXCClusterCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PXCClusters_GetPXCClusterCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PXCClustersServer).GetPXCClusterCredentials(ctx, req.(*GetPXCClusterCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PXCClusters_CreatePXCCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePXCClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PXCClustersServer).CreatePXCCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PXCClusters_CreatePXCCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PXCClustersServer).CreatePXCCluster(ctx, req.(*CreatePXCClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PXCClusters_UpdatePXCCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatePXCClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PXCClustersServer).UpdatePXCCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PXCClusters_UpdatePXCCluster_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PXCClustersServer).UpdatePXCCluster(ctx, req.(*UpdatePXCClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PXCClusters_GetPXCClusterResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPXCClusterResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PXCClustersServer).GetPXCClusterResources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: PXCClusters_GetPXCClusterResources_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PXCClustersServer).GetPXCClusterResources(ctx, req.(*GetPXCClusterResourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// PXCClusters_ServiceDesc is the grpc.ServiceDesc for PXCClusters service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var PXCClusters_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.PXCClusters", - HandlerType: (*PXCClustersServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetPXCClusterCredentials", - Handler: _PXCClusters_GetPXCClusterCredentials_Handler, - }, - { - MethodName: "CreatePXCCluster", - Handler: _PXCClusters_CreatePXCCluster_Handler, - }, - { - MethodName: "UpdatePXCCluster", - Handler: _PXCClusters_UpdatePXCCluster_Handler, - }, - { - MethodName: "GetPXCClusterResources", - Handler: _PXCClusters_GetPXCClusterResources_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/pxc_clusters.proto", -} diff --git a/api/managementpb/dbaas/templates.pb.go b/api/managementpb/dbaas/templates.pb.go deleted file mode 100644 index 9231f07326..0000000000 --- a/api/managementpb/dbaas/templates.pb.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: managementpb/dbaas/templates.proto - -package dbaasv1beta1 - -import ( - reflect "reflect" - sync "sync" - - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -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 Template struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Template CR name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Template CR kind. - Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` -} - -func (x *Template) Reset() { - *x = Template{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_templates_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Template) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Template) ProtoMessage() {} - -func (x *Template) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_templates_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 Template.ProtoReflect.Descriptor instead. -func (*Template) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_templates_proto_rawDescGZIP(), []int{0} -} - -func (x *Template) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Template) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -type ListTemplatesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Kubernetes cluster name. - KubernetesClusterName string `protobuf:"bytes,1,opt,name=kubernetes_cluster_name,json=kubernetesClusterName,proto3" json:"kubernetes_cluster_name,omitempty"` - // DB cluster type. - ClusterType DBClusterType `protobuf:"varint,2,opt,name=cluster_type,json=clusterType,proto3,enum=dbaas.v1beta1.DBClusterType" json:"cluster_type,omitempty"` -} - -func (x *ListTemplatesRequest) Reset() { - *x = ListTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_templates_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListTemplatesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTemplatesRequest) ProtoMessage() {} - -func (x *ListTemplatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_templates_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 ListTemplatesRequest.ProtoReflect.Descriptor instead. -func (*ListTemplatesRequest) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_templates_proto_rawDescGZIP(), []int{1} -} - -func (x *ListTemplatesRequest) GetKubernetesClusterName() string { - if x != nil { - return x.KubernetesClusterName - } - return "" -} - -func (x *ListTemplatesRequest) GetClusterType() DBClusterType { - if x != nil { - return x.ClusterType - } - return DBClusterType_DB_CLUSTER_TYPE_INVALID -} - -type ListTemplatesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"` -} - -func (x *ListTemplatesResponse) Reset() { - *x = ListTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_templates_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListTemplatesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTemplatesResponse) ProtoMessage() {} - -func (x *ListTemplatesResponse) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_templates_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 ListTemplatesResponse.ProtoReflect.Descriptor instead. -func (*ListTemplatesResponse) Descriptor() ([]byte, []int) { - return file_managementpb_dbaas_templates_proto_rawDescGZIP(), []int{2} -} - -func (x *ListTemplatesResponse) GetTemplates() []*Template { - if x != nil { - return x.Templates - } - return nil -} - -var File_managementpb_dbaas_templates_proto protoreflect.FileDescriptor - -var file_managementpb_dbaas_templates_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, - 0x62, 0x61, 0x61, 0x73, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 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, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x08, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xa2, - 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x17, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x15, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, - 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, - 0x42, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, - 0x79, 0x70, 0x65, 0x22, 0x4e, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x32, 0x98, 0x01, 0x0a, 0x09, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x42, 0xb4, - 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, - 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x62, 0x61, 0x61, 0x73, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x62, 0x61, 0x61, 0x73, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x44, 0x62, 0x61, 0x61, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_managementpb_dbaas_templates_proto_rawDescOnce sync.Once - file_managementpb_dbaas_templates_proto_rawDescData = file_managementpb_dbaas_templates_proto_rawDesc -) - -func file_managementpb_dbaas_templates_proto_rawDescGZIP() []byte { - file_managementpb_dbaas_templates_proto_rawDescOnce.Do(func() { - file_managementpb_dbaas_templates_proto_rawDescData = protoimpl.X.CompressGZIP(file_managementpb_dbaas_templates_proto_rawDescData) - }) - return file_managementpb_dbaas_templates_proto_rawDescData -} - -var ( - file_managementpb_dbaas_templates_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_dbaas_templates_proto_goTypes = []interface{}{ - (*Template)(nil), // 0: dbaas.v1beta1.Template - (*ListTemplatesRequest)(nil), // 1: dbaas.v1beta1.ListTemplatesRequest - (*ListTemplatesResponse)(nil), // 2: dbaas.v1beta1.ListTemplatesResponse - (DBClusterType)(0), // 3: dbaas.v1beta1.DBClusterType - } -) - -var file_managementpb_dbaas_templates_proto_depIdxs = []int32{ - 3, // 0: dbaas.v1beta1.ListTemplatesRequest.cluster_type:type_name -> dbaas.v1beta1.DBClusterType - 0, // 1: dbaas.v1beta1.ListTemplatesResponse.templates:type_name -> dbaas.v1beta1.Template - 1, // 2: dbaas.v1beta1.Templates.ListTemplates:input_type -> dbaas.v1beta1.ListTemplatesRequest - 2, // 3: dbaas.v1beta1.Templates.ListTemplates:output_type -> dbaas.v1beta1.ListTemplatesResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] 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_managementpb_dbaas_templates_proto_init() } -func file_managementpb_dbaas_templates_proto_init() { - if File_managementpb_dbaas_templates_proto != nil { - return - } - file_managementpb_dbaas_dbaas_proto_init() - if !protoimpl.UnsafeEnabled { - file_managementpb_dbaas_templates_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Template); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_templates_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_managementpb_dbaas_templates_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTemplatesResponse); 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_managementpb_dbaas_templates_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_managementpb_dbaas_templates_proto_goTypes, - DependencyIndexes: file_managementpb_dbaas_templates_proto_depIdxs, - MessageInfos: file_managementpb_dbaas_templates_proto_msgTypes, - }.Build() - File_managementpb_dbaas_templates_proto = out.File - file_managementpb_dbaas_templates_proto_rawDesc = nil - file_managementpb_dbaas_templates_proto_goTypes = nil - file_managementpb_dbaas_templates_proto_depIdxs = nil -} diff --git a/api/managementpb/dbaas/templates.pb.gw.go b/api/managementpb/dbaas/templates.pb.gw.go deleted file mode 100644 index bf46c4b9ef..0000000000 --- a/api/managementpb/dbaas/templates.pb.gw.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: managementpb/dbaas/templates.proto - -/* -Package dbaasv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package dbaasv1beta1 - -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 - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_Templates_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client TemplatesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListTemplatesRequest - 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.ListTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_Templates_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server TemplatesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListTemplatesRequest - 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.ListTemplates(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterTemplatesHandlerServer registers the http handlers for service Templates to "mux". -// UnaryRPC :call TemplatesServer 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 RegisterTemplatesHandlerFromEndpoint instead. -func RegisterTemplatesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TemplatesServer) error { - mux.Handle("POST", pattern_Templates_ListTemplates_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, "/dbaas.v1beta1.Templates/ListTemplates", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Templates/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Templates_ListTemplates_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_Templates_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterTemplatesHandlerFromEndpoint is same as RegisterTemplatesHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterTemplatesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, 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 RegisterTemplatesHandler(ctx, mux, conn) -} - -// RegisterTemplatesHandler registers the http handlers for service Templates to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTemplatesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterTemplatesHandlerClient(ctx, mux, NewTemplatesClient(conn)) -} - -// RegisterTemplatesHandlerClient registers the http handlers for service Templates -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TemplatesClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TemplatesClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TemplatesClient" to call the correct interceptors. -func RegisterTemplatesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TemplatesClient) error { - mux.Handle("POST", pattern_Templates_ListTemplates_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, "/dbaas.v1beta1.Templates/ListTemplates", runtime.WithHTTPPathPattern("/v1/management/DBaaS/Templates/List")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Templates_ListTemplates_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Templates_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var pattern_Templates_ListTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Templates", "List"}, "")) - -var forward_Templates_ListTemplates_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/dbaas/templates.pb.validate.go b/api/managementpb/dbaas/templates.pb.validate.go deleted file mode 100644 index 8c7825d0d4..0000000000 --- a/api/managementpb/dbaas/templates.pb.validate.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: managementpb/dbaas/templates.proto - -package dbaasv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Template with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Template) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Template with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TemplateMultiError, or nil -// if none found. -func (m *Template) ValidateAll() error { - return m.validate(true) -} - -func (m *Template) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for Kind - - if len(errors) > 0 { - return TemplateMultiError(errors) - } - - return nil -} - -// TemplateMultiError is an error wrapping multiple validation errors returned -// by Template.ValidateAll() if the designated constraints aren't met. -type TemplateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TemplateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TemplateMultiError) AllErrors() []error { return m } - -// TemplateValidationError is the validation error returned by -// Template.Validate if the designated constraints aren't met. -type TemplateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TemplateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TemplateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TemplateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TemplateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TemplateValidationError) ErrorName() string { return "TemplateValidationError" } - -// Error satisfies the builtin error interface -func (e TemplateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTemplate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TemplateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TemplateValidationError{} - -// Validate checks the field values on ListTemplatesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListTemplatesRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListTemplatesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListTemplatesRequestMultiError, or nil if none found. -func (m *ListTemplatesRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListTemplatesRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetKubernetesClusterName()) < 1 { - err := ListTemplatesRequestValidationError{ - field: "KubernetesClusterName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := DBClusterType_name[int32(m.GetClusterType())]; !ok { - err := ListTemplatesRequestValidationError{ - field: "ClusterType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ListTemplatesRequestMultiError(errors) - } - - return nil -} - -// ListTemplatesRequestMultiError is an error wrapping multiple validation -// errors returned by ListTemplatesRequest.ValidateAll() if the designated -// constraints aren't met. -type ListTemplatesRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListTemplatesRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListTemplatesRequestMultiError) AllErrors() []error { return m } - -// ListTemplatesRequestValidationError is the validation error returned by -// ListTemplatesRequest.Validate if the designated constraints aren't met. -type ListTemplatesRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListTemplatesRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListTemplatesRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListTemplatesRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListTemplatesRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListTemplatesRequestValidationError) ErrorName() string { - return "ListTemplatesRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListTemplatesRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListTemplatesRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListTemplatesRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListTemplatesRequestValidationError{} - -// Validate checks the field values on ListTemplatesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListTemplatesResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListTemplatesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListTemplatesResponseMultiError, or nil if none found. -func (m *ListTemplatesResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListTemplatesResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetTemplates() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListTemplatesResponseValidationError{ - field: fmt.Sprintf("Templates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListTemplatesResponseValidationError{ - field: fmt.Sprintf("Templates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListTemplatesResponseValidationError{ - field: fmt.Sprintf("Templates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListTemplatesResponseMultiError(errors) - } - - return nil -} - -// ListTemplatesResponseMultiError is an error wrapping multiple validation -// errors returned by ListTemplatesResponse.ValidateAll() if the designated -// constraints aren't met. -type ListTemplatesResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListTemplatesResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListTemplatesResponseMultiError) AllErrors() []error { return m } - -// ListTemplatesResponseValidationError is the validation error returned by -// ListTemplatesResponse.Validate if the designated constraints aren't met. -type ListTemplatesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListTemplatesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListTemplatesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListTemplatesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListTemplatesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListTemplatesResponseValidationError) ErrorName() string { - return "ListTemplatesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListTemplatesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListTemplatesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListTemplatesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListTemplatesResponseValidationError{} diff --git a/api/managementpb/dbaas/templates.proto b/api/managementpb/dbaas/templates.proto deleted file mode 100644 index 5b66514fd5..0000000000 --- a/api/managementpb/dbaas/templates.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package dbaas.v1beta1; - -import "google/api/annotations.proto"; -import "managementpb/dbaas/dbaas.proto"; -import "validate/validate.proto"; - -option go_package = "api/managementpb/dbaas;dbaasv1beta1"; - -message Template { - // Template CR name. - string name = 1; - // Template CR kind. - string kind = 2; -} - -message ListTemplatesRequest { - // Kubernetes cluster name. - string kubernetes_cluster_name = 1 [(validate.rules).string.min_len = 1]; - // DB cluster type. - DBClusterType cluster_type = 2 [(validate.rules).enum.defined_only = true]; -} - -message ListTemplatesResponse { - repeated Template templates = 1; -} - -// Templates service provides public methods for managing templates. -service Templates { - // ListTemplates returns a list of all registered templates. - rpc ListTemplates(ListTemplatesRequest) returns (ListTemplatesResponse) { - option (google.api.http) = { - post: "/v1/management/DBaaS/Templates/List" - body: "*" - }; - } -} diff --git a/api/managementpb/dbaas/templates_grpc.pb.go b/api/managementpb/dbaas/templates_grpc.pb.go deleted file mode 100644 index 08277efe43..0000000000 --- a/api/managementpb/dbaas/templates_grpc.pb.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: managementpb/dbaas/templates.proto - -package dbaasv1beta1 - -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 - -const ( - Templates_ListTemplates_FullMethodName = "/dbaas.v1beta1.Templates/ListTemplates" -) - -// TemplatesClient is the client API for Templates 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 TemplatesClient interface { - // ListTemplates returns a list of all registered templates. - ListTemplates(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) -} - -type templatesClient struct { - cc grpc.ClientConnInterface -} - -func NewTemplatesClient(cc grpc.ClientConnInterface) TemplatesClient { - return &templatesClient{cc} -} - -func (c *templatesClient) ListTemplates(ctx context.Context, in *ListTemplatesRequest, opts ...grpc.CallOption) (*ListTemplatesResponse, error) { - out := new(ListTemplatesResponse) - err := c.cc.Invoke(ctx, Templates_ListTemplates_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TemplatesServer is the server API for Templates service. -// All implementations must embed UnimplementedTemplatesServer -// for forward compatibility -type TemplatesServer interface { - // ListTemplates returns a list of all registered templates. - ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) - mustEmbedUnimplementedTemplatesServer() -} - -// UnimplementedTemplatesServer must be embedded to have forward compatible implementations. -type UnimplementedTemplatesServer struct{} - -func (UnimplementedTemplatesServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListTemplates not implemented") -} -func (UnimplementedTemplatesServer) mustEmbedUnimplementedTemplatesServer() {} - -// UnsafeTemplatesServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TemplatesServer will -// result in compilation errors. -type UnsafeTemplatesServer interface { - mustEmbedUnimplementedTemplatesServer() -} - -func RegisterTemplatesServer(s grpc.ServiceRegistrar, srv TemplatesServer) { - s.RegisterService(&Templates_ServiceDesc, srv) -} - -func _Templates_ListTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTemplatesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TemplatesServer).ListTemplates(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Templates_ListTemplates_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TemplatesServer).ListTemplates(ctx, req.(*ListTemplatesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Templates_ServiceDesc is the grpc.ServiceDesc for Templates service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Templates_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "dbaas.v1beta1.Templates", - HandlerType: (*TemplatesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListTemplates", - Handler: _Templates_ListTemplates_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "managementpb/dbaas/templates.proto", -} diff --git a/api/serverpb/json/client/server/change_settings_responses.go b/api/serverpb/json/client/server/change_settings_responses.go index a1b37f8b1f..2b8002e621 100644 --- a/api/serverpb/json/client/server/change_settings_responses.go +++ b/api/serverpb/json/client/server/change_settings_responses.go @@ -195,12 +195,6 @@ type ChangeSettingsBody struct { // Disable Backup Management. DisableBackupManagement bool `json:"disable_backup_management,omitempty"` - // Enable DBaaS. - EnableDbaas bool `json:"enable_dbaas,omitempty"` - - // Disable DBaaS. - DisableDbaas bool `json:"disable_dbaas,omitempty"` - // Enable Access Control EnableAccessControl bool `json:"enable_access_control,omitempty"` @@ -801,9 +795,6 @@ type ChangeSettingsOKBodySettings struct { // Percona Platform user's email, if this PMM instance is linked to the Platform. PlatformEmail string `json:"platform_email,omitempty"` - // True if DBaaS is enabled. - DbaasEnabled bool `json:"dbaas_enabled,omitempty"` - // True if Alerting is enabled. AlertingEnabled bool `json:"alerting_enabled,omitempty"` diff --git a/api/serverpb/json/client/server/get_settings_responses.go b/api/serverpb/json/client/server/get_settings_responses.go index 706128020b..3d40aa6583 100644 --- a/api/serverpb/json/client/server/get_settings_responses.go +++ b/api/serverpb/json/client/server/get_settings_responses.go @@ -493,9 +493,6 @@ type GetSettingsOKBodySettings struct { // Percona Platform user's email, if this PMM instance is linked to the Platform. PlatformEmail string `json:"platform_email,omitempty"` - // True if DBaaS is enabled. - DbaasEnabled bool `json:"dbaas_enabled,omitempty"` - // True if Alerting is enabled. AlertingEnabled bool `json:"alerting_enabled,omitempty"` diff --git a/api/serverpb/json/serverpb.json b/api/serverpb/json/serverpb.json index 4501cde473..3e58eb1247 100644 --- a/api/serverpb/json/serverpb.json +++ b/api/serverpb/json/serverpb.json @@ -172,7 +172,7 @@ "disable_access_control": { "type": "boolean", "title": "Disable Access Control", - "x-order": 30 + "x-order": 28 }, "disable_alerting": { "description": "Disable Alerting.", @@ -189,11 +189,6 @@ "type": "boolean", "x-order": 26 }, - "disable_dbaas": { - "description": "Disable DBaaS.", - "type": "boolean", - "x-order": 28 - }, "disable_stt": { "description": "Disable Security Threat Tool.", "type": "boolean", @@ -257,7 +252,7 @@ "enable_access_control": { "type": "boolean", "title": "Enable Access Control", - "x-order": 29 + "x-order": 27 }, "enable_alerting": { "description": "Enable Alerting.", @@ -274,11 +269,6 @@ "type": "boolean", "x-order": 25 }, - "enable_dbaas": { - "description": "Enable DBaaS.", - "type": "boolean", - "x-order": 27 - }, "enable_stt": { "description": "Enable Security Threat Tool.", "type": "boolean", @@ -408,7 +398,7 @@ "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 11 + "x-order": 10 }, "aws_partitions": { "type": "array", @@ -420,32 +410,27 @@ "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 16 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 18 + "x-order": 17 }, "data_retention": { "type": "string", "x-order": 3 }, - "dbaas_enabled": { - "description": "True if DBaaS is enabled.", - "type": "boolean", - "x-order": 10 - }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 21 + "x-order": 20 }, "email_alerting_settings": { "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting.", @@ -492,12 +477,12 @@ "x-order": 3 } }, - "x-order": 12 + "x-order": 11 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 20 + "x-order": 19 }, "metrics_resolutions": { "description": "MetricsResolutions represents Prometheus exporters metrics resolutions.", @@ -529,7 +514,7 @@ "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 14 + "x-order": 13 }, "slack_alerting_settings": { "description": "SlackAlertingSettings represents Slack configuration for Alerting.", @@ -541,7 +526,7 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 12 }, "ssh_key": { "type": "string", @@ -567,7 +552,7 @@ "x-order": 0 } }, - "x-order": 15 + "x-order": 14 }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", @@ -585,7 +570,7 @@ "items": { "type": "string" }, - "x-order": 19 + "x-order": 18 }, "updates_disabled": { "description": "True if updates are disabled.", @@ -675,7 +660,7 @@ "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 11 + "x-order": 10 }, "aws_partitions": { "type": "array", @@ -687,32 +672,27 @@ "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 16 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 18 + "x-order": 17 }, "data_retention": { "type": "string", "x-order": 3 }, - "dbaas_enabled": { - "description": "True if DBaaS is enabled.", - "type": "boolean", - "x-order": 10 - }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 21 + "x-order": 20 }, "email_alerting_settings": { "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting.", @@ -759,12 +739,12 @@ "x-order": 3 } }, - "x-order": 12 + "x-order": 11 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 20 + "x-order": 19 }, "metrics_resolutions": { "description": "MetricsResolutions represents Prometheus exporters metrics resolutions.", @@ -796,7 +776,7 @@ "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 14 + "x-order": 13 }, "slack_alerting_settings": { "description": "SlackAlertingSettings represents Slack configuration for Alerting.", @@ -808,7 +788,7 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 12 }, "ssh_key": { "type": "string", @@ -834,7 +814,7 @@ "x-order": 0 } }, - "x-order": 15 + "x-order": 14 }, "stt_enabled": { "description": "True if Security Threat Tool is enabled.", @@ -852,7 +832,7 @@ "items": { "type": "string" }, - "x-order": 19 + "x-order": 18 }, "updates_disabled": { "description": "True if updates are disabled.", diff --git a/api/serverpb/server.pb.go b/api/serverpb/server.pb.go index 3a3d7a99ec..996fda1cab 100644 --- a/api/serverpb/server.pb.go +++ b/api/serverpb/server.pb.go @@ -1027,8 +1027,6 @@ type Settings struct { SttEnabled bool `protobuf:"varint,9,opt,name=stt_enabled,json=sttEnabled,proto3" json:"stt_enabled,omitempty"` // Percona Platform user's email, if this PMM instance is linked to the Platform. PlatformEmail string `protobuf:"bytes,10,opt,name=platform_email,json=platformEmail,proto3" json:"platform_email,omitempty"` - // True if DBaaS is enabled. - DbaasEnabled bool `protobuf:"varint,11,opt,name=dbaas_enabled,json=dbaasEnabled,proto3" json:"dbaas_enabled,omitempty"` // True if Alerting is enabled. AlertingEnabled bool `protobuf:"varint,12,opt,name=alerting_enabled,json=alertingEnabled,proto3" json:"alerting_enabled,omitempty"` // Alerting email (SMTP) settings. @@ -1155,13 +1153,6 @@ func (x *Settings) GetPlatformEmail() string { return "" } -func (x *Settings) GetDbaasEnabled() bool { - if x != nil { - return x.DbaasEnabled - } - return false -} - func (x *Settings) GetAlertingEnabled() bool { if x != nil { return x.AlertingEnabled @@ -1375,10 +1366,6 @@ type ChangeSettingsRequest struct { EnableBackupManagement bool `protobuf:"varint,24,opt,name=enable_backup_management,json=enableBackupManagement,proto3" json:"enable_backup_management,omitempty"` // Disable Backup Management. DisableBackupManagement bool `protobuf:"varint,25,opt,name=disable_backup_management,json=disableBackupManagement,proto3" json:"disable_backup_management,omitempty"` - // Enable DBaaS. - EnableDbaas bool `protobuf:"varint,26,opt,name=enable_dbaas,json=enableDbaas,proto3" json:"enable_dbaas,omitempty"` - // Disable DBaaS. - DisableDbaas bool `protobuf:"varint,27,opt,name=disable_dbaas,json=disableDbaas,proto3" json:"disable_dbaas,omitempty"` // Enable Access Control EnableAccessControl bool `protobuf:"varint,30,opt,name=enable_access_control,json=enableAccessControl,proto3" json:"enable_access_control,omitempty"` // Disable Access Control @@ -1606,20 +1593,6 @@ func (x *ChangeSettingsRequest) GetDisableBackupManagement() bool { return false } -func (x *ChangeSettingsRequest) GetEnableDbaas() bool { - if x != nil { - return x.EnableDbaas - } - return false -} - -func (x *ChangeSettingsRequest) GetDisableDbaas() bool { - if x != nil { - return x.DisableDbaas - } - return false -} - func (x *ChangeSettingsRequest) GetEnableAccessControl() bool { if x != nil { return x.EnableAccessControl @@ -1988,7 +1961,7 @@ var file_serverpb_server_proto_rawDesc = []byte{ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x66, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xfe, 0x08, 0x0a, 0x08, + 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xd9, 0x08, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x44, 0x69, 0x73, 0x61, 0x62, @@ -2018,298 +1991,291 @@ var file_serverpb_server_proto_rawDesc = []byte{ 0x52, 0x0a, 0x73, 0x74, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x62, 0x61, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x62, 0x61, 0x61, - 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x65, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x17, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x6c, 0x65, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x15, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x17, 0x73, 0x6c, - 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x73, 0x6c, 0x61, 0x63, - 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, - 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x49, 0x0a, 0x13, 0x73, 0x74, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, 0x74, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x62, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x62, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, - 0x2f, 0x0a, 0x13, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x43, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xf0, 0x0c, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6c, 0x65, - 0x6d, 0x65, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x11, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x13, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x12, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, - 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x77, 0x73, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x65, 0x72, - 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x55, 0x72, 0x6c, 0x12, 0x37, 0x0a, 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, - 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, - 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x2e, 0x0a, - 0x13, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x6c, 0x65, 0x72, - 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x3b, 0x0a, - 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, - 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, - 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x55, + 0x61, 0x69, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, + 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x17, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x17, 0x73, 0x6c, - 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x73, 0x6c, 0x61, 0x63, - 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0x43, 0x0a, 0x1e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x63, - 0x6b, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x70, 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x70, - 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, - 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x49, 0x0a, 0x13, 0x73, 0x74, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, 0x74, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x33, 0x0a, - 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, - 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x18, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x17, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x62, 0x61, 0x61, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x18, 0x1b, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x62, 0x61, 0x61, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x46, 0x0a, 0x16, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x17, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x61, + 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x12, + 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x6d, 0x6d, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, + 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x33, 0x0a, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x54, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2f, 0x0a, 0x13, 0x74, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, + 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, + 0x26, 0x0a, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x67, 0x73, 0x22, 0xa8, 0x0c, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x1c, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6c, 0x65, 0x6d, + 0x65, 0x74, 0x72, 0x79, 0x12, 0x4b, 0x0a, 0x13, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x77, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x77, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, + 0x37, 0x0a, 0x18, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x6c, 0x65, 0x72, + 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x74, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x74, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x74, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x74, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x29, + 0x0a, 0x10, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x17, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x17, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x43, 0x0a, 0x1e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, - 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x54, 0x6f, 0x22, 0x23, 0x0a, 0x21, 0x54, 0x65, 0x73, - 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, - 0x0a, 0x17, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, - 0x66, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x54, 0x52, 0x49, 0x42, - 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x49, 0x4e, 0x56, - 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, - 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x56, 0x46, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x41, - 0x4d, 0x49, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x10, 0x04, 0x12, - 0x06, 0x0a, 0x02, 0x44, 0x4f, 0x10, 0x05, 0x32, 0xef, 0x0c, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x12, 0x79, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, - 0x92, 0x41, 0x27, 0x12, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x52, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, - 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x9e, 0x02, - 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xdb, 0x01, 0x92, 0x41, 0xc5, 0x01, 0x12, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, - 0xaa, 0x01, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, - 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x79, 0x65, 0x74, 0x2e, 0x20, 0x55, 0x73, 0x65, - 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x41, 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x20, 0x6f, 0x66, 0x20, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, - 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x12, 0xa3, - 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x39, 0x12, - 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x28, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, - 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x90, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, - 0x41, 0x29, 0x12, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x1a, 0x19, 0x53, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x67, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x17, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x61, + 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x53, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, 0x0a, 0x1e, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x6c, 0x65, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x6c, 0x61, 0x63, + 0x6b, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, + 0x6d, 0x6d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x39, 0x0a, 0x19, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x70, 0x6d, 0x6d, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6d, 0x6d, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x73, 0x74, + 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x53, 0x54, 0x54, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x73, 0x52, 0x11, 0x73, 0x74, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x7a, 0x75, 0x72, 0x65, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x38, 0x0a, + 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x1e, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x46, 0x0a, + 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x20, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x17, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x15, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x54, 0x6f, 0x22, 0x23, 0x0a, 0x21, + 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x43, 0x0a, 0x17, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0b, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2a, 0x66, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x54, + 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x43, + 0x4b, 0x45, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x56, 0x46, 0x10, 0x02, 0x12, 0x07, + 0x0a, 0x03, 0x41, 0x4d, 0x49, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x5a, 0x55, 0x52, 0x45, + 0x10, 0x04, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x4f, 0x10, 0x05, 0x32, 0xef, 0x0c, 0x0a, 0x06, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3d, 0x92, 0x41, 0x27, 0x12, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, + 0x1c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x9e, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x01, 0x92, 0x41, 0xc5, 0x01, 0x12, 0x16, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, + 0x73, 0x73, 0x1a, 0xaa, 0x01, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x62, 0x65, 0x69, + 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x79, 0x65, 0x74, 0x2e, 0x20, + 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x41, 0x50, 0x49, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, + 0x72, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x65, 0x73, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, + 0x7a, 0x12, 0xa3, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, + 0x41, 0x39, 0x12, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x1a, 0x28, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x2f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x9d, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x73, 0x2f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x90, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x48, 0x92, 0x41, 0x29, 0x12, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x1a, 0x19, 0x53, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x9d, 0x01, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x32, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x21, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, - 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x52, 0x92, 0x41, 0x34, 0x12, 0x0c, 0x47, 0x65, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x1a, 0x24, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, - 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x47, 0x65, 0x74, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2f, 0x12, 0x0f, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x1c, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x81, 0x02, 0x0a, 0x19, 0x54, 0x65, 0x73, - 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x32, 0x12, 0x0d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x21, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x52, 0x92, 0x41, 0x34, 0x12, 0x0c, 0x47, 0x65, 0x74, 0x20, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x24, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x12, 0xa1, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2f, 0x12, 0x0f, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, + 0x1c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x50, 0x4d, 0x4d, 0x20, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x81, 0x02, 0x0a, 0x19, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, - 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x92, 0x41, - 0x5a, 0x12, 0x13, 0x54, 0x65, 0x73, 0x74, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x6c, - 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x43, 0x53, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x74, 0x65, - 0x73, 0x74, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x4d, 0x54, 0x50, 0x20, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x20, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xaa, 0x01, 0x0a, - 0x10, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x12, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x57, 0x53, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x57, 0x53, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x31, 0x12, 0x12, 0x41, 0x57, 0x53, 0x20, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x1b, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x41, 0x57, 0x53, 0x20, 0x45, 0x43, 0x32, 0x20, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x76, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x53, 0x58, - 0x58, 0xaa, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0xca, 0x02, 0x06, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0xe2, 0x02, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, + 0x01, 0x92, 0x41, 0x5a, 0x12, 0x13, 0x54, 0x65, 0x73, 0x74, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x20, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x1a, 0x43, 0x53, 0x65, 0x6e, 0x64, 0x73, + 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x53, 0x4d, 0x54, + 0x50, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, + 0x6c, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0xaa, 0x01, 0x0a, 0x10, 0x41, 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, 0x57, + 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x41, + 0x57, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x31, 0x12, 0x12, 0x41, 0x57, + 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x1a, 0x1b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x41, 0x57, 0x53, 0x20, 0x45, 0x43, 0x32, + 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x49, 0x44, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x41, 0x57, 0x53, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x76, 0x0a, 0x0a, + 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x0b, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x70, 0x62, 0xa2, 0x02, + 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0xca, 0x02, 0x06, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0xe2, 0x02, 0x12, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/serverpb/server.pb.validate.go b/api/serverpb/server.pb.validate.go index de4247a314..2f6cca9075 100644 --- a/api/serverpb/server.pb.validate.go +++ b/api/serverpb/server.pb.validate.go @@ -2073,8 +2073,6 @@ func (m *Settings) validate(all bool) error { // no validation rules for PlatformEmail - // no validation rules for DbaasEnabled - // no validation rules for AlertingEnabled if all { @@ -2695,10 +2693,6 @@ func (m *ChangeSettingsRequest) validate(all bool) error { // no validation rules for DisableBackupManagement - // no validation rules for EnableDbaas - - // no validation rules for DisableDbaas - // no validation rules for EnableAccessControl // no validation rules for DisableAccessControl diff --git a/api/serverpb/server.proto b/api/serverpb/server.proto index 616b91fd43..445b62b500 100644 --- a/api/serverpb/server.proto +++ b/api/serverpb/server.proto @@ -165,8 +165,6 @@ message Settings { bool stt_enabled = 9; // Percona Platform user's email, if this PMM instance is linked to the Platform. string platform_email = 10; - // True if DBaaS is enabled. - bool dbaas_enabled = 11; // True if Alerting is enabled. bool alerting_enabled = 12; // Alerting email (SMTP) settings. @@ -247,10 +245,6 @@ message ChangeSettingsRequest { bool enable_backup_management = 24; // Disable Backup Management. bool disable_backup_management = 25; - // Enable DBaaS. - bool enable_dbaas = 26; - // Disable DBaaS. - bool disable_dbaas = 27; // Enable Access Control bool enable_access_control = 30; // Disable Access Control diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 4e04d3fe73..6c2313542a 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -3205,25 +3205,15 @@ "type": "boolean", "x-order": 26 }, - "enable_dbaas": { - "description": "Enable DBaaS.", - "type": "boolean", - "x-order": 27 - }, - "disable_dbaas": { - "description": "Disable DBaaS.", - "type": "boolean", - "x-order": 28 - }, "enable_access_control": { "type": "boolean", "title": "Enable Access Control", - "x-order": 29 + "x-order": 27 }, "disable_access_control": { "type": "boolean", "title": "Disable Access Control", - "x-order": 30 + "x-order": 28 } } } @@ -3306,15 +3296,10 @@ "type": "string", "x-order": 9 }, - "dbaas_enabled": { - "description": "True if DBaaS is enabled.", - "type": "boolean", - "x-order": 10 - }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 11 + "x-order": 10 }, "email_alerting_settings": { "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting.", @@ -3361,7 +3346,7 @@ "x-order": 7 } }, - "x-order": 12 + "x-order": 11 }, "slack_alerting_settings": { "description": "SlackAlertingSettings represents Slack configuration for Alerting.", @@ -3373,12 +3358,12 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 12 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 14 + "x-order": 13 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -3400,22 +3385,22 @@ "x-order": 2 } }, - "x-order": 15 + "x-order": 14 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 16 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 18 + "x-order": 17 }, "telemetry_summaries": { "type": "array", @@ -3423,18 +3408,18 @@ "items": { "type": "string" }, - "x-order": 19 + "x-order": 18 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 20 + "x-order": 19 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 21 + "x-order": 20 } }, "x-order": 0 @@ -3573,15 +3558,10 @@ "type": "string", "x-order": 9 }, - "dbaas_enabled": { - "description": "True if DBaaS is enabled.", - "type": "boolean", - "x-order": 10 - }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 11 + "x-order": 10 }, "email_alerting_settings": { "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting.", @@ -3628,7 +3608,7 @@ "x-order": 7 } }, - "x-order": 12 + "x-order": 11 }, "slack_alerting_settings": { "description": "SlackAlertingSettings represents Slack configuration for Alerting.", @@ -3640,12 +3620,12 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 12 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 14 + "x-order": 13 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -3667,22 +3647,22 @@ "x-order": 2 } }, - "x-order": 15 + "x-order": 14 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 16 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 18 + "x-order": 17 }, "telemetry_summaries": { "type": "array", @@ -3690,18 +3670,18 @@ "items": { "type": "string" }, - "x-order": 19 + "x-order": 18 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 20 + "x-order": 19 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 21 + "x-order": 20 } }, "x-order": 0 @@ -18466,7 +18446,7 @@ "Agent" ], "summary": "List Agents", - "operationId": "ListAgentsMixin10", + "operationId": "ListAgentsMixin9", "parameters": [ { "description": "Only one of the parameters below must be set.", @@ -18944,13 +18924,14 @@ } } }, - "/v1/management/DBaaS/Backups/List": { + "/v1/management/External/Add": { "post": { + "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", "tags": [ - "DBClusters" + "External" ], - "summary": "ListS3Backups lists backups stored on s3.", - "operationId": "ListS3Backups", + "summary": "Add External Service", + "operationId": "AddExternal", "parameters": [ { "name": "body", @@ -18959,5235 +18940,89 @@ "schema": { "type": "object", "properties": { - "location_id": { + "runs_on_node_id": { + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "title": "Backup Location ID to list backups from", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "backups": { - "description": "Backup list.", - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "description": "Key of a filename on s3.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", "x-order": 0 }, - "message": { + "node_name": { + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/ChangePSMDB": { - "post": { - "tags": [ - "Components" - ], - "summary": "ChangePSMDBComponents manages PSMDB related components.", - "operationId": "ChangePSMDBComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "mongod": { - "description": "ChangeComponent contains fields to manage components.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", "type": "object", "properties": { - "default_version": { + "node_type": { + "description": "NodeType describes supported Node types.", "type": "string", + "default": "NODE_TYPE_INVALID", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], "x-order": 0 }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 } }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 + "x-order": 2 }, - "message": { + "address": { + "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/ChangePXC": { - "post": { - "tags": [ - "Components" - ], - "summary": "ChangePXCComponents manages PXC related components.", - "operationId": "ChangePXCComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "pxc": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "ChangeComponent contains fields to manage components.", - "type": "object", - "properties": { - "default_version": { - "type": "string", - "x-order": 0 - }, - "versions": { - "type": "array", - "items": { - "description": "ComponentVersion contains operations which should be done with component version.", - "type": "object", - "properties": { - "version": { - "type": "string", - "x-order": 0 - }, - "disable": { - "type": "boolean", - "x-order": 1 - }, - "enable": { - "type": "boolean", - "x-order": 2 - } - } - }, - "x-order": 1 - } - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/CheckForOperatorUpdate": { - "post": { - "tags": [ - "Components" - ], - "summary": "CheckForOperatorUpdate checks if a new version of an operator is available.", - "operationId": "CheckForOperatorUpdate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "cluster_to_components": { - "description": "The cluster name is used as a key for this map, value contains components and their inforamtion about update.", - "type": "object", - "additionalProperties": { - "description": "ComponentsUpdateInformation contains info about components and their available latest versions.", - "type": "object", - "properties": { - "component_to_update_information": { - "description": "component_to_update_information stores, under the name of the component, information about the update.\n\"pxc-operator\", \"psmdb-operator\" are names used by backend for our operators.", - "type": "object", - "additionalProperties": { - "description": "ComponentUpdateInformation contains version we can update to for certain component.", - "type": "object", - "properties": { - "available_version": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/GetPSMDB": { - "post": { - "tags": [ - "Components" - ], - "summary": "GetPSMDBComponents returns list of available components for PSMDB Clusters.", - "operationId": "GetPSMDBComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "db_version": { - "description": "Version of DB.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "description": "OperatorVersion contains information about operator and components matrix.", - "type": "object", - "properties": { - "product": { - "type": "string", - "x-order": 0 - }, - "operator": { - "type": "string", - "x-order": 1 - }, - "matrix": { - "description": "Matrix contains all available components.", - "type": "object", - "properties": { - "mongod": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 0 - }, - "pxc": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 1 - }, - "pmm": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 2 - }, - "proxysql": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 3 - }, - "haproxy": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 4 - }, - "backup": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 5 - }, - "operator": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 6 - }, - "log_collector": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 7 - } - }, - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/GetPXC": { - "post": { - "tags": [ - "Components" - ], - "summary": "GetPXCComponents returns list of available components for PXC Clusters.", - "operationId": "GetPXCComponents", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "db_version": { - "description": "Version of DB.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "description": "OperatorVersion contains information about operator and components matrix.", - "type": "object", - "properties": { - "product": { - "type": "string", - "x-order": 0 - }, - "operator": { - "type": "string", - "x-order": 1 - }, - "matrix": { - "description": "Matrix contains all available components.", - "type": "object", - "properties": { - "mongod": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 0 - }, - "pxc": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 1 - }, - "pmm": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 2 - }, - "proxysql": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 3 - }, - "haproxy": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 4 - }, - "backup": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 5 - }, - "operator": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 6 - }, - "log_collector": { - "type": "object", - "additionalProperties": { - "description": "Component contains information about component.", - "type": "object", - "properties": { - "image_path": { - "type": "string", - "x-order": 0 - }, - "image_hash": { - "type": "string", - "x-order": 1 - }, - "status": { - "type": "string", - "x-order": 2 - }, - "critical": { - "type": "boolean", - "x-order": 3 - }, - "default": { - "type": "boolean", - "x-order": 4 - }, - "disabled": { - "type": "boolean", - "x-order": 5 - } - } - }, - "x-order": 7 - } - }, - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Components/InstallOperator": { - "post": { - "tags": [ - "Components" - ], - "summary": "InstallOperator installs given operator in given version.", - "operationId": "InstallOperator", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "operator_type": { - "description": "operator_type tells what operator we are interested in updating.", - "type": "string", - "x-order": 1 - }, - "version": { - "description": "version tells what version of the operator we should update to.", - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Delete": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "DeleteDBCluster deletes DB cluster.", - "operationId": "DeleteDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - }, - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Get": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "GetDBCluster returns parameters used to create a database cluster", - "operationId": "GetDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pxc_cluster": { - "description": "PXCCluster represents PXC cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed XtraDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 11 - } - }, - "x-order": 0 - }, - "psmdb_cluster": { - "description": "PSMDBCluster represents PSMDB cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed PSMDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 11 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/List": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "ListDBClusters returns a list of DB clusters.", - "operationId": "ListDBClusters", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "pxc_clusters": { - "description": "PXC clusters information.", - "type": "array", - "items": { - "description": "PXCCluster represents PXC cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed XtraDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 11 - } - } - }, - "x-order": 0 - }, - "psmdb_clusters": { - "description": "PSMDB clusters information.", - "type": "array", - "items": { - "description": "PSMDBCluster represents PSMDB cluster information.", - "type": "object", - "properties": { - "name": { - "description": "Cluster name.", - "type": "string", - "x-order": 0 - }, - "state": { - "description": "DBClusterState represents DB cluster CR state.\n\n - DB_CLUSTER_STATE_INVALID: DB_CLUSTER_STATE_INVALID represents unknown state.\n - DB_CLUSTER_STATE_CHANGING: DB_CLUSTER_STATE_CHANGING represents a cluster being changed.\n - DB_CLUSTER_STATE_READY: DB_CLUSTER_STATE_READY represents a cluster without pending changes.\n - DB_CLUSTER_STATE_FAILED: DB_CLUSTER_STATE_FAILED represents a failed cluster.\n - DB_CLUSTER_STATE_DELETING: DB_CLUSTER_STATE_DELETING represents a cluster being deleting.\n - DB_CLUSTER_STATE_PAUSED: DB_CLUSTER_STATE_PAUSED represents a cluster is paused.\n - DB_CLUSTER_STATE_UPGRADING: DB_CLUSTER_STATE_UPGRADING is a special case of DB_CLUSTER_STATE_CHANGING.\nIt indicates database cluster upgrade is ongoing.", - "type": "string", - "default": "DB_CLUSTER_STATE_INVALID", - "enum": [ - "DB_CLUSTER_STATE_INVALID", - "DB_CLUSTER_STATE_CHANGING", - "DB_CLUSTER_STATE_READY", - "DB_CLUSTER_STATE_FAILED", - "DB_CLUSTER_STATE_DELETING", - "DB_CLUSTER_STATE_PAUSED", - "DB_CLUSTER_STATE_UPGRADING" - ], - "x-order": 1 - }, - "operation": { - "description": "RunningOperation respresents a long-running operation.", - "type": "object", - "properties": { - "finished_steps": { - "description": "Finished steps of the operaion; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "description": "Text describing the current operation progress step.", - "type": "string", - "x-order": 1 - }, - "total_steps": { - "description": "Total steps needed to finish the operation; can decrease or increase compared to the previous value.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 2 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 3 - }, - "exposed": { - "description": "DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 4 - }, - "installed_image": { - "description": "Installed PSMDB image.", - "type": "string", - "x-order": 5 - }, - "available_image": { - "description": "Available database version user can upgrade cluster to, returned as an image. Image tag contains the version.\nIf it's empty, no upgrade is available.", - "type": "string", - "x-order": 6 - }, - "internet_facing": { - "description": "Is DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 7 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 8 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 9 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 10 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 11 - } - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/DBClusters/Restart": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "RestartDBCluster restarts DB cluster.", - "operationId": "RestartDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - }, - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/GetLogs": { - "post": { - "tags": [ - "LogsAPI" - ], - "summary": "GetLogs gets all logs from db cluster.", - "operationId": "GetLogs", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "cluster_name": { - "description": "DB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "logs": { - "description": "Log represents list of logs. Each entry contains either container's logs or,\nwhen container field is empty, pod's events.", - "type": "array", - "items": { - "description": "Logs contain logs for certain pod's container. If container is an empty\nstring, logs contain pod's events.", - "type": "object", - "properties": { - "pod": { - "description": "Pod name.", - "type": "string", - "x-order": 0 - }, - "container": { - "description": "Container name.", - "type": "string", - "x-order": 1 - }, - "logs": { - "description": "Content of container's log or pod's events.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Get": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "GetKubernetesCluster return KubeAuth with Kubernetes config.", - "operationId": "GetKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "kube_auth": { - "description": "KubeAuth represents Kubernetes / kubectl authentication and authorization information.", - "type": "object", - "properties": { - "kubeconfig": { - "description": "Kubeconfig file content.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/List": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "ListKubernetesClusters returns a list of all registered Kubernetes clusters.", - "operationId": "ListKubernetesClusters", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "kubernetes_clusters": { - "description": "Kubernetes clusters.", - "type": "array", - "items": { - "description": "Cluster contains public info about Kubernetes cluster.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "operators": { - "description": "Operators contains list of operators installed in Kubernetes cluster.", - "type": "object", - "properties": { - "pxc": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 0 - }, - "psmdb": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 1 - }, - "dbaas": { - "description": "Operator contains all information about operator installed in Kubernetes cluster.", - "type": "object", - "properties": { - "status": { - "description": "OperatorsStatus defines status of operators installed in Kubernetes cluster.\n\n - OPERATORS_STATUS_INVALID: OPERATORS_STATUS_INVALID represents unknown state.\n - OPERATORS_STATUS_OK: OPERATORS_STATUS_OK represents that operators are installed and have supported API version.\n - OPERATORS_STATUS_UNSUPPORTED: OPERATORS_STATUS_UNSUPPORTED represents that operators are installed, but doesn't have supported API version.\n - OPERATORS_STATUS_NOT_INSTALLED: OPERATORS_STATUS_NOT_INSTALLED represents that operators are not installed.", - "type": "string", - "default": "OPERATORS_STATUS_INVALID", - "enum": [ - "OPERATORS_STATUS_INVALID", - "OPERATORS_STATUS_OK", - "OPERATORS_STATUS_UNSUPPORTED", - "OPERATORS_STATUS_NOT_INSTALLED" - ], - "x-order": 0 - }, - "version": { - "type": "string", - "x-order": 1 - } - }, - "x-order": 2 - } - }, - "x-order": 1 - }, - "status": { - "description": "KubernetesClusterStatus defines status of Kubernetes cluster.\n\n - KUBERNETES_CLUSTER_STATUS_INVALID: KUBERNETES_CLUSTER_STATUS_INVALID represents unknown state.\n - KUBERNETES_CLUSTER_STATUS_OK: KUBERNETES_CLUSTER_STATUS_OK represents that Kubernetes cluster is accessible.\n - KUBERNETES_CLUSTER_STATUS_UNAVAILABLE: KUBERNETES_CLUSTER_STATUS_UNAVAILABLE represents that Kubernetes cluster is not accessible.\n - KUBERNETES_CLUSTER_STATUS_PROVISIONING: KUBERNETES_CLUSTER_STATUS_PROVISIONING represents that Kubernetes cluster is privisioning.", - "type": "string", - "default": "KUBERNETES_CLUSTER_STATUS_INVALID", - "enum": [ - "KUBERNETES_CLUSTER_STATUS_INVALID", - "KUBERNETES_CLUSTER_STATUS_OK", - "KUBERNETES_CLUSTER_STATUS_UNAVAILABLE", - "KUBERNETES_CLUSTER_STATUS_PROVISIONING" - ], - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Register": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM.", - "operationId": "RegisterKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "kube_auth": { - "description": "KubeAuth represents Kubernetes / kubectl authentication and authorization information.", - "type": "object", - "properties": { - "kubeconfig": { - "description": "Kubeconfig file content.", - "type": "string", - "x-order": 0 - } - }, - "x-order": 1 - }, - "aws_access_key_id": { - "description": "AWS access key id, only needed when registering EKS cluster and kubeconfig does not contain it.", - "type": "string", - "x-order": 2 - }, - "aws_secret_access_key": { - "description": "AWS secret access key, only needed when registering EKS cluster and kubeconfig does not contain it.", - "type": "string", - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Resources/Get": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "GetResources returns all and available resources of a Kubernetes cluster.\nNOTE: The user defined in kubeconfig for the cluster has to have rights to\n list and get Pods from all Namespaces. Also getting and listing Nodes\n has to be allowed.", - "operationId": "GetResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "all": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 0 - }, - "available": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/StorageClasses/List": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster.", - "operationId": "ListStorageClasses", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "storage_classes": { - "description": "Kubernetes storage classes names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Kubernetes/Unregister": { - "post": { - "tags": [ - "Kubernetes" - ], - "summary": "UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM.", - "operationId": "UnregisterKubernetesCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "force": { - "description": "If true then Kubernetes cluster will be deleted\neven if it contains database clusters.", - "type": "boolean", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Create": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "CreatePSMDBCluster creates a new PSMDB cluster.", - "operationId": "CreatePSMDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "PSMDB cluster name.\na DNS-1035 label must consist of lower case alphanumeric characters or '-',\nstart with an alphabetic character, and end with an alphanumeric character\n(e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')", - "x-order": 1 - }, - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Resources/Get": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "GetPSMDBClusterResources returns expected resources to be consumed by the cluster.", - "operationId": "GetPSMDBClusterResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "description": "PSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "image": { - "description": "Docker image used for PSMDB.", - "type": "string", - "x-order": 2 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 3 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 4 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "expected": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBCluster/Update": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "UpdatePSMDBCluster updates existing PSMDB cluster.", - "operationId": "UpdatePSMDBCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PSMDB cluster name.", - "type": "string", - "x-order": 1 - }, - "params": { - "description": "UpdatePSMDBClusterParams represents PSMDB cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "replicaset": { - "description": "ReplicaSet container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "configuration": { - "type": "string", - "title": "Configuration for PSMDB cluster", - "x-order": 1 - }, - "storage_class": { - "description": "Storage Class for PSMDB cluster.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 1 - }, - "suspend": { - "description": "Suspend cluster `pause: true`.", - "type": "boolean", - "x-order": 2 - }, - "resume": { - "description": "Resume cluster `pause: false`.", - "type": "boolean", - "x-order": 3 - }, - "image": { - "description": "PSMDB image to use. If it's the same image but with different version tag, upgrade of database cluster to version\nin given tag is triggered. If entirely different image is given, error is returned.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PSMDBClusters/GetCredentials": { - "post": { - "tags": [ - "PSMDBClusters" - ], - "summary": "GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name.", - "operationId": "GetPSMDBClusterCredentials", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PSMDB cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "connection_credentials": { - "description": "PSMDBCredentials is a credentials to connect to PSMDB.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "username": { - "description": "MongoDB username.", - "type": "string", - "x-order": 0 - }, - "password": { - "description": "MongoDB password.", - "type": "string", - "x-order": 1 - }, - "host": { - "description": "MongoDB host.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "MongoDB port.", - "type": "integer", - "format": "int32", - "x-order": 3 - }, - "replicaset": { - "description": "Replicaset name.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Create": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "CreatePXCCluster creates a new PXC cluster.", - "operationId": "CreatePXCCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "type": "string", - "title": "PXC cluster name.\na DNS-1035 label must consist of lower case alphanumeric characters or '-',\nstart with an alphabetic character, and end with an alphanumeric character\n(e.g. 'my-name', or 'abc-123', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')", - "x-order": 1 - }, - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Resources/Get": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "GetPXCClusterResources returns expected resources to be consumed by the cluster.", - "operationId": "GetPXCClusterResources", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "description": "PXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for PXC.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 3 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.\nTODO Do not use inner messages in all public APIs (for consistency).", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for ProxySQL.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "int64", - "x-order": 2 - } - }, - "x-order": 2 - }, - "haproxy": { - "description": "HAProxy container parameters.\nNOTE: HAProxy does not need disk size as ProxySQL does because the container does not require it.", - "type": "object", - "properties": { - "image": { - "description": "Docker image used for HAProxy.", - "type": "string", - "x-order": 0 - }, - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 1 - } - }, - "x-order": 3 - }, - "backup": { - "type": "object", - "title": "Backup configuration for a database cluster", - "properties": { - "location_id": { - "description": "Backup Location id of stored backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "keep_copies": { - "description": "Keep copies represents how many copies should retain.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "cron_expression": { - "type": "string", - "title": "Cron expression represents cron expression", - "x-order": 2 - }, - "service_account": { - "type": "string", - "title": "Service acccount used for backups", - "x-order": 3 - } - }, - "x-order": 4 - }, - "restore": { - "type": "object", - "title": "Restore represents restoration payload to restore a database cluster from backup", - "properties": { - "location_id": { - "description": "Backup location in PMM.", - "type": "string", - "x-order": 0 - }, - "destination": { - "description": "Destination filename.", - "type": "string", - "x-order": 1 - }, - "secrets_name": { - "description": "K8s Secrets name.", - "type": "string", - "x-order": 2 - } - }, - "x-order": 5 - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "expected": { - "description": "Resources contains Kubernetes cluster resources.", - "type": "object", - "properties": { - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "uint64", - "x-order": 0 - }, - "cpu_m": { - "description": "CPU in millicpus. For example 0.1 of CPU is equivalent to 100 millicpus.\nSee https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu.", - "type": "string", - "format": "uint64", - "x-order": 1 - }, - "disk_size": { - "description": "Disk size in bytes.", - "type": "string", - "format": "uint64", - "x-order": 2 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCCluster/Update": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "UpdatePXCCluster updates existing PXC cluster.", - "operationId": "UpdatePXCCluster", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - }, - "params": { - "description": "UpdatePXCClusterParams represents PXC cluster parameters that can be updated.", - "type": "object", - "properties": { - "cluster_size": { - "description": "Cluster size.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "pxc": { - "description": "PXC container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - }, - "image": { - "description": "Image to use. If it's the same image but with different version tag, upgrade of database cluster to version\nin given tag is triggered. If entirely different image is given, error is returned.", - "type": "string", - "x-order": 1 - }, - "configuration": { - "type": "string", - "title": "Configuration for PXC cluster", - "x-order": 2 - }, - "storage_class": { - "description": "Storage Class for PXC cluster.", - "type": "string", - "x-order": 3 - } - }, - "x-order": 1 - }, - "proxysql": { - "description": "ProxySQL container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 2 - }, - "suspend": { - "description": "Suspend cluster `pause: true`.", - "type": "boolean", - "x-order": 3 - }, - "resume": { - "description": "Resume cluster `pause: false`.", - "type": "boolean", - "x-order": 4 - }, - "haproxy": { - "description": "HAProxy container parameters.", - "type": "object", - "properties": { - "compute_resources": { - "description": "ComputeResources represents container computer resources requests or limits.", - "type": "object", - "properties": { - "cpu_m": { - "description": "CPUs in milliCPUs; 1000m = 1 vCPU.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "memory_bytes": { - "description": "Memory in bytes.", - "type": "string", - "format": "int64", - "x-order": 1 - } - }, - "x-order": 0 - } - }, - "x-order": 5 - } - }, - "x-order": 2 - }, - "expose": { - "description": "Make DB cluster accessible outside of K8s cluster.", - "type": "boolean", - "x-order": 3 - }, - "internet_facing": { - "description": "Make DB cluster accessible via public internet.", - "type": "boolean", - "x-order": 4 - }, - "source_ranges": { - "description": "Apply IP source ranges against the cluster.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 5 - }, - "template": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - }, - "x-order": 6 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/PXCClusters/GetCredentials": { - "post": { - "tags": [ - "PXCClusters" - ], - "summary": "GetPXCClusterCredentials returns a PXC cluster credentials by cluster name.", - "operationId": "GetPXCClusterCredentials", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "name": { - "description": "PXC cluster name.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "connection_credentials": { - "description": "PXCClusterConnectionCredentials is cluster connection credentials.", - "type": "object", - "properties": { - "username": { - "description": "PXC username.", - "type": "string", - "x-order": 0 - }, - "password": { - "description": "PXC password.", - "type": "string", - "x-order": 1 - }, - "host": { - "description": "PXC host.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "PXC port.", - "type": "integer", - "format": "int32", - "x-order": 3 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Secrets/List": { - "post": { - "tags": [ - "DBClusters" - ], - "summary": "ListSecrets returns a list of secrets from k8s", - "operationId": "ListSecrets", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "secrets": { - "description": "Secret list.", - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name of a secret", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/DBaaS/Templates/List": { - "post": { - "tags": [ - "Templates" - ], - "summary": "ListTemplates returns a list of all registered templates.", - "operationId": "ListTemplates", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "kubernetes_cluster_name": { - "description": "Kubernetes cluster name.", - "type": "string", - "x-order": 0 - }, - "cluster_type": { - "description": "DBClusterType represents database cluster type.\n\n - DB_CLUSTER_TYPE_INVALID: DB_CLUSTER_TYPE_INVALID represents unknown cluster type.\n - DB_CLUSTER_TYPE_PXC: DB_CLUSTER_TYPE_PXC represents pxc cluster type.\n - DB_CLUSTER_TYPE_PSMDB: DB_CLUSTER_TYPE_PSMDB represents psmdb cluster type.", - "type": "string", - "default": "DB_CLUSTER_TYPE_INVALID", - "enum": [ - "DB_CLUSTER_TYPE_INVALID", - "DB_CLUSTER_TYPE_PXC", - "DB_CLUSTER_TYPE_PSMDB" - ], - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "description": "Template CR name.", - "type": "string", - "x-order": 0 - }, - "kind": { - "description": "Template CR kind.", - "type": "string", - "x-order": 1 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/External/Add": { - "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", - "tags": [ - "External" - ], - "summary": "Add External Service", - "operationId": "AddExternal", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_INVALID", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, - "x-order": 2 - }, - "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", - "type": "string", - "x-order": 3 + "x-order": 3 }, "service_name": { "description": "Unique across all Services user-defined name. Required.", @@ -26088,7 +20923,7 @@ "MgmtNode" ], "summary": "Get Node", - "operationId": "GetNodeMixin11", + "operationId": "GetNodeMixin10", "parameters": [ { "name": "body", @@ -26305,7 +21140,7 @@ "MgmtNode" ], "summary": "List Nodes", - "operationId": "ListNodesMixin11", + "operationId": "ListNodesMixin10", "parameters": [ { "name": "body", @@ -30314,7 +25149,7 @@ "MgmtService" ], "summary": "List Services", - "operationId": "ListServicesMixin12", + "operationId": "ListServicesMixin11", "parameters": [ { "name": "body", @@ -31229,7 +26064,7 @@ "Alerting" ], "summary": "ListTemplates returns a list of all collected alert rule templates.", - "operationId": "ListTemplatesMixin6", + "operationId": "ListTemplates", "parameters": [ { "name": "body", @@ -32445,7 +27280,7 @@ "Backups" ], "summary": "GetLogs returns logs from the underlying tools for a backup/restore job.", - "operationId": "GetLogsMixin7", + "operationId": "GetLogs", "parameters": [ { "name": "body", @@ -37148,27 +31983,6 @@ { "name": "Service" }, - { - "name": "Components" - }, - { - "name": "DBClusters" - }, - { - "name": "Kubernetes" - }, - { - "name": "LogsAPI" - }, - { - "name": "PSMDBClusters" - }, - { - "name": "PXCClusters" - }, - { - "name": "Templates" - }, { "name": "Alerts" }, diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 908e2702de..7b8e4ca0c1 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -361,25 +361,15 @@ "type": "boolean", "x-order": 26 }, - "enable_dbaas": { - "description": "Enable DBaaS.", - "type": "boolean", - "x-order": 27 - }, - "disable_dbaas": { - "description": "Disable DBaaS.", - "type": "boolean", - "x-order": 28 - }, "enable_access_control": { "type": "boolean", "title": "Enable Access Control", - "x-order": 29 + "x-order": 27 }, "disable_access_control": { "type": "boolean", "title": "Disable Access Control", - "x-order": 30 + "x-order": 28 } } } @@ -462,15 +452,10 @@ "type": "string", "x-order": 9 }, - "dbaas_enabled": { - "description": "True if DBaaS is enabled.", - "type": "boolean", - "x-order": 10 - }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 11 + "x-order": 10 }, "email_alerting_settings": { "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting.", @@ -517,7 +502,7 @@ "x-order": 7 } }, - "x-order": 12 + "x-order": 11 }, "slack_alerting_settings": { "description": "SlackAlertingSettings represents Slack configuration for Alerting.", @@ -529,12 +514,12 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 12 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 14 + "x-order": 13 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -556,22 +541,22 @@ "x-order": 2 } }, - "x-order": 15 + "x-order": 14 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 16 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 18 + "x-order": 17 }, "telemetry_summaries": { "type": "array", @@ -579,18 +564,18 @@ "items": { "type": "string" }, - "x-order": 19 + "x-order": 18 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 20 + "x-order": 19 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 21 + "x-order": 20 } }, "x-order": 0 @@ -729,15 +714,10 @@ "type": "string", "x-order": 9 }, - "dbaas_enabled": { - "description": "True if DBaaS is enabled.", - "type": "boolean", - "x-order": 10 - }, "alerting_enabled": { "description": "True if Alerting is enabled.", "type": "boolean", - "x-order": 11 + "x-order": 10 }, "email_alerting_settings": { "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting.", @@ -784,7 +764,7 @@ "x-order": 7 } }, - "x-order": 12 + "x-order": 11 }, "slack_alerting_settings": { "description": "SlackAlertingSettings represents Slack configuration for Alerting.", @@ -796,12 +776,12 @@ "x-order": 0 } }, - "x-order": 13 + "x-order": 12 }, "pmm_public_address": { "description": "PMM Server public address.", "type": "string", - "x-order": 14 + "x-order": 13 }, "stt_check_intervals": { "description": "STTCheckIntervals represents intervals between STT checks.", @@ -823,22 +803,22 @@ "x-order": 2 } }, - "x-order": 15 + "x-order": 14 }, "backup_management_enabled": { "description": "True if Backup Management is enabled.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "azurediscover_enabled": { "description": "True if Azure Discover is enabled.", "type": "boolean", - "x-order": 17 + "x-order": 16 }, "connected_to_platform": { "type": "boolean", "title": "True if the PMM instance is connected to Platform", - "x-order": 18 + "x-order": 17 }, "telemetry_summaries": { "type": "array", @@ -846,18 +826,18 @@ "items": { "type": "string" }, - "x-order": 19 + "x-order": 18 }, "enable_access_control": { "description": "True if Access Control is enabled.", "type": "boolean", - "x-order": 20 + "x-order": 19 }, "default_role_id": { "description": "Default Access Control role ID for new users.", "type": "integer", "format": "int64", - "x-order": 21 + "x-order": 20 } }, "x-order": 0 diff --git a/build/ansible/roles/pmm2-images/tasks/main.yml b/build/ansible/roles/pmm2-images/tasks/main.yml index f7812a6328..d566b3606a 100644 --- a/build/ansible/roles/pmm2-images/tasks/main.yml +++ b/build/ansible/roles/pmm2-images/tasks/main.yml @@ -29,7 +29,7 @@ # local yum repo for building of pmm server docker image in autobuild jobs - name: PMM | Add local YUM repository - when: ansible_virtualization_type == "docker" + when: ansible_virtualization_type == "docker" yum_repository: name: local description: Local YUM repository - x86_64 @@ -147,8 +147,6 @@ - percona-alertmanager - pmm-managed - pmm-update - - dbaas-controller - - dbaas-tools - grafana-db-migrator - pmm-dump - vmproxy diff --git a/build/packages/rpm/server/SPECS/dbaas-tools.spec b/build/packages/rpm/server/SPECS/dbaas-tools.spec deleted file mode 100644 index a7c19d67f6..0000000000 --- a/build/packages/rpm/server/SPECS/dbaas-tools.spec +++ /dev/null @@ -1,89 +0,0 @@ -%undefine _missing_build_ids_terminate_build -%define debug_package %{nil} - -%global commit_aws ea9bcaeb5e62c110fe326d1db58b03a782d4bdd6 -%global shortcommit_aws %(c=%{commit_aws}; echo ${c:0:7}) - -%global commit_k8s ef70d260f3d036fc22b30538576bbf6b36329995 -%global shortcommit_k8s %(c=%{commit_k8s}; echo ${c:0:7}) -%global version_k8s v1.24.12 - -%global install_golang 1 -%global debug_package %{nil} - -%define build_timestamp %(date -u +"%y%m%d%H%M") -%define release 2 -%define rpm_release %{release}.%{build_timestamp}%{?dist} - -Name: dbaas-tools -Version: 0.6.10 -Release: %{rpm_release} -Summary: A set of tools for Percona DBaaS -License: ASL 2.0 -URL: https://github.com/kubernetes-sigs/aws-iam-authenticator -# Git tag can be moved and pointed to different commit hash which may brake reproducibility of the build -# As by using an exact commit hash, we can ensure that each time source will be identical -Source0: https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/%{commit_aws}/aws-iam-authenticator-%{shortcommit_aws}.tar.gz -Source1: https://github.com/kubernetes/kubernetes/archive/%{commit_k8s}/kubernetes-%{shortcommit_k8s}.tar.gz - -BuildRequires: which - -%description -%{summary} - -%prep -%setup -T -c -n aws-iam-authenticator-%{commit_aws} -%setup -q -c -a 0 -n aws-iam-authenticator-%{commit_aws} -mkdir -p src/github.com/kubernetes-sigs/ -mv aws-iam-authenticator-%{commit_aws} src/github.com/kubernetes-sigs/aws-iam-authenticator-%{commit_aws} - -%setup -T -c -n kubernetes-%{commit_k8s} -%setup -q -c -a 1 -n kubernetes-%{commit_k8s} -mkdir -p src/github.com/kubernetes/ -mv kubernetes-%{commit_k8s} src/github.com/kubernetes/kubernetes-%{commit_k8s} - -%build -cd %{_builddir}/aws-iam-authenticator-%{commit_aws} -export GOPATH="$(pwd)" -export CGO_ENABLED=0 -export USER=builder - -cd src/github.com/kubernetes-sigs/aws-iam-authenticator-%{commit_aws} -sed -i '/- darwin/d;/- windows/d;/- arm64/d;/dockers:/,+23d' .goreleaser.yaml -make goreleaser - -cd %{_builddir}/kubernetes-%{commit_k8s}/ -export GOPATH="$(pwd)" - -cd src/github.com/kubernetes/kubernetes-%{commit_k8s} -make WHAT="cmd/kubectl" - -%install -cd %{_builddir}/aws-iam-authenticator-%{commit_aws}/src/github.com/kubernetes-sigs/aws-iam-authenticator-%{commit_aws} -install -D -p -m 0755 dist/aws-iam-authenticator_linux_amd64_v1/aws-iam-authenticator %{buildroot}/opt/dbaas-tools/bin/aws-iam-authenticator - -cd %{_builddir}/kubernetes-%{commit_k8s}/src/github.com/kubernetes/kubernetes-%{commit_k8s} -install -D -p -m 0775 _output/local/go/bin/kubectl %{buildroot}/opt/dbaas-tools/bin/kubectl-1.23 - - -%files -/opt/dbaas-tools/bin/aws-iam-authenticator -/opt/dbaas-tools/bin/kubectl-1.23 - -%changelog - -* Mon Jun 12 2023 Nurlan Moldomurov - 0.6.10-1 -- Update versions of aws-iam-authenticator - -* Mon Jun 05 2023 Andrew Minkin - 0.6.2-1 -- Update versions of kubectl and aws-iam-authenticator - -* Mon Nov 21 2022 Alex Tymchuk - 0.5.7-2 -- Fix the double description warning - -* Wed May 04 2022 Nurlan Moldomurov - 0.5.7-1 -- Update versions of dbaas-tools - -* Thu Aug 27 2020 Illia Pshonkin - 0.5.1-1 -- Initial packaging for dbaas-tools - diff --git a/docs/api/dbaas.md b/docs/api/dbaas.md deleted file mode 100644 index 08eda78960..0000000000 --- a/docs/api/dbaas.md +++ /dev/null @@ -1,473 +0,0 @@ ---- -slug: 'dbaas' ---- - -## Private DBaaS -Database-as-a-Service (DBaaS) is a managed database that doesn’t need to be installed and maintained but is instead provided as a service to the user. - -A common misconception is that a DBaaS is limited to the public cloud. As many enterprises already have large data centers and heavy investments in hardware, an on-premise DBaaS can also be quite appealing. Keeping the database in-house is often favored when the hardware and resources are already available. In addition, there are extra compliance and security concerns when looking at a public cloud offering. - -The [Percona Monitoring and Management](https://www.percona.com/software/database-tools/percona-monitoring-and-management) (PMM) DBaaS component is a private DBaaS that simplifies and automates [Percona kubernetes operators](https://www.percona.com/software/percona-kubernetes-operators) to created DBs in a Kubernetes cluster. - -It creates and manages DBs such as [Percona XtraDB Cluster](https://www.percona.com/doc/kubernetes-operator-for-pxc/index.html) (PXC) and [Percona Server for MongoDB](https://www.percona.com/doc/kubernetes-operator-for-psmongodb/index.html) (PSMDB) and automates tasks such as: - - Installing the database software - - Configuring the database - - Setting up backups - - Managing upgrades - - Handling failover scenarios - -Read more about DBaaS: -- [DBaaS Documentation](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/dbaas.html) -- [DBaaS blogs](https://www.percona.com/blog/tag/dbaas/) - -## How to configure and use - -To configure and use DBaaS you would need to have PMM deployment and Kubernetes cluster. PMM provides functionality to create and manage DBs and Kubernetes cluster is where those DBs will be running. - -How to get this environment up and running you can read in our [documentation](https://docs.percona.com/percona-monitoring-and-management/setting-up/server/dbaas.html#create-a-kubernetes-cluster). - -PMM provides set of API calls to enable DBaaS, configure it and to create and manage DBs: -- [Change Settings](ref:changesettings) -- [Register Kubernetes Cluster](ref:registerkubernetescluster) -- [Create PXC Cluster](ref:createpxccluster) -- [Create PSMDB Cluster](ref:createpsmdbcluster) - -In this example we would use minikube for the kubernetes cluster and will create a PXC DB cluster, but similar API endpoints exist for the PSMDB. - -### Enabling - -To enable DBaaS, first we need: -- Enable DBaaS in settings. -- Specify the DNS name or public IP address of the pmm-server instance to be able to monitor DB clusters we create in DBaaS and Kubernetes cluster itself. - -It is highly recommended to **use DNS name** instead of IP address but in example bellow we have a dev environment and use IP address instead. - -#### Get Docker container IP and set it as public address - -First of all we should get IP address of PMM (or DNS name should be used and that is recommended). If you are running in local minikube environment you can use following command to get IP address: -```bash -IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmm-server) -``` -If your kubernetes cluster is located outside of your local system you can get public address by calling `ifconfig`. - -Then to enable DBaaS send request to `Settings/Change` endpoint like below where `IP` is public IP address or DNS name of PMM Server instance. -```bash -curl -X POST "http://localhost/v1/Settings/Change" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"pmm_public_address\": \"${IP}\", \"enable_dbaas\": true }" -``` - -API endpoint used in this step: [Change settings](ref:changesettings). - -### Registering new Kubernetes cluster - -Once kubernetes cluster is created it should be registered in PMM where `my_cluster` is a name of kubernetes cluster which will be used later. `sed` command is used to remove newlines, otherwise this script doesn’t work. -```bash -KUBECONFIG=$(kubectl config view --flatten --minify | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g') - -curl -X POST "http://localhost/v1/management/DBaaS/Kubernetes/Register" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"kube_auth\": { \"kubeconfig\": \"${KUBECONFIG}\" }}" -``` -This command will register kubernetes cluster, start monitoring of kubernetes cluster and install required kubernetes operators. - -API endpoint used in this step: [RegisterKubernetesCluster](ref:registerkubernetescluster) - -### Get available PXC image names - -To create a PXC cluster, we need to provide the image name for the database instance. -Percona maintains a list of available versions for each component. For example, to retrieve the list of the available PXC components we can call the `Components/GetPXC` API method: - -```bash -curl -X POST "http://localhost/v1/management/DBaaS/Components/GetPXC" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\"}" -``` -Example response: - -```json -{ - "versions": [ - { - "product": "pxc-operator", - "operator": "1.10.0", - "matrix": { - "pxc": { - "8.0.19-10.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.19-10.1", - "image_hash": "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", - "status": "available" - }, - "8.0.20-11.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.20-11.1", - "image_hash": "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", - "status": "available" - }, - "8.0.20-11.2": { - "image_path": "percona/percona-xtradb-cluster:8.0.20-11.2", - "image_hash": "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", - "status": "available" - }, - "8.0.21-12.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.21-12.1", - "image_hash": "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", - "status": "available" - }, - "8.0.22-13.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.22-13.1", - "image_hash": "1295af1153c1d02e9d40131eb0945b53f7f371796913e64116bf2caa77dc186d", - "status": "available" - }, - "8.0.23-14.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.23-14.1", - "image_hash": "8109f7ca4fc465ba862c08021df12e77b65d384395078e31e270d14b77810d79", - "status": "available" - }, - "8.0.25-15.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.25-15.1", - "image_hash": "529e979c86442429e6feabef9a2d9fc362f4626146f208fbfac704e145a492dd", - "status": "recommended", - "default": true - } - }, - "pmm": { - "2.23.0": { - "image_path": "percona/pmm-client:2.23.0", - "image_hash": "8fa0e45f740fa8564cbfbdf5d9a5507a07e331f8f40ea022d3a64d7278478eac", - "status": "recommended", - "default": true - } - }, - "proxysql": { - "2.0.18": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-proxysql", - "image_hash": "f109a62eb316732d59dd80ed0e013fc9594cbae601586b94023b8c068f7ced7b", - "status": "available" - }, - "2.0.18-2": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-proxysql-8.0.25", - "image_hash": "b84701c47a11c6f5ca46481f25f1b6086c0a30014d05584c7987f1d42a17b584", - "status": "recommended", - "default": true - } - }, - "haproxy": { - "2.3.14": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-haproxy", - "image_hash": "2f06ac4a0f39b2c0253421c3d024291d5ba19d41e35e633ff6ddcf4ba67fd51a", - "status": "available" - }, - "2.3.15": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-haproxy-8.0.25", - "image_hash": "62479be2a21192a3215f03d3f9541decd5ef1737741245ac33ee439915a15128", - "status": "recommended", - "default": true - } - }, - "backup": { - "2.4.24": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-pxc5.7-backup", - "image_hash": "2ff5992220ba251cf064cc2b4d5929e0fdb963db18e35d6c672f9aacb0be3bed", - "status": "available" - }, - "2.4.24-2": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-pxc5.7.35-backup", - "image_hash": "ac9fcd3078107c6492c687eb98215d4e5daf27a02fb3c78ba4b9e9c01f2078b3", - "status": "recommended" - }, - "8.0.23": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-pxc8.0-backup", - "image_hash": "6ab8efb3804d1e519e49ee10eb46b428a837cfdcee222cc5ae2089cc1dc02a6d", - "status": "available" - }, - "8.0.25": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-pxc8.0.25-backup", - "image_hash": "c3991f0959a3b4114d7ff629d9d3cdf0dc200c58443ca8ebb1446d8b1cbe416d", - "status": "recommended", - "default": true - } - }, - "operator": { - "1.10.0": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0", - "image_hash": "73d2266258b700a691db6196f4b5c830845d34d57bdef5be5ffbd45e88407309", - "status": "recommended", - "default": true - } - }, - "log_collector": { - "1.10.0": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-1-logcollector", - "image_hash": "8f106b1e9134812b77f4e210ad0fcd7d8d3515a90fe53554d24cd49defc9e044", - "status": "available" - }, - "1.10.0-2": { - "image_path": "percona/percona-xtradb-cluster-operator:1.10.0-logcollector-8.0.25", - "image_hash": "d69dad98900532e2ad6d0bf12c34a148462816fa3ee4697e9b73efef7583901a", - "status": "recommended", - "default": true - } - } - } - } - ] -} -``` - -From this response, choose one of the images in the `pxc` section: -```json - "matrix": { - "pxc": { - "8.0.19-10.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.19-10.1", - "image_hash": "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", - "status": "available" - }, - "8.0.20-11.1": { - "image_path": "percona/percona-xtradb-cluster:8.0.20-11.1", - "image_hash": "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", - "status": "available" - }, -``` - -The chosen `image_path` value is the value you should provide in the next API call as the `image` field. We recommend using the one with `"status": "recommended"` -Example: `"image": "percona/percona-xtradb-cluster:8.0.19-10.1"` - -API endpoint used in this step: [ChangePXCComponents](ref:changepxccomponents). - -### Create PXC Cluster - -Once we registered kubernetes cluster we can use it’s name to create DB Clusters. Here is an example for PXC Cluster, the values for parameters are recomended by Percona: - -```bash -curl -X POST "http://localhost/v1/management/DBaaS/PXCCluster/Create" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"name\": \"my-cluster-1\", \"expose\": true, \"params\": { \"cluster_size\": 3, \"pxc\": { \"compute_resources\": { \"cpu_m\": 1000, \"memory_bytes\": 2000000000 }, \"disk_size\": 25000000000, \"image\": \"percona/percona-xtradb-cluster:8.0.25-15.1\" }, \"haproxy\": { \"compute_resources\": { \"cpu_m\": 1000, \"memory_bytes\": 2000000000 } } } }" -``` - -### Request parameters - -``` -{ - "kubernetes_cluster_name": "string", - "name": "string", - "params": { - "cluster_size": 0, - "pxc": { - "image": "string", - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - }, - "disk_size": "string" - }, - "proxysql": { - "image": "string", - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - }, - "disk_size": "string" - }, - "haproxy": { - "image": "string", - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - } - } - }, - "expose": true -} -``` - - -|Parameter |Description |Notes | -|---------------------------------------|------------------------------------------------|---------------------------------------------------------------------| -|kubernetes_cluster_name |Kubernetes cluster name |Required | -|name |PXC cluster name to create |Default: pxc + DB version + 5 chars random string | -|cluster_size |Cluster size |Default: 3 | -|image |Docker image name |Default is the recommended version from the Percona's version service| -|compute_resources.cpu_m |CPU resources millis |Default: 1000 | -|compute_resources.memory_bytes |Max memory size in bytes |Default: 2 GB | -|disk_size |Max disk size for the PXC instance |Default: 25 GB | -|proxysql.image |Docker image for ProxySQL |Default: empty. (Use operator's default) | -|proxysql.compute_resources.cpu_m |CPU resources millis |Default: 1000 | -|proxysql.compute_resources.memory_bytes|Max memory size in bytes |Default 2 GB | -|proxysql.disk_size |Max disk size for ProxySQL |Default: empty, use operator's default | -|haproxyimage |Docker image for HA Proxy |Default: empty, use operator's default | -|haproxy.compute_resources.cpu_m |CPU resources millis |Default: 1000 | -|haproxy.compute_resources.memory_bytes |Max memory size in bytes |Default: 2 GB | -|expose |Make it available outside the Kubernetes cluster|Default: false | - -**Notes:** -Either ProxySQL or HAProxy should be specified in the request. -Memory bytes are strings because the parameter accepts the unit, like *1 Gi* - -#### Minimum request example - -Since the API has the defaults mentioned above, the HTTP request can have the Kubernetes cluster name as the only parameter. - -Example: - -```bash -curl -X POST "http://localhost/v1/management/DBaaS/PXCCluster/Create" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d '{ "kubernetes_cluster_name": "my_cluster" }' -``` - -API endpoint used in this step: [CreatePXCCluster](ref:createpxccluster). - -### List Kubernetes clusters - -Once you created PXC cluster you can check the status of the cluster by calling the `List` endpoint. -```bash -curl -X POST "http://localhost/v1/management/DBaaS/DBClusters/List" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\"}" -``` - -Example response: -```json -{ - "pxc_clusters": [ - { - "name": "my-cluster-1", - "state": "DB_CLUSTER_STATE_READY", - "operation": { - "finished_steps": 6, - "total_steps": 6 - }, - "params": { - "cluster_size": 3, - "pxc": { - "compute_resources": { - "cpu_m": 1000, - "memory_bytes": "2000000000" - }, - "disk_size": "25000000000" - }, - "haproxy": { - "compute_resources": { - "cpu_m": 1000, - "memory_bytes": "2000000000" - } - } - }, - "installed_image": "percona/percona-xtradb-cluster:8.0.25-15.1" - } - ] -} -``` -Response contains field `state` which provides current state of DB cluster. `DB_CLUSTER_STATE_READY` means that DB cluster is ready for use. - -API endpoint used in this step: [ListDBClusters](ref:listdbclusters) - -### Get credentials - -Once PXC Cluster is ready we can request credentials to connect to DB. - -```bash -curl -X POST "http://localhost/v1/management/DBaaS/PXCClusters/GetCredentials" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"name\": \"my-cluster-1\"}" -``` -**Example response:** -```json -{ - "connection_credentials": { - "username": "root", - "password": "8fhAK0wjBLcjPncEfJM2r4Ny", - "host": "my-cluster-1-haproxy.default", - "port": 3306 - } -} -``` - -API endpoint used in this step: [GetPXCClusterCredentials](ref:getpxcclustercredentials) - -### Create a PSMDB Cluster - -The PSMDB `Create` endpoint can also set defaults, so creating a PSMDB cluster can be made with a request like this: - -```bash -curl -X POST "http://localhost/v1/management/DBaaS/PSMDBCluster/Create" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"expose\": true}" -``` - -#### Request fields - -```json -{ - "kubernetes_cluster_name": "string", - "name": "string", - "params": { - "cluster_size": 0, - "replicaset": { - "compute_resources": { - "cpu_m": 0, - "memory_bytes": "string" - }, - "disk_size": "string" - }, - "image": "string" - }, - "expose": true -} -``` - -| Field | Description | Notes | -| ----------------------------------------- | ------------------------------------- | ------------------------------------------------------------ | -| kubernetes_cluster_name | Kubernetes cluster name | Required | -| name | PSMDB cluster name | Default: `psmdb`+DB version+5 chars random string | -| cluster_size | Cluster size | Default: 3 | -| replicaset.compute_resources.cpu_m | CPU resources millis | Default: 1000 | -| replicaset.compute_resources.memory_bytes | Max memory size in bytes | Default: 2 GB | -| disk_size | Max disk size | Default: 25 Gb | -| image | PSMDB Docker image | Default is the recommended version from the Percona's version service | -| expose | Expose outside the Kubernetes cluster | Default: false | - -### Delete DB Cluster - -If you don’t need the database cluster you can delete it using the request below. -```bash -curl -X POST "http://localhost/v1/management/DBaaS/DBClusters/Delete" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"name\": \"my-cluster-1\", \"cluster_type\": \"DB_CLUSTER_TYPE_PXC\"}" -``` - -API endpoint used in this step: [DeleteDBCluster deletes](ref:deletedbcluster) - -### Unregister Kubernetes Cluster - -After we played with DBaaS we can unregister kubernetes cluster. - -Unregister a kubernetes cluster doesn’t delete anything, it just removes the cluster from the list of registered clusters and all database clusters will remain active and will send metrics to PMM. - -```bash -curl -X POST "http://localhost/v1/management/DBaaS/Kubernetes/Unregister" \ - -H "accept: application/json" \ - -H "authorization: Basic YWRtaW46YWRtaW4=" \ - -H "Content-Type: application/json" \ - -d "{ \"kubernetes_cluster_name\": \"my_cluster\", \"force\": true}" -``` - -API endpoint used in this step: [UnregisterKubernetesCluster](ref:unregisterkubernetescluster) diff --git a/docs/proposals/dbaas/01-architecture/current_arch.jpg b/docs/proposals/dbaas/01-architecture/current_arch.jpg deleted file mode 100644 index 2c3b598602ecb3e66cc0bd04d0caaf081832200f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 115513 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%0DTKNVAa4r7~ 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 M!2fOp_P-zc4-Muj1poj5 diff --git a/docs/proposals/dbaas/01-architecture/dbaas_catalog.jpg b/docs/proposals/dbaas/01-architecture/dbaas_catalog.jpg deleted file mode 100644 index 0c75533afaeeade941499fdeece04627e80bf0b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117383 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 diff --git a/docs/proposals/dbaas/01-architecture/olm_arch.jpg b/docs/proposals/dbaas/01-architecture/olm_arch.jpg deleted file mode 100644 index 1f61c8a186e99d2e1af00178ed12a3f1b5795aee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149283 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

~6jvf*vGKv}!+ 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 diff --git a/docs/proposals/dbaas/01-architecture/proposal.md b/docs/proposals/dbaas/01-architecture/proposal.md deleted file mode 100644 index 8b14c5fbfb..0000000000 --- a/docs/proposals/dbaas/01-architecture/proposal.md +++ /dev/null @@ -1,628 +0,0 @@ -# Kubernetes-native implementation for PMM/DBaaS - -## Summary - -PMM DBaaS has a lot of functionality to install/manage operators and CRUD operations for either a Percona XtraDB or a Percona Server For MongoDB cluster. However, the current implementation is not extensible enough and lacks scalability features. - -This proposal introduces architectural changes that are required to make DBaaS more extensible and more native for K8S. - -## Motivation - -The current architecture for DBaaS has the following components: - -1. PMM that exposes REST API for UI and some automation -2. DBaaS controller that exposes gRPC API to PMM and works with Kubernetes clusters - -![Current DBaaS architecture](./current_arch.jpg) - -As a proof of concept, this architecture covers everything. However, it has the following issues: - -1. Non-native Kubernetes API to work with clusters. DBaaS controller has only gRPC API and this creates additional friction for community users to work with the controller. One needs to generate a gRPC client to communicate with the DBaaS controller. -2. DBaaS controller has a set of CRUD endpoints for each database type (e.g. PXC and PSMDB). It adds additional room for bugs/inconsistencies and has the following issues: - * There’s no simple and generic API for any database cluster - * PMM needs to make two requests to get a list of created clusters (one for PSMDB and one for PXC clusters). In case we need to add support for another database, DBaaS controller would have an additional set of CRUD endpoints and PMM whould also call the list method for the new database type. - -3. DBaaS controller suffers from insufficient test coverage and integration testing because of the reasons mentioned above. Yet we can create an integration testing framework and increase coverage, but in that case it’ll require a substantial effort. -4. Currently, DBaaS controller has only basic features such as CRUD operators for the database cluster and a lack of backup/restore features and additional configuration. There’s no way to specify additional parameters (Database configuration options, load balancer rules, storage class, backup schedule) -5. DBaaS logic is coupled with PMM release lifecycle. Using operator and OLM we can make DBaaS released independent from PMM release lifecycle. -6. The current implementation requires to implement 5 endpoints to add a new database/operator support (Create, Update, List, Restart, Delete). However, following operator pattern a software engineer needs to implement reconcile logic. -7. Listing database clusters on the current solution has performance issues. Firstly, it requires making one request per database cluster type to list them (e.g. `kubectl get pxc` to get PXC clusters and `kubectl get psmdb` to get PSMDB clusters. For any new database cluster it required to run an additional request against Kubernetes cluster). Secondly, it requires its own implementation of working with client-go caches. Using the operator provides cache integration out-of-the-box and having cr bound to underlying operator's CR (e.g. for PXC and PSMDB) will provide a one call to get all database clusters created. - -Moving to OLM and a DBaaS operator will improve this situation because of the following reasons - -1. It'll be better for the Percona community because the operator pattern as well as OLM are widely spread industry standards. Using standard tools requires no additional learning, hence, better developer/user experience of using the product and contributing to it. From the implementation standpoint we do not need to implemnent custom CLI tools to manage DBaaS/Database clusters because it will be integrated with kubectl. -2. It'll be easier to implement an independent release cycle by removing all hardcoded parameters from PMM and integrating it with dbaas-operator. The dbaas-operator knows about supported databases and it can return available databases engines via `kubectl get dbengines` command -3. DBaaS-operator can be easily added to any other service because it contains everything dbaas-specific such as database configuration templates, supported engines, database cluster sizes and other features. -4. OLM provides a robust way to manage operator lifecycle (Install/Update/Delete operator, resolving conflicts, managind dependencies of one operator from another and so on). It's preinstalled - -## Goals - -1. Make DBaaS Kubernetes native will make it a first-class citizen in the Kubernetes ecosystem. End users can use kubectl to work with PMM/DBaaS to edit/manage database clusters. -2. Provide a simplified way to create templates for a database cluster creation with sane defaults. -3. Reduce the complexity of managing operator's installation/management. OLM will implement lifecycle management for operators and we can drop code that does the same for PMM. - - -## Non-goals - -1. Bloat the size of PMM docker container -2. Overcomplicate the overall development process -3. Change REST API design. It'll be changed by providing an additional proposal - - -## Proposal - -The main idea is to move from the dbaas-controller that manages operators’ installation/updating its version database creation/management inside Kubernetes to a `dbaas-operator` and [OLM](https://olm.operatorframework.io/). The high-level architecture is described below. - -![Proposed architecture](./proposed_arch_full.jpg) - -In that case, the `dbaas-operator` provides Kubernetes native implementation of the creating/managing database clusters and acts like `unified operator to create any database cluster`. OLM installs and updates a version of the operators (psmdb, pxc, dbaas, victoria metrics). - -### Working with the operators - -An Operator catalog is a repository of metadata that Operator Lifecycle Manager (OLM) can query to discover and install Operators and their dependencies on a cluster. OLM always installs Operators from the latest version of a catalog. We can store Percona operators as well as Community operators inside Percona Catalog as shown below. - -![DBaaS Catalog architecture](./dbaas_catalog.jpg) - -Catalog also gives us the benefits of using CatalogSource and ClusterServiceVersion. ClusterServiceVersion (CSV) can solve the issue by getting the current version of installed operators via OLM API. Currently, we rely on the API version of Percona Operators by requesting `api-versions` via `kubectl` and using the latest API version as an operator’s version. However, there'll be no way to get information about the version after the 1.13 release of PSMDB and the 1.12 release of PXC operator. In that case, we can request an operator image and split the version information from the tag, but in the case of the overridden image tag, we can have discrepancies between versions. With OLM we’ll have a single source of truth for the installed operator version. [Read more](https://olm.operatorframework.io/docs/concepts/crds/clusterserviceversion/) - -Example for PXC operator (It's only 1.10 available on operatorhub, however it demonstrates the idea) - -```bash -kubectl get csv -n my-percona-xtradb-cluster-operator -NAME DISPLAY VERSION REPLACES PHASE -percona-xtradb-cluster-operator.v1.10.0 Percona Distribution for MySQL Operator 1.10.0 percona-xtradb-cluster-operator.v1.9.0 Installing -``` - -In that case, PMM DBaaS will provide a consistent way to get operator version. In addition, OLM can manage a complex upgrades for operators via [InstallPlan](https://olm.operatorframework.io/docs/concepts/crds/installplan/), [OperatorGroup](https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/) or [UpgradeGraph](https://olm.operatorframework.io/docs/glossary/#update-graph). - -A high-level architecture diagram of OLM -![OLM Architecture](./olm_arch.jpg) - -High-level sequence diagram that illustrates registering of K8s cluster - -```mermaid -sequenceDiagram - - PMM UI->>ManageD: Add kubernetes cluster - ManageD->>K8S: Install OLM - break when olm is installed - K8S->>OLM: provisions an OLM - end - Note right of K8S: OLM is provisioned! -``` -High-level sequence diagram that illustrates an Installation and upgrading process inside PMM/DBaaS in terms of end user - -```mermaid -sequenceDiagram - Note right of PMM UI: Once OLM is available - PMM UI->>ManageD: Install operators - ManageD->>OLM: Install required operators and create a manual subscription - OLM->>Catalog: Gets the latest version of the operator - loop when subscription is created - OLM->>Catalog: manages subscription and checks for a new version - end - Note right of OLM: A new version of operator is available - OLM->>Catalog: Downloads and installs a new version of operator and waiting for a user approval to switch to a new version. - PMM UI->>ManageD: Check for unapproved install plans - OLM->>ManageD: Sure. I downloaded it for you and waiting for your approval to switch to a new version - ManageD->>PMM UI: Yeah, there's a new version of operator available - Note left of PMM UI: A user approved the upgrade request - PMM UI->> ManageD: approve a new version of operator - ManageD->>OLM: approve an subscription upgrade request - Note left of OLM: A new version of operator is available -``` -This process makes version service usage for supported versions of operators obsolete because it gets the latest version of available operator from the catalog. However, the catalog can be managed by our team and we'll push only supported versions of operators to the catalog. This also will improve integration testing for unreleased versions of operators. - -### Working with the databases - -The second part of the proposal is implementing the generic and simplified API to create database clusters via k8s operator. The proposal discusses the drawbacks of the current implementation in the Motivation section and moving to the `dbaas-operator` will have the following benefits - -1. Kubernetes native way to work with database clusters via unified and general specifications. -2. PMM DBaaS does not need to care about the state of a managed database. -3. PMM/DBaaS should manage clusters that were created via PMM/DBaaS. Yet, it manages clusters that were created via Percona operators now. `dbaas-operator` uses its own custom resources to specify database clusters managed by PMM/DBaaS. Also, it opens room for additional features such as CR templates to create a database cluster and update a version of a template using the same annotations spec. -4. Installation and upgrading of `dbaas-operator` will be managed by OLM as proposed above. -5. `dbaas-operator` opens a possibility to create an easy to use integration testing framework using codecept.js/playwright or even simple bash scripts. Integration testing can be covered by development team. It can use Github actions as a pipeline to run additional tests to check create/load/run queries against exposed/non-exposed database clusters. -6. PMM/DBaaS will have native integration with `dbaas-operator` via `client-go` package that will improve the overall performance on large-scale clusters - -The sequential diagram illustrates a creation of PXC cluster - -```mermaid -sequenceDiagram - - PMM UI->>ManageD: Create a Database cluster - Note right of PMM UI: (DatabaseType: PXC) - ManageD->>K8S: Create a DatabaseCluster Kind object - K8S->>DBaaS Operator: Reconcile DatabaseCluster object - DBaaS Operator->>PXC Operator: Create a PXC cluster Object - Note right of DBaaS Operator: Binds objects to each other - Note right of DBaaS Operator: (Database->PerconaXtraDBCluster) - break when PXC cluster is in ready state - PXC Operator->>Statefulset: provisions PXC cluster - end - Note right of PXC Operator: PXC Cluster is created - - -``` - -Listing DatabaseClusters - -```mermaid -sequenceDiagram - PMM UI->>ManageD: Give me a list of database clusters - ManageD->>K8S: Get list of DatabaseCluster Kind objects - Note left of K8S: They can be with DatabaseType either PXC or PSMDB - K8S->>ManageD: Returns list of databases - ManageD->>PMM UI: Returns list of database clusters -``` - -#### Communication speed benchmarks - -Currently [dbaas-controller](https://github.com/percona-platform/dbaas-controller) implements proxy api to k8s Percona operators thus `dbaas-controller` needs to call k8s and gets data from k8s operators. That could be expensive call to k8s as api returns full spec and in case of 100 or 1000 of server it could be quite large and time consuming response. - -Also if there is no good connection to the k8s cluster situation would be much worse. - -Here are some measurements made against PMM in different setups (local PMM -> Remote k8s, Remote PMM inside the same cluster, Direct API calls against K8S) - -**Local PMM connected to LKE cluster - -``` -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost:81/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -9.08s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost:81/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -9.08s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost:81/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -11.06s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost:81/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -10.19s -➜ ~ -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost:81/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -``` - -** Same as above but uses dbaas-operator and communicates via client-go library** - -``` - -## Listing 10 clusters -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -1.02s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -0.99s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -1.07s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -0.90s -➜ ~ time curl -s -k -o file1.out --request POST --url http://localhost/v1/management/DBaaS/DBClusters/List --header 'accept: application/json' -u "admin:admin" --header 'content-type: application/json' --data '{ - "kubernetes_cluster_name": "lke84438" -}' -0.90s - -``` -The environment for the benchmark above uses the same testing environment - -1. PMM -2. Remote kubernetes cluster -3. Communicates either via dbaas-controller (first two test runs) or via dbaas-operator (the last test run) - -Note: Communication with dbaas-operator via client-go made without caches, however, using [client-go caches](https://pkg.go.dev/k8s.io/client-go/tools/cache) as well as [Limit and Continue](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#ListOptions) will improve performance for large scale deployments (more than 500 clusters created) - - -### User Stories - -#### Story 1 -As an SRE person, I should be able to register the Kubernetes cluster using a service account without admin access to the cluster. - -#### Story 2 -As an SRE person, I should be able to understand what’s going wrong during the bootstrapping DBaaS feature inside of PMM in case of insufficient permissions so that I can debug and solve my issues. (E.g. No permissions to run kube-state-metrics, pxc, or psmdb operator). - -#### Story 3 -As an SRE person, I should be able to rename a Kubernetes cluster once it was provisioned automatically so that I can keep my naming conventions. - -#### Story 4 -As an SRE person, I should be able to specify which database operators I need to install in the cluster. - -#### Story 5 -As an SRE person, I should be able to create logical spaces to deploy databases so that I can easily split my environments. (e.g. dev namespace goes to the dev environment and the staging namespace goes to the staging environment. For the production environment I should be able to register and setup an additional cluster.) - -#### Story 6 -As an SRE person, I should be able to create a resource template for a database engine so that I don’t need to manually provide it every time. - -#### Story 7 -As an SRE person, I should be able to create an engine configuration template for a database engine. - -#### Story 8 -As an SRE person, I should be able to manage database engine versions that are allowed to use because I need to control which versions are used in my environment. - -#### Story 9 -As an SRE person, I should be able to specify a backup schedule template for a database cluster. - -#### Story 10 -As an SRE person, I should be able to configure storage for backups. - -#### Story 11 -As a user, I should be able to deploy a database with the recommended defaults - -#### Story 12 -As a user, I should be able to deploy a database with the selected version or cluster size - -#### Story 13 -As a user, I should be able to select a resource template to deploy a database - -#### Story 14 -As a user, I should be able to select a resource template and database engine configuration template to deploy a database - -#### Story 15 -As a user, I should be able to edit a database cluster (If I have sufficient permissions) - -#### Story 16 -As a user, I should be able to delete a database cluster (If I have sufficient permissions) - -#### Story 17 -As a user, I should be able to create a database cluster from a provided backup file. - -#### Story 18 -As a DBA, I should be able to edit database configuration parameters. - -#### Story 19 -As a DBA(?), I should be able to view cluster resources available before creating a database. - -## Design Details - -### Air gapped environments -The design does not support air gapped environments because of internet connectivity dependency. - -### OLM installation -PMM always installs the latest version of OLM using the following process: - -1. Get the latest release from Github -2. Download crds.yaml and olm.yaml -3. Apply crds.yaml and olm.yaml against Kubernetes cluster - -### Installation of dbaas-catalog - -PMM uses [Percona DBaaS catalog](https://github.com/percona/dbaas-catalog/blob/main/docs/design/Percona-DBaaS-Platform-design.md). Percona DBaaS catalog is a repository of metadata that Operator Lifecycle Manager (OLM) can query to discover and install Operators and their dependencies on a cluster. OLM always installs Operators from the latest version of a catalog. It installs the following operators from this catalog: - -1. Percona XtraDB Cluster Operator -2. Percona Server MongoDB Operator -3. Victoria Metrics Operator -4. DBaaS operator - -Any additional operators should be added to the catalog. Installation of an operator has the following steps: - -1. PMM should have DBaaS operator installed -2. PMM creates [Operator Group](https://docs.openshift.com/container-platform/4.8/operators/understanding/olm/olm-understanding-operatorgroups.html) if it does not exist -3. PMM creates [subscription](https://olm.operatorframework.io/docs/concepts/olm-architecture/) for the selected operator - -**Using OLM with pre-installed operators** - -1. PMM gets versions of installed operators -2. PMM creates subscription with specified versions -3. OLM installs [specific version](https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/#example-install-a-specific-version-of-an-operator) -4. Operator restarts and continues to work normally but now OLM manages installation of new versions - - -### CR design for dbaas-operator - -Go struct that represents the payload to create/list database clusters -```go -const ( - PXCEngine EngineType = "pxc" - PSMDBEngine EngineType = "psmdb" - - LoadBalancerMongos LoadBalancerType = "mongos" - LoadBalancerHAProxy LoadBalancerType = "haproxy" - LoadBalancerProxySQL LoadBalancerType = "proxysql" -) -type ( - // EngineType stands for the supported database engines. Right now it's only pxc - // and psmdb. However, it can be ps, pg and any other source - EngineType string - // LoadBalancerType contains supported loadbalancers. It can be proxysql or haproxy - // for PXC clusters and mongos for PSMDB clusters. - // - // Once PG support will be added, it can be pg-bouncer or something else. - LoadBalancerType string - // DatabaseSpec defines the desired state of Database - DatabaseSpec struct { - // Database type stands for supported databases by the PMM API - // Now it's pxc or psmdb types but we can extend it - Database EngineType `json:"databaseType"` - // DatabaseVersion sets from version service and uses the recommended version - // by default - DatabaseImage string `json:"databaseImage"` - // DatabaseConfig contains a config settings for the specified database - DatabaseConfig string `json:"databaseConfig"` - SecretsName string `json:"secretsName,omitempty"` - Pause bool `json:"pause,omitempty"` - // ClusterSize is amount of nodes that required for the cluster. - // A database starts in cluster mode if clusterSize >= 3. - ClusterSize int32 `json:"clusterSize"` - // LoadBalancer contains a load balancer settings. For PXC it's haproxy - // or proxysql. For PSMDB it's mongos. - LoadBalancer LoadBalancerSpec `json:"loadBalancer,omitempty"` - Monitoring MonitoringSpec `json:"monitoring,omitempty"` - DBInstance DBInstanceSpec `json:"dbInstance"` - Backup BackupSpec `json:"backup,omitempty"` - } - // LoadBalancer contains a load balancer settings. For PXC it's haproxy - // or proxysql. For PSMDB it's mongos. - LoadBalancerSpec struct { - Type LoadBalancerType `json:"type,omitempty"` - ExposeType corev1.ServiceType `json:"exposeType,omitempty"` - Image string `json:"image,omitempty"` - Size int32 `json:"size,omitempty"` - Configuration string `json:"configuration,omitempty"` - LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - TrafficPolicy corev1.ServiceExternalTrafficPolicyType `json:"trafficPolicy,omitempty"` - Resources corev1.ResourceRequirements `json:"resources,omitempty"` - } - MonitoringSpec struct { - PMM *PMMSpec `json:"pmm,omitempty"` - ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` - Resources corev1.ResourceRequirements `json:"resources,omitempty"` - RuntimeClassName *string `json:"runtimeClassName,omitempty"` - ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` - } - PMMSpec struct { - Image string `json:"image,omitempty"` - ServerHost string `json:"serverHost,omitempty"` - ServerUser string `json:"serverUser,omitempty"` - PublicAddress string `json:"publicAddress,omitempty"` - Login string `json:"login,omitempty"` - Password string `json:"password,omitempty"` - } - DBInstanceSpec struct { - CPU string `json:"cpu,omitempty"` - Memory string `json:"memory,omitempty"` - DiskSize string `json:"diskSize,omitempty"` - StorageClassName *string `json:"storageClassName,omitempty"` - } -``` -Since, the main focus for the PMM/DBaaS is to support AWS EKS clusters. The main focus is supporting managed kubernetes clusters as a main provider. However, the requirements can be changed and PMM/DBaaS may support bare-metal or EC2 setups. That adds additional constraints on the architecture. Everything related to the current implementation of k8s provider is located under `managed/services/dbaas` folder. However, it would be great to have `managed/services/dbaas/provider.go` file with the following interface - -```go -// Provider is the interface that a developer should implement to add support of any other provider that required for DBaaS. -// Currently, PMM supports only K8s/EKS provider but bare-metal setup or using EC2 instances support can be adopted by implementing this inteface -type Provider interface { - // ProvisionCluster provisions a specified cluster. In this case, it'll install - // all required operators that we need (pxc, psmdb, dbaas-operator and victoria metrics - // operator via OLM - ProvisionCluster() error - // CleanupCluster cleans up cluster and removes VMAgent operator - // and, or, dbaas-operator, pxc operator and psmdb operator via --force tag. - // At the moment PMM should remove VMAgent operator only and keep everything that related to databases - // untouched and the end user can decide what to clean - CleanupCluster() error - // CreateDatabase cluster creates a cluster by using Database struct - // and it'll make a request to dbaas-operator to create a database - CreateDatabase(Database) error - // EditDatabase edit's deployed database CR specs by using Database struct - EditDatabase(Database) error - // UpgradeDatabase upgrades database to a desired version - UpgradeDatabase(Database) error - // DestroyDatabase destroys a database from the cluster - DestroyDatabase(Database) error - // UpdateClusterDependencies upgrades cluster dependencies. For k8s it upgrades dbaas and database operators versions and CR configuration - UpdateClusterDependencies() error -} -``` -Every additional provider should implement this interface. Kubernetes related implementations - -#### Further steps with OLM and dbaas-operator - -Since PMM used OLM to install/update operators, PMM can get the information about supported database engines from dbaas-operator. That will help us to make releases of PMM/DBaaS independent from PMM release cycle. As an additional feature, SRE or Admin can select database engines she wants to use and PMM will provision it accordingly - - -### Templates - -There are number of possible template use cases: -- as a DBA I would like to template Cluster and DB parameters for number of different environments -- as a SRE I would like to template k8s and cloud infrastructural parameters - -When DBA would like to have more control over DBs and DB Clusters (versions, sizing, backups, configs, parameters), SRE would like to control over Kubernetes and Cloud infrastructure (networking, storage, secrets) and how that infrastructure connected to applications (affinity, networking, rbac). - -Percona Kubernetes operators have CRs that include both parts of those requirements: -- configs, sizing, backup parameters, cluster parameters (sharding, replsets) -- toleration, affinity, annotations, storage classes, networking - -All those template requirements are subset of Kubernetes CR objects that are supported by operators and kubernetes addons (such as special annotations). - -To define similar properties for different environments, clusters, namespaces - templates could also have different visibility: -- namespace -- environment -- cluster -- set of clusters - -And that visibility would probably define where those will be stored: -- template for a namespace (prod/staging namespaces): as object in a namespace -- environment templates: template with environment labels to select from -- cluster wide templates: as object in a cluster for all namespaces -- global templates: in a external storage in CI/CD, or in PMM as app that manages many clusters - -#### DatabaseCluster templates - -`dbaas-operator` would provide simplifier interface to abstract internal mechanics of kubernetes and different clouds, so templates for it's interface are probably more related to Developer's and DBA's use case. And that makes `dbaas-operator` a more simpler interface that is just a subset of bigger CR template. - -As these kind of templates are more higher level, they would take priority over more low level templates and could be defined later when more business logic on operating templates would be defined. - -![Template Layers](./tpl_layers.png) - -Proposal on a current stage is to propagate low level templates (Database Engine defined by SRE/DBA in a cluster) to a higher level for the know fields. When middle level and high level templates (DBA, Dev) business logic would be better known, it will just a simple layer on top low level template and be presented to the user instead. - - -#### Database Engine Templates - -These templates provide possibility to template full Database operator CR even for the fields that `dbaas-operator` don't really care or even don't know (annotations, parameters for the future CSI drivers and etc). - -1. SRE/DBA creates DB templates (through UI/API/YAML) and they are stored in the Kubernetes cluster. -2. UI requests [PMM API](proposal.md#pmm-rest-api-high-level-design) `GET /dbaas/templates` -3. PMM gets templates from k8s cluster -4. User chooses template in UI. -5. UI parses and present fields from template that are recognized -6. User creates database with or without modifications to the values from template -7. UI call PMM with results of user choices `POST /dbaas/dbclusters` - -Priority: - 1. changes from PMM UI configured by user - 2. chosen template - 3. defaults from `dbaas-operator` - -`dbaas-operator` merges all those 3 sources according to priority and produces CR (custom resource) for specific engine. - -Corner cases: -- user uses PMM UI and there are no default template (or none selected) - - PMM uses old scheme with version service and some default values -- user uses k8s directly without PMM and there neither default templates and submits nor optional fields - - `dbaas-operator` uses default CR that comes from alm-examples of CSV - -There are might be couple of ways for `dbaas-operator` to know about templates. - -Also this use case defaults to namespace and cluster visibility. So if there would be a need to have similar template for different clusters/namespaces - SRE need to copy them over to the another cluster/namespace and apply there (or use automation for it). - -**New parameter in API** -```go - // Optional unique template name for specified EngineType - TemplateName string `json:"templateName,omitempty"` -``` -`dbass-operator` receives `TemplateName` parameters and get template from k8s by combining engine type and template name. Or would implement additional controller for templates and track them. - -That is a possible way is to extend `dbaas-operator` with template functionality. But there are too many questions open: -- what type to choose (string, unstructured) -- how to validate that parameters in template are correct -- how to track template versioning if it will be a controller -- how to extend templates when adding new Database operators - -So instead of committing to the API, annotations could solve the problem for now. - -**Annotations** - -It could be a good solution to not blow up API and keep it simple by making that convention with annotations and later decide to keep it or to switch to something else. Annotations are more flexible and are conventions instead of hard contract, thus we could avoid migrations/mutations later. - -Annotations that PMM or user could set for `dbaas-operator` that related to the templates: -- `dbaas.percona.com/dbtemplate-kind: PSMDBtemplate`: is CustomResource (CR) Kind that implements template -- `dbaas.percona.com/dbtemplate-name: prod-app-X-small`: `metadata.name` identifier for CR that provides template -- `dbaas.percona.com/origin: pmm`: who created CR for `database-operator`: pmm, user, sre, dba, ci - -If one of those 2 parameters (kind, name) are not set - `dbaas-operator` wouldn't be able to identify template and thus would ignore another one. - -Annotations that are set by `dbaas-operator` for any engine to provide additional information about inputs for template: -- all annotations from the template should be propagated to CR of the DB Cluster CR. -- `dbaas.percona.com/dbtemplate-kind: PSMDBtemplate` -- `dbaas.percona.com/dbtemplate-name: prod-app-X-small` -- `dbaas.percona.com/origin: pmm` -- `dbaas.percona.com/dbtemplate-default: yes`: default CR was created without origin and parameters - -**Labels** - -All the labels of the DB Template should be propagated to the DB Cluster CR. - -**Database Engine Templates implementation** - -On a first phase to simplify template creation it might be better to restrict templates to simple k8s custom objects without operator that handles them. Architecture for interacting and layering for some additional operators is not yet defined. - -To simplify implementation of `dbaas-operator` it is better to build templates with exactly the same definitions as the corresponding CR of DB Cluster instances. So `dbaas-operator` would just blindly merge template with user input without validating and knowing details of template implementation. Thus templates should have exactly same CRD as CRD for DB clusters. CRD for templates are needed to avoid errors as templates would be validated by k8s. - -Here are CRDs for DB Clusters: -- PSMDBtemplate: [psmdbtpl.dbaas.percona.com.crd.yaml](psmdbtpl.dbaas.percona.com.crd.yaml) -- PXCtemplate: [pxctpl.dbaas.percona.com.crd.yaml](pxctpl.dbaas.percona.com.crd.yaml) - -Example of CRs for templates: -- [psmdbtpl.dbaas.percona.com.cr.yaml](psmdbtpl.dbaas.percona.com.crd.yaml) -- [pxctpl.dbaas.percona.com.cr.yaml](pxctpl.dbaas.percona.com.crd.yaml) - -CRs should have these annotations: -- `dbaas.percona.com/dbtemplate-origin: sre`: who created template: sre, dba and etc -- TBD - -CRs should have these labels: -- `IsDefaultTpl: "yes"`: yes, or no -- `dbaas.percona.com/engine: psmdb`: engine type -- `dbaas.percona.com/template: "yes"`: indicates that this is a template -- TBD - -There could be more labels to identify env, teams and defaults for teams. That logic could be defined later and probably defined in a separate document with versions of apps that could understand such convention. - -Here is example of 2 templates creation: -```sh -minikube start - -kubectl apply -f pxctmpl.dbaas.percona.com.crd.yaml -customresourcedefinition.apiextensions.k8s.io/pxctemplates.dbaas.percona.com created - -kubectl apply -f psmdbtpl.dbaas.percona.com.crd.yaml -customresourcedefinition.apiextensions.k8s.io/psmdbtemplates.dbaas.percona.com created - -kubectl apply -f pxctpl.dbaas.percona.com.cr.yaml -pxctemplate.dbaas.percona.com/prod-app-n-large created - -kubectl apply -f psmdbtpl.dbaas.percona.com.cr.yaml -psmdbtemplate.dbaas.percona.com/dev-app-x created - -kubectl get psmdbtpl,pxctpl -NAME ENDPOINT STATUS AGE -psmdbtemplate.dbaas.percona.com/dev-app-x 31s - -NAME ENDPOINT STATUS PXC PROXYSQL HAPROXY AGE -pxctemplate.dbaas.percona.com/prod-app-n-large - -``` - -PMM could get templates by selecting specific dbaas resources: -```sh -kubectl api-resources --api-group=dbaas.percona.com -NAME SHORTNAMES APIVERSION NAMESPACED KIND -psmdbtemplates psmdbtpl dbaas.percona.com/v1alpha1 true PSMDBtemplate -pxctemplates pxctpl dbaas.percona.com/v1alpha1 true PXCtemplate - -kubectl api-resources --api-group=dbaas.percona.com --verbs=list --namespaced -o name | xargs -n 1 kubectl get -l 'dbaas.percona.com/engine in (psmdb,pxc)',dbaas.percona.com/template="yes" -NAME ENDPOINT STATUS AGE -dev-app-x 7s -NAME ENDPOINT STATUS PXC PROXYSQL HAPROXY AGE -prod-app-n-large 5m24s -``` - -### Test Plan - -During moving from dbaas-controller to `dbaas-operator` we'll keep the same user experience for the end user - -#### Prerequisite testing updates - -1. Setup Github actions pipelines for dbaas-operator -2. Setup Github actions pipelines for dbaas-catalog - -#### Unit tests - -1. Add unit tests for PMM integration with dbaas-operator -2. Add unit tests for PMM CR generation -3. Add unit tests for PMM k8s client - -#### Integration tests - -1. Use current PMM integration tests for DBaaS during the migration to understand what goes wrong -2. Add additional tests for OLM integration - - -#### e2e tests - -1. Add e2e tests for dbaas-operator to test create/upgrade/update/scale database cluster -2. Add e2e tests to ensure dbaas-operator works well with only one installed operator - - diff --git a/docs/proposals/dbaas/01-architecture/proposed_arch_full.jpg b/docs/proposals/dbaas/01-architecture/proposed_arch_full.jpg deleted file mode 100644 index eee9caa242bfed9bb639f2187fbc9fa402809111..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 219491 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

A_G`-tY$39knADry9bLh*mUI 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 u`Pk9(9|etd@i< diff --git a/docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.cr.yaml b/docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.cr.yaml deleted file mode 100644 index 2cebf43857..0000000000 --- a/docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.cr.yaml +++ /dev/null @@ -1,492 +0,0 @@ -apiVersion: dbaas.percona.com/v1alpha1 -kind: PSMDBtemplate -metadata: - name: dev-app-x - labels: - dbaas.percona.com/engine: psmdb - dbaas.percona.com/template: "yes" - env: prod - annotations: - dbaas.percona.com/team: GAS -spec: -# platform: openshift -# clusterServiceDNSSuffix: svc.cluster.local -# clusterServiceDNSMode: "Internal" -# pause: true -# unmanaged: false - crVersion: 1.13.0 - image: percona/percona-server-mongodb:5.0.11-10 - imagePullPolicy: Always -# tls: -# # 90 days in hours -# certValidityDuration: 2160h -# imagePullSecrets: -# - name: private-registry-credentials - allowUnsafeConfigurations: false - updateStrategy: SmartUpdate -# multiCluster: -# enabled: true -# DNSSuffix: svc.clusterset.local - upgradeOptions: - versionServiceEndpoint: https://check.percona.com - apply: disabled - schedule: "0 2 * * *" - setFCV: false - secrets: - users: my-cluster-name-secrets - encryptionKey: my-cluster-name-mongodb-encryption-key -# vault: my-cluster-name-vault - pmm: - enabled: false - image: percona/pmm-client:2.30.0 - serverHost: monitoring-service -# mongodParams: --environment=ENVIRONMENT -# mongosParams: --environment=ENVIRONMENT - replsets: - - - name: rs0 - size: 3 -# externalNodes: -# - host: 34.124.76.90 -# - host: 34.124.76.91 -# port: 27017 -# votes: 0 -# priority: 0 -# - host: 34.124.76.92 -# # for more configuration fields refer to https://docs.mongodb.com/manual/reference/configuration-options/ -# configuration: | -# net: -# tls: -# mode: preferTLS -# operationProfiling: -# mode: slowOp -# systemLog: -# verbosity: 1 -# storage: -# engine: wiredTiger -# wiredTiger: -# engineConfig: -# directoryForIndexes: false -# journalCompressor: snappy -# collectionConfig: -# blockCompressor: snappy -# indexConfig: -# prefixCompression: true - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 -# priorityClassName: high-priority -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# nodeSelector: -# disktype: ssd -# storage: -# engine: wiredTiger -# wiredTiger: -# engineConfig: -# cacheSizeRatio: 0.5 -# directoryForIndexes: false -# journalCompressor: snappy -# collectionConfig: -# blockCompressor: snappy -# indexConfig: -# prefixCompression: true -# inMemory: -# engineConfig: -# inMemorySizeRatio: 0.5 -# livenessProbe: -# failureThreshold: 4 -# initialDelaySeconds: 60 -# periodSeconds: 30 -# timeoutSeconds: 10 -# startupDelaySeconds: 7200 -# readinessProbe: -# failureThreshold: 8 -# initialDelaySeconds: 10 -# periodSeconds: 3 -# successThreshold: 1 -# timeoutSeconds: 2 -# runtimeClassName: image-rc -# sidecars: -# - image: busybox -# command: ["/bin/sh"] -# args: ["-c", "while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done"] -# name: rs-sidecar-1 -# volumeMounts: -# - mountPath: /volume1 -# name: sidecar-volume-claim -# - mountPath: /secret -# name: sidecar-secret -# - mountPath: /configmap -# name: sidecar-config -# sidecarVolumes: -# - name: sidecar-secret -# secret: -# secretName: mysecret -# - name: sidecar-config -# configMap: -# name: myconfigmap -# sidecarPVCs: -# - apiVersion: v1 -# kind: PersistentVolumeClaim -# metadata: -# name: sidecar-volume-claim -# spec: -# resources: -# requests: -# storage: 1Gi -# volumeMode: Filesystem -# accessModes: -# - ReadWriteOnce - podDisruptionBudget: - maxUnavailable: 1 -# minAvailable: 0 - expose: - enabled: false - exposeType: ClusterIP -# loadBalancerSourceRanges: -# - 10.0.0.0/8 -# serviceAnnotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http -# serviceLabels: -# rack: rack-22 - resources: - limits: - cpu: "300m" - memory: "0.5G" - requests: - cpu: "300m" - memory: "0.5G" - volumeSpec: -# emptyDir: {} -# hostPath: -# path: /data -# type: Directory - persistentVolumeClaim: -# storageClassName: standard -# accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 3Gi - - nonvoting: - enabled: false -# podSecurityContext: {} -# containerSecurityContext: {} - size: 3 -# # for more configuration fields refer to https://docs.mongodb.com/manual/reference/configuration-options/ -# configuration: | -# operationProfiling: -# mode: slowOp -# systemLog: -# verbosity: 1 - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 -# priorityClassName: high-priority -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# nodeSelector: -# disktype: ssd - podDisruptionBudget: - maxUnavailable: 1 -# minAvailable: 0 - resources: - limits: - cpu: "300m" - memory: "0.5G" - requests: - cpu: "300m" - memory: "0.5G" - volumeSpec: -# emptyDir: {} -# hostPath: -# path: /data -# type: Directory - persistentVolumeClaim: -# storageClassName: standard -# accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 3Gi - arbiter: - enabled: false - size: 1 - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 -# priorityClassName: high-priority -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# nodeSelector: -# disktype: ssd - - sharding: - enabled: true - - configsvrReplSet: - size: 3 -# externalNodes: -# - host: 34.124.76.93 -# - host: 34.124.76.94 -# port: 27017 -# votes: 0 -# priority: 0 -# - host: 34.124.76.95 -# # for more configuration fields refer to https://docs.mongodb.com/manual/reference/configuration-options/ -# configuration: | -# operationProfiling: -# mode: slowOp -# systemLog: -# verbosity: 1 - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 -# priorityClassName: high-priority -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# nodeSelector: -# disktype: ssd -# livenessProbe: -# failureThreshold: 4 -# initialDelaySeconds: 60 -# periodSeconds: 30 -# timeoutSeconds: 10 -# startupDelaySeconds: 7200 -# readinessProbe: -# failureThreshold: 3 -# initialDelaySeconds: 10 -# periodSeconds: 3 -# successThreshold: 1 -# timeoutSeconds: 2 -# runtimeClassName: image-rc -# sidecars: -# - image: busybox -# command: ["/bin/sh"] -# args: ["-c", "while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done"] -# name: rs-sidecar-1 - podDisruptionBudget: - maxUnavailable: 1 - expose: - enabled: false - exposeType: ClusterIP -# loadBalancerSourceRanges: -# - 10.0.0.0/8 -# serviceAnnotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http -# serviceLabels: -# rack: rack-22 - resources: - limits: - cpu: "300m" - memory: "0.5G" - requests: - cpu: "300m" - memory: "0.5G" - volumeSpec: -# emptyDir: {} -# hostPath: -# path: /data -# type: Directory - persistentVolumeClaim: -# storageClassName: standard -# accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 3Gi - - mongos: - size: 3 -# # for more configuration fields refer to https://docs.mongodb.com/manual/reference/configuration-options/ -# configuration: | -# systemLog: -# verbosity: 1 - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 -# priorityClassName: high-priority -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# nodeSelector: -# disktype: ssd -# livenessProbe: -# failureThreshold: 4 -# initialDelaySeconds: 60 -# periodSeconds: 30 -# timeoutSeconds: 10 -# startupDelaySeconds: 7200 -# readinessProbe: -# failureThreshold: 3 -# initialDelaySeconds: 10 -# periodSeconds: 3 -# successThreshold: 1 -# timeoutSeconds: 2 -# runtimeClassName: image-rc -# sidecars: -# - image: busybox -# command: ["/bin/sh"] -# args: ["-c", "while true; do echo echo $(date -u) 'test' >> /dev/null; sleep 5;done"] -# name: rs-sidecar-1 - podDisruptionBudget: - maxUnavailable: 1 - resources: - limits: - cpu: "300m" - memory: "0.5G" - requests: - cpu: "300m" - memory: "0.5G" - expose: - exposeType: ClusterIP -# servicePerPod: true -# loadBalancerSourceRanges: -# - 10.0.0.0/8 -# serviceAnnotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http -# serviceLabels: -# rack: rack-22 - -# mongod: -# security: -# encryptionKeySecret: "my-cluster-name-mongodb-encryption-key" - - backup: - enabled: true - image: percona/percona-backup-mongodb:1.8.1 - serviceAccountName: percona-server-mongodb-operator -# annotations: -# iam.amazonaws.com/role: role-arn -# resources: -# limits: -# cpu: "300m" -# memory: "0.5G" -# requests: -# cpu: "300m" -# memory: "0.5G" -# storages: -# s3-us-west: -# type: s3 -# s3: -# bucket: S3-BACKUP-BUCKET-NAME-HERE -# credentialsSecret: my-cluster-name-backup-s3 -# region: us-west-2 -# prefix: "" -# uploadPartSize: 10485760 -# maxUploadParts: 10000 -# storageClass: STANDARD -# insecureSkipTLSVerify: false -# minio: -# type: s3 -# s3: -# bucket: MINIO-BACKUP-BUCKET-NAME-HERE -# region: us-east-1 -# credentialsSecret: my-cluster-name-backup-minio -# endpointUrl: http://minio.psmdb.svc.cluster.local:9000/minio/ -# insecureSkipTLSVerify: false -# prefix: "" -# azure-blob: -# type: azure -# azure: -# container: CONTAINER-NAME -# prefix: PREFIX-NAME -# credentialsSecret: SECRET-NAME - pitr: - enabled: false -# oplogSpanMin: 10 - compressionType: gzip - compressionLevel: 6 -# tasks: -# - name: daily-s3-us-west -# enabled: true -# schedule: "0 0 * * *" -# keep: 3 -# storageName: s3-us-west -# compressionType: gzip -# compressionLevel: 6 -# - name: weekly-s3-us-west -# enabled: false -# schedule: "0 0 * * 0" -# keep: 5 -# storageName: s3-us-west -# compressionType: gzip -# compressionLevel: 6 diff --git a/docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.crd.yaml b/docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.crd.yaml deleted file mode 100644 index 4223b1101d..0000000000 --- a/docs/proposals/dbaas/01-architecture/psmdbtpl.dbaas.percona.com.crd.yaml +++ /dev/null @@ -1,15536 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - dbaas.percona.com/dbtemplate-engine: psmdb - creationTimestamp: null - name: psmdbtemplates.dbaas.percona.com -spec: - group: dbaas.percona.com - names: - kind: PSMDBtemplate - plural: psmdbtemplates - shortNames: - - psmdbtpl - singular: psmdbtemplate - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.host - name: ENDPOINT - type: string - - jsonPath: .status.state - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - allowUnsafeConfigurations: - type: boolean - backup: - properties: - annotations: - additionalProperties: - type: string - type: object - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - image: - type: string - labels: - additionalProperties: - type: string - type: object - pitr: - properties: - compressionLevel: - type: integer - compressionType: - type: string - enabled: - type: boolean - oplogSpanMin: - type: number - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - storages: - additionalProperties: - properties: - azure: - properties: - container: - type: string - credentialsSecret: - type: string - prefix: - type: string - required: - - credentialsSecret - type: object - s3: - properties: - bucket: - type: string - credentialsSecret: - type: string - endpointUrl: - type: string - insecureSkipTLSVerify: - type: boolean - maxUploadParts: - type: integer - prefix: - type: string - region: - type: string - storageClass: - type: string - uploadPartSize: - type: integer - required: - - bucket - type: object - type: - type: string - required: - - type - type: object - type: object - tasks: - items: - properties: - compressionLevel: - type: integer - compressionType: - type: string - enabled: - type: boolean - keep: - type: integer - name: - type: string - schedule: - type: string - storageName: - type: string - required: - - enabled - - name - type: object - type: array - required: - - enabled - type: object - clusterServiceDNSMode: - type: string - clusterServiceDNSSuffix: - type: string - crVersion: - type: string - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - initImage: - type: string - mongod: - properties: - auditLog: - properties: - destination: - type: string - filter: - type: string - format: - type: string - type: object - net: - properties: - hostPort: - format: int32 - type: integer - port: - format: int32 - type: integer - type: object - operationProfiling: - properties: - mode: - type: string - rateLimit: - type: integer - slowOpThresholdMs: - type: integer - type: object - replication: - properties: - oplogSizeMB: - type: integer - type: object - security: - properties: - enableEncryption: - type: boolean - encryptionCipherMode: - type: string - encryptionKeySecret: - type: string - redactClientLogData: - type: boolean - type: object - setParameter: - properties: - cursorTimeoutMillis: - type: integer - ttlMonitorSleepSecs: - type: integer - wiredTigerConcurrentReadTransactions: - type: integer - wiredTigerConcurrentWriteTransactions: - type: integer - type: object - storage: - properties: - directoryPerDB: - type: boolean - engine: - type: string - inMemory: - properties: - engineConfig: - properties: - inMemorySizeRatio: - type: number - type: object - type: object - mmapv1: - properties: - nsSize: - type: integer - smallfiles: - type: boolean - type: object - syncPeriodSecs: - type: integer - wiredTiger: - properties: - collectionConfig: - properties: - blockCompressor: - type: string - type: object - engineConfig: - properties: - cacheSizeRatio: - type: number - directoryForIndexes: - type: boolean - journalCompressor: - type: string - type: object - indexConfig: - properties: - prefixCompression: - type: boolean - type: object - type: object - type: object - type: object - multiCluster: - properties: - DNSSuffix: - type: string - enabled: - type: boolean - required: - - enabled - type: object - pause: - type: boolean - platform: - type: string - pmm: - properties: - enabled: - type: boolean - image: - type: string - mongodParams: - type: string - mongosParams: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - serverHost: - type: string - type: object - replsets: - items: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - arbiter: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - enabled: - type: boolean - labels: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - priorityClassName: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - required: - - enabled - - size - type: object - clusterRole: - type: string - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - expose: - properties: - enabled: - type: boolean - exposeType: - type: string - loadBalancerSourceRanges: - items: - type: string - type: array - serviceAnnotations: - additionalProperties: - type: string - type: object - serviceLabels: - additionalProperties: - type: string - type: object - required: - - enabled - type: object - externalNodes: - items: - properties: - host: - type: string - port: - type: integer - priority: - type: integer - votes: - type: integer - required: - - host - - priority - - votes - type: object - type: array - labels: - additionalProperties: - type: string - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - startupDelaySeconds: - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - nodeSelector: - additionalProperties: - type: string - type: object - nonvoting: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - labels: - additionalProperties: - type: string - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - startupDelaySeconds: - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - required: - - enabled - - size - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - storage: - properties: - directoryPerDB: - type: boolean - engine: - type: string - inMemory: - properties: - engineConfig: - properties: - inMemorySizeRatio: - type: number - type: object - type: object - mmapv1: - properties: - nsSize: - type: integer - smallfiles: - type: boolean - type: object - syncPeriodSecs: - type: integer - wiredTiger: - properties: - collectionConfig: - properties: - blockCompressor: - type: string - type: object - engineConfig: - properties: - cacheSizeRatio: - type: number - directoryForIndexes: - type: boolean - journalCompressor: - type: string - type: object - indexConfig: - properties: - prefixCompression: - type: boolean - type: object - type: object - type: object - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - required: - - size - type: object - type: array - schedulerName: - type: string - secrets: - properties: - encryptionKey: - type: string - ssl: - type: string - sslInternal: - type: string - users: - type: string - vault: - type: string - type: object - sharding: - properties: - configsvrReplSet: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - arbiter: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - enabled: - type: boolean - labels: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - priorityClassName: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - required: - - enabled - - size - type: object - clusterRole: - type: string - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - expose: - properties: - enabled: - type: boolean - exposeType: - type: string - loadBalancerSourceRanges: - items: - type: string - type: array - serviceAnnotations: - additionalProperties: - type: string - type: object - serviceLabels: - additionalProperties: - type: string - type: object - required: - - enabled - type: object - externalNodes: - items: - properties: - host: - type: string - port: - type: integer - priority: - type: integer - votes: - type: integer - required: - - host - - priority - - votes - type: object - type: array - labels: - additionalProperties: - type: string - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - startupDelaySeconds: - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - nodeSelector: - additionalProperties: - type: string - type: object - nonvoting: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - labels: - additionalProperties: - type: string - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - startupDelaySeconds: - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - required: - - enabled - - size - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - storage: - properties: - directoryPerDB: - type: boolean - engine: - type: string - inMemory: - properties: - engineConfig: - properties: - inMemorySizeRatio: - type: number - type: object - type: object - mmapv1: - properties: - nsSize: - type: integer - smallfiles: - type: boolean - type: object - syncPeriodSecs: - type: integer - wiredTiger: - properties: - collectionConfig: - properties: - blockCompressor: - type: string - type: object - engineConfig: - properties: - cacheSizeRatio: - type: number - directoryForIndexes: - type: boolean - journalCompressor: - type: string - type: object - indexConfig: - properties: - prefixCompression: - type: boolean - type: object - type: object - type: object - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - required: - - size - type: object - enabled: - type: boolean - mongos: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - auditLog: - properties: - destination: - type: string - filter: - type: string - format: - type: string - type: object - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - expose: - properties: - exposeType: - type: string - loadBalancerSourceRanges: - items: - type: string - type: array - serviceAnnotations: - additionalProperties: - type: string - type: object - serviceLabels: - additionalProperties: - type: string - type: object - servicePerPod: - type: boolean - type: object - hostPort: - format: int32 - type: integer - labels: - additionalProperties: - type: string - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - startupDelaySeconds: - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - port: - format: int32 - type: integer - priorityClassName: - type: string - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serviceAccountName: - type: string - setParameter: - properties: - cursorTimeoutMillis: - type: integer - type: object - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - type: object - required: - - enabled - type: object - tls: - properties: - certValidityDuration: - type: string - type: object - unmanaged: - type: boolean - updateStrategy: - type: string - upgradeOptions: - properties: - apply: - type: string - schedule: - type: string - setFCV: - type: boolean - versionServiceEndpoint: - type: string - type: object - type: object - status: - properties: - backup: - type: string - backupVersion: - type: string - conditions: - items: - properties: - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - host: - type: string - message: - type: string - mongoImage: - type: string - mongoVersion: - type: string - mongos: - properties: - message: - type: string - ready: - type: integer - size: - type: integer - status: - type: string - required: - - ready - - size - type: object - observedGeneration: - format: int64 - type: integer - pmmStatus: - type: string - pmmVersion: - type: string - ready: - format: int32 - type: integer - replsets: - additionalProperties: - properties: - added_as_shard: - type: boolean - clusterRole: - type: string - initialized: - type: boolean - members: - items: - properties: - name: - type: string - version: - type: string - type: object - type: array - message: - type: string - ready: - format: int32 - type: integer - size: - format: int32 - type: integer - status: - type: string - required: - - ready - - size - type: object - type: object - size: - format: int32 - type: integer - state: - type: string - required: - - ready - - size - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.cr.yaml b/docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.cr.yaml deleted file mode 100644 index 515281b9b3..0000000000 --- a/docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.cr.yaml +++ /dev/null @@ -1,579 +0,0 @@ -apiVersion: dbaas.percona.com/v1alpha1 -kind: PXCtemplate -metadata: - name: prod-app-n-large - annotations: - dbaas.percona.com/dbtemplate-origin: sre -# percona.com/issue-vault-token: "false" - labels: - dbaas.percona.com/engine: pxc - dbaas.percona.com/template: "yes" - IsDefaultTpl: "yes" -spec: - crVersion: 1.11.0 -# secretsName: my-cluster-secrets -# vaultSecretName: keyring-secret-vault -# sslSecretName: my-cluster-ssl -# sslInternalSecretName: my-cluster-ssl-internal -# logCollectorSecretName: my-log-collector-secrets -# initImage: percona/percona-xtradb-cluster-operator:1.11.0 -# enableCRValidationWebhook: true -# tls: -# SANs: -# - pxc-1.example.com -# - pxc-2.example.com -# - pxc-3.example.com -# issuerConf: -# name: special-selfsigned-issuer -# kind: ClusterIssuer -# group: cert-manager.io - allowUnsafeConfigurations: false -# pause: false - updateStrategy: SmartUpdate - upgradeOptions: - versionServiceEndpoint: https://check.percona.com - apply: 8.0-recommended - schedule: "0 4 * * *" - pxc: - size: 3 - image: percona/percona-xtradb-cluster:8.0.27-18.1 - autoRecovery: true -# expose: -# enabled: true -# type: LoadBalancer -# trafficPolicy: Local -# loadBalancerSourceRanges: -# - 10.0.0.0/8 -# annotations: -# networking.gke.io/load-balancer-type: "Internal" -# replicationChannels: -# - name: pxc1_to_pxc2 -# isSource: true -# - name: pxc2_to_pxc1 -# isSource: false -# configuration: -# sourceRetryCount: 3 -# sourceConnectRetry: 60 -# sourcesList: -# - host: 10.95.251.101 -# port: 3306 -# weight: 100 -# schedulerName: mycustom-scheduler -# readinessDelaySec: 15 -# livenessDelaySec: 600 -# configuration: | -# [mysqld] -# wsrep_debug=CLIENT -# wsrep_provider_options="gcache.size=1G; gcache.recover=yes" -# [sst] -# xbstream-opts=--decompress -# [xtrabackup] -# compress=lz4 -# for PXC 5.7 -# [xtrabackup] -# compress -# imagePullSecrets: -# - name: private-registry-credentials -# priorityClassName: high-priority -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# readinessProbes: -# initialDelaySeconds: 15 -# timeoutSeconds: 15 -# periodSeconds: 30 -# successThreshold: 1 -# failureThreshold: 5 -# livenessProbes: -# initialDelaySeconds: 300 -# timeoutSeconds: 5 -# periodSeconds: 10 -# successThreshold: 1 -# failureThreshold: 3 -# containerSecurityContext: -# privileged: false -# podSecurityContext: -# runAsUser: 1001 -# runAsGroup: 1001 -# supplementalGroups: [1001] -# serviceAccountName: percona-xtradb-cluster-operator-workload -# imagePullPolicy: Always -# runtimeClassName: image-rc -# sidecars: -# - image: busybox -# command: ["/bin/sh"] -# args: ["-c", "while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;"] -# name: my-sidecar-1 -# resources: -# requests: -# memory: 100M -# cpu: 100m -# limits: -# memory: 200M -# cpu: 200m -# envVarsSecret: my-env-var-secrets - resources: - requests: - memory: 1G - cpu: 600m -# ephemeral-storage: 1G -# limits: -# memory: 1G -# cpu: "1" -# ephemeral-storage: 1G -# nodeSelector: -# disktype: ssd - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 - podDisruptionBudget: - maxUnavailable: 1 -# minAvailable: 0 - volumeSpec: -# emptyDir: {} -# hostPath: -# path: /data -# type: Directory - persistentVolumeClaim: -# storageClassName: standard -# accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 6G - gracePeriod: 600 - haproxy: - enabled: true - size: 3 - image: percona/percona-xtradb-cluster-operator:1.11.0-haproxy -# replicasServiceEnabled: false -# imagePullPolicy: Always -# schedulerName: mycustom-scheduler -# readinessDelaySec: 15 -# livenessDelaySec: 600 -# configuration: | -# -# the actual default configuration file can be found here https://github.com/percona/percona-docker/blob/main/haproxy/dockerdir/etc/haproxy/haproxy-global.cfg -# -# global -# maxconn 2048 -# external-check -# insecure-fork-wanted -# stats socket /etc/haproxy/pxc/haproxy.sock mode 600 expose-fd listeners level admin -# -# defaults -# default-server init-addr last,libc,none -# log global -# mode tcp -# retries 10 -# timeout client 28800s -# timeout connect 100500 -# timeout server 28800s -# -# frontend galera-in -# bind *:3309 accept-proxy -# bind *:3306 -# mode tcp -# option clitcpka -# default_backend galera-nodes -# -# frontend galera-admin-in -# bind *:33062 -# mode tcp -# option clitcpka -# default_backend galera-admin-nodes -# -# frontend galera-replica-in -# bind *:3307 -# mode tcp -# option clitcpka -# default_backend galera-replica-nodes -# -# frontend galera-mysqlx-in -# bind *:33060 -# mode tcp -# option clitcpka -# default_backend galera-mysqlx-nodes -# -# frontend stats -# bind *:8404 -# mode http -# option http-use-htx -# http-request use-service prometheus-exporter if { path /metrics } -# imagePullSecrets: -# - name: private-registry-credentials -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# readinessProbes: -# initialDelaySeconds: 15 -# timeoutSeconds: 1 -# periodSeconds: 5 -# successThreshold: 1 -# failureThreshold: 3 -# livenessProbes: -# initialDelaySeconds: 60 -# timeoutSeconds: 5 -# periodSeconds: 30 -# successThreshold: 1 -# failureThreshold: 4 -# serviceType: ClusterIP -# externalTrafficPolicy: Cluster -# replicasServiceType: ClusterIP -# replicasExternalTrafficPolicy: Cluster -# runtimeClassName: image-rc -# sidecars: -# - image: busybox -# command: ["/bin/sh"] -# args: ["-c", "while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;"] -# name: my-sidecar-1 -# resources: -# requests: -# memory: 100M -# cpu: 100m -# limits: -# memory: 200M -# cpu: 200m -# envVarsSecret: my-env-var-secrets - resources: - requests: - memory: 1G - cpu: 600m -# limits: -# memory: 1G -# cpu: 700m -# priorityClassName: high-priority -# nodeSelector: -# disktype: ssd -# sidecarResources: -# requests: -# memory: 1G -# cpu: 500m -# limits: -# memory: 2G -# cpu: 600m -# containerSecurityContext: -# privileged: false -# podSecurityContext: -# runAsUser: 1001 -# runAsGroup: 1001 -# supplementalGroups: [1001] -# serviceAccountName: percona-xtradb-cluster-operator-workload - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 - podDisruptionBudget: - maxUnavailable: 1 -# minAvailable: 0 - gracePeriod: 30 -# loadBalancerSourceRanges: -# - 10.0.0.0/8 -# serviceAnnotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http -# serviceLabels: -# rack: rack-23 - proxysql: - enabled: false - size: 3 - image: percona/percona-xtradb-cluster-operator:1.11.0-proxysql -# imagePullPolicy: Always -# configuration: | -# datadir="/var/lib/proxysql" -# -# admin_variables = -# { -# admin_credentials="proxyadmin:admin_password" -# mysql_ifaces="0.0.0.0:6032" -# refresh_interval=2000 -# -# cluster_username="proxyadmin" -# cluster_password="admin_password" -# checksum_admin_variables=false -# checksum_ldap_variables=false -# checksum_mysql_variables=false -# cluster_check_interval_ms=200 -# cluster_check_status_frequency=100 -# cluster_mysql_query_rules_save_to_disk=true -# cluster_mysql_servers_save_to_disk=true -# cluster_mysql_users_save_to_disk=true -# cluster_proxysql_servers_save_to_disk=true -# cluster_mysql_query_rules_diffs_before_sync=1 -# cluster_mysql_servers_diffs_before_sync=1 -# cluster_mysql_users_diffs_before_sync=1 -# cluster_proxysql_servers_diffs_before_sync=1 -# } -# -# mysql_variables= -# { -# monitor_password="monitor" -# monitor_galera_healthcheck_interval=1000 -# threads=2 -# max_connections=2048 -# default_query_delay=0 -# default_query_timeout=10000 -# poll_timeout=2000 -# interfaces="0.0.0.0:3306" -# default_schema="information_schema" -# stacksize=1048576 -# connect_timeout_server=10000 -# monitor_history=60000 -# monitor_connect_interval=20000 -# monitor_ping_interval=10000 -# ping_timeout_server=200 -# commands_stats=true -# sessions_sort=true -# have_ssl=true -# ssl_p2s_ca="/etc/proxysql/ssl-internal/ca.crt" -# ssl_p2s_cert="/etc/proxysql/ssl-internal/tls.crt" -# ssl_p2s_key="/etc/proxysql/ssl-internal/tls.key" -# ssl_p2s_cipher="ECDHE-RSA-AES128-GCM-SHA256" -# } -# readinessDelaySec: 15 -# livenessDelaySec: 600 -# schedulerName: mycustom-scheduler -# imagePullSecrets: -# - name: private-registry-credentials -# annotations: -# iam.amazonaws.com/role: role-arn -# labels: -# rack: rack-22 -# serviceType: ClusterIP -# externalTrafficPolicy: Cluster -# runtimeClassName: image-rc -# sidecars: -# - image: busybox -# command: ["/bin/sh"] -# args: ["-c", "while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;"] -# name: my-sidecar-1 -# resources: -# requests: -# memory: 100M -# cpu: 100m -# limits: -# memory: 200M -# cpu: 200m -# envVarsSecret: my-env-var-secrets - resources: - requests: - memory: 1G - cpu: 600m -# limits: -# memory: 1G -# cpu: 700m -# priorityClassName: high-priority -# nodeSelector: -# disktype: ssd -# sidecarResources: -# requests: -# memory: 1G -# cpu: 500m -# limits: -# memory: 2G -# cpu: 600m -# containerSecurityContext: -# privileged: false -# podSecurityContext: -# runAsUser: 1001 -# runAsGroup: 1001 -# supplementalGroups: [1001] -# serviceAccountName: percona-xtradb-cluster-operator-workload - affinity: - antiAffinityTopologyKey: "kubernetes.io/hostname" -# advanced: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: kubernetes.io/e2e-az-name -# operator: In -# values: -# - e2e-az1 -# - e2e-az2 -# tolerations: -# - key: "node.alpha.kubernetes.io/unreachable" -# operator: "Exists" -# effect: "NoExecute" -# tolerationSeconds: 6000 - volumeSpec: -# emptyDir: {} -# hostPath: -# path: /data -# type: Directory - persistentVolumeClaim: -# storageClassName: standard -# accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 2G - podDisruptionBudget: - maxUnavailable: 1 -# minAvailable: 0 - gracePeriod: 30 -# loadBalancerSourceRanges: -# - 10.0.0.0/8 -# serviceAnnotations: -# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http -# serviceLabels: -# rack: rack-23 - logcollector: - enabled: true - image: percona/percona-xtradb-cluster-operator:1.11.0-logcollector -# configuration: | -# [OUTPUT] -# Name es -# Match * -# Host 192.168.2.3 -# Port 9200 -# Index my_index -# Type my_type - resources: - requests: - memory: 100M - cpu: 200m - pmm: - enabled: false - image: percona/pmm-client:2.28.0 - serverHost: monitoring-service -# serverUser: admin -# pxcParams: "--disable-tablestats-limit=2000" -# proxysqlParams: "--custom-labels=CUSTOM-LABELS" - resources: - requests: - memory: 150M - cpu: 300m - backup: - image: percona/percona-xtradb-cluster-operator:1.11.0-pxc8.0-backup -# backoffLimit: 6 -# serviceAccountName: percona-xtradb-cluster-operator -# imagePullSecrets: -# - name: private-registry-credentials - pitr: - enabled: false - storageName: STORAGE-NAME-HERE - timeBetweenUploads: 60 -# resources: -# requests: -# memory: 0.1G -# cpu: 100m -# limits: -# memory: 1G -# cpu: 700m - storages: - s3-us-west: - type: s3 - verifyTLS: true -# nodeSelector: -# storage: tape -# backupWorker: 'True' -# resources: -# requests: -# memory: 1G -# cpu: 600m -# affinity: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: backupWorker -# operator: In -# values: -# - 'True' -# tolerations: -# - key: "backupWorker" -# operator: "Equal" -# value: "True" -# effect: "NoSchedule" -# annotations: -# testName: scheduled-backup -# labels: -# backupWorker: 'True' -# schedulerName: 'default-scheduler' -# priorityClassName: 'high-priority' -# containerSecurityContext: -# privileged: true -# podSecurityContext: -# fsGroup: 1001 -# supplementalGroups: [1001, 1002, 1003] - s3: - bucket: S3-BACKUP-BUCKET-NAME-HERE - credentialsSecret: my-cluster-name-backup-s3 - region: us-west-2 - fs-pvc: - type: filesystem -# nodeSelector: -# storage: tape -# backupWorker: 'True' -# resources: -# requests: -# memory: 1G -# cpu: 600m -# affinity: -# nodeAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# nodeSelectorTerms: -# - matchExpressions: -# - key: backupWorker -# operator: In -# values: -# - 'True' -# tolerations: -# - key: "backupWorker" -# operator: "Equal" -# value: "True" -# effect: "NoSchedule" -# annotations: -# testName: scheduled-backup -# labels: -# backupWorker: 'True' -# schedulerName: 'default-scheduler' -# priorityClassName: 'high-priority' -# containerSecurityContext: -# privileged: true -# podSecurityContext: -# fsGroup: 1001 -# supplementalGroups: [1001, 1002, 1003] - volume: - persistentVolumeClaim: -# storageClassName: standard - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 6G - schedule: - - name: "sat-night-backup" - schedule: "0 0 * * 6" - keep: 3 - storageName: s3-us-west - - name: "daily-backup" - schedule: "0 0 * * *" - keep: 5 - storageName: fs-pvc diff --git a/docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.crd.yaml b/docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.crd.yaml deleted file mode 100644 index 1a60ff1c47..0000000000 --- a/docs/proposals/dbaas/01-architecture/pxctpl.dbaas.percona.com.crd.yaml +++ /dev/null @@ -1,8107 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: pxctemplates.dbaas.percona.com - annotations: - dbaas.percona.com/dbtemplate-engine: pxc -spec: - group: dbaas.percona.com - names: - kind: PXCtemplate - plural: pxctemplates - singular: pxctemplate - shortNames: - - pxctpl - scope: Namespaced - versions: - - name: v1alpha1 - additionalPrinterColumns: - - jsonPath: .status.host - name: Endpoint - type: string - - jsonPath: .status.state - name: Status - type: string - - description: Ready pxc nodes - jsonPath: .status.pxc.ready - name: PXC - type: string - - description: Ready proxysql nodes - jsonPath: .status.proxysql.ready - name: proxysql - type: string - - description: Ready haproxy nodes - jsonPath: .status.haproxy.ready - name: haproxy - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - schema: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - allowUnsafeConfigurations: - type: boolean - backup: - properties: - annotations: - additionalProperties: - type: string - type: object - backoffLimit: - format: int32 - type: integer - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - pitr: - properties: - enabled: - type: boolean - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - storageName: - type: string - timeBetweenUploads: - type: number - type: object - schedule: - items: - properties: - keep: - type: integer - name: - type: string - schedule: - type: string - storageName: - type: string - type: object - type: array - serviceAccountName: - type: string - storages: - additionalProperties: - properties: - affinity: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - annotations: - additionalProperties: - type: string - type: object - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - labels: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - s3: - properties: - bucket: - type: string - credentialsSecret: - type: string - endpointUrl: - type: string - region: - type: string - type: object - schedulerName: - type: string - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - type: - type: string - verifyTLS: - type: boolean - volume: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - type: object - type: object - type: object - crVersion: - type: string - enableCRValidationWebhook: - type: boolean - haproxy: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - envVarsSecret: - type: string - externalTrafficPolicy: - type: string - forceUnsafeBootstrap: - type: boolean - gracePeriod: - format: int64 - type: integer - hookScript: - type: string - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - labels: - additionalProperties: - type: string - type: object - livenessDelaySec: - format: int32 - type: integer - livenessProbes: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - loadBalancerSourceRanges: - items: - type: string - type: array - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessDelaySec: - format: int32 - type: integer - readinessProbes: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - replicasExternalTrafficPolicy: - type: string - replicasServiceEnabled: - type: boolean - replicasServiceType: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - schedulerName: - type: string - serviceAccountName: - type: string - serviceAnnotations: - additionalProperties: - type: string - type: object - serviceLabels: - additionalProperties: - type: string - type: object - serviceType: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarResources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - protocol - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - protocol - - containerPort - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - sslInternalSecretName: - type: string - sslSecretName: - type: string - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - vaultSecretName: - type: string - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - type: object - initImage: - type: string - logCollectorSecretName: - type: string - logcollector: - properties: - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - hookScript: - type: string - image: - type: string - imagePullPolicy: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - type: object - pause: - type: boolean - platform: - type: string - pmm: - properties: - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - image: - type: string - imagePullPolicy: - type: string - proxysqlParams: - type: string - pxcParams: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - serverHost: - type: string - serverUser: - type: string - type: object - proxysql: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - envVarsSecret: - type: string - externalTrafficPolicy: - type: string - forceUnsafeBootstrap: - type: boolean - gracePeriod: - format: int64 - type: integer - hookScript: - type: string - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - labels: - additionalProperties: - type: string - type: object - livenessDelaySec: - format: int32 - type: integer - livenessProbes: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - loadBalancerSourceRanges: - items: - type: string - type: array - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessDelaySec: - format: int32 - type: integer - readinessProbes: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - replicasExternalTrafficPolicy: - type: string - replicasServiceType: - type: string - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - schedulerName: - type: string - serviceAccountName: - type: string - serviceAnnotations: - additionalProperties: - type: string - type: object - serviceLabels: - additionalProperties: - type: string - type: object - serviceType: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarResources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - protocol - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - protocol - - containerPort - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - sslInternalSecretName: - type: string - sslSecretName: - type: string - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - vaultSecretName: - type: string - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - type: object - pxc: - properties: - affinity: - properties: - advanced: - properties: - nodeAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - preference: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - properties: - nodeSelectorTerms: - items: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - properties: - preferredDuringSchedulingIgnoredDuringExecution: - items: - properties: - podAffinityTerm: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - weight: - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - items: - properties: - labelSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaceSelector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - namespaces: - items: - type: string - type: array - topologyKey: - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - antiAffinityTopologyKey: - type: string - type: object - annotations: - additionalProperties: - type: string - type: object - autoRecovery: - type: boolean - configuration: - type: string - containerSecurityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - enabled: - type: boolean - envVarsSecret: - type: string - expose: - properties: - annotations: - additionalProperties: - type: string - type: object - enabled: - type: boolean - loadBalancerSourceRanges: - items: - type: string - type: array - trafficPolicy: - type: string - type: - type: string - type: object - externalTrafficPolicy: - type: string - forceUnsafeBootstrap: - type: boolean - gracePeriod: - format: int64 - type: integer - hookScript: - type: string - image: - type: string - imagePullPolicy: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - type: array - labels: - additionalProperties: - type: string - type: object - livenessDelaySec: - format: int32 - type: integer - livenessProbes: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - loadBalancerSourceRanges: - items: - type: string - type: array - nodeSelector: - additionalProperties: - type: string - type: object - podDisruptionBudget: - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - properties: - fsGroup: - format: int64 - type: integer - fsGroupChangePolicy: - type: string - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - supplementalGroups: - items: - format: int64 - type: integer - type: array - sysctls: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - priorityClassName: - type: string - readinessDelaySec: - format: int32 - type: integer - readinessProbes: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - replicasExternalTrafficPolicy: - type: string - replicasServiceType: - type: string - replicationChannels: - items: - properties: - configuration: - properties: - sourceConnectRetry: - type: integer - sourceRetryCount: - type: integer - type: object - isSource: - type: boolean - name: - type: string - sourcesList: - items: - properties: - host: - type: string - port: - type: integer - weight: - type: integer - type: object - type: array - type: object - type: array - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - runtimeClassName: - type: string - schedulerName: - type: string - serviceAccountName: - type: string - serviceAnnotations: - additionalProperties: - type: string - type: object - serviceLabels: - additionalProperties: - type: string - type: object - serviceType: - type: string - sidecarPVCs: - items: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - status: - properties: - accessModes: - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - conditions: - items: - properties: - lastProbeTime: - format: date-time - type: string - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - required: - - status - - type - type: object - type: array - phase: - type: string - resizeStatus: - type: string - type: object - type: object - type: array - sidecarResources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - sidecarVolumes: - items: - properties: - awsElasticBlockStore: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - azureDisk: - properties: - cachingMode: - type: string - diskName: - type: string - diskURI: - type: string - fsType: - type: string - kind: - type: string - readOnly: - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - properties: - readOnly: - type: boolean - secretName: - type: string - shareName: - type: string - required: - - secretName - - shareName - type: object - cephfs: - properties: - monitors: - items: - type: string - type: array - path: - type: string - readOnly: - type: boolean - secretFile: - type: string - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - monitors - type: object - cinder: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeID: - type: string - required: - - volumeID - type: object - configMap: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - csi: - properties: - driver: - type: string - fsType: - type: string - nodePublishSecretRef: - properties: - name: - type: string - type: object - readOnly: - type: boolean - volumeAttributes: - additionalProperties: - type: string - type: object - required: - - driver - type: object - downwardAPI: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - properties: - volumeClaimTemplate: - properties: - metadata: - type: object - spec: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - required: - - spec - type: object - type: object - fc: - properties: - fsType: - type: string - lun: - format: int32 - type: integer - readOnly: - type: boolean - targetWWNs: - items: - type: string - type: array - wwids: - items: - type: string - type: array - type: object - flexVolume: - properties: - driver: - type: string - fsType: - type: string - options: - additionalProperties: - type: string - type: object - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - required: - - driver - type: object - flocker: - properties: - datasetName: - type: string - datasetUUID: - type: string - type: object - gcePersistentDisk: - properties: - fsType: - type: string - partition: - format: int32 - type: integer - pdName: - type: string - readOnly: - type: boolean - required: - - pdName - type: object - gitRepo: - properties: - directory: - type: string - repository: - type: string - revision: - type: string - required: - - repository - type: object - glusterfs: - properties: - endpoints: - type: string - path: - type: string - readOnly: - type: boolean - required: - - endpoints - - path - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - iscsi: - properties: - chapAuthDiscovery: - type: boolean - chapAuthSession: - type: boolean - fsType: - type: string - initiatorName: - type: string - iqn: - type: string - iscsiInterface: - type: string - lun: - format: int32 - type: integer - portals: - items: - type: string - type: array - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - targetPortal: - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - type: string - nfs: - properties: - path: - type: string - readOnly: - type: boolean - server: - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - properties: - claimName: - type: string - readOnly: - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - properties: - fsType: - type: string - pdID: - type: string - required: - - pdID - type: object - portworxVolume: - properties: - fsType: - type: string - readOnly: - type: boolean - volumeID: - type: string - required: - - volumeID - type: object - projected: - properties: - defaultMode: - format: int32 - type: integer - sources: - items: - properties: - configMap: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - downwardAPI: - properties: - items: - items: - properties: - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - mode: - format: int32 - type: integer - path: - type: string - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - properties: - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - name: - type: string - optional: - type: boolean - type: object - serviceAccountToken: - properties: - audience: - type: string - expirationSeconds: - format: int64 - type: integer - path: - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - properties: - group: - type: string - readOnly: - type: boolean - registry: - type: string - tenant: - type: string - user: - type: string - volume: - type: string - required: - - registry - - volume - type: object - rbd: - properties: - fsType: - type: string - image: - type: string - keyring: - type: string - monitors: - items: - type: string - type: array - pool: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - user: - type: string - required: - - image - - monitors - type: object - scaleIO: - properties: - fsType: - type: string - gateway: - type: string - protectionDomain: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - sslEnabled: - type: boolean - storageMode: - type: string - storagePool: - type: string - system: - type: string - volumeName: - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - properties: - defaultMode: - format: int32 - type: integer - items: - items: - properties: - key: - type: string - mode: - format: int32 - type: integer - path: - type: string - required: - - key - - path - type: object - type: array - optional: - type: boolean - secretName: - type: string - type: object - storageos: - properties: - fsType: - type: string - readOnly: - type: boolean - secretRef: - properties: - name: - type: string - type: object - volumeName: - type: string - volumeNamespace: - type: string - type: object - vsphereVolume: - properties: - fsType: - type: string - storagePolicyID: - type: string - storagePolicyName: - type: string - volumePath: - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - sidecars: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - required: - - fieldPath - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - type: string - required: - - resource - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - name: - type: string - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - default: TCP - type: string - required: - - protocol - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - protocol - - containerPort - x-kubernetes-list-type: map - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - required: - - type - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - required: - - port - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - required: - - name - - value - type: object - type: array - path: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - type: string - required: - - port - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - stdin: - type: boolean - stdinOnce: - type: boolean - terminationMessagePath: - type: string - terminationMessagePolicy: - type: string - tty: - type: boolean - volumeDevices: - items: - properties: - devicePath: - type: string - name: - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - type: string - required: - - name - type: object - type: array - size: - format: int32 - type: integer - sslInternalSecretName: - type: string - sslSecretName: - type: string - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - vaultSecretName: - type: string - volumeSpec: - properties: - emptyDir: - properties: - medium: - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - hostPath: - properties: - path: - type: string - type: - type: string - required: - - path - type: object - persistentVolumeClaim: - properties: - accessModes: - items: - type: string - type: array - dataSource: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - dataSourceRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - selector: - properties: - matchExpressions: - items: - properties: - key: - type: string - operator: - type: string - values: - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - type: object - type: object - storageClassName: - type: string - volumeMode: - type: string - volumeName: - type: string - type: object - type: object - type: object - secretsName: - type: string - sslInternalSecretName: - type: string - sslSecretName: - type: string - tls: - properties: - SANs: - items: - type: string - type: array - issuerConf: - properties: - group: - type: string - kind: - type: string - name: - type: string - required: - - name - type: object - type: object - updateStrategy: - type: string - upgradeOptions: - properties: - apply: - type: string - schedule: - type: string - versionServiceEndpoint: - type: string - type: object - vaultSecretName: - type: string - type: object - status: - properties: - backup: - properties: - image: - type: string - labelSelectorPath: - type: string - message: - type: string - status: - type: string - version: - type: string - type: object - conditions: - items: - properties: - lastTransitionTime: - format: date-time - type: string - message: - type: string - reason: - type: string - status: - type: string - type: - type: string - type: object - type: array - haproxy: - properties: - image: - type: string - labelSelectorPath: - type: string - message: - type: string - ready: - format: int32 - type: integer - size: - format: int32 - type: integer - status: - type: string - version: - type: string - type: object - host: - type: string - logcollector: - properties: - image: - type: string - labelSelectorPath: - type: string - message: - type: string - status: - type: string - version: - type: string - type: object - message: - items: - type: string - type: array - observedGeneration: - format: int64 - type: integer - pmm: - properties: - image: - type: string - labelSelectorPath: - type: string - message: - type: string - status: - type: string - version: - type: string - type: object - proxysql: - properties: - image: - type: string - labelSelectorPath: - type: string - message: - type: string - ready: - format: int32 - type: integer - size: - format: int32 - type: integer - status: - type: string - version: - type: string - type: object - pxc: - properties: - image: - type: string - labelSelectorPath: - type: string - message: - type: string - ready: - format: int32 - type: integer - size: - format: int32 - type: integer - status: - type: string - version: - type: string - type: object - pxcReplication: - properties: - replicationChannels: - items: - properties: - name: - type: string - sourceConnectRetry: - type: integer - sourceRetryCount: - type: integer - type: object - type: array - type: object - ready: - format: int32 - type: integer - size: - format: int32 - type: integer - state: - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/docs/proposals/dbaas/01-architecture/tpl_layers.png b/docs/proposals/dbaas/01-architecture/tpl_layers.png deleted file mode 100644 index 1f4fb8c131162f73eb37ceeea1175c0ba1f9d658..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 64400 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 g+5?wW{DC: Only used when SourceType = SourceTypeGrpc. Ignored when the Image field is set.' - type: string - configMap: - description: ConfigMap is the name of the ConfigMap to be used to back a configmap-server registry. Only used when SourceType = SourceTypeConfigmap or SourceTypeInternal. - type: string - description: - type: string - displayName: - description: Metadata - type: string - grpcPodConfig: - description: GrpcPodConfig exposes different overrides for the pod spec of the CatalogSource Pod. Only used when SourceType = SourceTypeGrpc and Image is set. - type: object - properties: - nodeSelector: - description: NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. - type: object - additionalProperties: - type: string - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default. - type: string - tolerations: - description: Tolerations are the catalog source's pod's tolerations. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: 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. - type: string - operator: - description: 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 pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: 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. - type: integer - format: int64 - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - icon: - type: object - required: - - base64data - - mediatype - properties: - base64data: - type: string - mediatype: - type: string - image: - description: Image is an operator-registry container image to instantiate a registry-server with. Only used when SourceType = SourceTypeGrpc. If present, the address field is ignored. - type: string - priority: - description: 'Priority field assigns a weight to the catalog source to prioritize them so that it can be consumed by the dependency resolver. Usage: Higher weight indicates that this catalog source is preferred over lower weighted catalog sources during dependency resolution. The range of the priority value can go from positive to negative in the range of int32. The default value to a catalog source with unassigned priority would be 0. The catalog source with the same priority values will be ranked lexicographically based on its name.' - type: integer - publisher: - type: string - secrets: - description: Secrets represent set of secrets that can be used to access the contents of the catalog. It is best to keep this list small, since each will need to be tried for every catalog entry. - type: array - items: - type: string - sourceType: - description: SourceType is the type of source - type: string - updateStrategy: - description: UpdateStrategy defines how updated catalog source images can be discovered Consists of an interval that defines polling duration and an embedded strategy type - type: object - properties: - registryPoll: - type: object - properties: - interval: - description: Interval is used to determine the time interval between checks of the latest catalog source version. The catalog operator polls to see if a new version of the catalog source is available. If available, the latest image is pulled and gRPC traffic is directed to the latest catalog source. - type: string - status: - type: object - properties: - conditions: - description: Represents the state of a CatalogSource. Note that Message and Reason represent the original status information, which may be migrated to be conditions based in the future. Any new features introduced will use conditions. - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - configMapReference: - type: object - required: - - name - - namespace - properties: - lastUpdateTime: - type: string - format: date-time - name: - type: string - namespace: - type: string - resourceVersion: - type: string - uid: - description: UID is a type that holds unique ID values, including UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being a type captures intent and helps make sure that UIDs and names do not get conflated. - type: string - connectionState: - type: object - required: - - lastObservedState - properties: - address: - type: string - lastConnect: - type: string - format: date-time - lastObservedState: - type: string - latestImageRegistryPoll: - description: The last time the CatalogSource image registry has been polled to ensure the image is up-to-date - type: string - format: date-time - message: - description: A human readable message indicating details about why the CatalogSource is in this condition. - type: string - reason: - description: Reason is the reason the CatalogSource was transitioned to its current state. - type: string - registryService: - type: object - properties: - createdAt: - type: string - format: date-time - port: - type: string - protocol: - type: string - serviceName: - type: string - serviceNamespace: - type: string - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: clusterserviceversions.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: ClusterServiceVersion - listKind: ClusterServiceVersionList - plural: clusterserviceversions - shortNames: - - csv - - csvs - singular: clusterserviceversion - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: The name of the CSV - jsonPath: .spec.displayName - name: Display - type: string - - description: The version of the CSV - jsonPath: .spec.version - name: Version - type: string - - description: The name of a CSV that this one replaces - jsonPath: .spec.replaces - name: Replaces - type: string - - jsonPath: .status.phase - name: Phase - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterServiceVersion is a Custom Resource of type `ClusterServiceVersionSpec`. - type: object - required: - - metadata - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ClusterServiceVersionSpec declarations tell OLM how to install an operator that can manage apps for a given version. - type: object - required: - - displayName - - install - properties: - annotations: - description: Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. - type: object - additionalProperties: - type: string - apiservicedefinitions: - description: APIServiceDefinitions declares all of the extension apis managed or required by an operator being ran by ClusterServiceVersion. - type: object - properties: - owned: - type: array - items: - description: APIServiceDescription provides details to OLM about apis provided via aggregation - type: object - required: - - group - - kind - - name - - version - properties: - actionDescriptors: - type: array - items: - description: ActionDescriptor describes a declarative action that can be performed on a custom resource instance - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - containerPort: - type: integer - format: int32 - deploymentName: - type: string - description: - type: string - displayName: - type: string - group: - type: string - kind: - type: string - name: - type: string - resources: - type: array - items: - description: APIResourceReference is a Kubernetes resource type used by a custom resource - type: object - required: - - kind - - name - - version - properties: - kind: - type: string - name: - type: string - version: - type: string - specDescriptors: - type: array - items: - description: SpecDescriptor describes a field in a spec block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - statusDescriptors: - type: array - items: - description: StatusDescriptor describes a field in a status block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - version: - type: string - required: - type: array - items: - description: APIServiceDescription provides details to OLM about apis provided via aggregation - type: object - required: - - group - - kind - - name - - version - properties: - actionDescriptors: - type: array - items: - description: ActionDescriptor describes a declarative action that can be performed on a custom resource instance - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - containerPort: - type: integer - format: int32 - deploymentName: - type: string - description: - type: string - displayName: - type: string - group: - type: string - kind: - type: string - name: - type: string - resources: - type: array - items: - description: APIResourceReference is a Kubernetes resource type used by a custom resource - type: object - required: - - kind - - name - - version - properties: - kind: - type: string - name: - type: string - version: - type: string - specDescriptors: - type: array - items: - description: SpecDescriptor describes a field in a spec block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - statusDescriptors: - type: array - items: - description: StatusDescriptor describes a field in a status block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - version: - type: string - cleanup: - description: Cleanup specifies the cleanup behaviour when the CSV gets deleted - type: object - required: - - enabled - properties: - enabled: - type: boolean - customresourcedefinitions: - description: "CustomResourceDefinitions declares all of the CRDs managed or required by an operator being ran by ClusterServiceVersion. \n If the CRD is present in the Owned list, it is implicitly required." - type: object - properties: - owned: - type: array - items: - description: CRDDescription provides details to OLM about the CRDs - type: object - required: - - kind - - name - - version - properties: - actionDescriptors: - type: array - items: - description: ActionDescriptor describes a declarative action that can be performed on a custom resource instance - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - description: - type: string - displayName: - type: string - kind: - type: string - name: - type: string - resources: - type: array - items: - description: APIResourceReference is a Kubernetes resource type used by a custom resource - type: object - required: - - kind - - name - - version - properties: - kind: - type: string - name: - type: string - version: - type: string - specDescriptors: - type: array - items: - description: SpecDescriptor describes a field in a spec block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - statusDescriptors: - type: array - items: - description: StatusDescriptor describes a field in a status block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - version: - type: string - required: - type: array - items: - description: CRDDescription provides details to OLM about the CRDs - type: object - required: - - kind - - name - - version - properties: - actionDescriptors: - type: array - items: - description: ActionDescriptor describes a declarative action that can be performed on a custom resource instance - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - description: - type: string - displayName: - type: string - kind: - type: string - name: - type: string - resources: - type: array - items: - description: APIResourceReference is a Kubernetes resource type used by a custom resource - type: object - required: - - kind - - name - - version - properties: - kind: - type: string - name: - type: string - version: - type: string - specDescriptors: - type: array - items: - description: SpecDescriptor describes a field in a spec block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - statusDescriptors: - type: array - items: - description: StatusDescriptor describes a field in a status block of a CRD so that OLM can consume it - type: object - required: - - path - properties: - description: - type: string - displayName: - type: string - path: - type: string - value: - description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding. - type: string - format: byte - x-descriptors: - type: array - items: - type: string - version: - type: string - description: - type: string - displayName: - type: string - icon: - type: array - items: - type: object - required: - - base64data - - mediatype - properties: - base64data: - type: string - mediatype: - type: string - install: - description: NamedInstallStrategy represents the block of an ClusterServiceVersion resource where the install strategy is specified. - type: object - required: - - strategy - properties: - spec: - description: StrategyDetailsDeployment represents the parsed details of a Deployment InstallStrategy. - type: object - required: - - deployments - properties: - clusterPermissions: - type: array - items: - description: StrategyDeploymentPermissions describe the rbac rules and service account needed by the install strategy - type: object - required: - - rules - - serviceAccountName - properties: - rules: - type: array - items: - description: PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. - type: object - required: - - verbs - properties: - apiGroups: - description: APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. - type: array - items: - type: string - nonResourceURLs: - description: NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. - type: array - items: - type: string - resourceNames: - description: ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - type: array - items: - type: string - resources: - description: Resources is a list of resources this rule applies to. '*' represents all resources. - type: array - items: - type: string - verbs: - description: Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs. - type: array - items: - type: string - serviceAccountName: - type: string - deployments: - type: array - items: - description: StrategyDeploymentSpec contains the name, spec and labels for the deployment ALM should create - type: object - required: - - name - - spec - properties: - label: - description: Set is a map of label:value. It implements Labels. - type: object - additionalProperties: - type: string - name: - type: string - spec: - description: DeploymentSpec is the specification of the desired behavior of the Deployment. - type: object - required: - - selector - - template - properties: - minReadySeconds: - description: Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) - type: integer - format: int32 - paused: - description: Indicates that the deployment is paused. - type: boolean - progressDeadlineSeconds: - description: The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. - type: integer - format: int32 - replicas: - description: Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - type: integer - format: int32 - revisionHistoryLimit: - description: The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. - type: integer - format: int32 - selector: - description: Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - strategy: - description: The deployment strategy to use to replace existing pods with new ones. - type: object - properties: - rollingUpdate: - description: 'Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. --- TODO: Update this to follow our convention for oneOf, whatever we decide it to be.' - type: object - properties: - maxSurge: - description: 'The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.' - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - maxUnavailable: - description: 'The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.' - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - type: - description: Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type: string - template: - description: Template describes the pods that will be created. - type: object - properties: - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - type: object - x-kubernetes-preserve-unknown-fields: true - spec: - description: 'Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' - type: object - required: - - containers - properties: - activeDeadlineSeconds: - description: Optional duration in seconds the 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. - type: integer - format: int64 - affinity: - description: If specified, the pod's scheduling constraints - type: object - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the pod. - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: 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. - type: array - items: - description: 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: object - required: - - preference - - weight - properties: - preference: - description: A node selector term, associated with the corresponding weight. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - type: object - required: - - nodeSelectorTerms - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - type: array - items: - description: 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: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: 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. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the 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. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this 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 pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: 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. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the 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 pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the 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. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this 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 pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - automountServiceAccountToken: - description: AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - type: boolean - containers: - description: List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. - type: array - items: - description: A single application container that you want to run within a pod. - type: object - required: - - name - properties: - args: - description: 'Arguments to the entrypoint. The container 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - type: array - items: - type: string - command: - description: 'Entrypoint array. Not executed within a shell. The container 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - type: array - items: - type: string - env: - description: List of environment variables to set in the container. Cannot be updated. - type: array - items: - description: EnvVar represents an environment variable present in a Container. - type: object - required: - - name - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - type: object - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - type: object - required: - - key - properties: - key: - description: The key to select. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - resourceFieldRef: - description: '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.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - type: object - required: - - key - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - envFrom: - description: 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. - type: array - items: - description: EnvFromSource represents the source of a set of ConfigMaps - type: object - properties: - configMapRef: - description: The ConfigMap to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - image: - description: 'Container 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.' - type: string - imagePullPolicy: - description: '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' - type: string - lifecycle: - description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. - type: object - properties: - postStart: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - preStop: - description: '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 Pod''s termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period (unless delayed by finalizers). 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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - livenessProbe: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - name: - description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. - type: string - ports: - description: 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. - type: array - items: - description: ContainerPort represents a network port in a single container. - type: object - required: - - containerPort - properties: - containerPort: - description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - type: integer - format: int32 - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: 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. - type: integer - format: int32 - name: - description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. - type: string - protocol: - description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". - type: string - default: TCP - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - resources: - description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - properties: - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - description: '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/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - securityContext: - description: 'SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' - type: object - properties: - allowPrivilegeEscalation: - description: '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 Note that this field cannot be set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - add: - description: Added capabilities - type: array - items: - description: Capability represent POSIX capabilities type - type: string - drop: - description: Removed capabilities - type: array - items: - description: Capability represent POSIX capabilities type - type: string - privileged: - description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - runAsNonRoot: - description: 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. - type: boolean - runAsUser: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - seLinuxOptions: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - level: - description: Level is SELinux level label that applies to the container. - type: string - role: - description: Role is a SELinux role label that applies to the container. - type: string - type: - description: Type is a SELinux type label that applies to the container. - type: string - user: - description: User is a SELinux user label that applies to the container. - type: string - seccompProfile: - description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. - type: object - required: - - type - properties: - localhostProfile: - description: 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". - type: string - type: - description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n 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." - type: string - windowsOptions: - description: 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. Note that this field cannot be set when spec.os.name is linux. - type: object - properties: - gmsaCredentialSpec: - description: 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. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: 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. - type: string - startupProbe: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - stdin: - description: 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. - type: boolean - stdinOnce: - description: 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 - type: boolean - terminationMessagePath: - description: '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.' - type: string - terminationMessagePolicy: - description: 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. - type: string - tty: - description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be used by the container. - type: array - items: - description: volumeDevice describes a mapping of a raw block device within a container. - type: object - required: - - devicePath - - name - properties: - devicePath: - description: devicePath is the path inside of the container that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim in the pod - type: string - volumeMounts: - description: Pod volumes to mount into the container's filesystem. Cannot be updated. - type: array - items: - description: VolumeMount describes a mounting of a Volume within a container. - type: object - required: - - mountPath - - name - properties: - mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: 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. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: 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. - type: string - workingDir: - description: 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. - type: string - dnsConfig: - description: Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - type: object - properties: - nameservers: - description: A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - type: array - items: - type: string - options: - description: 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. - type: array - items: - description: PodDNSConfigOption defines DNS resolver options of a pod. - type: object - properties: - name: - description: Required. - type: string - value: - type: string - searches: - description: 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. - type: array - items: - type: string - dnsPolicy: - description: Set DNS policy for the 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'. - type: string - enableServiceLinks: - description: 'EnableServiceLinks indicates whether information about services should be injected into pod''s environment variables, matching the syntax of Docker links. Optional: Defaults to true.' - type: boolean - ephemeralContainers: - description: List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate. - type: array - items: - description: "An EphemeralContainer is a temporary container that you may add to an existing 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 Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation. \n To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted. \n This is a beta feature available on clusters that haven't disabled the EphemeralContainers feature gate." - type: object - required: - - name - properties: - args: - description: 'Arguments to the entrypoint. The 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - type: array - items: - type: string - command: - description: 'Entrypoint array. Not executed within a shell. The 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - type: array - items: - type: string - env: - description: List of environment variables to set in the container. Cannot be updated. - type: array - items: - description: EnvVar represents an environment variable present in a Container. - type: object - required: - - name - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - type: object - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - type: object - required: - - key - properties: - key: - description: The key to select. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - resourceFieldRef: - description: '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.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - type: object - required: - - key - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - envFrom: - description: 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. - type: array - items: - description: EnvFromSource represents the source of a set of ConfigMaps - type: object - properties: - configMapRef: - description: The ConfigMap to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images' - type: string - imagePullPolicy: - description: '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' - type: string - lifecycle: - description: Lifecycle is not allowed for ephemeral containers. - type: object - properties: - postStart: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - preStop: - description: '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 Pod''s termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period (unless delayed by finalizers). 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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - livenessProbe: - description: Probes are not allowed for ephemeral containers. - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - name: - description: Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers. - type: string - ports: - description: Ports are not allowed for ephemeral containers. - type: array - items: - description: ContainerPort represents a network port in a single container. - type: object - required: - - containerPort - properties: - containerPort: - description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - type: integer - format: int32 - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: 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. - type: integer - format: int32 - name: - description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. - type: string - protocol: - description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". - type: string - default: TCP - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: Probes are not allowed for ephemeral containers. - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - resources: - description: Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod. - type: object - properties: - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - description: '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/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - securityContext: - description: 'Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.' - type: object - properties: - allowPrivilegeEscalation: - description: '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 Note that this field cannot be set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - add: - description: Added capabilities - type: array - items: - description: Capability represent POSIX capabilities type - type: string - drop: - description: Removed capabilities - type: array - items: - description: Capability represent POSIX capabilities type - type: string - privileged: - description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - runAsNonRoot: - description: 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. - type: boolean - runAsUser: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - seLinuxOptions: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - level: - description: Level is SELinux level label that applies to the container. - type: string - role: - description: Role is a SELinux role label that applies to the container. - type: string - type: - description: Type is a SELinux type label that applies to the container. - type: string - user: - description: User is a SELinux user label that applies to the container. - type: string - seccompProfile: - description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. - type: object - required: - - type - properties: - localhostProfile: - description: 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". - type: string - type: - description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n 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." - type: string - windowsOptions: - description: 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. Note that this field cannot be set when spec.os.name is linux. - type: object - properties: - gmsaCredentialSpec: - description: 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. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: 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. - type: string - startupProbe: - description: Probes are not allowed for ephemeral containers. - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - stdin: - description: 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. - type: boolean - stdinOnce: - description: 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 - type: boolean - targetContainerName: - description: "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 uses the namespaces configured in the Pod spec. \n The container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined." - type: string - terminationMessagePath: - description: '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.' - type: string - terminationMessagePolicy: - description: 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. - type: string - tty: - description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be used by the container. - type: array - items: - description: volumeDevice describes a mapping of a raw block device within a container. - type: object - required: - - devicePath - - name - properties: - devicePath: - description: devicePath is the path inside of the container that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim in the pod - type: string - volumeMounts: - description: Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated. - type: array - items: - description: VolumeMount describes a mounting of a Volume within a container. - type: object - required: - - mountPath - - name - properties: - mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: 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. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: 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. - type: string - workingDir: - description: 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. - type: string - hostAliases: - description: HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. - type: array - items: - description: HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. - type: object - properties: - hostnames: - description: Hostnames for the above IP address. - type: array - items: - type: string - ip: - description: IP address of the host file entry. - type: string - hostIPC: - description: 'Use the host''s ipc namespace. Optional: Default to false.' - type: boolean - hostNetwork: - description: Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. - type: boolean - hostPID: - description: 'Use the host''s pid namespace. Optional: Default to false.' - type: boolean - hostname: - description: Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - type: string - imagePullSecrets: - description: '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. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' - type: array - items: - description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - type: object - properties: - name: - description: '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?' - type: string - initContainers: - description: 'List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the 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/' - type: array - items: - description: A single application container that you want to run within a pod. - type: object - required: - - name - properties: - args: - description: 'Arguments to the entrypoint. The container 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - type: array - items: - type: string - command: - description: 'Entrypoint array. Not executed within a shell. The container 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' - type: array - items: - type: string - env: - description: List of environment variables to set in the container. Cannot be updated. - type: array - items: - description: EnvVar represents an environment variable present in a Container. - type: object - required: - - name - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - type: object - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - type: object - required: - - key - properties: - key: - description: The key to select. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - resourceFieldRef: - description: '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.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - type: object - required: - - key - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - envFrom: - description: 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. - type: array - items: - description: EnvFromSource represents the source of a set of ConfigMaps - type: object - properties: - configMapRef: - description: The ConfigMap to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - image: - description: 'Container 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.' - type: string - imagePullPolicy: - description: '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' - type: string - lifecycle: - description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. - type: object - properties: - postStart: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - preStop: - description: '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 Pod''s termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period (unless delayed by finalizers). 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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - livenessProbe: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - name: - description: Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. - type: string - ports: - description: 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. - type: array - items: - description: ContainerPort represents a network port in a single container. - type: object - required: - - containerPort - properties: - containerPort: - description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - type: integer - format: int32 - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: 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. - type: integer - format: int32 - name: - description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. - type: string - protocol: - description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". - type: string - default: TCP - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - resources: - description: 'Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - properties: - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - description: '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/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - securityContext: - description: 'SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' - type: object - properties: - allowPrivilegeEscalation: - description: '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 Note that this field cannot be set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - add: - description: Added capabilities - type: array - items: - description: Capability represent POSIX capabilities type - type: string - drop: - description: Removed capabilities - type: array - items: - description: Capability represent POSIX capabilities type - type: string - privileged: - description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - runAsNonRoot: - description: 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. - type: boolean - runAsUser: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - seLinuxOptions: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - level: - description: Level is SELinux level label that applies to the container. - type: string - role: - description: Role is a SELinux role label that applies to the container. - type: string - type: - description: Type is a SELinux type label that applies to the container. - type: string - user: - description: User is a SELinux user label that applies to the container. - type: string - seccompProfile: - description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. - type: object - required: - - type - properties: - localhostProfile: - description: 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". - type: string - type: - description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n 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." - type: string - windowsOptions: - description: 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. Note that this field cannot be set when spec.os.name is linux. - type: object - properties: - gmsaCredentialSpec: - description: 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. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: 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. - type: string - startupProbe: - description: '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' - type: object - properties: - exec: - description: Exec specifies the action to take. - type: object - properties: - command: - description: 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. - type: array - items: - type: string - failureThreshold: - description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - type: integer - format: int32 - grpc: - description: GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate. - type: object - required: - - port - properties: - port: - description: Port number of the gRPC service. Number must be in the range 1 to 65535. - type: integer - format: int32 - service: - description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). \n If this is not specified, the default behavior is defined by gRPC." - type: string - httpGet: - description: HTTPGet specifies the http request to perform. - type: object - required: - - port - properties: - host: - description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP allows repeated headers. - type: array - items: - description: HTTPHeader describes a custom header to be used in HTTP probes - type: object - required: - - name - - value - properties: - name: - description: The header field name - type: string - value: - description: The header field value - type: string - path: - description: Path to access on the HTTP server. - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. Defaults to HTTP. - type: string - initialDelaySeconds: - description: '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' - type: integer - format: int32 - periodSeconds: - description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - type: integer - format: int32 - successThreshold: - description: 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. - type: integer - format: int32 - tcpSocket: - description: TCPSocket specifies an action involving a TCP port. - type: object - required: - - port - properties: - host: - description: 'Optional: Host name to connect to, defaults to the pod IP.' - type: string - port: - description: 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. - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the 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 pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - type: integer - format: int64 - timeoutSeconds: - description: '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' - type: integer - format: int32 - stdin: - description: 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. - type: boolean - stdinOnce: - description: 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 - type: boolean - terminationMessagePath: - description: '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.' - type: string - terminationMessagePolicy: - description: 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. - type: string - tty: - description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be used by the container. - type: array - items: - description: volumeDevice describes a mapping of a raw block device within a container. - type: object - required: - - devicePath - - name - properties: - devicePath: - description: devicePath is the path inside of the container that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim in the pod - type: string - volumeMounts: - description: Pod volumes to mount into the container's filesystem. Cannot be updated. - type: array - items: - description: VolumeMount describes a mounting of a Volume within a container. - type: object - required: - - mountPath - - name - properties: - mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: 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. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: 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. - type: string - workingDir: - description: 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. - type: string - nodeName: - description: NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. - type: string - nodeSelector: - description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' - type: object - additionalProperties: - type: string - x-kubernetes-map-type: atomic - os: - description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set. \n If the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions \n If the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is a beta field and requires the IdentifyPodOS feature" - type: object - required: - - name - properties: - name: - description: 'Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null' - type: string - overhead: - description: 'Overhead represents the resource overhead associated with running a 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/688-pod-overhead/README.md' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - preemptionPolicy: - description: PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. - type: string - priority: - description: The priority value. Various system components use this field to find the priority of the 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. - type: integer - format: int32 - priorityClassName: - description: If specified, indicates the 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 pod priority will be default or zero if there is no default. - type: string - readinessGates: - description: 'If specified, all readiness gates will be evaluated for pod readiness. A 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/580-pod-readiness-gates' - type: array - items: - description: PodReadinessGate contains the reference to a pod condition - type: object - required: - - conditionType - properties: - conditionType: - description: ConditionType refers to a condition in the pod's condition list with matching type. - type: string - restartPolicy: - description: 'Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' - type: string - runtimeClassName: - description: 'RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the 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/585-runtime-class' - type: string - schedulerName: - description: If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - type: string - securityContext: - description: 'SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.' - type: object - properties: - fsGroup: - description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: \n 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---- \n If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows." - type: integer - format: int64 - fsGroupChangePolicy: - description: '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. Note that this field cannot be set when spec.os.name is windows.' - type: string - runAsGroup: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - runAsNonRoot: - description: 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. - type: boolean - runAsUser: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: integer - format: int64 - seLinuxOptions: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: object - properties: - level: - description: Level is SELinux level label that applies to the container. - type: string - role: - description: Role is a SELinux role label that applies to the container. - type: string - type: - description: Type is a SELinux type label that applies to the container. - type: string - user: - description: User is a SELinux user label that applies to the container. - type: string - seccompProfile: - description: The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. - type: object - required: - - type - properties: - localhostProfile: - description: 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". - type: string - type: - description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n 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." - type: string - supplementalGroups: - description: 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. Note that this field cannot be set when spec.os.name is windows. - type: array - items: - type: integer - format: int64 - sysctls: - description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows. - type: array - items: - description: Sysctl defines a kernel parameter to be set - type: object - required: - - name - - value - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - windowsOptions: - description: 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. Note that this field cannot be set when spec.os.name is linux. - type: object - properties: - gmsaCredentialSpec: - description: 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. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: 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. - type: string - serviceAccount: - description: 'DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.' - type: string - serviceAccountName: - description: 'ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' - type: string - setHostnameAsFQDN: - description: If true the pod's hostname will be configured as the 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 pod does not have FQDN, this has no effect. Default to false. - type: boolean - shareProcessNamespace: - description: 'Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same 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.' - type: boolean - subdomain: - description: If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - type: string - terminationGracePeriodSeconds: - description: Optional duration in seconds the 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 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. - type: integer - format: int64 - tolerations: - description: If specified, the pod's tolerations. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: 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. - type: string - operator: - description: 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 pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: 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. - type: integer - format: int64 - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - topologySpreadConstraints: - description: 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. - type: array - items: - description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. - type: object - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - properties: - labelSelector: - description: 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. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - maxSkew: - description: '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. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming 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.' - type: integer - format: int32 - minDomains: - description: "MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. \n This is an alpha field and requires enabling MinDomainsInPodTopologySpread feature gate." - type: integer - format: int32 - topologyKey: - description: 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. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes match the node selector. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field. - type: string - whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a 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 pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that 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 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.' - type: string - x-kubernetes-list-map-keys: - - topologyKey - - whenUnsatisfiable - x-kubernetes-list-type: map - volumes: - description: 'List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' - type: array - items: - description: Volume represents a named volume in a pod that may be accessed by any container in the pod. - type: object - required: - - name - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: object - required: - - volumeID - properties: - fsType: - description: 'fsType is the 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' - type: string - partition: - description: 'partition is 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).' - type: integer - format: int32 - readOnly: - description: 'readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - azureDisk: - description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - type: object - required: - - diskName - - diskURI - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob storage - type: string - fsType: - description: fsType is 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. - type: string - kind: - description: 'kind expected values are 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' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - azureFile: - description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. - type: object - required: - - secretName - - shareName - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - cephfs: - description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime - type: object - required: - - monitors - properties: - monitors: - description: 'monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: array - items: - type: string - path: - description: 'path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is 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' - type: boolean - secretFile: - description: 'secretFile is 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' - type: string - secretRef: - description: 'secretRef is 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' - type: object - properties: - name: - description: '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?' - type: string - user: - description: 'user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - cinder: - description: 'cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: object - required: - - volumeID - properties: - fsType: - description: 'fsType is the 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' - type: string - readOnly: - description: 'readOnly 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' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.' - type: object - properties: - name: - description: '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?' - type: string - volumeID: - description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - configMap: - description: configMap represents a configMap that should populate this volume - type: object - properties: - defaultMode: - description: 'defaultMode is 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.' - type: integer - format: int32 - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - name: - description: '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?' - type: string - optional: - description: optional specify whether the ConfigMap or its keys must be defined - type: boolean - csi: - description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). - type: object - required: - - driver - properties: - driver: - description: 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. - type: string - fsType: - description: fsType 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. - type: string - nodePublishSecretRef: - description: 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. - type: object - properties: - name: - description: '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?' - type: string - readOnly: - description: readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - description: volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - type: object - additionalProperties: - type: string - downwardAPI: - description: downwardAPI represents downward API about the pod that should populate this volume - type: object - properties: - defaultMode: - description: '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.' - type: integer - format: int32 - items: - description: Items is a list of downward API volume file - type: array - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - type: object - required: - - path - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - mode: - description: '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.' - type: integer - format: int32 - path: - description: '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 ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - emptyDir: - description: 'emptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: object - properties: - medium: - description: 'medium represents 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' - type: string - sizeLimit: - description: 'sizeLimit is the 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 pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - ephemeral: - description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the 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). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n 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. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." - type: object - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." - type: object - required: - - spec - properties: - metadata: - description: 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. - type: object - spec: - description: 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. - type: object - properties: - accessModes: - description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - type: array - items: - type: string - dataSource: - description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) 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. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - type: object - required: - - kind - - name - properties: - apiGroup: - description: 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. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - dataSourceRef: - description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - type: object - required: - - kind - - name - properties: - apiGroup: - description: 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. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - resources: - description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - type: object - properties: - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - description: '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/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - selector: - description: selector is a label query over volumes to consider for binding. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - storageClassName: - description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume backing this claim. - type: string - fc: - description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - type: object - properties: - fsType: - description: 'fsType is the 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' - type: string - lun: - description: 'lun is Optional: FC target lun number' - type: integer - format: int32 - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide names (WWNs)' - type: array - items: - type: string - wwids: - description: 'wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' - type: array - items: - type: string - flexVolume: - description: flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - type: object - required: - - driver - properties: - driver: - description: driver is the name of the driver to use for this volume. - type: string - fsType: - description: fsType is the 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. - type: string - options: - description: 'options is Optional: this field holds extra command options if any.' - type: object - additionalProperties: - type: string - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is 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.' - type: object - properties: - name: - description: '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?' - type: string - flocker: - description: flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - type: object - properties: - datasetName: - description: datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset - type: string - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: object - required: - - pdName - properties: - fsType: - description: 'fsType is 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' - type: string - partition: - description: 'partition is 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' - type: integer - format: int32 - pdName: - description: 'pdName is 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' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - gitRepo: - description: '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.' - type: object - required: - - repository - properties: - directory: - description: directory is the 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. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified revision. - type: string - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - type: object - required: - - endpoints - - path - properties: - endpoints: - description: 'endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: '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' - type: boolean - hostPath: - description: '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.' - type: object - required: - - path - properties: - path: - description: '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' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - type: object - required: - - iqn - - lun - - targetPortal - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the 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' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - type: integer - format: int32 - portals: - description: portals is the 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). - type: array - items: - type: string - readOnly: - description: readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target and initiator authentication - type: object - properties: - name: - description: '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?' - type: string - targetPortal: - description: targetPortal is 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). - type: string - name: - description: 'name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: object - required: - - path - - server - properties: - path: - description: 'path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: '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' - type: boolean - server: - description: 'server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: object - required: - - claimName - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in VolumeMounts. Default false. - type: boolean - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - type: object - required: - - pdID - properties: - fsType: - description: fsType is the 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. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller persistent disk - type: string - portworxVolume: - description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine - type: object - required: - - volumeID - properties: - fsType: - description: 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. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - projected: - description: projected items for all in one resources secrets, configmaps, and downward API - type: object - properties: - defaultMode: - description: defaultMode are the 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. - type: integer - format: int32 - sources: - description: sources is the list of volume projections - type: array - items: - description: Projection that may be projected along with other supported volume types - type: object - properties: - configMap: - description: configMap information about the configMap data to project - type: object - properties: - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - name: - description: '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?' - type: string - optional: - description: optional specify whether the ConfigMap or its keys must be defined - type: boolean - downwardAPI: - description: downwardAPI information about the downwardAPI data to project - type: object - properties: - items: - description: Items is a list of DownwardAPIVolume file - type: array - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - type: object - required: - - path - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - mode: - description: '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.' - type: integer - format: int32 - path: - description: '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 ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - secret: - description: secret information about the secret data to project - type: object - properties: - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - name: - description: '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?' - type: string - optional: - description: optional field specify whether the Secret or its key must be defined - type: boolean - serviceAccountToken: - description: serviceAccountToken is information about the serviceAccountToken data to project - type: object - required: - - path - properties: - audience: - description: 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. - type: string - expirationSeconds: - description: 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. - type: integer - format: int64 - path: - description: path is the path relative to the mount point of the file to project the token into. - type: string - quobyte: - description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime - type: object - required: - - registry - - volume - properties: - group: - description: group to map volume access to Default is no group - type: string - readOnly: - description: readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - type: boolean - registry: - description: 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 - type: string - tenant: - description: tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references an already created Quobyte volume by name. - type: string - rbd: - description: 'rbd represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - type: object - required: - - image - - monitors - properties: - fsType: - description: 'fsType is the 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' - type: string - image: - description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: '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' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: array - items: - type: string - pool: - description: 'pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: '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' - type: boolean - secretRef: - description: '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' - type: object - properties: - name: - description: '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?' - type: string - user: - description: 'user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - scaleIO: - description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - type: object - required: - - gateway - - secretRef - - system - properties: - fsType: - description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - type: object - properties: - name: - description: '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?' - type: string - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated with the protection domain. - type: string - system: - description: system is the name of the storage system as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. - type: string - secret: - description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: object - properties: - defaultMode: - description: 'defaultMode is 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.' - type: integer - format: int32 - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - optional: - description: optional field specify whether the Secret or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - storageos: - description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - type: object - properties: - fsType: - description: fsType is the 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. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - type: object - properties: - name: - description: '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?' - type: string - volumeName: - description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - type: string - volumeNamespace: - description: 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. - type: string - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - type: object - required: - - volumePath - properties: - fsType: - description: fsType is 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. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere volume vmdk - type: string - permissions: - type: array - items: - description: StrategyDeploymentPermissions describe the rbac rules and service account needed by the install strategy - type: object - required: - - rules - - serviceAccountName - properties: - rules: - type: array - items: - description: PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. - type: object - required: - - verbs - properties: - apiGroups: - description: APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. - type: array - items: - type: string - nonResourceURLs: - description: NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. - type: array - items: - type: string - resourceNames: - description: ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - type: array - items: - type: string - resources: - description: Resources is a list of resources this rule applies to. '*' represents all resources. - type: array - items: - type: string - verbs: - description: Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs. - type: array - items: - type: string - serviceAccountName: - type: string - strategy: - type: string - installModes: - description: InstallModes specify supported installation types - type: array - items: - description: InstallMode associates an InstallModeType with a flag representing if the CSV supports it - type: object - required: - - supported - - type - properties: - supported: - type: boolean - type: - description: InstallModeType is a supported type of install mode for CSV installation - type: string - keywords: - type: array - items: - type: string - labels: - description: Map of string keys and values that can be used to organize and categorize (scope and select) objects. - type: object - additionalProperties: - type: string - links: - type: array - items: - type: object - properties: - name: - type: string - url: - type: string - maintainers: - type: array - items: - type: object - properties: - email: - type: string - name: - type: string - maturity: - type: string - minKubeVersion: - type: string - nativeAPIs: - type: array - items: - description: GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling - type: object - required: - - group - - kind - - version - properties: - group: - type: string - kind: - type: string - version: - type: string - provider: - type: object - properties: - name: - type: string - url: - type: string - relatedImages: - description: List any related images, or other container images that your Operator might require to perform their functions. This list should also include operand images as well. All image references should be specified by digest (SHA) and not by tag. This field is only used during catalog creation and plays no part in cluster runtime. - type: array - items: - type: object - required: - - image - - name - properties: - image: - type: string - name: - type: string - replaces: - description: The name of a CSV this one replaces. Should match the `metadata.Name` field of the old CSV. - type: string - selector: - description: Label selector for related resources. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - skips: - description: The name(s) of one or more CSV(s) that should be skipped in the upgrade graph. Should match the `metadata.Name` field of the CSV that should be skipped. This field is only used during catalog creation and plays no part in cluster runtime. - type: array - items: - type: string - version: - type: string - webhookdefinitions: - type: array - items: - description: WebhookDescription provides details to OLM about required webhooks - type: object - required: - - admissionReviewVersions - - generateName - - sideEffects - - type - properties: - admissionReviewVersions: - type: array - items: - type: string - containerPort: - type: integer - format: int32 - default: 443 - maximum: 65535 - minimum: 1 - conversionCRDs: - type: array - items: - type: string - deploymentName: - type: string - failurePolicy: - description: FailurePolicyType specifies a failure policy that defines how unrecognized errors from the admission endpoint are handled. - type: string - generateName: - type: string - matchPolicy: - description: MatchPolicyType specifies the type of match policy. - type: string - objectSelector: - description: 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. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - reinvocationPolicy: - description: ReinvocationPolicyType specifies what type of policy the admission hook uses. - type: string - rules: - type: array - items: - description: RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. - type: object - properties: - apiGroups: - description: APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - type: array - items: - type: string - apiVersions: - description: APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. - type: array - items: - type: string - operations: - description: Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. - type: array - items: - description: OperationType specifies an operation for a request. - type: string - resources: - description: "Resources is a list of resources this rule applies to. \n For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources. \n If wildcard is present, the validation rule will ensure resources do not overlap with each other. \n Depending on the enclosing object, subresources might not be allowed. Required." - type: array - items: - type: string - scope: - description: scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - type: string - sideEffects: - description: SideEffectClass specifies the types of side effects a webhook may have. - type: string - targetPort: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - timeoutSeconds: - type: integer - format: int32 - type: - description: WebhookAdmissionType is the type of admission webhooks supported by OLM - type: string - enum: - - ValidatingAdmissionWebhook - - MutatingAdmissionWebhook - - ConversionWebhook - webhookPath: - type: string - status: - description: ClusterServiceVersionStatus represents information about the status of a CSV. Status may trail the actual state of a system. - type: object - properties: - certsLastUpdated: - description: Last time the owned APIService certs were updated - type: string - format: date-time - certsRotateAt: - description: Time the owned APIService certs will rotate next - type: string - format: date-time - cleanup: - description: CleanupStatus represents information about the status of cleanup while a CSV is pending deletion - type: object - properties: - pendingDeletion: - description: PendingDeletion is the list of custom resource objects that are pending deletion and blocked on finalizers. This indicates the progress of cleanup that is blocking CSV deletion or operator uninstall. - type: array - items: - description: ResourceList represents a list of resources which are of the same Group/Kind - type: object - required: - - group - - instances - - kind - properties: - group: - type: string - instances: - type: array - items: - type: object - required: - - name - properties: - name: - type: string - namespace: - description: Namespace can be empty for cluster-scoped resources - type: string - kind: - type: string - conditions: - description: List of conditions, a history of state transitions - type: array - items: - description: Conditions appear in the status as a record of state transitions on the ClusterServiceVersion - type: object - properties: - lastTransitionTime: - description: Last time the status transitioned from one status to another. - type: string - format: date-time - lastUpdateTime: - description: Last time we updated the status - type: string - format: date-time - message: - description: A human readable message indicating details about why the ClusterServiceVersion is in this condition. - type: string - phase: - description: Condition of the ClusterServiceVersion - type: string - reason: - description: A brief CamelCase message indicating details about why the ClusterServiceVersion is in this state. e.g. 'RequirementsNotMet' - type: string - lastTransitionTime: - description: Last time the status transitioned from one status to another. - type: string - format: date-time - lastUpdateTime: - description: Last time we updated the status - type: string - format: date-time - message: - description: A human readable message indicating details about why the ClusterServiceVersion is in this condition. - type: string - phase: - description: Current condition of the ClusterServiceVersion - type: string - reason: - description: A brief CamelCase message indicating details about why the ClusterServiceVersion is in this state. e.g. 'RequirementsNotMet' - type: string - requirementStatus: - description: The status of each requirement for this CSV - type: array - items: - type: object - required: - - group - - kind - - message - - name - - status - - version - properties: - dependents: - type: array - items: - description: DependentStatus is the status for a dependent requirement (to prevent infinite nesting) - type: object - required: - - group - - kind - - status - - version - properties: - group: - type: string - kind: - type: string - message: - type: string - status: - description: StatusReason is a camelcased reason for the status of a RequirementStatus or DependentStatus - type: string - uuid: - type: string - version: - type: string - group: - type: string - kind: - type: string - message: - type: string - name: - type: string - status: - description: StatusReason is a camelcased reason for the status of a RequirementStatus or DependentStatus - type: string - uuid: - type: string - version: - type: string - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: installplans.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: InstallPlan - listKind: InstallPlanList - plural: installplans - shortNames: - - ip - singular: installplan - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: The first CSV in the list of clusterServiceVersionNames - jsonPath: .spec.clusterServiceVersionNames[0] - name: CSV - type: string - - description: The approval mode - jsonPath: .spec.approval - name: Approval - type: string - - jsonPath: .spec.approved - name: Approved - type: boolean - name: v1alpha1 - schema: - openAPIV3Schema: - description: InstallPlan defines the installation of a set of operators. - type: object - required: - - metadata - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: InstallPlanSpec defines a set of Application resources to be installed - type: object - required: - - approval - - approved - - clusterServiceVersionNames - properties: - approval: - description: Approval is the user approval policy for an InstallPlan. It must be one of "Automatic" or "Manual". - type: string - approved: - type: boolean - clusterServiceVersionNames: - type: array - items: - type: string - generation: - type: integer - source: - type: string - sourceNamespace: - type: string - status: - description: "InstallPlanStatus represents the information about the status of steps required to complete installation. \n Status may trail the actual state of a system." - type: object - required: - - catalogSources - - phase - properties: - attenuatedServiceAccountRef: - description: AttenuatedServiceAccountRef references the service account that is used to do scoped operator install. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - bundleLookups: - description: BundleLookups is the set of in-progress requests to pull and unpackage bundle content to the cluster. - type: array - items: - description: BundleLookup is a request to pull and unpackage the content of a bundle to the cluster. - type: object - required: - - catalogSourceRef - - identifier - - path - - replaces - properties: - catalogSourceRef: - description: CatalogSourceRef is a reference to the CatalogSource the bundle path was resolved from. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - conditions: - description: Conditions represents the overall state of a BundleLookup. - type: array - items: - type: object - required: - - status - - type - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - type: string - format: date-time - lastUpdateTime: - description: Last time the condition was probed. - type: string - format: date-time - message: - description: A human readable message indicating details about the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition. - type: string - identifier: - description: Identifier is the catalog-unique name of the operator (the name of the CSV for bundles that contain CSVs) - type: string - path: - description: Path refers to the location of a bundle to pull. It's typically an image reference. - type: string - properties: - description: The effective properties of the unpacked bundle. - type: string - replaces: - description: Replaces is the name of the bundle to replace with the one found at Path. - type: string - catalogSources: - type: array - items: - type: string - conditions: - type: array - items: - description: InstallPlanCondition represents the overall status of the execution of an InstallPlan. - type: object - properties: - lastTransitionTime: - type: string - format: date-time - lastUpdateTime: - type: string - format: date-time - message: - type: string - reason: - description: ConditionReason is a camelcased reason for the state transition. - type: string - status: - type: string - type: - description: InstallPlanConditionType describes the state of an InstallPlan at a certain point as a whole. - type: string - message: - description: Message is a human-readable message containing detailed information that may be important to understanding why the plan has its current status. - type: string - phase: - description: InstallPlanPhase is the current status of a InstallPlan as a whole. - type: string - plan: - type: array - items: - description: Step represents the status of an individual step in an InstallPlan. - type: object - required: - - resolving - - resource - - status - properties: - optional: - type: boolean - resolving: - type: string - resource: - description: StepResource represents the status of a resource to be tracked by an InstallPlan. - type: object - required: - - group - - kind - - name - - sourceName - - sourceNamespace - - version - properties: - group: - type: string - kind: - type: string - manifest: - type: string - name: - type: string - sourceName: - type: string - sourceNamespace: - type: string - version: - type: string - status: - description: StepStatus is the current status of a particular resource an in InstallPlan - type: string - startTime: - description: StartTime is the time when the controller began applying the resources listed in the plan to the cluster. - type: string - format: date-time - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: olmconfigs.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: OLMConfig - listKind: OLMConfigList - plural: olmconfigs - singular: olmconfig - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: OLMConfig is a resource responsible for configuring OLM. - type: object - required: - - metadata - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OLMConfigSpec is the spec for an OLMConfig resource. - type: object - properties: - features: - description: Features contains the list of configurable OLM features. - type: object - properties: - disableCopiedCSVs: - description: DisableCopiedCSVs is used to disable OLM's "Copied CSV" feature for operators installed at the cluster scope, where a cluster scoped operator is one that has been installed in an OperatorGroup that targets all namespaces. When reenabled, OLM will recreate the "Copied CSVs" for each cluster scoped operator. - type: boolean - status: - description: OLMConfigStatus is the status for an OLMConfig resource. - type: object - properties: - conditions: - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: operatorconditions.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: OperatorCondition - listKind: OperatorConditionList - plural: operatorconditions - shortNames: - - condition - singular: operatorcondition - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: OperatorCondition is a Custom Resource of type `OperatorCondition` which is used to convey information to OLM about the state of an operator. - type: object - required: - - metadata - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OperatorConditionSpec allows a cluster admin to convey information about the state of an operator to OLM, potentially overriding state reported by the operator. - type: object - properties: - deployments: - type: array - items: - type: string - overrides: - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - serviceAccounts: - type: array - items: - type: string - status: - description: OperatorConditionStatus allows an operator to convey information its state to OLM. The status may trail the actual state of a system. - type: object - properties: - conditions: - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - served: true - storage: false - subresources: - status: {} - - name: v2 - schema: - openAPIV3Schema: - description: OperatorCondition is a Custom Resource of type `OperatorCondition` which is used to convey information to OLM about the state of an operator. - type: object - required: - - metadata - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OperatorConditionSpec allows an operator to report state to OLM and provides cluster admin with the ability to manually override state reported by the operator. - type: object - properties: - conditions: - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - deployments: - type: array - items: - type: string - overrides: - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - serviceAccounts: - type: array - items: - type: string - status: - description: OperatorConditionStatus allows OLM to convey which conditions have been observed. - type: object - properties: - conditions: - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: operatorgroups.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: OperatorGroup - listKind: OperatorGroupList - plural: operatorgroups - shortNames: - - og - singular: operatorgroup - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: OperatorGroup is the unit of multitenancy for OLM managed operators. It constrains the installation of operators in its namespace to a specified set of target namespaces. - type: object - required: - - metadata - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OperatorGroupSpec is the spec for an OperatorGroup resource. - type: object - default: - upgradeStrategy: Default - properties: - selector: - description: Selector selects the OperatorGroup's target namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - serviceAccountName: - description: ServiceAccountName is the admin specified service account which will be used to deploy operator(s) in this operator group. - type: string - staticProvidedAPIs: - description: Static tells OLM not to update the OperatorGroup's providedAPIs annotation - type: boolean - targetNamespaces: - description: TargetNamespaces is an explicit set of namespaces to target. If it is set, Selector is ignored. - type: array - items: - type: string - x-kubernetes-list-type: set - upgradeStrategy: - description: "UpgradeStrategy defines the upgrade strategy for operators in the namespace. There are currently two supported upgrade strategies: \n Default: OLM will only allow clusterServiceVersions to move to the replacing phase from the succeeded phase. This effectively means that OLM will not allow operators to move to the next version if an installation or upgrade has failed. \n TechPreviewUnsafeFailForward: OLM will allow clusterServiceVersions to move to the replacing phase from the succeeded phase or from the failed phase. Additionally, OLM will generate new installPlans when a subscription references a failed installPlan and the catalog has been updated with a new upgrade for the existing set of operators. \n WARNING: The TechPreviewUnsafeFailForward upgrade strategy is unsafe and may result in unexpected behavior or unrecoverable data loss unless you have deep understanding of the set of operators being managed in the namespace." - type: string - default: Default - enum: - - Default - - TechPreviewUnsafeFailForward - status: - description: OperatorGroupStatus is the status for an OperatorGroupResource. - type: object - required: - - lastUpdated - properties: - conditions: - description: Conditions is an array of the OperatorGroup's conditions. - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - lastUpdated: - description: LastUpdated is a timestamp of the last time the OperatorGroup's status was Updated. - type: string - format: date-time - namespaces: - description: Namespaces is the set of target namespaces for the OperatorGroup. - type: array - items: - type: string - x-kubernetes-list-type: set - serviceAccountRef: - description: ServiceAccountRef references the service account object specified. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - served: true - storage: true - subresources: - status: {} - - name: v1alpha2 - schema: - openAPIV3Schema: - description: OperatorGroup is the unit of multitenancy for OLM managed operators. It constrains the installation of operators in its namespace to a specified set of target namespaces. - type: object - required: - - metadata - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OperatorGroupSpec is the spec for an OperatorGroup resource. - type: object - properties: - selector: - description: Selector selects the OperatorGroup's target namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - serviceAccountName: - description: ServiceAccountName is the admin specified service account which will be used to deploy operator(s) in this operator group. - type: string - staticProvidedAPIs: - description: Static tells OLM not to update the OperatorGroup's providedAPIs annotation - type: boolean - targetNamespaces: - description: TargetNamespaces is an explicit set of namespaces to target. If it is set, Selector is ignored. - type: array - items: - type: string - status: - description: OperatorGroupStatus is the status for an OperatorGroupResource. - type: object - required: - - lastUpdated - properties: - lastUpdated: - description: LastUpdated is a timestamp of the last time the OperatorGroup's status was Updated. - type: string - format: date-time - namespaces: - description: Namespaces is the set of target namespaces for the OperatorGroup. - type: array - items: - type: string - serviceAccountRef: - description: ServiceAccountRef references the service account object specified. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - served: true - storage: false - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: operators.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: Operator - listKind: OperatorList - plural: operators - singular: operator - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: Operator represents a cluster operator. - type: object - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OperatorSpec defines the desired state of Operator - type: object - status: - description: OperatorStatus defines the observed state of an Operator and its components - type: object - properties: - components: - description: Components describes resources that compose the operator. - type: object - required: - - labelSelector - properties: - labelSelector: - description: LabelSelector is a label query over a set of resources used to select the operator's components - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - refs: - description: Refs are a set of references to the operator's component resources, selected with LabelSelector. - type: array - items: - description: RichReference is a reference to a resource, enriched with its status conditions. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - conditions: - description: Conditions represents the latest state of the component. - type: array - items: - description: Condition represent the latest available observations of an component's state. - type: object - required: - - status - - type - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - type: string - format: date-time - lastUpdateTime: - description: Last time the condition was probed - type: string - format: date-time - message: - description: A human readable message indicating details about the transition. - type: string - reason: - description: The reason for the condition's last transition. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - served: true - storage: true - subresources: - status: {} - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: subscriptions.operators.coreos.com -spec: - group: operators.coreos.com - names: - categories: - - olm - kind: Subscription - listKind: SubscriptionList - plural: subscriptions - shortNames: - - sub - - subs - singular: subscription - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: The package subscribed to - jsonPath: .spec.name - name: Package - type: string - - description: The catalog source for the specified package - jsonPath: .spec.source - name: Source - type: string - - description: The channel of updates to subscribe to - jsonPath: .spec.channel - name: Channel - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Subscription keeps operators up to date by tracking changes to Catalogs. - type: object - required: - - metadata - - spec - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: SubscriptionSpec defines an Application that can be installed - type: object - required: - - name - - source - - sourceNamespace - properties: - channel: - type: string - config: - description: SubscriptionConfig contains configuration specified for a subscription. - type: object - properties: - affinity: - description: If specified, overrides the pod's scheduling constraints. nil sub-attributes will *not* override the original values in the pod.spec for those sub-attributes. Use empty object ({}) to erase original sub-attribute values. - type: object - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the pod. - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: 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. - type: array - items: - description: 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: object - required: - - preference - - weight - properties: - preference: - description: A node selector term, associated with the corresponding weight. - type: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - weight: - description: Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. - type: object - required: - - nodeSelectorTerms - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The terms are ORed. - type: array - items: - description: 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: object - properties: - matchExpressions: - description: A list of node selector requirements by node's labels. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - matchFields: - description: A list of node selector requirements by node's fields. - type: array - items: - description: A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: The label key that the selector applies to. - type: string - operator: - description: Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: 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. - type: array - items: - type: string - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: 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. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the 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. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this 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 pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). - type: object - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: 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. - type: array - items: - description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - type: object - required: - - podAffinityTerm - - weight - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated with the corresponding weight. - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - weight: - description: weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - type: integer - format: int32 - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by this field are not met at scheduling time, the 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 pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the 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. - type: array - items: - description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this 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 pod of the set of pods is running - type: object - required: - - topologyKey - properties: - labelSelector: - description: A label query over a set of resources, in this case pods. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaceSelector: - description: 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 pod's namespace". An empty selector ({}) matches all namespaces. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - namespaces: - description: 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 pod's namespace". - type: array - items: - type: string - topologyKey: - description: This 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. - type: string - env: - description: Env is a list of environment variables to set in the container. Cannot be updated. - type: array - items: - description: EnvVar represents an environment variable present in a Container. - type: object - required: - - name - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - type: object - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - type: object - required: - - key - properties: - key: - description: The key to select. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - resourceFieldRef: - description: '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.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - type: object - required: - - key - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - envFrom: - description: EnvFrom is a 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. Immutable. - type: array - items: - description: EnvFromSource represents the source of a set of ConfigMaps - type: object - properties: - configMapRef: - description: The ConfigMap to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - type: object - properties: - name: - description: '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?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - nodeSelector: - description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' - type: object - additionalProperties: - type: string - resources: - description: 'Resources represents compute resources required by this container. Immutable. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - properties: - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - description: '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/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - selector: - description: Selector is the label selector for pods to be configured. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - tolerations: - description: Tolerations are the pod's tolerations. - type: array - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - type: object - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: 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. - type: string - operator: - description: 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 pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: 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. - type: integer - format: int64 - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - volumeMounts: - description: List of VolumeMounts to set in the container. - type: array - items: - description: VolumeMount describes a mounting of a Volume within a container. - type: object - required: - - mountPath - - name - properties: - mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: 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. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: 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. - type: string - volumes: - description: List of Volumes to set in the podSpec. - type: array - items: - description: Volume represents a named volume in a pod that may be accessed by any container in the pod. - type: object - required: - - name - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: object - required: - - volumeID - properties: - fsType: - description: 'fsType is the 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' - type: string - partition: - description: 'partition is 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).' - type: integer - format: int32 - readOnly: - description: 'readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - azureDisk: - description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - type: object - required: - - diskName - - diskURI - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob storage - type: string - fsType: - description: fsType is 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. - type: string - kind: - description: 'kind expected values are 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' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - azureFile: - description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. - type: object - required: - - secretName - - shareName - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - cephfs: - description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime - type: object - required: - - monitors - properties: - monitors: - description: 'monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: array - items: - type: string - path: - description: 'path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is 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' - type: boolean - secretFile: - description: 'secretFile is 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' - type: string - secretRef: - description: 'secretRef is 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' - type: object - properties: - name: - description: '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?' - type: string - user: - description: 'user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - cinder: - description: 'cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: object - required: - - volumeID - properties: - fsType: - description: 'fsType is the 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' - type: string - readOnly: - description: 'readOnly 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' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.' - type: object - properties: - name: - description: '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?' - type: string - volumeID: - description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - configMap: - description: configMap represents a configMap that should populate this volume - type: object - properties: - defaultMode: - description: 'defaultMode is 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.' - type: integer - format: int32 - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - name: - description: '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?' - type: string - optional: - description: optional specify whether the ConfigMap or its keys must be defined - type: boolean - csi: - description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). - type: object - required: - - driver - properties: - driver: - description: 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. - type: string - fsType: - description: fsType 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. - type: string - nodePublishSecretRef: - description: 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. - type: object - properties: - name: - description: '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?' - type: string - readOnly: - description: readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - description: volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - type: object - additionalProperties: - type: string - downwardAPI: - description: downwardAPI represents downward API about the pod that should populate this volume - type: object - properties: - defaultMode: - description: '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.' - type: integer - format: int32 - items: - description: Items is a list of downward API volume file - type: array - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - type: object - required: - - path - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - mode: - description: '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.' - type: integer - format: int32 - path: - description: '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 ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - emptyDir: - description: 'emptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: object - properties: - medium: - description: 'medium represents 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' - type: string - sizeLimit: - description: 'sizeLimit is the 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 pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - ephemeral: - description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the 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). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n 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. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." - type: object - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." - type: object - required: - - spec - properties: - metadata: - description: 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. - type: object - spec: - description: 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. - type: object - properties: - accessModes: - description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - type: array - items: - type: string - dataSource: - description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) 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. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - type: object - required: - - kind - - name - properties: - apiGroup: - description: 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. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - dataSourceRef: - description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - type: object - required: - - kind - - name - properties: - apiGroup: - description: 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. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - resources: - description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - type: object - properties: - limits: - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - requests: - description: '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/' - type: object - additionalProperties: - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - selector: - description: selector is a label query over volumes to consider for binding. - type: object - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - type: array - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - type: object - required: - - key - - operator - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: 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. - type: array - items: - type: string - matchLabels: - description: 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. - type: object - additionalProperties: - type: string - storageClassName: - description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume backing this claim. - type: string - fc: - description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - type: object - properties: - fsType: - description: 'fsType is the 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' - type: string - lun: - description: 'lun is Optional: FC target lun number' - type: integer - format: int32 - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide names (WWNs)' - type: array - items: - type: string - wwids: - description: 'wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' - type: array - items: - type: string - flexVolume: - description: flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - type: object - required: - - driver - properties: - driver: - description: driver is the name of the driver to use for this volume. - type: string - fsType: - description: fsType is the 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. - type: string - options: - description: 'options is Optional: this field holds extra command options if any.' - type: object - additionalProperties: - type: string - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is 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.' - type: object - properties: - name: - description: '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?' - type: string - flocker: - description: flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - type: object - properties: - datasetName: - description: datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset - type: string - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: object - required: - - pdName - properties: - fsType: - description: 'fsType is 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' - type: string - partition: - description: 'partition is 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' - type: integer - format: int32 - pdName: - description: 'pdName is 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' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - gitRepo: - description: '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.' - type: object - required: - - repository - properties: - directory: - description: directory is the 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. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified revision. - type: string - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - type: object - required: - - endpoints - - path - properties: - endpoints: - description: 'endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: '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' - type: boolean - hostPath: - description: '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.' - type: object - required: - - path - properties: - path: - description: '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' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - type: object - required: - - iqn - - lun - - targetPortal - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the 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' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - type: integer - format: int32 - portals: - description: portals is the 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). - type: array - items: - type: string - readOnly: - description: readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target and initiator authentication - type: object - properties: - name: - description: '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?' - type: string - targetPortal: - description: targetPortal is 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). - type: string - name: - description: 'name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: object - required: - - path - - server - properties: - path: - description: 'path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: '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' - type: boolean - server: - description: 'server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: object - required: - - claimName - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in VolumeMounts. Default false. - type: boolean - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - type: object - required: - - pdID - properties: - fsType: - description: fsType is the 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. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller persistent disk - type: string - portworxVolume: - description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine - type: object - required: - - volumeID - properties: - fsType: - description: 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. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - projected: - description: projected items for all in one resources secrets, configmaps, and downward API - type: object - properties: - defaultMode: - description: defaultMode are the 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. - type: integer - format: int32 - sources: - description: sources is the list of volume projections - type: array - items: - description: Projection that may be projected along with other supported volume types - type: object - properties: - configMap: - description: configMap information about the configMap data to project - type: object - properties: - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - name: - description: '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?' - type: string - optional: - description: optional specify whether the ConfigMap or its keys must be defined - type: boolean - downwardAPI: - description: downwardAPI information about the downwardAPI data to project - type: object - properties: - items: - description: Items is a list of DownwardAPIVolume file - type: array - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - type: object - required: - - path - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - type: object - required: - - fieldPath - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - mode: - description: '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.' - type: integer - format: int32 - path: - description: '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 ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - type: object - required: - - resource - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - secret: - description: secret information about the secret data to project - type: object - properties: - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - name: - description: '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?' - type: string - optional: - description: optional field specify whether the Secret or its key must be defined - type: boolean - serviceAccountToken: - description: serviceAccountToken is information about the serviceAccountToken data to project - type: object - required: - - path - properties: - audience: - description: 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. - type: string - expirationSeconds: - description: 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. - type: integer - format: int64 - path: - description: path is the path relative to the mount point of the file to project the token into. - type: string - quobyte: - description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime - type: object - required: - - registry - - volume - properties: - group: - description: group to map volume access to Default is no group - type: string - readOnly: - description: readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - type: boolean - registry: - description: 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 - type: string - tenant: - description: tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references an already created Quobyte volume by name. - type: string - rbd: - description: 'rbd represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - type: object - required: - - image - - monitors - properties: - fsType: - description: 'fsType is the 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' - type: string - image: - description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: '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' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: array - items: - type: string - pool: - description: 'pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: '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' - type: boolean - secretRef: - description: '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' - type: object - properties: - name: - description: '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?' - type: string - user: - description: 'user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - scaleIO: - description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - type: object - required: - - gateway - - secretRef - - system - properties: - fsType: - description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - type: object - properties: - name: - description: '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?' - type: string - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated with the protection domain. - type: string - system: - description: system is the name of the storage system as configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. - type: string - secret: - description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: object - properties: - defaultMode: - description: 'defaultMode is 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.' - type: integer - format: int32 - items: - description: items 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 '..'. - type: array - items: - description: Maps a string key to a path within a volume. - type: object - required: - - key - - path - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is 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.' - type: integer - format: int32 - path: - description: path is 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 '..'. - type: string - optional: - description: optional field specify whether the Secret or its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - storageos: - description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - type: object - properties: - fsType: - description: fsType is the 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. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - type: object - properties: - name: - description: '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?' - type: string - volumeName: - description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - type: string - volumeNamespace: - description: 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. - type: string - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - type: object - required: - - volumePath - properties: - fsType: - description: fsType is 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. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere volume vmdk - type: string - installPlanApproval: - description: Approval is the user approval policy for an InstallPlan. It must be one of "Automatic" or "Manual". - type: string - name: - type: string - source: - type: string - sourceNamespace: - type: string - startingCSV: - type: string - status: - type: object - required: - - lastUpdated - properties: - catalogHealth: - description: CatalogHealth contains the Subscription's view of its relevant CatalogSources' status. It is used to determine SubscriptionStatusConditions related to CatalogSources. - type: array - items: - description: SubscriptionCatalogHealth describes the health of a CatalogSource the Subscription knows about. - type: object - required: - - catalogSourceRef - - healthy - - lastUpdated - properties: - catalogSourceRef: - description: CatalogSourceRef is a reference to a CatalogSource. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - healthy: - description: Healthy is true if the CatalogSource is healthy; false otherwise. - type: boolean - lastUpdated: - description: LastUpdated represents the last time that the CatalogSourceHealth changed - type: string - format: date-time - conditions: - description: Conditions is a list of the latest available observations about a Subscription's current state. - type: array - items: - description: SubscriptionCondition represents the latest available observations of a Subscription's state. - type: object - required: - - status - - type - properties: - lastHeartbeatTime: - description: LastHeartbeatTime is the last time we got an update on a given condition - type: string - format: date-time - lastTransitionTime: - description: LastTransitionTime is the last time the condition transit from one status to another - type: string - format: date-time - message: - description: Message is a human-readable message indicating details about last transition. - type: string - reason: - description: Reason is a one-word CamelCase reason for the condition's last transition. - type: string - status: - description: Status is the status of the condition, one of True, False, Unknown. - type: string - type: - description: Type is the type of Subscription condition. - type: string - currentCSV: - description: CurrentCSV is the CSV the Subscription is progressing to. - type: string - installPlanGeneration: - description: InstallPlanGeneration is the current generation of the installplan - type: integer - installPlanRef: - description: InstallPlanRef is a reference to the latest InstallPlan that contains the Subscription's current CSV. - type: object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: '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 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 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.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: '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' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - installedCSV: - description: InstalledCSV is the CSV currently installed by the Subscription. - type: string - installplan: - description: 'Install is a reference to the latest InstallPlan generated for the Subscription. DEPRECATED: InstallPlanRef' - type: object - required: - - apiVersion - - kind - - name - - uuid - properties: - apiVersion: - type: string - kind: - type: string - name: - type: string - uuid: - description: UID is a type that holds unique ID values, including UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being a type captures intent and helps make sure that UIDs and names do not get conflated. - type: string - lastUpdated: - description: LastUpdated represents the last time that the Subscription status was updated. - type: string - format: date-time - reason: - description: Reason is the reason the Subscription was transitioned to its current state. - type: string - state: - description: State represents the current state of the Subscription - type: string - served: true - storage: true - subresources: - status: {} - diff --git a/managed/data/crds/olm/olm.yaml b/managed/data/crds/olm/olm.yaml deleted file mode 100644 index 4d53754d45..0000000000 --- a/managed/data/crds/olm/olm.yaml +++ /dev/null @@ -1,380 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: olm - labels: - pod-security.kubernetes.io/enforce: restricted - pod-security.kubernetes.io/enforce-version: latest ---- -apiVersion: v1 -kind: Namespace -metadata: - name: operators - labels: - pod-security.kubernetes.io/enforce: baseline - pod-security.kubernetes.io/enforce-version: latest ---- -kind: ServiceAccount -apiVersion: v1 -metadata: - name: olm-operator-serviceaccount - namespace: olm ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: system:controller:operator-lifecycle-manager -rules: -- apiGroups: ["*"] - resources: ["*"] - verbs: ["*"] -- nonResourceURLs: ["*"] - verbs: ["*"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: olm-operator-binding-olm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:controller:operator-lifecycle-manager -subjects: -- kind: ServiceAccount - name: olm-operator-serviceaccount - namespace: olm ---- -apiVersion: operators.coreos.com/v1 -kind: OLMConfig -metadata: - name: cluster ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: olm-operator - namespace: olm - labels: - app: olm-operator -spec: - strategy: - type: RollingUpdate - replicas: 1 - selector: - matchLabels: - app: olm-operator - template: - metadata: - labels: - app: olm-operator - spec: - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - serviceAccountName: olm-operator-serviceaccount - containers: - - name: olm-operator - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: [ "ALL" ] - command: - - /bin/olm - args: - - --namespace - - $(OPERATOR_NAMESPACE) - - --writeStatusName - - "" - image: quay.io/operator-framework/olm@sha256:2b4fee73c05069d9d2c537c7d3072241097914748abfb938b5b08c969b2f544b - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - name: metrics - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - readinessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - terminationMessagePolicy: FallbackToLogsOnError - env: - - name: OPERATOR_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: OPERATOR_NAME - value: olm-operator - resources: - requests: - cpu: 10m - memory: 160Mi - nodeSelector: - kubernetes.io/os: linux ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: catalog-operator - namespace: olm - labels: - app: catalog-operator -spec: - strategy: - type: RollingUpdate - replicas: 1 - selector: - matchLabels: - app: catalog-operator - template: - metadata: - labels: - app: catalog-operator - spec: - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - serviceAccountName: olm-operator-serviceaccount - containers: - - name: catalog-operator - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: [ "ALL" ] - command: - - /bin/catalog - args: - - '--namespace' - - olm - - --configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest - - --util-image - - quay.io/operator-framework/olm@sha256:2b4fee73c05069d9d2c537c7d3072241097914748abfb938b5b08c969b2f544b - - --set-workload-user-id=true - image: quay.io/operator-framework/olm@sha256:2b4fee73c05069d9d2c537c7d3072241097914748abfb938b5b08c969b2f544b - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - name: metrics - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - readinessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - terminationMessagePolicy: FallbackToLogsOnError - resources: - requests: - cpu: 10m - memory: 80Mi - nodeSelector: - kubernetes.io/os: linux ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: aggregate-olm-edit - labels: - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" -rules: -- apiGroups: ["operators.coreos.com"] - resources: ["subscriptions"] - verbs: ["create", "update", "patch", "delete"] -- apiGroups: ["operators.coreos.com"] - resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions"] - verbs: ["delete"] ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: aggregate-olm-view - labels: - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" - rbac.authorization.k8s.io/aggregate-to-view: "true" -rules: -- apiGroups: ["operators.coreos.com"] - resources: ["clusterserviceversions", "catalogsources", "installplans", "subscriptions", "operatorgroups"] - verbs: ["get", "list", "watch"] -- apiGroups: ["packages.operators.coreos.com"] - resources: ["packagemanifests", "packagemanifests/icon"] - verbs: ["get", "list", "watch"] ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: global-operators - namespace: operators ---- -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: olm-operators - namespace: olm -spec: - targetNamespaces: - - olm ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - name: packageserver - namespace: olm - labels: - olm.version: v0.22.0 -spec: - displayName: Package Server - description: Represents an Operator package that is available from a given CatalogSource which will resolve to a ClusterServiceVersion. - minKubeVersion: 1.11.0 - keywords: ['packagemanifests', 'olm', 'packages'] - maintainers: - - name: Red Hat - email: openshift-operators@redhat.com - provider: - name: Red Hat - links: - - name: Package Server - url: https://github.com/operator-framework/operator-lifecycle-manager/tree/master/pkg/package-server - installModes: - - type: OwnNamespace - supported: true - - type: SingleNamespace - supported: true - - type: MultiNamespace - supported: true - - type: AllNamespaces - supported: true - install: - strategy: deployment - spec: - clusterPermissions: - - serviceAccountName: olm-operator-serviceaccount - rules: - - apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create - - get - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "operators.coreos.com" - resources: - - catalogsources - verbs: - - get - - list - - watch - - apiGroups: - - "packages.operators.coreos.com" - resources: - - packagemanifests - verbs: - - get - - list - deployments: - - name: packageserver - spec: - strategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - maxSurge: 1 - replicas: 2 - selector: - matchLabels: - app: packageserver - template: - metadata: - labels: - app: packageserver - spec: - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - serviceAccountName: olm-operator-serviceaccount - nodeSelector: - kubernetes.io/os: linux - containers: - - name: packageserver - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: [ "ALL" ] - command: - - /bin/package-server - - -v=4 - - --secure-port - - "5443" - - --global-namespace - - olm - image: quay.io/operator-framework/olm@sha256:2b4fee73c05069d9d2c537c7d3072241097914748abfb938b5b08c969b2f544b - imagePullPolicy: Always - ports: - - containerPort: 5443 - livenessProbe: - httpGet: - scheme: HTTPS - path: /healthz - port: 5443 - readinessProbe: - httpGet: - scheme: HTTPS - path: /healthz - port: 5443 - terminationMessagePolicy: FallbackToLogsOnError - resources: - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - - name: tmpfs - mountPath: /tmp - volumes: - - name: tmpfs - emptyDir: {} - maturity: alpha - version: v0.22.0 - apiservicedefinitions: - owned: - - group: packages.operators.coreos.com - version: v1 - kind: PackageManifest - name: packagemanifests - displayName: PackageManifest - description: A PackageManifest is a resource generated from existing CatalogSources and their ConfigMaps - deploymentName: packageserver - containerPort: 5443 ---- -apiVersion: operators.coreos.com/v1alpha1 -kind: CatalogSource -metadata: - name: operatorhubio-catalog - namespace: olm -spec: - sourceType: grpc - image: quay.io/operatorhubio/catalog:latest - displayName: Community Operators - publisher: OperatorHub.io - updateStrategy: - registryPoll: - interval: 60m diff --git a/managed/data/crds/olm/percona-dbaas-catalog.yaml b/managed/data/crds/olm/percona-dbaas-catalog.yaml deleted file mode 100644 index cf00d4e57f..0000000000 --- a/managed/data/crds/olm/percona-dbaas-catalog.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: CatalogSource -metadata: - name: percona-dbaas-catalog - namespace: olm -spec: - displayName: Percona DBaaS Catalog - publisher: Percona - sourceType: grpc - image: docker.io/percona/dbaas-catalog:latest - updateStrategy: - registryPoll: - interval: 45m diff --git a/managed/data/crds/victoriametrics/crs/vmagent_rbac.yaml b/managed/data/crds/victoriametrics/crs/vmagent_rbac.yaml deleted file mode 100644 index 153f1442d3..0000000000 --- a/managed/data/crds/victoriametrics/crs/vmagent_rbac.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: vmagent - namespace: monitoring-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: vmagent -rules: - - apiGroups: ["","networking.k8s.io","extensions"] - resources: - - nodes - - nodes/metrics - - services - - endpoints - - endpointslices - - pods - - app - - ingresses - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: - - namespaces - - configmaps - verbs: ["get"] - - nonResourceURLs: ["/metrics","/metrics/resources"] - verbs: ["get"] - - apiGroups: - - route.openshift.io - - image.openshift.io - resources: - - routers/metrics - - registry/metrics - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: vmagent -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: vmagent -subjects: - - kind: ServiceAccount - name: vmagent - namespace: monitoring-system ---- diff --git a/managed/data/crds/victoriametrics/crs/vmnodescrape.yaml b/managed/data/crds/victoriametrics/crs/vmnodescrape.yaml deleted file mode 100644 index 44b35909f2..0000000000 --- a/managed/data/crds/victoriametrics/crs/vmnodescrape.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: operator.victoriametrics.com/v1beta1 -kind: VMNodeScrape -metadata: - name: pmm-vm-cadvisor-metrics -spec: - scheme: "https" - interval: "10s" - honorLabels: true - scrapeTimeout: "2s" - selector: {} - tlsConfig: - insecureSkipVerify: true - caFile: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" - bearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token" - relabelConfigs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - targetLabel: __address__ - replacement: kubernetes.default.svc:443 - - sourceLabels: [__meta_kubernetes_node_name] - regex: (.+) - targetLabel: __metrics_path__ - replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor - metricRelabelConfigs: - - source_labels: - - namespace - - pod - target_label: node_name - regex: (.+);(.+) - replacement: $1-$2 diff --git a/managed/data/crds/victoriametrics/crs/vmpodscrape.yaml b/managed/data/crds/victoriametrics/crs/vmpodscrape.yaml deleted file mode 100644 index 64b0799495..0000000000 --- a/managed/data/crds/victoriametrics/crs/vmpodscrape.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: operator.victoriametrics.com/v1beta1 -kind: VMPodScrape -metadata: - name: pmm-vm-pod-scrape -spec: - podMetricsEndpoints: - - port: metrics - scheme: http - selector: - matchLabels: - monitored-by: vm-operator diff --git a/managed/data/crds/victoriametrics/kube-state-metrics/cluster-role-binding.yaml b/managed/data/crds/victoriametrics/kube-state-metrics/cluster-role-binding.yaml deleted file mode 100644 index d0ca0ba5eb..0000000000 --- a/managed/data/crds/victoriametrics/kube-state-metrics/cluster-role-binding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.5.0 - name: kube-state-metrics -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kube-state-metrics -subjects: -- kind: ServiceAccount - name: kube-state-metrics - namespace: default diff --git a/managed/data/crds/victoriametrics/kube-state-metrics/cluster-role.yaml b/managed/data/crds/victoriametrics/kube-state-metrics/cluster-role.yaml deleted file mode 100644 index 7992529ac7..0000000000 --- a/managed/data/crds/victoriametrics/kube-state-metrics/cluster-role.yaml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.5.0 - name: kube-state-metrics -rules: -- apiGroups: - - "" - resources: - - configmaps - - secrets - - nodes - - pods - - services - - resourcequotas - - replicationcontrollers - - limitranges - - persistentvolumeclaims - - persistentvolumes - - namespaces - - endpoints - verbs: - - list - - watch -- apiGroups: - - apps - resources: - - statefulsets - - daemonsets - - deployments - - replicasets - verbs: - - list - - watch -- apiGroups: - - batch - resources: - - cronjobs - - jobs - verbs: - - list - - watch -- apiGroups: - - autoscaling - resources: - - horizontalpodautoscalers - verbs: - - list - - watch -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create -- apiGroups: - - policy - resources: - - poddisruptionbudgets - verbs: - - list - - watch -- apiGroups: - - certificates.k8s.io - resources: - - certificatesigningrequests - verbs: - - list - - watch -- apiGroups: - - storage.k8s.io - resources: - - storageclasses - - volumeattachments - verbs: - - list - - watch -- apiGroups: - - admissionregistration.k8s.io - resources: - - mutatingwebhookconfigurations - - validatingwebhookconfigurations - verbs: - - list - - watch -- apiGroups: - - networking.k8s.io - resources: - - networkpolicies - - ingresses - verbs: - - list - - watch -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - list - - watch diff --git a/managed/data/crds/victoriametrics/kube-state-metrics/deployment.yaml b/managed/data/crds/victoriametrics/kube-state-metrics/deployment.yaml deleted file mode 100644 index 6baaf7afeb..0000000000 --- a/managed/data/crds/victoriametrics/kube-state-metrics/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.5.0 - name: kube-state-metrics - namespace: default -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: kube-state-metrics - template: - metadata: - labels: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.5.0 - spec: - automountServiceAccountToken: true - containers: - - image: k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.5.0 - livenessProbe: - httpGet: - path: /healthz - port: 8080 - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: kube-state-metrics - ports: - - containerPort: 8080 - name: http-metrics - - containerPort: 8081 - name: telemetry - readinessProbe: - httpGet: - path: / - port: 8081 - initialDelaySeconds: 5 - timeoutSeconds: 5 - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - runAsUser: 65534 - nodeSelector: - kubernetes.io/os: linux - serviceAccountName: kube-state-metrics diff --git a/managed/data/crds/victoriametrics/kube-state-metrics/service-account.yaml b/managed/data/crds/victoriametrics/kube-state-metrics/service-account.yaml deleted file mode 100644 index b384429a16..0000000000 --- a/managed/data/crds/victoriametrics/kube-state-metrics/service-account.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -automountServiceAccountToken: false -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.5.0 - name: kube-state-metrics - namespace: default diff --git a/managed/data/crds/victoriametrics/kube-state-metrics/service.yaml b/managed/data/crds/victoriametrics/kube-state-metrics/service.yaml deleted file mode 100644 index ea3deef654..0000000000 --- a/managed/data/crds/victoriametrics/kube-state-metrics/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: kube-state-metrics - app.kubernetes.io/version: 2.5.0 - name: kube-state-metrics - namespace: default -spec: - clusterIP: None - ports: - - name: http-metrics - port: 8080 - targetPort: http-metrics - - name: telemetry - port: 8081 - targetPort: telemetry - selector: - app.kubernetes.io/name: kube-state-metrics diff --git a/managed/data/gen.go b/managed/data/gen.go index 4e01fb7a53..248b9ce466 100644 --- a/managed/data/gen.go +++ b/managed/data/gen.go @@ -22,6 +22,3 @@ import "embed" // //go:embed iatemplates/* var IATemplates embed.FS - -//go:embed crds/* -var OLMCRDs embed.FS diff --git a/managed/models/database.go b/managed/models/database.go index 4897a7d3cb..e88a23d2eb 100644 --- a/managed/models/database.go +++ b/managed/models/database.go @@ -862,7 +862,7 @@ var databaseSchema = [][]string{ `CREATE TABLE onboarding_system_tips ( id INTEGER PRIMARY KEY, is_completed BOOLEAN NOT NULL, - + created_at TIMESTAMP NOT NULL, updated_at TIMESTAMP NOT NULL ); @@ -873,13 +873,13 @@ var databaseSchema = [][]string{ (1, false, current_timestamp, current_timestamp), (2, false, current_timestamp, current_timestamp), (3, false, current_timestamp, current_timestamp); - + CREATE TABLE onboarding_user_tips ( id SERIAL PRIMARY KEY, tip_id INTEGER NOT NULL, user_id INTEGER NOT NULL, is_completed BOOLEAN NOT NULL, - + created_at TIMESTAMP NOT NULL, updated_at TIMESTAMP NOT NULL, UNIQUE (user_id, tip_id) @@ -900,7 +900,7 @@ var databaseSchema = [][]string{ ADD COLUMN folder VARCHAR NOT NULL DEFAULT '', ADD COLUMN metadata_list JSONB; - UPDATE scheduled_tasks + UPDATE scheduled_tasks SET data = jsonb_set(data, '{mongodb_backup, folder}', data->'mongodb_backup'->'name') WHERE type = 'mongodb_backup';`, }, @@ -909,12 +909,15 @@ var databaseSchema = [][]string{ `DROP TABLE IF EXISTS onboarding_user_tips`, }, 84: { - `ALTER TABLE agents + `ALTER TABLE agents ADD COLUMN comments_parsing_disabled BOOLEAN NOT NULL DEFAULT TRUE`, `ALTER TABLE agents ALTER COLUMN comments_parsing_disabled DROP DEFAULT`, }, + 85: { + `DROP TABLE kubernetes_clusters`, + }, } // ^^^ Avoid default values in schema definition. ^^^ diff --git a/managed/models/kubernetes_models.go b/managed/models/kubernetes_models.go deleted file mode 100644 index 1fa98726f4..0000000000 --- a/managed/models/kubernetes_models.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package models - -import ( - "database/sql/driver" - "time" - - "gopkg.in/reform.v1" -) - -//go:generate ../../bin/reform - -// Component stores info about DBaaS Component -type Component struct { - DisabledVersions []string - DefaultVersion string -} - -// Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c Component) Value() (driver.Value, error) { return jsonValue(c) } - -// Scan implements database/sql.Scanner interface. Should be defined on the pointer. -func (c *Component) Scan(src interface{}) error { return jsonScan(c, src) } - -// KubernetesCluster represents a Kubernetes cluster as stored in database. -// -//reform:kubernetes_clusters -type KubernetesCluster struct { - ID string `reform:"id,pk"` - KubernetesClusterName string `reform:"kubernetes_cluster_name"` - KubeConfig string `reform:"kube_config"` - IsReady bool `reform:"ready"` - PXC *Component `reform:"pxc"` - ProxySQL *Component `reform:"proxysql"` - HAProxy *Component `reform:"haproxy"` - Mongod *Component `reform:"mongod"` - CreatedAt time.Time `reform:"created_at"` - UpdatedAt time.Time `reform:"updated_at"` -} - -// BeforeInsert implements reform.BeforeInserter interface. -func (s *KubernetesCluster) BeforeInsert() error { - now := Now() - s.CreatedAt = now - s.UpdatedAt = now - - return nil -} - -// BeforeUpdate implements reform.BeforeUpdater interface. -func (s *KubernetesCluster) BeforeUpdate() error { - s.UpdatedAt = Now() - - return nil -} - -// AfterFind implements reform.AfterFinder interface. -func (s *KubernetesCluster) AfterFind() error { - s.CreatedAt = s.CreatedAt.UTC() - s.UpdatedAt = s.UpdatedAt.UTC() - - return nil -} - -// check interfaces. -var ( - _ reform.BeforeInserter = (*KubernetesCluster)(nil) - _ reform.BeforeUpdater = (*KubernetesCluster)(nil) - _ reform.AfterFinder = (*KubernetesCluster)(nil) -) diff --git a/managed/models/kubernetes_models_reform.go b/managed/models/kubernetes_models_reform.go deleted file mode 100644 index 1bd2337d39..0000000000 --- a/managed/models/kubernetes_models_reform.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by gopkg.in/reform.v1. DO NOT EDIT. - -package models - -import ( - "fmt" - "strings" - - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/parse" -) - -type kubernetesClusterTableType struct { - s parse.StructInfo - z []interface{} -} - -// Schema returns a schema name in SQL database (""). -func (v *kubernetesClusterTableType) Schema() string { - return v.s.SQLSchema -} - -// Name returns a view or table name in SQL database ("kubernetes_clusters"). -func (v *kubernetesClusterTableType) Name() string { - return v.s.SQLName -} - -// Columns returns a new slice of column names for that view or table in SQL database. -func (v *kubernetesClusterTableType) Columns() []string { - return []string{ - "id", - "kubernetes_cluster_name", - "kube_config", - "ready", - "pxc", - "proxysql", - "haproxy", - "mongod", - "created_at", - "updated_at", - } -} - -// NewStruct makes a new struct for that view or table. -func (v *kubernetesClusterTableType) NewStruct() reform.Struct { - return new(KubernetesCluster) -} - -// NewRecord makes a new record for that table. -func (v *kubernetesClusterTableType) NewRecord() reform.Record { - return new(KubernetesCluster) -} - -// PKColumnIndex returns an index of primary key column for that table in SQL database. -func (v *kubernetesClusterTableType) PKColumnIndex() uint { - return uint(v.s.PKFieldIndex) -} - -// KubernetesClusterTable represents kubernetes_clusters view or table in SQL database. -var KubernetesClusterTable = &kubernetesClusterTableType{ - s: parse.StructInfo{ - Type: "KubernetesCluster", - SQLName: "kubernetes_clusters", - Fields: []parse.FieldInfo{ - {Name: "ID", Type: "string", Column: "id"}, - {Name: "KubernetesClusterName", Type: "string", Column: "kubernetes_cluster_name"}, - {Name: "KubeConfig", Type: "string", Column: "kube_config"}, - {Name: "IsReady", Type: "bool", Column: "ready"}, - {Name: "PXC", Type: "*Component", Column: "pxc"}, - {Name: "ProxySQL", Type: "*Component", Column: "proxysql"}, - {Name: "HAProxy", Type: "*Component", Column: "haproxy"}, - {Name: "Mongod", Type: "*Component", Column: "mongod"}, - {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, - {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}, - }, - PKFieldIndex: 0, - }, - z: new(KubernetesCluster).Values(), -} - -// String returns a string representation of this struct or record. -func (s KubernetesCluster) String() string { - res := make([]string, 10) - res[0] = "ID: " + reform.Inspect(s.ID, true) - res[1] = "KubernetesClusterName: " + reform.Inspect(s.KubernetesClusterName, true) - res[2] = "KubeConfig: " + reform.Inspect(s.KubeConfig, true) - res[3] = "IsReady: " + reform.Inspect(s.IsReady, true) - res[4] = "PXC: " + reform.Inspect(s.PXC, true) - res[5] = "ProxySQL: " + reform.Inspect(s.ProxySQL, true) - res[6] = "HAProxy: " + reform.Inspect(s.HAProxy, true) - res[7] = "Mongod: " + reform.Inspect(s.Mongod, true) - res[8] = "CreatedAt: " + reform.Inspect(s.CreatedAt, true) - res[9] = "UpdatedAt: " + reform.Inspect(s.UpdatedAt, true) - return strings.Join(res, ", ") -} - -// Values returns a slice of struct or record field values. -// Returned interface{} values are never untyped nils. -func (s *KubernetesCluster) Values() []interface{} { - return []interface{}{ - s.ID, - s.KubernetesClusterName, - s.KubeConfig, - s.IsReady, - s.PXC, - s.ProxySQL, - s.HAProxy, - s.Mongod, - s.CreatedAt, - s.UpdatedAt, - } -} - -// Pointers returns a slice of pointers to struct or record fields. -// Returned interface{} values are never untyped nils. -func (s *KubernetesCluster) Pointers() []interface{} { - return []interface{}{ - &s.ID, - &s.KubernetesClusterName, - &s.KubeConfig, - &s.IsReady, - &s.PXC, - &s.ProxySQL, - &s.HAProxy, - &s.Mongod, - &s.CreatedAt, - &s.UpdatedAt, - } -} - -// View returns View object for that struct. -func (s *KubernetesCluster) View() reform.View { - return KubernetesClusterTable -} - -// Table returns Table object for that record. -func (s *KubernetesCluster) Table() reform.Table { - return KubernetesClusterTable -} - -// PKValue returns a value of primary key for that record. -// Returned interface{} value is never untyped nil. -func (s *KubernetesCluster) PKValue() interface{} { - return s.ID -} - -// PKPointer returns a pointer to primary key field for that record. -// Returned interface{} value is never untyped nil. -func (s *KubernetesCluster) PKPointer() interface{} { - return &s.ID -} - -// HasPK returns true if record has non-zero primary key set, false otherwise. -func (s *KubernetesCluster) HasPK() bool { - return s.ID != KubernetesClusterTable.z[KubernetesClusterTable.s.PKFieldIndex] -} - -// SetPK sets record primary key, if possible. -// -// Deprecated: prefer direct field assignment where possible: s.ID = pk. -func (s *KubernetesCluster) SetPK(pk interface{}) { - reform.SetPK(s, pk) -} - -// check interfaces -var ( - _ reform.View = KubernetesClusterTable - _ reform.Struct = (*KubernetesCluster)(nil) - _ reform.Table = KubernetesClusterTable - _ reform.Record = (*KubernetesCluster)(nil) - _ fmt.Stringer = (*KubernetesCluster)(nil) -) - -func init() { - parse.AssertUpToDate(&KubernetesClusterTable.s, new(KubernetesCluster)) -} diff --git a/managed/models/settings.go b/managed/models/settings.go index 590920bde1..3c9a8d8cf8 100644 --- a/managed/models/settings.go +++ b/managed/models/settings.go @@ -79,11 +79,6 @@ type Settings struct { SaaS SaaS `json:"sass"` // sic :( - // DBaaS config options - DBaaS struct { - Enabled bool `json:"enabled"` - } `json:"dbaas"` - Alerting Alerting `json:"alerting"` Azurediscover struct { @@ -189,7 +184,6 @@ func (s *Settings) fillDefaults() { // SSHKey is empty by default // AlertManagerURL is empty by default // SaaS.STTDisabled is false by default - // DBaaS.Enabled is false by default // Alerting.Disabled is false by default // VictoriaMetrics CacheEnable is false by default // PMMPublicAddress is empty by default diff --git a/managed/models/settings_helpers.go b/managed/models/settings_helpers.go index 8e73d73601..dd6f57217b 100644 --- a/managed/models/settings_helpers.go +++ b/managed/models/settings_helpers.go @@ -81,11 +81,6 @@ type ChangeSettingsParams struct { // STT check intervals STTCheckIntervals STTCheckIntervals - // Enable DBaaS features. - EnableDBaaS bool - // Disable DBaaS features. - DisableDBaaS bool - // Enable Azure Discover features. EnableAzurediscover bool // Disable Azure Discover features. @@ -240,14 +235,6 @@ func UpdateSettings(q reform.DBTX, params *ChangeSettingsParams) (*Settings, err settings.SaaS.DisabledSTTChecks = res } - if params.EnableDBaaS { - settings.DBaaS.Enabled = true - } - - if params.DisableDBaaS { - settings.DBaaS.Enabled = false - } - if params.DisableVMCache { settings.VictoriaMetrics.CacheEnabled = false } diff --git a/managed/packages.dot b/managed/packages.dot index b0b874749b..529737a6c2 100644 --- a/managed/packages.dot +++ b/managed/packages.dot @@ -7,13 +7,11 @@ digraph packages { "/" -> "/services/backup"; "/" -> "/services/checks"; "/" -> "/services/config"; - "/" -> "/services/dbaas"; "/" -> "/services/grafana"; "/" -> "/services/inventory"; "/" -> "/services/inventory/grpc"; "/" -> "/services/management"; "/" -> "/services/management/backup"; - "/" -> "/services/management/dbaas"; "/" -> "/services/management/grpc"; "/" -> "/services/management/ia"; "/" -> "/services/minio"; diff --git a/managed/services/dbaas/dbaas_client.go b/managed/services/dbaas/dbaas_client.go deleted file mode 100644 index 2e3ec415f6..0000000000 --- a/managed/services/dbaas/dbaas_client.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains logic related to communication with dbaas-controller. -// -//nolint:lll -package dbaas - -import ( - "context" - "sync" - "time" - - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc" - "google.golang.org/grpc/backoff" - "google.golang.org/grpc/credentials/insecure" - - "github.com/percona/pmm/managed/services/dbaas/kubernetes" - "github.com/percona/pmm/version" -) - -// Client is a client for dbaas-controller. -type Client struct { - l *logrus.Entry - kubernetesClient controllerv1beta1.KubernetesClusterAPIClient - pxcClusterClient controllerv1beta1.PXCClusterAPIClient - psmdbClusterClient controllerv1beta1.PSMDBClusterAPIClient - logsClient controllerv1beta1.LogsAPIClient - pxcOperatorClient controllerv1beta1.PXCOperatorAPIClient - psmdbOperatorClient controllerv1beta1.PSMDBOperatorAPIClient - connM sync.RWMutex - conn *grpc.ClientConn - dbaasControllerAPIAddress string -} - -// NewClient creates new Client object. -func NewClient(dbaasControllerAPIAddress string) *Client { - c := &Client{ - l: logrus.WithField("component", "dbaas.Client"), - dbaasControllerAPIAddress: dbaasControllerAPIAddress, - } - return c -} - -// Connect connects the client to dbaas-controller API. -func (c *Client) Connect(ctx context.Context) error { - c.connM.Lock() - defer c.connM.Unlock() - c.l.Infof("Connecting to dbaas-controller API on %s.", c.dbaasControllerAPIAddress) - if c.conn != nil { - c.l.Warnf("Trying to connect to dbaas-controller API but connection is already up.") - return nil - } - backoffConfig := backoff.DefaultConfig - backoffConfig.MaxDelay = 10 * time.Second - opts := []grpc.DialOption{ - grpc.WithBlock(), // Dial blocks, we do not connect in background. - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithConnectParams(grpc.ConnectParams{Backoff: backoffConfig, MinConnectTimeout: 10 * time.Second}), - grpc.WithUserAgent("pmm-managed/" + version.Version), - } - - conn, err := grpc.DialContext(ctx, c.dbaasControllerAPIAddress, opts...) - if err != nil { - return errors.Errorf("failed to connect to dbaas-controller API: %v", err) - } - c.conn = conn - - c.kubernetesClient = controllerv1beta1.NewKubernetesClusterAPIClient(conn) - c.pxcClusterClient = controllerv1beta1.NewPXCClusterAPIClient(conn) - c.psmdbClusterClient = controllerv1beta1.NewPSMDBClusterAPIClient(conn) - c.logsClient = controllerv1beta1.NewLogsAPIClient(conn) - c.psmdbOperatorClient = controllerv1beta1.NewPSMDBOperatorAPIClient(conn) - c.pxcOperatorClient = controllerv1beta1.NewPXCOperatorAPIClient(conn) - - c.l.Info("Connected to dbaas-controller API.") - return nil -} - -// Disconnect disconnects the client from dbaas-controller API. -func (c *Client) Disconnect() error { - c.connM.Lock() - defer c.connM.Unlock() - c.l.Info("Disconnecting from dbaas-controller API.") - - if c.conn == nil { - c.l.Warnf("Trying to disconnect from dbaas-controller API but the connection is not up.") - return nil - } - - if err := c.conn.Close(); err != nil { - return errors.Errorf("failed to close conn to dbaas-controller API: %v", err) - } - c.conn = nil - c.l.Info("Disconected from dbaas-controller API.") - return nil -} - -// GetLogs gets logs out of cluster containers and events out of pods. -func (c *Client) GetLogs(ctx context.Context, in *controllerv1beta1.GetLogsRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetLogsResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.logsClient.GetLogs(ctx, in, opts...) -} - -// GetResources returns all and available resources of a Kubernetes cluster. -func (c *Client) GetResources(ctx context.Context, in *controllerv1beta1.GetResourcesRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetResourcesResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.kubernetesClient.GetResources(ctx, in, opts...) -} - -// InstallPXCOperator installs kubernetes pxc operator. -func (c *Client) InstallPXCOperator(ctx context.Context, in *controllerv1beta1.InstallPXCOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPXCOperatorResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.pxcOperatorClient.InstallPXCOperator(ctx, in, opts...) -} - -// InstallPSMDBOperator installs kubernetes PSMDB operator. -func (c *Client) InstallPSMDBOperator(ctx context.Context, in *controllerv1beta1.InstallPSMDBOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPSMDBOperatorResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.psmdbOperatorClient.InstallPSMDBOperator(ctx, in, opts...) -} - -// StartMonitoring sets up victoria metrics operator to monitor kubernetes cluster. -func (c *Client) StartMonitoring(ctx context.Context, in *controllerv1beta1.StartMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StartMonitoringResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.kubernetesClient.StartMonitoring(ctx, in, opts...) -} - -// StopMonitoring removes victoria metrics operator from the kubernetes cluster. -func (c *Client) StopMonitoring(ctx context.Context, in *controllerv1beta1.StopMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StopMonitoringResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.kubernetesClient.StopMonitoring(ctx, in, opts...) -} - -func (c *Client) GetKubeConfig(ctx context.Context, _ *controllerv1beta1.GetKubeconfigRequest, _ ...grpc.CallOption) (*controllerv1beta1.GetKubeconfigResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - - kClient, err := kubernetes.NewIncluster() - if err != nil { - c.l.Errorf("failed creating kubernetes client: %v", err) - return nil, err - } - - kubeConfig, err := kClient.GetKubeconfig(ctx) - return &controllerv1beta1.GetKubeconfigResponse{ - Kubeconfig: kubeConfig, - }, err -} diff --git a/managed/services/dbaas/kubernetes/client/client.go b/managed/services/dbaas/kubernetes/client/client.go deleted file mode 100644 index 309887ee9f..0000000000 --- a/managed/services/dbaas/kubernetes/client/client.go +++ /dev/null @@ -1,1089 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package client TODO -package client - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "log" - "os" - "sort" - "strings" - "sync" - "text/tabwriter" - "time" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - "gopkg.in/yaml.v3" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextv1clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - yamlSerializer "k8s.io/apimachinery/pkg/runtime/serializer/yaml" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/duration" - "k8s.io/apimachinery/pkg/util/wait" - yamlutil "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/apimachinery/pkg/version" - "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/scheme" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - _ "k8s.io/client-go/plugin/pkg/client/auth" // load all auth plugins - "k8s.io/client-go/rest" - "k8s.io/client-go/restmapper" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/tools/reference" - deploymentutil "k8s.io/kubectl/pkg/util/deployment" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - - "github.com/percona/pmm/managed/services/dbaas/kubernetes/client/database" -) - -const ( - configKind = "Config" - apiVersion = "v1" - defaultName = "default" - - dbaasToolPath = "/opt/dbaas-tools/bin" - - defaultQPSLimit = 100 - defaultBurstLimit = 150 - defaultChunkSize = 500 - - defaultAPIURIPath = "/api" - defaultAPIsURIPath = "/apis" -) - -// Each level has 2 spaces for PrefixWriter -// -//nolint:stylecheck -const ( - LEVEL_0 = iota - LEVEL_1 - LEVEL_2 - LEVEL_3 - LEVEL_4 -) - -// Client is the internal client for Kubernetes. -type Client struct { - clientset kubernetes.Interface - apiextClientset apiextv1clientset.Interface - dynamicClientset dynamic.Interface - dbClusterClient *database.DatabaseClusterClient - rcLock *sync.Mutex - restConfig *rest.Config - namespace string -} - -// SortableEvents implements sort.Interface for []api.Event based on the Timestamp field -type SortableEvents []corev1.Event - -func (list SortableEvents) Len() int { - return len(list) -} - -func (list SortableEvents) Swap(i, j int) { - list[i], list[j] = list[j], list[i] -} - -func (list SortableEvents) Less(i, j int) bool { - return list[i].LastTimestamp.Time.Before(list[j].LastTimestamp.Time) -} - -type resourceError struct { - name string - issue string -} - -type podError struct { - resourceError -} - -type deploymentError struct { - resourceError - podErrs podErrors -} - -type ( - deploymentErrors []deploymentError - podErrors []podError -) - -func (e deploymentErrors) Error() string { - var sb strings.Builder - for _, i := range e { - sb.WriteString(fmt.Sprintf("deployment %s has error: %s\n%s", i.name, i.issue, i.podErrs.Error())) - } - return sb.String() -} - -func (e podErrors) Error() string { - var sb strings.Builder - for _, i := range e { - sb.WriteString(fmt.Sprintf("\tpod %s has error: %s\n", i.name, i.issue)) - } - return sb.String() -} - -// NewFromInCluster returns a client object which uses the service account -// kubernetes gives to pods. It's intended for clients that expect to be -// running inside a pod running on kubernetes. It will return ErrNotInCluster -// if called from a process not running in a kubernetes environment. -func NewFromInCluster() (*Client, error) { - config, err := rest.InClusterConfig() - if err != nil { - return nil, err - } - config.QPS = defaultQPSLimit - config.Burst = defaultBurstLimit - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return nil, err - } - apiextClientset, err := apiextv1clientset.NewForConfig(config) - if err != nil { - return nil, err - } - dynamicClientset, err := dynamic.NewForConfig(config) - if err != nil { - return nil, err - } - c := &Client{ - clientset: clientset, - apiextClientset: apiextClientset, - dynamicClientset: dynamicClientset, - restConfig: config, - rcLock: &sync.Mutex{}, - } - err = c.setup() - return c, err -} - -// NewFromKubeConfigString creates a new client for the given config string. -// It's intended for clients that expect to be running outside of a cluster -func NewFromKubeConfigString(kubeconfig string) (*Client, error) { - config, err := clientcmd.BuildConfigFromKubeconfigGetter("", NewConfigGetter(kubeconfig).loadFromString) - if err != nil { - return nil, err - } - config.QPS = defaultQPSLimit - config.Burst = defaultBurstLimit - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return nil, err - } - apiextClientset, err := apiextv1clientset.NewForConfig(config) - if err != nil { - return nil, err - } - dynamicClientset, err := dynamic.NewForConfig(config) - if err != nil { - return nil, err - } - c := &Client{ - clientset: clientset, - apiextClientset: apiextClientset, - dynamicClientset: dynamicClientset, - restConfig: config, - rcLock: &sync.Mutex{}, - } - err = c.setup() - return c, err -} - -func (c *Client) setup() error { - namespace := "default" - if space := os.Getenv("NAMESPACE"); space != "" { - namespace = space - } - // Set PATH variable to make aws-iam-authenticator executable - path := fmt.Sprintf("%s:%s", os.Getenv("PATH"), dbaasToolPath) - os.Setenv("PATH", path) - c.namespace = namespace - return c.initOperatorClients() -} - -// Initializes clients for operators -func (c *Client) initOperatorClients() error { - dbClusterClient, err := database.NewForConfig(c.restConfig) - if err != nil { - return err - } - c.dbClusterClient = dbClusterClient - _, err = c.GetServerVersion() - return err -} - -// GetSecretsForServiceAccount returns secret by given service account name -func (c *Client) GetSecretsForServiceAccount(ctx context.Context, accountName string) (*corev1.Secret, error) { - serviceAccount, err := c.clientset.CoreV1().ServiceAccounts(c.namespace).Get(ctx, accountName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - if len(serviceAccount.Secrets) == 0 { - return nil, errors.Errorf("no secrets available for namespace %s", c.namespace) - } - - return c.clientset.CoreV1().Secrets(c.namespace).Get( - ctx, - serviceAccount.Secrets[0].Name, - metav1.GetOptions{}) -} - -// GenerateKubeConfig generates kubeconfig -func (c *Client) GenerateKubeConfig(secret *corev1.Secret) ([]byte, error) { - conf := &Config{ - Kind: configKind, - APIVersion: apiVersion, - CurrentContext: defaultName, - } - conf.Clusters = []ClusterInfo{ - { - Name: defaultName, - Cluster: Cluster{ - CertificateAuthorityData: secret.Data["ca.crt"], - Server: c.restConfig.Host, - }, - }, - } - conf.Contexts = []ContextInfo{ - { - Name: defaultName, - Context: Context{ - Cluster: defaultName, - User: "pmm-service-account", - Namespace: defaultName, - }, - }, - } - conf.Users = []UserInfo{ - { - Name: "pmm-service-account", - User: User{ - Token: string(secret.Data["token"]), - }, - }, - } - - return c.marshalKubeConfig(conf) -} - -// GetServerVersion returns server version -func (c *Client) GetServerVersion() (*version.Info, error) { - return c.clientset.Discovery().ServerVersion() -} - -// ListDatabaseClusters returns list of managed PCX clusters. -func (c *Client) ListDatabaseClusters(ctx context.Context) (*dbaasv1.DatabaseClusterList, error) { - return c.dbClusterClient.DBClusters(c.namespace).List(ctx, metav1.ListOptions{}) -} - -// GetDatabaseCluster returns PXC clusters by provided name. -func (c *Client) GetDatabaseCluster(ctx context.Context, name string) (*dbaasv1.DatabaseCluster, error) { - cluster, err := c.dbClusterClient.DBClusters(c.namespace).Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return nil, err - } - return cluster, nil -} - -// GetStorageClasses returns all storage classes available in the cluster -func (c *Client) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - return c.clientset.StorageV1().StorageClasses().List(ctx, metav1.ListOptions{}) -} - -// GetDeployment returns deployment by name -func (c *Client) GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error) { - return c.clientset.AppsV1().Deployments(c.namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// GetSecret returns secret by name -func (c *Client) GetSecret(ctx context.Context, name string) (*corev1.Secret, error) { - return c.clientset.CoreV1().Secrets(c.namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// ListSecrets returns secrets -func (c *Client) ListSecrets(ctx context.Context) (*corev1.SecretList, error) { - return c.clientset.CoreV1().Secrets(c.namespace).List(ctx, metav1.ListOptions{}) -} - -// DeleteObject deletes object from the k8s cluster -func (c *Client) DeleteObject(obj runtime.Object) error { - groupResources, err := restmapper.GetAPIGroupResources(c.clientset.Discovery()) - if err != nil { - return err - } - mapper := restmapper.NewDiscoveryRESTMapper(groupResources) - - gvk := obj.GetObjectKind().GroupVersionKind() - gk := schema.GroupKind{Group: gvk.Group, Kind: gvk.Kind} - mapping, err := mapper.RESTMapping(gk, gvk.Version) - if err != nil { - return err - } - namespace, name, err := c.retrieveMetaFromObject(obj) - if err != nil { - return err - } - cli, err := c.resourceClient(mapping.GroupVersionKind.GroupVersion()) - if err != nil { - return err - } - helper := resource.NewHelper(cli, mapping) - err = deleteObject(helper, namespace, name) - return err -} - -func deleteObject(helper *resource.Helper, namespace, name string) error { - if _, err := helper.Get(namespace, name); err == nil { - _, err = helper.Delete(namespace, name) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) ApplyObject(obj runtime.Object) error { - groupResources, err := restmapper.GetAPIGroupResources(c.clientset.Discovery()) - if err != nil { - return err - } - mapper := restmapper.NewDiscoveryRESTMapper(groupResources) - - gvk := obj.GetObjectKind().GroupVersionKind() - gk := schema.GroupKind{Group: gvk.Group, Kind: gvk.Kind} - mapping, err := mapper.RESTMapping(gk, gvk.Version) - if err != nil { - return err - } - namespace, name, err := c.retrieveMetaFromObject(obj) - if err != nil { - return err - } - cli, err := c.resourceClient(mapping.GroupVersionKind.GroupVersion()) - if err != nil { - return err - } - helper := resource.NewHelper(cli, mapping) - return c.applyObject(helper, namespace, name, obj) -} - -func (c *Client) applyObject(helper *resource.Helper, namespace, name string, obj runtime.Object) error { - if _, err := helper.Get(namespace, name); err != nil { - _, err = helper.Create(namespace, false, obj) - if err != nil { - return err - } - } else { - _, err = helper.Replace(namespace, name, true, obj) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) retrieveMetaFromObject(obj runtime.Object) (namespace, name string, err error) { //nolint:nonamedreturns - name, err = meta.NewAccessor().Name(obj) - if err != nil { - return - } - namespace, err = meta.NewAccessor().Namespace(obj) - if err != nil { - return - } - if namespace == "" { - namespace = c.namespace - } - return -} - -func (c *Client) resourceClient(gv schema.GroupVersion) (*rest.RESTClient, error) { - cfg := c.restConfig - cfg.ContentConfig = resource.UnstructuredPlusDefaultContentConfig() - cfg.GroupVersion = &gv - if len(gv.Group) == 0 { - cfg.APIPath = defaultAPIURIPath - } else { - cfg.APIPath = defaultAPIsURIPath - } - return rest.RESTClientFor(cfg) -} - -func (c *Client) marshalKubeConfig(conf *Config) ([]byte, error) { - config, err := json.Marshal(&conf) - if err != nil { - return nil, err - } - - var jsonObj interface{} - err = yaml.Unmarshal(config, &jsonObj) - if err != nil { - return nil, err - } - - return yaml.Marshal(jsonObj) -} - -// GetPersistentVolumes returns Persistent Volumes available in the cluster -func (c *Client) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - return c.clientset.CoreV1().PersistentVolumes().List(ctx, metav1.ListOptions{}) -} - -// GetPods returns list of pods -func (c *Client) GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) { - options := metav1.ListOptions{} - if labelSelector != nil && (labelSelector.MatchLabels != nil || labelSelector.MatchExpressions != nil) { - options.LabelSelector = metav1.FormatLabelSelector(labelSelector) - } - - return c.clientset.CoreV1().Pods(namespace).List(ctx, options) -} - -// GetNodes returns list of nodes -func (c *Client) GetNodes(ctx context.Context) (*corev1.NodeList, error) { - return c.clientset.CoreV1().Nodes().List(ctx, metav1.ListOptions{}) -} - -// GetLogs returns logs for pod -func (c *Client) GetLogs(ctx context.Context, pod, container string) (string, error) { - defaultLogLines := int64(3000) - options := &corev1.PodLogOptions{} - if container != "" { - options.Container = container - } - - options.TailLines = &defaultLogLines - buf := &bytes.Buffer{} - - req := c.clientset.CoreV1().Pods(c.namespace).GetLogs(pod, options) - podLogs, err := req.Stream(ctx) - if err != nil { - return buf.String(), err - } - - _, err = io.Copy(buf, podLogs) - if err != nil { - return buf.String(), err - } - - return buf.String(), nil -} - -func (c *Client) GetEvents(ctx context.Context, name string) (string, error) { - pod, err := c.clientset.CoreV1().Pods(c.namespace).Get(ctx, name, metav1.GetOptions{}) - if err != nil { - eventsInterface := c.clientset.CoreV1().Events(c.namespace) - selector := eventsInterface.GetFieldSelector(&name, &c.namespace, nil, nil) - initialOpts := metav1.ListOptions{ - FieldSelector: selector.String(), - Limit: defaultChunkSize, - } - events := &corev1.EventList{} - err2 := resource.FollowContinue(&initialOpts, - func(options metav1.ListOptions) (runtime.Object, error) { - newList, err := eventsInterface.List(ctx, options) - if err != nil { - return nil, resource.EnhanceListError(err, options, "events") - } - - events.Items = append(events.Items, newList.Items...) - return newList, nil - }) - - if err2 == nil && len(events.Items) != 0 { - return tabbedString(func(out io.Writer) error { - w := NewPrefixWriter(out) - w.Writef(0, "Pod '%v': error '%v', but found events.\n", name, err) - DescribeEvents(events, w) - return nil - }) - } - - return "", err - } - - var events *corev1.EventList - if ref, err := reference.GetReference(scheme.Scheme, pod); err != nil { - fmt.Printf("Unable to construct reference to '%#v': %v", pod, err) //nolint:forbidigo - } else { - ref.Kind = "" - if _, isMirrorPod := pod.Annotations[corev1.MirrorPodAnnotationKey]; isMirrorPod { - ref.UID = types.UID(pod.Annotations[corev1.MirrorPodAnnotationKey]) - } - - events, _ = searchEvents(c.clientset.CoreV1(), ref, defaultChunkSize) //nolint:contextcheck - } - - return tabbedString(func(out io.Writer) error { - w := NewPrefixWriter(out) - w.Writef(LEVEL_0, name+" ") - DescribeEvents(events, w) - return nil - }) -} - -func tabbedString(f func(io.Writer) error) (string, error) { - out := &tabwriter.Writer{} - buf := &bytes.Buffer{} - out.Init(buf, 0, 8, 2, ' ', 0) - - err := f(out) - if err != nil { - return "", err - } - - out.Flush() - str := buf.String() - return str, nil -} - -func DescribeEvents(el *corev1.EventList, w PrefixWriter) { - if len(el.Items) == 0 { - w.Writef(LEVEL_0, "Events:\t\n") - return - } - - w.Flush() - sort.Sort(SortableEvents(el.Items)) - w.Writef(LEVEL_0, "Events:\n Type\tReason\tAge\tFrom\tMessage\n") - w.Writef(LEVEL_1, "----\t------\t----\t----\t-------\n") - for _, e := range el.Items { - var interval string - firstTimestampSince := translateMicroTimestampSince(e.EventTime) - if e.EventTime.IsZero() { - firstTimestampSince = translateTimestampSince(e.FirstTimestamp) - } - - switch { - case e.Series != nil: - interval = fmt.Sprintf("%s (x%d over %s)", translateMicroTimestampSince(e.Series.LastObservedTime), e.Series.Count, firstTimestampSince) - case e.Count > 1: - interval = fmt.Sprintf("%s (x%d over %s)", translateTimestampSince(e.LastTimestamp), e.Count, firstTimestampSince) - default: - interval = firstTimestampSince - } - - source := e.Source.Component - if source == "" { - source = e.ReportingController - } - - w.Writef(LEVEL_1, "%v\t%v\t%s\t%v\t%v\n", - e.Type, - e.Reason, - interval, - source, - strings.TrimSpace(e.Message)) - } -} - -// searchEvents finds events about the specified object. -// It is very similar to CoreV1.Events.Search, but supports the Limit parameter. -func searchEvents(client corev1client.EventsGetter, objOrRef runtime.Object, limit int64) (*corev1.EventList, error) { - ref, err := reference.GetReference(scheme.Scheme, objOrRef) - if err != nil { - return nil, err - } - - stringRefKind := ref.Kind - var refKind *string - if len(stringRefKind) > 0 { - refKind = &stringRefKind - } - - stringRefUID := string(ref.UID) - var refUID *string - if len(stringRefUID) > 0 { - refUID = &stringRefUID - } - - e := client.Events(ref.Namespace) - fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - initialOpts := metav1.ListOptions{FieldSelector: fieldSelector.String(), Limit: limit} - eventList := &corev1.EventList{} - err = resource.FollowContinue(&initialOpts, - func(options metav1.ListOptions) (runtime.Object, error) { - newEvents, err := e.List(context.TODO(), options) - if err != nil { - return nil, resource.EnhanceListError(err, options, "events") - } - - eventList.Items = append(eventList.Items, newEvents.Items...) - return newEvents, nil - }) - - return eventList, err -} - -// translateMicroTimestampSince returns the elapsed time since timestamp in -// human-readable approximation. -func translateMicroTimestampSince(timestamp metav1.MicroTime) string { - if timestamp.IsZero() { - return "" - } - - return duration.HumanDuration(time.Since(timestamp.Time)) -} - -// translateTimestampSince returns the elapsed time since timestamp in -// human-readable approximation. -func translateTimestampSince(timestamp metav1.Time) string { - if timestamp.IsZero() { - return "" - } - - return duration.HumanDuration(time.Since(timestamp.Time)) -} - -// ApplyFile accepts manifest file contents, parses into []runtime.Object -// and applies them against the cluster -func (c *Client) ApplyFile(fileBytes []byte) error { - objs, err := c.getObjects(fileBytes) - if err != nil { - return err - } - for i := range objs { - err := c.ApplyObject(objs[i]) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) getObjects(f []byte) ([]runtime.Object, error) { - objs := []runtime.Object{} - decoder := yamlutil.NewYAMLOrJSONDecoder(bytes.NewReader(f), 100) - var err error - for { - var rawObj runtime.RawExtension - if err = decoder.Decode(&rawObj); err != nil { - break - } - - obj, _, err := yamlSerializer.NewDecodingSerializer(unstructured.UnstructuredJSONScheme).Decode(rawObj.Raw, nil, nil) - if err != nil { - return nil, err - } - - unstructuredMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) - if err != nil { - return nil, err - } - - objs = append(objs, &unstructured.Unstructured{Object: unstructuredMap}) - } - - return objs, nil //nolint:nilerr -} - -// DoCSVWait waits until for a CSV to be applied. -func (c Client) DoCSVWait(ctx context.Context, key types.NamespacedName) error { - var ( - curPhase v1alpha1.ClusterServiceVersionPhase - newPhase v1alpha1.ClusterServiceVersionPhase - ) - - kubeclient, err := c.getKubeclient() - if err != nil { - return err - } - - csv := v1alpha1.ClusterServiceVersion{} - csvPhaseSucceeded := func() (bool, error) { - err := kubeclient.Get(ctx, key, &csv) - if err != nil { - if apierrors.IsNotFound(err) { - return false, nil - } - return false, err - } - newPhase = csv.Status.Phase - if newPhase != curPhase { - curPhase = newPhase - } - - switch curPhase { - case v1alpha1.CSVPhaseFailed: - return false, fmt.Errorf("csv failed: reason: %q, message: %q", csv.Status.Reason, csv.Status.Message) - case v1alpha1.CSVPhaseSucceeded: - return true, nil - default: - return false, nil - } - } - - err = wait.PollImmediateUntil(time.Second, csvPhaseSucceeded, ctx.Done()) - if err != nil && errors.Is(err, context.DeadlineExceeded) { - depCheckErr := c.checkDeploymentErrors(ctx, key, csv) - if depCheckErr != nil { - return depCheckErr - } - } - return err -} - -// GetSubscriptionCSV retrieves a subscription CSV. -func (c Client) GetSubscriptionCSV(ctx context.Context, subKey types.NamespacedName) (types.NamespacedName, error) { - var csvKey types.NamespacedName - - kubeclient, err := c.getKubeclient() - if err != nil { - return csvKey, err - } - - subscriptionInstalledCSV := func() (bool, error) { - sub := v1alpha1.Subscription{} - err := kubeclient.Get(ctx, subKey, &sub) - if err != nil { - return false, err - } - installedCSV := sub.Status.InstalledCSV - if installedCSV == "" { - return false, nil - } - csvKey = types.NamespacedName{ - Namespace: subKey.Namespace, - Name: installedCSV, - } - log.Printf(" Found installed CSV %q", installedCSV) - return true, nil - } - return csvKey, wait.PollImmediateUntil(time.Second, subscriptionInstalledCSV, ctx.Done()) -} - -func (c *Client) getKubeclient() (client.Client, error) { //nolint:ireturn - rm, err := apiutil.NewDynamicRESTMapper(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "failed to create dynamic rest mapper") - } - - cl, err := client.New(c.restConfig, client.Options{ - Scheme: scheme.Scheme, - Mapper: rm, - }) - if err != nil { - return nil, errors.Wrap(err, "failed to create client") - } - return cl, nil -} - -// checkDeploymentErrors function loops through deployment specs of a given CSV, and prints reason -// in case of failures, based on deployment condition. -func (c Client) checkDeploymentErrors(ctx context.Context, key types.NamespacedName, csv v1alpha1.ClusterServiceVersion) error { - depErrs := deploymentErrors{} - if key.Namespace == "" { - return fmt.Errorf("no namespace provided to get deployment failures") - } - - kubeclient, err := c.getKubeclient() - if err != nil { - return err - } - - dep := &appsv1.Deployment{} - for _, ds := range csv.Spec.InstallStrategy.StrategySpec.DeploymentSpecs { - depKey := types.NamespacedName{ - Namespace: key.Namespace, - Name: ds.Name, - } - depSelectors := ds.Spec.Selector - if err := kubeclient.Get(ctx, depKey, dep); err != nil { - depErrs = append(depErrs, deploymentError{ - resourceError: resourceError{ - name: ds.Name, - issue: err.Error(), - }, - }) - continue - } - for _, s := range dep.Status.Conditions { - if s.Type == appsv1.DeploymentAvailable && s.Status != corev1.ConditionTrue { - depErr := deploymentError{ - resourceError: resourceError{ - name: ds.Name, - issue: s.Reason, - }, - } - podErr := c.checkPodErrors(ctx, kubeclient, depSelectors, key) - podErrs := podErrors{} - if errors.As(podErr, &podErrs) { - depErr.podErrs = append(depErr.podErrs, podErrs...) - } else { - return podErr - } - depErrs = append(depErrs, depErr) - } - } - } - - return depErrs -} - -// checkPodErrors loops through pods, and returns pod errors if any. -func (c Client) checkPodErrors(ctx context.Context, kubeclient client.Client, depSelectors *metav1.LabelSelector, key types.NamespacedName) error { - // loop through pods and return specific error message. - podErr := podErrors{} - podList := &corev1.PodList{} - podLabelSelectors, err := metav1.LabelSelectorAsSelector(depSelectors) - if err != nil { - return err - } - - options := client.ListOptions{ - LabelSelector: podLabelSelectors, - Namespace: key.Namespace, - } - - if err := kubeclient.List(ctx, podList, &options); err != nil { - return errors.Wrap(err, "error getting Pods") - } - - for _, p := range podList.Items { - for _, cs := range p.Status.ContainerStatuses { - if !cs.Ready { - if cs.State.Waiting != nil { - containerName := p.Name + ":" + cs.Name - podErr = append(podErr, podError{resourceError{name: containerName, issue: cs.State.Waiting.Message}}) - } - } - } - } - - return podErr -} - -// DoRolloutWait waits until a deployment has been rolled out susccessfully or there is an error. -func (c Client) DoRolloutWait(ctx context.Context, key types.NamespacedName) error { - kubeclient, err := c.getKubeclient() - if err != nil { - return err - } - - rolloutComplete := func() (bool, error) { - deployment := appsv1.Deployment{} - err := kubeclient.Get(ctx, key, &deployment) - if err != nil { - if apierrors.IsNotFound(err) { - // Waiting for Deployment to appear - return false, nil - } - return false, err - } - if deployment.Generation <= deployment.Status.ObservedGeneration { - cond := deploymentutil.GetDeploymentCondition(deployment.Status, appsv1.DeploymentProgressing) - if cond != nil && cond.Reason == deploymentutil.TimedOutReason { - return false, errors.New("progress deadline exceeded") - } - if deployment.Spec.Replicas != nil && deployment.Status.UpdatedReplicas < *deployment.Spec.Replicas { - // Waiting for Deployment to rollout. Not all replicas have been updated - return false, nil - } - if deployment.Status.Replicas > deployment.Status.UpdatedReplicas { - // Waiting for Deployment to rollout. Old replicas are pending termination - return false, nil - } - if deployment.Status.AvailableReplicas < deployment.Status.UpdatedReplicas { - // Waiting for Deployment to rollout. Not all updated replicas are available - return false, nil - } - // Deployment successfully rolled out - return true, nil - } - // Waiting for Deployment to rollout: waiting for deployment spec update to be observed - return false, nil - } - return wait.PollImmediateUntil(time.Second, rolloutComplete, ctx.Done()) -} - -// GetOperatorGroup retrieves an operator group details by namespace and name. -func (c *Client) GetOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) { - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - if namespace == "" { - namespace = c.namespace - } - - return operatorClient.OperatorsV1().OperatorGroups(namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// CreateOperatorGroup creates an operator group to be used as part of a subscription. -func (c *Client) CreateOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) { - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - if namespace == "" { - namespace = c.namespace - } - og := &v1.OperatorGroup{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - Spec: v1.OperatorGroupSpec{ - TargetNamespaces: []string{namespace}, - }, - Status: v1.OperatorGroupStatus{ - LastUpdated: &metav1.Time{ - Time: time.Now(), - }, - }, - } - - return operatorClient.OperatorsV1().OperatorGroups(namespace).Create(ctx, og, metav1.CreateOptions{}) -} - -// CreateSubscriptionForCatalog creates an OLM subscription. -func (c *Client) CreateSubscriptionForCatalog(ctx context.Context, namespace, name, catalogNamespace, catalog, - packageName, channel, startingCSV string, approval v1alpha1.Approval, -) (*v1alpha1.Subscription, error) { - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - subscription := &v1alpha1.Subscription{ - TypeMeta: metav1.TypeMeta{ - Kind: v1alpha1.SubscriptionKind, - APIVersion: v1alpha1.SubscriptionCRDAPIVersion, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - Spec: &v1alpha1.SubscriptionSpec{ - CatalogSource: catalog, - CatalogSourceNamespace: catalogNamespace, - Package: packageName, - Channel: channel, - StartingCSV: startingCSV, - InstallPlanApproval: approval, - }, - } - - sub, err := operatorClient.OperatorsV1alpha1().Subscriptions(namespace).Create(ctx, subscription, metav1.CreateOptions{}) - if err != nil { - if apierrors.IsAlreadyExists(err) { - return sub, nil - } - return sub, err - } - return sub, nil -} - -// GetSubscription retrieves an OLM subscription by namespace and name. -func (c *Client) GetSubscription(ctx context.Context, namespace, name string) (*v1alpha1.Subscription, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().Subscriptions(namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// ListSubscriptions all the subscriptions in the namespace. -func (c *Client) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().Subscriptions(namespace).List(ctx, metav1.ListOptions{}) -} - -// GetInstallPlan retrieves an OLM install plan by namespace and name. -func (c *Client) GetInstallPlan(ctx context.Context, namespace string, name string) (*v1alpha1.InstallPlan, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().InstallPlans(namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// UpdateInstallPlan updates the existing install plan in the specified namespace. -func (c *Client) UpdateInstallPlan(ctx context.Context, namespace string, installPlan *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().InstallPlans(namespace).Update(ctx, installPlan, metav1.UpdateOptions{}) -} - -// ListCRDs returns a list of CRDs. -func (c *Client) ListCRDs(ctx context.Context, labelSelector *metav1.LabelSelector) (*apiextv1.CustomResourceDefinitionList, error) { - options := metav1.ListOptions{} - if labelSelector != nil && (labelSelector.MatchLabels != nil || labelSelector.MatchExpressions != nil) { - options.LabelSelector = metav1.FormatLabelSelector(labelSelector) - } - - return c.apiextClientset.ApiextensionsV1().CustomResourceDefinitions().List(ctx, options) -} - -// ListCRs returns a list of CRs. -func (c *Client) ListCRs( - ctx context.Context, - namespace string, - gvr schema.GroupVersionResource, - labelSelector *metav1.LabelSelector, -) (*unstructured.UnstructuredList, error) { - options := metav1.ListOptions{} - if labelSelector != nil && (labelSelector.MatchLabels != nil || labelSelector.MatchExpressions != nil) { - options.LabelSelector = metav1.FormatLabelSelector(labelSelector) - } - - return c.dynamicClientset.Resource(gvr).Namespace(namespace).List(ctx, options) -} diff --git a/managed/services/dbaas/kubernetes/client/client_test.go b/managed/services/dbaas/kubernetes/client/client_test.go deleted file mode 100644 index 542fa2b927..0000000000 --- a/managed/services/dbaas/kubernetes/client/client_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - corev1 "k8s.io/api/core/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextv1clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apiextfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/version" - "k8s.io/client-go/dynamic" - dynamicfake "k8s.io/client-go/dynamic/fake" - "k8s.io/client-go/kubernetes" - fake "k8s.io/client-go/kubernetes/fake" -) - -func TestGetSecretsForServiceAccount(t *testing.T) { - clientset := fake.NewSimpleClientset( - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account", - Namespace: "default", - }, - Secrets: []corev1.ObjectReference{ - { - Name: "pmm-service-account-token", - }, - { - Name: "pmm-service-account-token-ktgqd", - }, - }, - }, - &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account-token", - Namespace: "default", - }, - }, - &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account-token-ktgqd", - Namespace: "default", - }, - }) - client := &Client{clientset: clientset, restConfig: nil, namespace: "default"} - - ctx := context.Background() - secret, err := client.GetSecretsForServiceAccount(ctx, "pmm-service-account") - assert.NotNil(t, secret, "secret is nil") - assert.NoError(t, err) -} - -func TestGetSecretsForServiceAccountNoSecrets(t *testing.T) { - clientset := fake.NewSimpleClientset( - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account", - Namespace: "default", - }, - }) - client := &Client{clientset: clientset, restConfig: nil, namespace: "default"} - - ctx := context.Background() - secret, err := client.GetSecretsForServiceAccount(ctx, "pmm-service-account") - assert.Nil(t, secret, "secret is not nil") - assert.Error(t, err) -} - -func TestGetServerVersion(t *testing.T) { - clientset := fake.NewSimpleClientset() - client := &Client{clientset: clientset, namespace: "default"} - ver, err := client.GetServerVersion() - expectedVersion := &version.Info{} - require.NoError(t, err) - assert.Equal(t, expectedVersion.Minor, ver.Minor) -} - -func TestGetPods(t *testing.T) { - t.Parallel() - - data := []struct { - clientset kubernetes.Interface - countExpectedPods int - inputNamespace string - err error - }{ - // there are no pods in the specified namespace - { - clientset: fake.NewSimpleClientset(&corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-pod", - Namespace: "my-safe-space", - }, - Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - }, - }, &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-pod", - Namespace: "get-me-outta-here", - }, - }), - inputNamespace: "default", - countExpectedPods: 0, - }, - // there is a pod in the specified namespace - { - clientset: fake.NewSimpleClientset(&corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-0", - Namespace: "default", - }, - Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - }, - }, &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-pod", - Namespace: "get-me-outta-here", - }, - }), - inputNamespace: "default", - countExpectedPods: 1, - }, - } - - for _, test := range data { - t.Run("", func(test struct { - clientset kubernetes.Interface - countExpectedPods int - inputNamespace string - err error - }, - ) func(t *testing.T) { - return func(t *testing.T) { - clientset := test.clientset - client := &Client{clientset: clientset, namespace: "default"} - - pods, err := client.GetPods(context.Background(), test.inputNamespace, nil) - if test.err == nil { - assert.NoError(t, err) - assert.Equal(t, test.countExpectedPods, len(pods.Items)) - } else { - assert.Error(t, err) - assert.Equal(t, test.err, err) - } - } - }(test)) - } -} - -func TestListCRDs(t *testing.T) { - t.Parallel() - - data := []struct { - clientset apiextv1clientset.Interface - inputLabelSelector *metav1.LabelSelector - countExpectedCRDs int - err error - }{ - // no label selector - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }), - inputLabelSelector: nil, - countExpectedCRDs: 2, - }, - // one CRD matches label selector - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }), - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRDs: 1, - }, - // two CRDs match label selector - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "another-crd", - Labels: map[string]string{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }), - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRDs: 2, - }, - // one CRD matches label selector with multiple labels - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "another-crd", - Labels: map[string]string{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }), - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - countExpectedCRDs: 1, - }, - } - - for _, test := range data { - t.Run("", func(test struct { - clientset apiextv1clientset.Interface - inputLabelSelector *metav1.LabelSelector - countExpectedCRDs int - err error - }, - ) func(t *testing.T) { - return func(t *testing.T) { - clientset := test.clientset - client := &Client{apiextClientset: clientset, namespace: "default"} - - crds, err := client.ListCRDs(context.Background(), test.inputLabelSelector) - if test.err == nil { - assert.NoError(t, err) - assert.Equal(t, test.countExpectedCRDs, len(crds.Items)) - } else { - assert.Error(t, err) - assert.Equal(t, test.err, err) - } - } - }(test)) - } -} - -func TestListCRs(t *testing.T) { - t.Parallel() - - data := []struct { - clientset dynamic.Interface - inputNamespace string - inputGVR schema.GroupVersionResource - inputLabelSelector *metav1.LabelSelector - countExpectedCRs int - err error - }{ - // one CR matches namespace - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "get-me-outta-here", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: nil, - countExpectedCRs: 1, - }, - // one CR matches GVR - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - {Group: "dbaas.percona.com", Version: "v1", Resource: "othercoolkinds"}: "OtherKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "OtherKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: nil, - countExpectedCRs: 1, - }, - // no label selector - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: nil, - countExpectedCRs: 2, - }, - // one CR matches label selector - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRs: 1, - }, - // two CRs match label selector - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRs: 2, - }, - // one CR matches label selector with multiple labels - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - countExpectedCRs: 1, - }, - } - - for _, test := range data { - t.Run("", func(test struct { - clientset dynamic.Interface - inputNamespace string - inputGVR schema.GroupVersionResource - inputLabelSelector *metav1.LabelSelector - countExpectedCRs int - err error - }, - ) func(t *testing.T) { - return func(t *testing.T) { - clientset := test.clientset - client := &Client{dynamicClientset: clientset, namespace: "default"} - - crds, err := client.ListCRs(context.Background(), test.inputNamespace, test.inputGVR, test.inputLabelSelector) - if test.err == nil { - assert.NoError(t, err) - assert.Equal(t, test.countExpectedCRs, len(crds.Items)) - } else { - assert.Error(t, err) - assert.Equal(t, test.err, err) - } - } - }(test)) - } -} diff --git a/managed/services/dbaas/kubernetes/client/ctl.go b/managed/services/dbaas/kubernetes/client/ctl.go deleted file mode 100644 index 795f0863f9..0000000000 --- a/managed/services/dbaas/kubernetes/client/ctl.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -type ( - // Cluster contains information about how to communicate with a kubernetes cluster. - Cluster struct { - CertificateAuthorityData []byte `json:"certificate-authority-data"` - Server string `json:"server"` - } - // ClusterInfo is a struct used to parse Cluster config from kubeconfig. - ClusterInfo struct { - Name string `json:"name"` - Cluster Cluster `json:"cluster"` - } - // User contains information that describes identity information. This is use to tell the kubernetes cluster who you are. - User struct { - Token string `json:"token"` - } - // UserInfo is a struct used to parse User config from kubeconfig. - UserInfo struct { - Name string `json:"name"` - User User `json:"user"` - } - // Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), - // a user (how do I identify myself), and a namespace (what subset of resources do I want to work with). - Context struct { - Cluster string `json:"cluster"` - User string `json:"user"` - Namespace string `json:"namespace"` - } - // ContextInfo is a struct used to parse Context config from kubeconfig. - ContextInfo struct { - Name string `json:"name"` - Context Context `json:"context"` - } - // Config holds the information needed to build connect to remote kubernetes clusters as a given user. - Config struct { - // Legacy field from pkg/api/types.go TypeMeta. - Kind string `json:"kind,omitempty"` - // Legacy field from pkg/api/types.go TypeMeta. - APIVersion string `json:"apiVersion,omitempty"` - // Preferences holds general information to be use for cli interactions - Clusters []ClusterInfo `json:"clusters"` - // AuthInfos is a map of referencable names to user configs - Users []UserInfo `json:"users"` - // Contexts is a map of referencable names to context configs - Contexts []ContextInfo `json:"contexts"` - // CurrentContext is the name of the context that you would like to use by default - CurrentContext string `json:"current-context"` - } -) diff --git a/managed/services/dbaas/kubernetes/client/database/database.go b/managed/services/dbaas/kubernetes/client/database/database.go deleted file mode 100644 index f803a10e72..0000000000 --- a/managed/services/dbaas/kubernetes/client/database/database.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package database TODO -package database - -import ( - "context" - "sync" - - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" -) - -const ( - DBClusterKind = "DatabaseCluster" - apiKind = "databaseclusters" -) - -type DatabaseClusterClientInterface interface { - DBClusters(namespace string) DatabaseClusterInterface -} - -type DatabaseClusterClient struct { - restClient rest.Interface -} - -var addToScheme sync.Once - -func NewForConfig(c *rest.Config) (*DatabaseClusterClient, error) { - config := *c - config.ContentConfig.GroupVersion = &dbaasv1.GroupVersion - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - config.UserAgent = rest.DefaultKubernetesUserAgent() - - addToScheme.Do(func() { - dbaasv1.SchemeBuilder.AddToScheme(scheme.Scheme) - metav1.AddToGroupVersion(scheme.Scheme, dbaasv1.GroupVersion) - }) - - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - - return &DatabaseClusterClient{restClient: client}, nil -} - -func (c *DatabaseClusterClient) DBClusters(namespace string) DatabaseClusterInterface { //nolint:ireturn - return &dbClusterClient{ - restClient: c.restClient, - namespace: namespace, - } -} - -type DatabaseClusterInterface interface { - List(ctx context.Context, opts metav1.ListOptions) (*dbaasv1.DatabaseClusterList, error) - Get(ctx context.Context, name string, options metav1.GetOptions) (*dbaasv1.DatabaseCluster, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type dbClusterClient struct { - restClient rest.Interface - namespace string -} - -func (c *dbClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*dbaasv1.DatabaseClusterList, error) { - result := &dbaasv1.DatabaseClusterList{} - err := c.restClient. - Get(). - Namespace(c.namespace). - Resource(apiKind). - VersionedParams(&opts, scheme.ParameterCodec). - Do(ctx). - Into(result) - return result, err -} - -func (c *dbClusterClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*dbaasv1.DatabaseCluster, error) { - result := &dbaasv1.DatabaseCluster{} - err := c.restClient. - Get(). - Namespace(c.namespace). - Resource(apiKind). - VersionedParams(&opts, scheme.ParameterCodec). - Name(name). - Do(ctx). - Into(result) - return result, err -} - -func (c *dbClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { //nolint:ireturn - opts.Watch = true - return c.restClient. - Get(). - Namespace(c.namespace). - Resource(apiKind). - VersionedParams(&opts, scheme.ParameterCodec). - Watch(ctx) -} diff --git a/managed/services/dbaas/kubernetes/client/gen.go b/managed/services/dbaas/kubernetes/client/gen.go deleted file mode 100644 index fe733886cf..0000000000 --- a/managed/services/dbaas/kubernetes/client/gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -//go:generate ../../../../../bin/ifacemaker -f client.go -s Client -i KubeClientConnector -p client -o kubeclient_interface.go -//go:generate ../../../../../bin/mockery --name=KubeClientConnector --case=snake --inpackage diff --git a/managed/services/dbaas/kubernetes/client/kubeclient_interface.go b/managed/services/dbaas/kubernetes/client/kubeclient_interface.go deleted file mode 100644 index e64a80225e..0000000000 --- a/managed/services/dbaas/kubernetes/client/kubeclient_interface.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by ifacemaker; DO NOT EDIT. - -package client - -import ( - "context" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/version" - _ "k8s.io/client-go/plugin/pkg/client/auth" -) - -// KubeClientConnector ... -type KubeClientConnector interface { - // GetSecretsForServiceAccount returns secret by given service account name - GetSecretsForServiceAccount(ctx context.Context, accountName string) (*corev1.Secret, error) - // GenerateKubeConfig generates kubeconfig - GenerateKubeConfig(secret *corev1.Secret) ([]byte, error) - // GetServerVersion returns server version - GetServerVersion() (*version.Info, error) - // ListDatabaseClusters returns list of managed PCX clusters. - ListDatabaseClusters(ctx context.Context) (*dbaasv1.DatabaseClusterList, error) - // GetDatabaseCluster returns PXC clusters by provided name. - GetDatabaseCluster(ctx context.Context, name string) (*dbaasv1.DatabaseCluster, error) - // GetStorageClasses returns all storage classes available in the cluster - GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) - // GetDeployment returns deployment by name - GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error) - // GetSecret returns secret by name - GetSecret(ctx context.Context, name string) (*corev1.Secret, error) - // ListSecrets returns secrets - ListSecrets(ctx context.Context) (*corev1.SecretList, error) - // DeleteObject deletes object from the k8s cluster - DeleteObject(obj runtime.Object) error - ApplyObject(obj runtime.Object) error - // GetPersistentVolumes returns Persistent Volumes available in the cluster - GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) - // GetPods returns list of pods - GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) - // GetNodes returns list of nodes - GetNodes(ctx context.Context) (*corev1.NodeList, error) - // GetLogs returns logs for pod - GetLogs(ctx context.Context, pod, container string) (string, error) - GetEvents(ctx context.Context, name string) (string, error) - // ApplyFile accepts manifest file contents, parses into []runtime.Object - // and applies them against the cluster - ApplyFile(fileBytes []byte) error - // DoCSVWait waits until for a CSV to be applied. - DoCSVWait(ctx context.Context, key types.NamespacedName) error - // GetSubscriptionCSV retrieves a subscription CSV. - GetSubscriptionCSV(ctx context.Context, subKey types.NamespacedName) (types.NamespacedName, error) - // DoRolloutWait waits until a deployment has been rolled out susccessfully or there is an error. - DoRolloutWait(ctx context.Context, key types.NamespacedName) error - // GetOperatorGroup retrieves an operator group details by namespace and name. - GetOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) - // CreateOperatorGroup creates an operator group to be used as part of a subscription. - CreateOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) - // CreateSubscriptionForCatalog creates an OLM subscription. - CreateSubscriptionForCatalog(ctx context.Context, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV string, approval v1alpha1.Approval) (*v1alpha1.Subscription, error) - // GetSubscription retrieves an OLM subscription by namespace and name. - GetSubscription(ctx context.Context, namespace, name string) (*v1alpha1.Subscription, error) - // ListSubscriptions all the subscriptions in the namespace. - ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) - // GetInstallPlan retrieves an OLM install plan by namespace and name. - GetInstallPlan(ctx context.Context, namespace string, name string) (*v1alpha1.InstallPlan, error) - // UpdateInstallPlan updates the existing install plan in the specified namespace. - UpdateInstallPlan(ctx context.Context, namespace string, installPlan *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error) - // ListCRDs returns a list of CRDs. - ListCRDs(ctx context.Context, labelSelector *metav1.LabelSelector) (*apiextv1.CustomResourceDefinitionList, error) - // ListCRs returns a list of CRs. - ListCRs(ctx context.Context, namespace string, gvr schema.GroupVersionResource, labelSelector *metav1.LabelSelector) (*unstructured.UnstructuredList, error) -} diff --git a/managed/services/dbaas/kubernetes/client/load_config.go b/managed/services/dbaas/kubernetes/client/load_config.go deleted file mode 100644 index 4d993af1ba..0000000000 --- a/managed/services/dbaas/kubernetes/client/load_config.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -import ( - "k8s.io/client-go/tools/clientcmd" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -// configGetter stores kubeconfig string to convert it to the final object -type configGetter struct { - kubeconfig string -} - -// NewConfigGetter creates a new configGetter struct -func NewConfigGetter(kubeconfig string) *configGetter { - return &configGetter{kubeconfig: kubeconfig} -} - -// loadFromString takes a kubeconfig and deserializes the contents into Config object. -func (g *configGetter) loadFromString() (*clientcmdapi.Config, error) { - config, err := clientcmd.Load([]byte(g.kubeconfig)) - if err != nil { - return nil, err - } - - if config.AuthInfos == nil { - config.AuthInfos = make(map[string]*clientcmdapi.AuthInfo) - } - if config.Clusters == nil { - config.Clusters = make(map[string]*clientcmdapi.Cluster) - } - if config.Contexts == nil { - config.Contexts = make(map[string]*clientcmdapi.Context) - } - - return config, nil -} diff --git a/managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go b/managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go deleted file mode 100644 index 694db0862d..0000000000 --- a/managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go +++ /dev/null @@ -1,730 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package client - -import ( - context "context" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - v1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" - apiv1 "github.com/percona/dbaas-operator/api/v1" - mock "github.com/stretchr/testify/mock" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - version "k8s.io/apimachinery/pkg/version" -) - -// MockKubeClientConnector is an autogenerated mock type for the KubeClientConnector type -type MockKubeClientConnector struct { - mock.Mock -} - -// ApplyFile provides a mock function with given fields: fileBytes -func (_m *MockKubeClientConnector) ApplyFile(fileBytes []byte) error { - ret := _m.Called(fileBytes) - - var r0 error - if rf, ok := ret.Get(0).(func([]byte) error); ok { - r0 = rf(fileBytes) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ApplyObject provides a mock function with given fields: obj -func (_m *MockKubeClientConnector) ApplyObject(obj runtime.Object) error { - ret := _m.Called(obj) - - var r0 error - if rf, ok := ret.Get(0).(func(runtime.Object) error); ok { - r0 = rf(obj) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CreateOperatorGroup provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) CreateOperatorGroup(ctx context.Context, namespace string, name string) (*v1.OperatorGroup, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1.OperatorGroup - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1.OperatorGroup, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1.OperatorGroup); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.OperatorGroup) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CreateSubscriptionForCatalog provides a mock function with given fields: ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval -func (_m *MockKubeClientConnector) CreateSubscriptionForCatalog(ctx context.Context, namespace string, name string, catalogNamespace string, catalog string, packageName string, channel string, startingCSV string, approval v1alpha1.Approval) (*v1alpha1.Subscription, error) { - ret := _m.Called(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - - var r0 *v1alpha1.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string, string, v1alpha1.Approval) (*v1alpha1.Subscription, error)); ok { - return rf(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string, string, v1alpha1.Approval) *v1alpha1.Subscription); ok { - r0 = rf(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string, string, string, v1alpha1.Approval) error); ok { - r1 = rf(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DeleteObject provides a mock function with given fields: obj -func (_m *MockKubeClientConnector) DeleteObject(obj runtime.Object) error { - ret := _m.Called(obj) - - var r0 error - if rf, ok := ret.Get(0).(func(runtime.Object) error); ok { - r0 = rf(obj) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DoCSVWait provides a mock function with given fields: ctx, key -func (_m *MockKubeClientConnector) DoCSVWait(ctx context.Context, key types.NamespacedName) error { - ret := _m.Called(ctx, key) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DoRolloutWait provides a mock function with given fields: ctx, key -func (_m *MockKubeClientConnector) DoRolloutWait(ctx context.Context, key types.NamespacedName) error { - ret := _m.Called(ctx, key) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GenerateKubeConfig provides a mock function with given fields: secret -func (_m *MockKubeClientConnector) GenerateKubeConfig(secret *corev1.Secret) ([]byte, error) { - ret := _m.Called(secret) - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(*corev1.Secret) ([]byte, error)); ok { - return rf(secret) - } - if rf, ok := ret.Get(0).(func(*corev1.Secret) []byte); ok { - r0 = rf(secret) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(*corev1.Secret) error); ok { - r1 = rf(secret) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDatabaseCluster provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDatabaseCluster(ctx context.Context, name string) (*apiv1.DatabaseCluster, error) { - ret := _m.Called(ctx, name) - - var r0 *apiv1.DatabaseCluster - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apiv1.DatabaseCluster, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apiv1.DatabaseCluster); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiv1.DatabaseCluster) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDeployment provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error) { - ret := _m.Called(ctx, name) - - var r0 *appsv1.Deployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*appsv1.Deployment, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *appsv1.Deployment); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.Deployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetEvents provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetEvents(ctx context.Context, name string) (string, error) { - ret := _m.Called(ctx, name) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetInstallPlan provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) GetInstallPlan(ctx context.Context, namespace string, name string) (*v1alpha1.InstallPlan, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1alpha1.InstallPlan - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.InstallPlan, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.InstallPlan); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.InstallPlan) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLogs provides a mock function with given fields: ctx, pod, container -func (_m *MockKubeClientConnector) GetLogs(ctx context.Context, pod string, container string) (string, error) { - ret := _m.Called(ctx, pod, container) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { - return rf(ctx, pod, container) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) string); ok { - r0 = rf(ctx, pod, container) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, pod, container) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetNodes provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) GetNodes(ctx context.Context) (*corev1.NodeList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.NodeList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.NodeList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.NodeList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.NodeList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetOperatorGroup provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) GetOperatorGroup(ctx context.Context, namespace string, name string) (*v1.OperatorGroup, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1.OperatorGroup - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1.OperatorGroup, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1.OperatorGroup); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.OperatorGroup) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPersistentVolumes provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.PersistentVolumeList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.PersistentVolumeList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.PersistentVolumeList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.PersistentVolumeList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPods provides a mock function with given fields: ctx, namespace, labelSelector -func (_m *MockKubeClientConnector) GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) { - ret := _m.Called(ctx, namespace, labelSelector) - - var r0 *corev1.PodList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *metav1.LabelSelector) (*corev1.PodList, error)); ok { - return rf(ctx, namespace, labelSelector) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *metav1.LabelSelector) *corev1.PodList); ok { - r0 = rf(ctx, namespace, labelSelector) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.PodList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *metav1.LabelSelector) error); ok { - r1 = rf(ctx, namespace, labelSelector) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSecret provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetSecret(ctx context.Context, name string) (*corev1.Secret, error) { - ret := _m.Called(ctx, name) - - var r0 *corev1.Secret - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*corev1.Secret, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *corev1.Secret); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Secret) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSecretsForServiceAccount provides a mock function with given fields: ctx, accountName -func (_m *MockKubeClientConnector) GetSecretsForServiceAccount(ctx context.Context, accountName string) (*corev1.Secret, error) { - ret := _m.Called(ctx, accountName) - - var r0 *corev1.Secret - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*corev1.Secret, error)); ok { - return rf(ctx, accountName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *corev1.Secret); ok { - r0 = rf(ctx, accountName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Secret) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, accountName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetServerVersion provides a mock function with given fields: -func (_m *MockKubeClientConnector) GetServerVersion() (*version.Info, error) { - ret := _m.Called() - - var r0 *version.Info - var r1 error - if rf, ok := ret.Get(0).(func() (*version.Info, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() *version.Info); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*version.Info) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetStorageClasses provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - ret := _m.Called(ctx) - - var r0 *storagev1.StorageClassList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*storagev1.StorageClassList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *storagev1.StorageClassList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*storagev1.StorageClassList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSubscription provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) GetSubscription(ctx context.Context, namespace string, name string) (*v1alpha1.Subscription, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1alpha1.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Subscription, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Subscription); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSubscriptionCSV provides a mock function with given fields: ctx, subKey -func (_m *MockKubeClientConnector) GetSubscriptionCSV(ctx context.Context, subKey types.NamespacedName) (types.NamespacedName, error) { - ret := _m.Called(ctx, subKey) - - var r0 types.NamespacedName - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) (types.NamespacedName, error)); ok { - return rf(ctx, subKey) - } - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) types.NamespacedName); ok { - r0 = rf(ctx, subKey) - } else { - r0 = ret.Get(0).(types.NamespacedName) - } - - if rf, ok := ret.Get(1).(func(context.Context, types.NamespacedName) error); ok { - r1 = rf(ctx, subKey) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListCRDs provides a mock function with given fields: ctx, labelSelector -func (_m *MockKubeClientConnector) ListCRDs(ctx context.Context, labelSelector *metav1.LabelSelector) (*apiextensionsv1.CustomResourceDefinitionList, error) { - ret := _m.Called(ctx, labelSelector) - - var r0 *apiextensionsv1.CustomResourceDefinitionList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *metav1.LabelSelector) (*apiextensionsv1.CustomResourceDefinitionList, error)); ok { - return rf(ctx, labelSelector) - } - if rf, ok := ret.Get(0).(func(context.Context, *metav1.LabelSelector) *apiextensionsv1.CustomResourceDefinitionList); ok { - r0 = rf(ctx, labelSelector) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiextensionsv1.CustomResourceDefinitionList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *metav1.LabelSelector) error); ok { - r1 = rf(ctx, labelSelector) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListCRs provides a mock function with given fields: ctx, namespace, gvr, labelSelector -func (_m *MockKubeClientConnector) ListCRs(ctx context.Context, namespace string, gvr schema.GroupVersionResource, labelSelector *metav1.LabelSelector) (*unstructured.UnstructuredList, error) { - ret := _m.Called(ctx, namespace, gvr, labelSelector) - - var r0 *unstructured.UnstructuredList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, schema.GroupVersionResource, *metav1.LabelSelector) (*unstructured.UnstructuredList, error)); ok { - return rf(ctx, namespace, gvr, labelSelector) - } - if rf, ok := ret.Get(0).(func(context.Context, string, schema.GroupVersionResource, *metav1.LabelSelector) *unstructured.UnstructuredList); ok { - r0 = rf(ctx, namespace, gvr, labelSelector) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*unstructured.UnstructuredList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, schema.GroupVersionResource, *metav1.LabelSelector) error); ok { - r1 = rf(ctx, namespace, gvr, labelSelector) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListDatabaseClusters provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) ListDatabaseClusters(ctx context.Context) (*apiv1.DatabaseClusterList, error) { - ret := _m.Called(ctx) - - var r0 *apiv1.DatabaseClusterList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*apiv1.DatabaseClusterList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *apiv1.DatabaseClusterList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiv1.DatabaseClusterList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListSecrets provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) ListSecrets(ctx context.Context) (*corev1.SecretList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.SecretList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.SecretList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.SecretList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.SecretList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListSubscriptions provides a mock function with given fields: ctx, namespace -func (_m *MockKubeClientConnector) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - ret := _m.Called(ctx, namespace) - - var r0 *v1alpha1.SubscriptionList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.SubscriptionList, error)); ok { - return rf(ctx, namespace) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.SubscriptionList); ok { - r0 = rf(ctx, namespace) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.SubscriptionList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// UpdateInstallPlan provides a mock function with given fields: ctx, namespace, installPlan -func (_m *MockKubeClientConnector) UpdateInstallPlan(ctx context.Context, namespace string, installPlan *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error) { - ret := _m.Called(ctx, namespace, installPlan) - - var r0 *v1alpha1.InstallPlan - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error)); ok { - return rf(ctx, namespace, installPlan) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *v1alpha1.InstallPlan) *v1alpha1.InstallPlan); ok { - r0 = rf(ctx, namespace, installPlan) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.InstallPlan) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *v1alpha1.InstallPlan) error); ok { - r1 = rf(ctx, namespace, installPlan) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewMockKubeClientConnector creates a new instance of MockKubeClientConnector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockKubeClientConnector(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockKubeClientConnector { - mock := &MockKubeClientConnector{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/dbaas/kubernetes/client/writer.go b/managed/services/dbaas/kubernetes/client/writer.go deleted file mode 100644 index a058cc0531..0000000000 --- a/managed/services/dbaas/kubernetes/client/writer.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -import ( - "fmt" - "io" -) - -// PrefixWriter can write text at various indentation levels. -type PrefixWriter interface { - // Writef writes text with the specified indentation level. - Writef(level int, format string, a ...interface{}) - // WriteLine writes an entire line with no indentation level. - WriteLine(a ...interface{}) - // Flush forces indentation to be reset. - Flush() -} - -// prefixWriter implements PrefixWriter -type prefixWriter struct { - out io.Writer -} - -var _ PrefixWriter = &prefixWriter{} - -// NewPrefixWriter creates a new PrefixWriter. -func NewPrefixWriter(out io.Writer) PrefixWriter { //nolint:ireturn - return &prefixWriter{out: out} -} - -func (pw *prefixWriter) Writef(level int, format string, a ...interface{}) { - levelSpace := " " - prefix := "" - for i := 0; i < level; i++ { - prefix += levelSpace - } - - fmt.Fprintf(pw.out, prefix+format, a...) -} - -func (pw *prefixWriter) WriteLine(a ...interface{}) { - fmt.Fprintln(pw.out, a...) -} - -func (pw *prefixWriter) Flush() { - if f, ok := pw.out.(flusher); ok { - f.Flush() - } -} - -type flusher interface { - Flush() -} diff --git a/managed/services/dbaas/kubernetes/kubernetes.go b/managed/services/dbaas/kubernetes/kubernetes.go deleted file mode 100644 index 5fe45368a7..0000000000 --- a/managed/services/dbaas/kubernetes/kubernetes.go +++ /dev/null @@ -1,973 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package kubernetes provides functionality for kubernetes. -package kubernetes - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "io/fs" - "log" - "net/http" - "strings" - "sync" - "time" - - "github.com/operator-framework/api/pkg/operators/v1alpha1" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/apimachinery/pkg/version" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/data" - "github.com/percona/pmm/managed/services/dbaas/kubernetes/client" - "github.com/percona/pmm/managed/services/dbaas/utils/convertors" -) - -type ClusterType string - -const ( - ClusterTypeUnknown ClusterType = "unknown" - ClusterTypeMinikube ClusterType = "minikube" - ClusterTypeEKS ClusterType = "eks" - ClusterTypeGeneric ClusterType = "generic" - pxcDeploymentName = "percona-xtradb-cluster-operator" - psmdbDeploymentName = "percona-server-mongodb-operator" - dbaasDeploymentName = "dbaas-operator-controller-manager" - psmdbOperatorContainerName = "percona-server-mongodb-operator" - pxcOperatorContainerName = "percona-xtradb-cluster-operator" - dbaasOperatorContainerName = "manager" - databaseClusterKind = "DatabaseCluster" - databaseClusterAPIVersion = "dbaas.percona.com/v1" - restartAnnotationKey = "dbaas.percona.com/restart" - managedByKey = "dbaas.percona.com/managed-by" - templateLabelKey = "dbaas.percona.com/template" - engineLabelKey = "dbaas.percona.com/engine" - - // ContainerStateWaiting represents a state when container requires some - // operations being done in order to complete start up. - ContainerStateWaiting ContainerState = "waiting" - // ContainerStateTerminated indicates that container began execution and - // then either ran to completion or failed for some reason. - ContainerStateTerminated ContainerState = "terminated" - - // Max size of volume for AWS Elastic Block Storage service is 16TiB. - maxVolumeSizeEBS uint64 = 16 * 1024 * 1024 * 1024 * 1024 - olmNamespace = "olm" - useDefaultNamespace = "" - - // APIVersionCoreosV1 constant for some API requests. - APIVersionCoreosV1 = "operators.coreos.com/v1" - - pollInterval = 1 * time.Second - pollDuration = 5 * time.Minute -) - -// ErrEmptyVersionTag Got an empty version tag from GitHub API. -var ErrEmptyVersionTag error = errors.New("got an empty version tag from Github") - -// Kubernetes is a client for Kubernetes. -type Kubernetes struct { - lock *sync.RWMutex - client client.KubeClientConnector - l *logrus.Entry - httpClient *http.Client - kubeconfig string -} - -// ContainerState describes container's state - waiting, running, terminated. -type ContainerState string - -// NodeSummaryNode holds information about Node inside Node's summary. -type NodeSummaryNode struct { - FileSystem NodeFileSystemSummary `json:"fs,omitempty"` -} - -// NodeSummary holds summary of the Node. -// One gets this by requesting Kubernetes API endpoint: -// /v1/nodes//proxy/stats/summary. -type NodeSummary struct { - Node NodeSummaryNode `json:"node,omitempty"` -} - -// NodeFileSystemSummary holds a summary of Node's filesystem. -type NodeFileSystemSummary struct { - UsedBytes uint64 `json:"usedBytes,omitempty"` -} - -// NewIncluster returns new Kubernetes object. -func NewIncluster() (*Kubernetes, error) { - l := logrus.WithField("component", "kubernetes") - - client, err := client.NewFromInCluster() - if err != nil { - return nil, err - } - - return &Kubernetes{ - client: client, - l: l, - lock: &sync.RWMutex{}, - httpClient: &http.Client{ - Timeout: time.Second * 5, - Transport: &http.Transport{ - MaxIdleConns: 1, - IdleConnTimeout: 10 * time.Second, - }, - }, - }, nil -} - -// New returns new Kubernetes object. -func New(kubeconfig string) (*Kubernetes, error) { - l := logrus.WithField("component", "kubernetes") - - client, err := client.NewFromKubeConfigString(kubeconfig) - if err != nil { - return nil, err - } - - return &Kubernetes{ - client: client, - l: l, - lock: &sync.RWMutex{}, - httpClient: &http.Client{ - Timeout: time.Second * 5, - Transport: &http.Transport{ - MaxIdleConns: 1, - IdleConnTimeout: 10 * time.Second, - }, - }, - kubeconfig: kubeconfig, - }, nil -} - -// NewEmpty returns new Kubernetes object. -func NewEmpty() *Kubernetes { - return &Kubernetes{ - client: &client.Client{}, - lock: &sync.RWMutex{}, - l: logrus.WithField("component", "kubernetes"), - httpClient: &http.Client{ - Timeout: time.Second * 5, - Transport: &http.Transport{ - MaxIdleConns: 1, - IdleConnTimeout: 10 * time.Second, - }, - }, - } -} - -// SetKubeconfig changes kubeconfig for active client -func (k *Kubernetes) SetKubeconfig(kubeconfig string) error { - k.lock.Lock() - defer k.lock.Unlock() - client, err := client.NewFromKubeConfigString(kubeconfig) - if err != nil { - return err - } - k.client = client - k.kubeconfig = kubeconfig - return nil -} - -// GetKubeconfig generates kubeconfig compatible with kubectl for incluster created clients. -func (k *Kubernetes) GetKubeconfig(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - secret, err := k.client.GetSecretsForServiceAccount(ctx, "pmm-service-account") - if err != nil { - k.l.Errorf("failed getting service account: %v", err) - return "", err - } - - kubeConfig, err := k.client.GenerateKubeConfig(secret) - if err != nil { - k.l.Errorf("failed generating kubeconfig: %v", err) - return "", err - } - - return string(kubeConfig), nil -} - -// ListDatabaseClusters returns list of managed PCX clusters. -func (k *Kubernetes) ListDatabaseClusters(ctx context.Context) (*dbaasv1.DatabaseClusterList, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.ListDatabaseClusters(ctx) -} - -// GetDatabaseCluster returns PXC clusters by provided name. -func (k *Kubernetes) GetDatabaseCluster(ctx context.Context, name string) (*dbaasv1.DatabaseCluster, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.GetDatabaseCluster(ctx, name) -} - -// RestartDatabaseCluster restarts database cluster -func (k *Kubernetes) RestartDatabaseCluster(ctx context.Context, name string) error { - k.lock.Lock() - defer k.lock.Unlock() - cluster, err := k.client.GetDatabaseCluster(ctx, name) - if err != nil { - return err - } - cluster.TypeMeta.APIVersion = databaseClusterAPIVersion - cluster.TypeMeta.Kind = databaseClusterKind - if cluster.ObjectMeta.Annotations == nil { - cluster.ObjectMeta.Annotations = make(map[string]string) - } - cluster.ObjectMeta.Annotations[restartAnnotationKey] = "true" - return k.client.ApplyObject(cluster) -} - -// PatchDatabaseCluster patches CR of managed Database cluster. -func (k *Kubernetes) PatchDatabaseCluster(cluster *dbaasv1.DatabaseCluster) error { - k.lock.Lock() - defer k.lock.Unlock() - return k.client.ApplyObject(cluster) -} - -// CreateDatabaseCluster creates database cluster -func (k *Kubernetes) CreateDatabaseCluster(cluster *dbaasv1.DatabaseCluster) error { - k.lock.Lock() - defer k.lock.Unlock() - if cluster.ObjectMeta.Annotations == nil { - cluster.ObjectMeta.Annotations = make(map[string]string) - } - cluster.ObjectMeta.Annotations[managedByKey] = "pmm" - return k.client.ApplyObject(cluster) -} - -// DeleteDatabaseCluster deletes database cluster -func (k *Kubernetes) DeleteDatabaseCluster(ctx context.Context, name string) error { - k.lock.Lock() - defer k.lock.Unlock() - cluster, err := k.client.GetDatabaseCluster(ctx, name) - if err != nil { - return err - } - cluster.TypeMeta.APIVersion = databaseClusterAPIVersion - cluster.TypeMeta.Kind = databaseClusterKind - return k.client.DeleteObject(cluster) -} - -// GetDefaultStorageClassName returns first storageClassName from kubernetes cluster -func (k *Kubernetes) GetDefaultStorageClassName(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - storageClasses, err := k.client.GetStorageClasses(ctx) - if err != nil { - return "", err - } - if len(storageClasses.Items) != 0 { - return storageClasses.Items[0].Name, nil - } - return "", errors.New("no storage classes available") -} - -// GetClusterType tries to guess the underlying kubernetes cluster based on storage class -func (k *Kubernetes) GetClusterType(ctx context.Context) (ClusterType, error) { - k.lock.RLock() - defer k.lock.RUnlock() - storageClasses, err := k.client.GetStorageClasses(ctx) - if err != nil { - return ClusterTypeUnknown, err - } - for _, storageClass := range storageClasses.Items { - if strings.Contains(storageClass.Provisioner, "aws") { - return ClusterTypeEKS, nil - } - if strings.Contains(storageClass.Provisioner, "minikube") || - strings.Contains(storageClass.Provisioner, "kubevirt.io/hostpath-provisioner") || - strings.Contains(storageClass.Provisioner, "standard") { - return ClusterTypeMinikube, nil - } - } - return ClusterTypeGeneric, nil -} - -// getOperatorVersion parses operator version from operator deployment -func (k *Kubernetes) getOperatorVersion(ctx context.Context, deploymentName, containerName string) (string, error) { - deployment, err := k.client.GetDeployment(ctx, deploymentName) - if err != nil { - return "", err - } - for _, container := range deployment.Spec.Template.Spec.Containers { - if container.Name == containerName { - return strings.Split(container.Image, ":")[1], nil - } - } - return "", errors.New("unknown version of operator") -} - -// GetPSMDBOperatorVersion parses PSMDB operator version from operator deployment -func (k *Kubernetes) GetPSMDBOperatorVersion(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.getOperatorVersion(ctx, psmdbDeploymentName, psmdbOperatorContainerName) -} - -// GetPXCOperatorVersion parses PXC operator version from operator deployment -func (k *Kubernetes) GetPXCOperatorVersion(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.getOperatorVersion(ctx, pxcDeploymentName, pxcOperatorContainerName) -} - -// GetDBaaSOperatorVersion parses DBaaS operator version from operator deployment -func (k *Kubernetes) GetDBaaSOperatorVersion(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.getOperatorVersion(ctx, dbaasDeploymentName, dbaasOperatorContainerName) -} - -// GetSecret returns secret by name -func (k *Kubernetes) GetSecret(ctx context.Context, name string) (*corev1.Secret, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.GetSecret(ctx, name) -} - -// ListSecrets returns secret by name -func (k *Kubernetes) ListSecrets(ctx context.Context) (*corev1.SecretList, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.ListSecrets(ctx) -} - -// CreatePMMSecret creates pmm secret in kubernetes. -func (k *Kubernetes) CreatePMMSecret(secretName string, secrets map[string][]byte) error { - k.lock.Lock() - defer k.lock.Unlock() - secret := &corev1.Secret{ //nolint: exhaustruct - TypeMeta: metav1.TypeMeta{ - APIVersion: "v1", - Kind: "Secret", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: secretName, - }, - Type: corev1.SecretTypeOpaque, - Data: secrets, - } - return k.client.ApplyObject(secret) -} - -func (k *Kubernetes) CreateRestore(restore *dbaasv1.DatabaseClusterRestore) error { - k.lock.Lock() - defer k.lock.Unlock() - return k.client.ApplyObject(restore) -} - -// GetPods returns list of pods. -func (k *Kubernetes) GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) { - return k.client.GetPods(ctx, namespace, labelSelector) -} - -// GetLogs returns logs as slice of log lines - strings - for given pod's container. -func (k *Kubernetes) GetLogs( - ctx context.Context, - containerStatuses []corev1.ContainerStatus, - pod, - container string, -) ([]string, error) { - if IsContainerInState(containerStatuses, ContainerStateWaiting) { - return []string{}, nil - } - - stdout, err := k.client.GetLogs(ctx, pod, container) - if err != nil { - return nil, errors.Wrap(err, "couldn't get logs") - } - - if stdout == "" { - return []string{}, nil - } - - return strings.Split(stdout, "\n"), nil -} - -// GetEvents returns pod's events as a slice of strings. -func (k *Kubernetes) GetEvents(ctx context.Context, pod string) ([]string, error) { - stdout, err := k.client.GetEvents(ctx, pod) - if err != nil { - return nil, errors.Wrap(err, "couldn't describe pod") - } - - lines := strings.Split(stdout, "\n") - - return lines, nil -} - -// IsContainerInState returns true if container is in give state, otherwise false. -func IsContainerInState(containerStatuses []corev1.ContainerStatus, state ContainerState) bool { - containerState := make(map[string]interface{}) - for _, status := range containerStatuses { - data, err := json.Marshal(status.State) - if err != nil { - return false - } - - if err := json.Unmarshal(data, &containerState); err != nil { - return false - } - - if _, ok := containerState[string(state)]; ok { - return true - } - } - - return false -} - -// IsNodeInCondition returns true if node's condition given as an argument has -// status "True". Otherwise it returns false. -func IsNodeInCondition(node corev1.Node, conditionType corev1.NodeConditionType) bool { - for _, condition := range node.Status.Conditions { - if condition.Status == corev1.ConditionTrue && condition.Type == conditionType { - return true - } - } - return false -} - -// GetWorkerNodes returns list of cluster workers nodes. -func (k *Kubernetes) GetWorkerNodes(ctx context.Context) ([]corev1.Node, error) { - nodes, err := k.client.GetNodes(ctx) - if err != nil { - return nil, errors.Wrap(err, "could not get nodes of Kubernetes cluster") - } - forbidenTaints := map[string]corev1.TaintEffect{ - "node.cloudprovider.kubernetes.io/uninitialized": corev1.TaintEffectNoSchedule, - "node.kubernetes.io/unschedulable": corev1.TaintEffectNoSchedule, - "node-role.kubernetes.io/master": corev1.TaintEffectNoSchedule, - } - workers := make([]corev1.Node, 0, len(nodes.Items)) - for _, node := range nodes.Items { - if len(node.Spec.Taints) == 0 { - workers = append(workers, node) - continue - } - for _, taint := range node.Spec.Taints { - effect, keyFound := forbidenTaints[taint.Key] - if !keyFound || effect != taint.Effect { - workers = append(workers, node) - } - } - } - return workers, nil -} - -// GetAllClusterResources goes through all cluster nodes and sums their allocatable resources. -func (k *Kubernetes) GetAllClusterResources(ctx context.Context, clusterType ClusterType, volumes *corev1.PersistentVolumeList) ( //nolint:nonamedreturns - cpuMillis uint64, memoryBytes uint64, diskSizeBytes uint64, err error, -) { - nodes, err := k.GetWorkerNodes(ctx) - if err != nil { - return 0, 0, 0, errors.Wrap(err, "could not get a list of nodes") - } - var volumeCountEKS uint64 - for _, node := range nodes { - cpu, memory, err := getResources(node.Status.Allocatable) - if err != nil { - return 0, 0, 0, errors.Wrap(err, "could not get allocatable resources of the node") - } - cpuMillis += cpu - memoryBytes += memory - - switch clusterType { - case ClusterTypeUnknown: - return 0, 0, 0, errors.Errorf("unknown cluster type") - case ClusterTypeGeneric: - // TODO support other cluster types - continue - case ClusterTypeMinikube: - storage, ok := node.Status.Allocatable[corev1.ResourceEphemeralStorage] - if !ok { - return 0, 0, 0, errors.Errorf("could not get storage size of the node") - } - bytes, err := convertors.StrToBytes(storage.String()) - if err != nil { - return 0, 0, 0, errors.Wrapf(err, "could not convert storage size '%s' to bytes", storage.String()) - } - diskSizeBytes += bytes - case ClusterTypeEKS: - // See https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#scheduler. - if IsNodeInCondition(node, corev1.NodeDiskPressure) { - continue - } - - // Get nodes's type. - nodeType, ok := node.Labels["beta.kubernetes.io/instance-type"] - if !ok { - return 0, 0, 0, errors.New("dealing with AWS EKS cluster but the node does not have label 'beta.kubernetes.io/instance-type'") - } - // 39 is a default limit for EKS cluster nodes ... - volumeLimitPerNode := uint64(39) - typeAndSize := strings.Split(strings.ToLower(nodeType), ".") - if len(typeAndSize) < 2 { - return 0, 0, 0, errors.Errorf("failed to parse EKS node type '%s', it's not in expected format 'type.size'", nodeType) - } - // ... however, if the node type is one of M5, C5, R5, T3, Z1D it's 25. - limitedVolumesSet := map[string]struct{}{ - "m5": {}, "c5": {}, "r5": {}, "t3": {}, "t1d": {}, - } - if _, ok := limitedVolumesSet[typeAndSize[0]]; ok { - volumeLimitPerNode = 25 - } - volumeCountEKS += volumeLimitPerNode - } - } - if clusterType == ClusterTypeEKS { - volumeCountEKSBackup := volumeCountEKS - volumeCountEKS -= uint64(len(volumes.Items)) - if volumeCountEKS > volumeCountEKSBackup { - // handle uint underflow - volumeCountEKS = 0 - } - - consumedBytes, err := sumVolumesSize(volumes) - if err != nil { - return 0, 0, 0, errors.Wrap(err, "failed to sum persistent volumes storage sizes") - } - diskSizeBytes = (volumeCountEKS * maxVolumeSizeEBS) + consumedBytes - } - return cpuMillis, memoryBytes, diskSizeBytes, nil -} - -// getResources extracts resources out of corev1.ResourceList and converts them to int64 values. -// Millicpus are used for CPU values and bytes for memory. -func getResources(resources corev1.ResourceList) (cpuMillis uint64, memoryBytes uint64, err error) { //nolint:nonamedreturns - cpu, ok := resources[corev1.ResourceCPU] - if ok { - cpuMillis, err = convertors.StrToMilliCPU(cpu.String()) - if err != nil { - return 0, 0, errors.Wrapf(err, "failed to convert '%s' to millicpus", cpu.String()) - } - } - memory, ok := resources[corev1.ResourceMemory] - if ok { - memoryBytes, err = convertors.StrToBytes(memory.String()) - if err != nil { - return 0, 0, errors.Wrapf(err, "failed to convert '%s' to bytes", memory.String()) - } - } - return cpuMillis, memoryBytes, nil -} - -// GetConsumedCPUAndMemory returns consumed CPU and Memory in given namespace. If namespace -// is empty, it tries to get them from all namespaces. -func (k *Kubernetes) GetConsumedCPUAndMemory(ctx context.Context, namespace string) ( //nolint:nonamedreturns - cpuMillis uint64, memoryBytes uint64, err error, -) { - // Get CPU and Memory Requests of Pods' containers. - pods, err := k.GetPods(ctx, namespace, nil) - if err != nil { - return 0, 0, errors.Wrap(err, "failed to get consumed resources") - } - for _, ppod := range pods.Items { - if ppod.Status.Phase != corev1.PodRunning { - continue - } - nonTerminatedInitContainers := make([]corev1.Container, 0, len(ppod.Spec.InitContainers)) - for _, container := range ppod.Spec.InitContainers { - if !IsContainerInState( - ppod.Status.InitContainerStatuses, ContainerStateTerminated, - ) { - nonTerminatedInitContainers = append(nonTerminatedInitContainers, container) - } - } - for _, container := range append(ppod.Spec.Containers, nonTerminatedInitContainers...) { - cpu, memory, err := getResources(container.Resources.Requests) - if err != nil { - return 0, 0, errors.Wrap(err, "failed to sum all consumed resources") - } - cpuMillis += cpu - memoryBytes += memory - } - } - - return cpuMillis, memoryBytes, nil -} - -// GetConsumedDiskBytes returns consumed bytes. The strategy differs based on k8s cluster type. -func (k *Kubernetes) GetConsumedDiskBytes(ctx context.Context, clusterType ClusterType, volumes *corev1.PersistentVolumeList) (consumedBytes uint64, err error) { //nolint:lll,nonamedreturns - switch clusterType { - case ClusterTypeUnknown: - return 0, errors.Errorf("unknown cluster type") - case ClusterTypeGeneric: - // TODO support other cluster types - return 0, nil - case ClusterTypeMinikube: - nodes, err := k.GetWorkerNodes(ctx) - if err != nil { - return 0, errors.Wrap(err, "can't compute consumed disk size: failed to get worker nodes") - } - clientConfig, err := clientcmd.NewClientConfigFromBytes([]byte(k.kubeconfig)) - if err != nil { - return 0, errors.Wrap(err, "failed to build kubeconfig out of given path") - } - config, err := clientConfig.ClientConfig() - if err != nil { - return 0, errors.Wrap(err, "failed to build kubeconfig out of given path") - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return 0, errors.Wrap(err, "failed to build client out of submited kubeconfig") - } - for _, node := range nodes { - var summary NodeSummary - request := clientset.CoreV1().RESTClient().Get().Resource("nodes").Name(node.Name).SubResource("proxy").Suffix("stats/summary") - responseRawArrayOfBytes, err := request.DoRaw(context.Background()) //nolint:contextcheck - if err != nil { - return 0, errors.Wrap(err, "failed to get stats from node") - } - if err := json.Unmarshal(responseRawArrayOfBytes, &summary); err != nil { - return 0, errors.Wrap(err, "failed to unmarshal response from kubernetes API") - } - consumedBytes += summary.Node.FileSystem.UsedBytes - } - return consumedBytes, nil - case ClusterTypeEKS: - consumedBytes, err := sumVolumesSize(volumes) - if err != nil { - return 0, errors.Wrap(err, "failed to sum persistent volumes storage sizes") - } - return consumedBytes, nil - } - - return 0, nil -} - -// sumVolumesSize returns sum of persistent volumes storage size in bytes. -func sumVolumesSize(pvs *corev1.PersistentVolumeList) (sum uint64, err error) { //nolint:nonamedreturns - for _, pv := range pvs.Items { - bytes, err := convertors.StrToBytes(pv.Spec.Capacity.Storage().String()) - if err != nil { - return 0, err - } - sum += bytes - } - return -} - -// GetPersistentVolumes returns list of persistent volumes. -func (k *Kubernetes) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - return k.client.GetPersistentVolumes(ctx) -} - -// GetStorageClasses returns all storage classes available in the cluster. -func (k *Kubernetes) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - return k.client.GetStorageClasses(ctx) -} - -// InstallOLMOperator installs the OLM in the Kubernetes cluster. -func (k *Kubernetes) InstallOLMOperator(ctx context.Context) error { - deployment, err := k.client.GetDeployment(ctx, "olm-operator") - if err == nil && deployment != nil && deployment.ObjectMeta.Name != "" { - return nil // already installed - } - - var crdFile, olmFile, perconaCatalog []byte - - crdFile, err = fs.ReadFile(data.OLMCRDs, "crds/olm/crds.yaml") - if err != nil { - return errors.Wrapf(err, "failed to read OLM CRDs file") - } - - if err := k.client.ApplyFile(crdFile); err != nil { - return errors.Wrapf(err, "cannot apply %q file", crdFile) - } - - olmFile, err = fs.ReadFile(data.OLMCRDs, "crds/olm/olm.yaml") - if err != nil { - return errors.Wrapf(err, "failed to read OLM file") - } - - if err := k.client.ApplyFile(olmFile); err != nil { - return errors.Wrapf(err, "cannot apply %q file", crdFile) - } - - perconaCatalog, err = fs.ReadFile(data.OLMCRDs, "crds/olm/percona-dbaas-catalog.yaml") - if err != nil { - return errors.Wrapf(err, "failed to read percona catalog yaml file") - } - - if err := k.client.ApplyFile(perconaCatalog); err != nil { - return errors.Wrapf(err, "cannot apply %q file", crdFile) - } - - if err := k.client.DoRolloutWait(ctx, types.NamespacedName{Namespace: olmNamespace, Name: "olm-operator"}); err != nil { - return errors.Wrap(err, "error while waiting for deployment rollout") - } - if err := k.client.DoRolloutWait(ctx, types.NamespacedName{Namespace: "olm", Name: "catalog-operator"}); err != nil { - return errors.Wrap(err, "error while waiting for deployment rollout") - } - - crdResources, err := decodeResources(crdFile) - if err != nil { - return errors.Wrap(err, "cannot decode crd resources") - } - - olmResources, err := decodeResources(olmFile) - if err != nil { - return errors.Wrap(err, "cannot decode olm resources") - } - - resources := append(crdResources, olmResources...) //nolint:gocritic - - subscriptions := filterResources(resources, func(r unstructured.Unstructured) bool { - return r.GroupVersionKind() == schema.GroupVersionKind{ - Group: v1alpha1.GroupName, - Version: v1alpha1.GroupVersion, - Kind: v1alpha1.SubscriptionKind, - } - }) - - for _, sub := range subscriptions { - subscriptionKey := types.NamespacedName{Namespace: sub.GetNamespace(), Name: sub.GetName()} - log.Printf("Waiting for subscription/%s to install CSV", subscriptionKey.Name) - csvKey, err := k.client.GetSubscriptionCSV(ctx, subscriptionKey) - if err != nil { - return fmt.Errorf("subscription/%s failed to install CSV: %w", subscriptionKey.Name, err) - } - log.Printf("Waiting for clusterserviceversion/%s to reach 'Succeeded' phase", csvKey.Name) - if err := k.client.DoCSVWait(ctx, csvKey); err != nil { - return fmt.Errorf("clusterserviceversion/%s failed to reach 'Succeeded' phase", csvKey.Name) - } - } - - if err := k.client.DoRolloutWait(ctx, types.NamespacedName{Namespace: "olm", Name: "packageserver"}); err != nil { - return errors.Wrap(err, "error while waiting for deployment rollout") - } - - return nil -} - -func decodeResources(f []byte) ([]unstructured.Unstructured, error) { - dec := yaml.NewYAMLOrJSONDecoder(bytes.NewReader(f), 8) - var objs []unstructured.Unstructured - - for { - var u unstructured.Unstructured - err := dec.Decode(&u) - if errors.Is(err, io.EOF) { - break - } else if err != nil { - return nil, err - } - objs = append(objs, u) - } - - return objs, nil -} - -func filterResources( //nolint:nonamedreturns - resources []unstructured.Unstructured, - filter func(unstructured.Unstructured) bool, -) (filtered []unstructured.Unstructured) { - for _, r := range resources { - if filter(r) { - filtered = append(filtered, r) - } - } - return filtered -} - -// InstallOperatorRequest holds the fields to make an operator install request. -type InstallOperatorRequest struct { - Namespace string - Name string - OperatorGroup string - CatalogSource string - CatalogSourceNamespace string - Channel string - InstallPlanApproval v1alpha1.Approval - StartingCSV string -} - -// InstallOperator installs an operator via OLM. -func (k *Kubernetes) InstallOperator(ctx context.Context, req InstallOperatorRequest) error { - if err := createOperatorGroupIfNeeded(ctx, k.client, req.OperatorGroup); err != nil { - return err - } - - subs, err := k.client.CreateSubscriptionForCatalog(ctx, req.Namespace, req.Name, "olm", req.CatalogSource, - req.Name, req.Channel, req.StartingCSV, v1alpha1.ApprovalManual) - if err != nil { - return errors.Wrap(err, "cannot create a susbcription to install the operator") - } - - err = wait.Poll(pollInterval, pollDuration, func() (bool, error) { - k.lock.Lock() - defer k.lock.Unlock() - - subs, err = k.client.GetSubscription(ctx, req.Namespace, req.Name) - if err != nil || subs == nil || (subs != nil && subs.Status.Install == nil) { - return false, err - } - - return true, nil - }) - - if err != nil { - return err - } - if subs == nil { - return fmt.Errorf("cannot get an install plan for the operator subscription: %q", req.Name) - } - - ip, err := k.client.GetInstallPlan(ctx, req.Namespace, subs.Status.Install.Name) - if err != nil { - return err - } - - ip.Spec.Approved = true - _, err = k.client.UpdateInstallPlan(ctx, req.Namespace, ip) - - return err -} - -func createOperatorGroupIfNeeded(ctx context.Context, client client.KubeClientConnector, name string) error { - _, err := client.GetOperatorGroup(ctx, useDefaultNamespace, name) - if err == nil { - return nil - } - - _, err = client.CreateOperatorGroup(ctx, "default", name) - - return err -} - -// ListSubscriptions all the subscriptions in the namespace. -func (k *Kubernetes) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - return k.client.ListSubscriptions(ctx, namespace) -} - -// UpgradeOperator upgrades an operator to the next available version. -func (k *Kubernetes) UpgradeOperator(ctx context.Context, namespace, name string) error { - var subs *v1alpha1.Subscription - - // If the subscription was recently created, the install plan might not be ready yet. - err := wait.Poll(pollInterval, pollDuration, func() (bool, error) { - var err error - subs, err = k.client.GetSubscription(ctx, namespace, name) - if err != nil { - return false, err - } - if subs == nil || subs.Status.Install == nil || subs.Status.Install.Name == "" { - return false, nil - } - - return true, nil - }) - if err != nil { - return err - } - if subs == nil || subs.Status.Install == nil || subs.Status.Install.Name == "" { - return fmt.Errorf("cannot get subscription for %q operator", name) - } - - ip, err := k.client.GetInstallPlan(ctx, namespace, subs.Status.Install.Name) - if err != nil { - return errors.Wrapf(err, "cannot get install plan to upgrade %q", name) - } - - if ip.Spec.Approved { - return nil // There are no upgrades. - } - - ip.Spec.Approved = true - - _, err = k.client.UpdateInstallPlan(ctx, namespace, ip) - - return err -} - -// GetServerVersion returns server version -func (k *Kubernetes) GetServerVersion() (*version.Info, error) { - return k.client.GetServerVersion() -} - -// ListTemplates returns a list of templates. -func (k *Kubernetes) ListTemplates(ctx context.Context, engine, namespace string) ([]*dbaasv1beta1.Template, error) { - k.lock.RLock() - defer k.lock.RUnlock() - - labelSelector := &metav1.LabelSelector{ - MatchLabels: map[string]string{ - templateLabelKey: "yes", - engineLabelKey: engine, - }, - } - - templateCRDs, err := k.client.ListCRDs(ctx, labelSelector) - if err != nil { - return nil, errors.Wrap(err, "failed listing template CRDs") - } - - templates := []*dbaasv1beta1.Template{} - for _, templateCRD := range templateCRDs.Items { - var storedVersionName string - for _, version := range templateCRD.Spec.Versions { - if version.Storage { - storedVersionName = version.Name - break - } - } - // XXX: logically we should check that storedVersionName has been set and - // return an error otherwise but according to the - // CustomResourceDefinitionVersion documentation - // "There must be exactly one version with storage=true." so we are sure - // that storedVersionName will be set. If for some reason it's not, it will - // fail to find the CRs so an error will be returned either way. - gvr := schema.GroupVersionResource{ - Group: templateCRD.Spec.Group, - Version: storedVersionName, - Resource: templateCRD.Spec.Names.Plural, - } - - templateCRs, err := k.client.ListCRs(ctx, namespace, gvr, labelSelector) - if err != nil { - return nil, errors.Wrap(err, "failed listing template CRs") - } - - for _, templateCR := range templateCRs.Items { - //nolint:forcetypeassert - templates = append(templates, &dbaasv1beta1.Template{ - Name: templateCR.Object["metadata"].(map[string]interface{})["name"].(string), - Kind: templateCR.Object["kind"].(string), - }) - } - } - - return templates, nil -} diff --git a/managed/services/dbaas/kubernetes/olm_operator_test.go b/managed/services/dbaas/kubernetes/olm_operator_test.go deleted file mode 100644 index b9cb55d414..0000000000 --- a/managed/services/dbaas/kubernetes/olm_operator_test.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2020 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package operator contains logic related to kubernetes operators. -package kubernetes - -import ( - "context" - "testing" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - appsv1 "k8s.io/api/apps/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/percona/pmm/managed/services/dbaas/kubernetes/client" -) - -func TestInstallOlmOperator(t *testing.T) { - ctx := context.Background() - k8sclient := &client.MockKubeClientConnector{} - - olms := NewEmpty() - olms.client = k8sclient - - t.Run("Install OLM Operator", func(t *testing.T) { - k8sclient.On("CreateSubscriptionForCatalog", mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(&v1alpha1.Subscription{}, nil) - k8sclient.On("GetDeployment", ctx, mock.Anything).Return(&appsv1.Deployment{}, nil) - k8sclient.On("ApplyFile", mock.Anything).Return(nil) - k8sclient.On("DoRolloutWait", ctx, mock.Anything).Return(nil) - k8sclient.On("GetSubscriptionCSV", ctx, mock.Anything).Return(types.NamespacedName{}, nil) - k8sclient.On("DoRolloutWait", ctx, mock.Anything).Return(nil) - err := olms.InstallOLMOperator(ctx) - assert.NoError(t, err) - }) - - t.Run("Install PSMDB Operator", func(t *testing.T) { - // Install PSMDB Operator - subscriptionNamespace := "default" - operatorGroup := "percona-operators-group" - catalosSourceNamespace := "olm" - operatorName := "percona-server-mongodb-operator" - params := InstallOperatorRequest{ - Namespace: subscriptionNamespace, - Name: operatorName, - OperatorGroup: operatorGroup, - CatalogSource: "operatorhubio-catalog", - CatalogSourceNamespace: catalosSourceNamespace, - Channel: "stable", - InstallPlanApproval: v1alpha1.ApprovalManual, - } - - k8sclient.On("GetOperatorGroup", ctx, "", operatorGroup).Return(&v1.OperatorGroup{}, nil) - mockSubscription := &v1alpha1.Subscription{ - Status: v1alpha1.SubscriptionStatus{ - Install: &v1alpha1.InstallPlanReference{ - Name: "abcd1234", - }, - }, - } - k8sclient.On("GetSubscription", ctx, subscriptionNamespace, operatorName).Return(mockSubscription, nil) - mockInstallPlan := &v1alpha1.InstallPlan{} - k8sclient.On("GetInstallPlan", ctx, subscriptionNamespace, mockSubscription.Status.Install.Name).Return(mockInstallPlan, nil) - k8sclient.On("UpdateInstallPlan", ctx, subscriptionNamespace, mockInstallPlan).Return(mockInstallPlan, nil) - err := olms.InstallOperator(ctx, params) - assert.NoError(t, err) - }) -} diff --git a/managed/services/dbaas/kubernetes/operator_service_interface.go b/managed/services/dbaas/kubernetes/operator_service_interface.go deleted file mode 100644 index 01d184b605..0000000000 --- a/managed/services/dbaas/kubernetes/operator_service_interface.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by ifacemaker; DO NOT EDIT. - -package kubernetes - -import ( - "context" - - "github.com/operator-framework/api/pkg/operators/v1alpha1" -) - -// OperatorServiceManager ... -type OperatorServiceManager interface { - // SetKubeConfig receives a new config and establish a new connection to the K8 cluster. - SetKubeConfig(kubeConfig string) error - // InstallOLMOperator installs the OLM in the Kubernetes cluster. - InstallOLMOperator(ctx context.Context) error - // InstallOperator installs an operator via OLM. - InstallOperator(ctx context.Context, req InstallOperatorRequest) error - // ListSubscriptions all the subscriptions in the namespace. - ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) - // UpgradeOperator upgrades an operator to the next available version. - UpgradeOperator(ctx context.Context, namespace, name string) error -} diff --git a/managed/services/dbaas/kubernetes/types.go b/managed/services/dbaas/kubernetes/types.go deleted file mode 100644 index 867491f48f..0000000000 --- a/managed/services/dbaas/kubernetes/types.go +++ /dev/null @@ -1,597 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package kubernetes - -import ( - "fmt" - "strconv" - "strings" - - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" -) - -const ( - dbaasAPI = "dbaas.percona.com/v1" - dbaasKind = "DatabaseCluster" - pxcSecretNameTmpl = "dbaas-%s-pxc-secrets" //nolint:gosec - psmdbSecretNameTmpl = "dbaas-%s-psmdb-secrets" //nolint:gosec - // DatabaseTypePXC is a pxc database - DatabaseTypePXC dbaasv1.EngineType = "pxc" - // DatabaseTypePSMDB is a psmdb database - DatabaseTypePSMDB dbaasv1.EngineType = "psmdb" - externalNLB string = "external" - - dbTemplateKindAnnotationKey = "dbaas.percona.com/dbtemplate-kind" - dbTemplateNameAnnotationKey = "dbaas.percona.com/dbtemplate-name" -) - -var errSimultaneous = errors.New("field suspend and resume cannot be true simultaneously") - -var exposeTypeMap = map[ClusterType]corev1.ServiceType{ - ClusterTypeMinikube: corev1.ServiceTypeNodePort, - ClusterTypeEKS: corev1.ServiceTypeLoadBalancer, - ClusterTypeGeneric: corev1.ServiceTypeLoadBalancer, -} - -var exposeAnnotationsMap = map[ClusterType]map[string]string{ - ClusterTypeMinikube: make(map[string]string), - ClusterTypeEKS: { - "service.beta.kubernetes.io/aws-load-balancer-nlb-target-type": "ip", - "service.beta.kubernetes.io/aws-load-balancer-scheme": "internet-facing", - "service.beta.kubernetes.io/aws-load-balancer-target-group-attributes": "preserve_client_ip.enabled=true", - }, - ClusterTypeGeneric: make(map[string]string), -} - -func convertComputeResource(res *dbaasv1beta1.ComputeResources) (corev1.ResourceRequirements, error) { - req := corev1.ResourceRequirements{} - if res == nil { - return req, nil - } - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", res.CpuM)) - if err != nil { - return req, err - } - memory, err := resource.ParseQuantity(strconv.FormatInt(res.MemoryBytes, 10)) - if err != nil { - return req, err - } - req.Limits = corev1.ResourceList{} - req.Limits[corev1.ResourceCPU] = cpu - req.Limits[corev1.ResourceMemory] = memory - return req, nil -} - -// DatabaseClusterForPXC fills dbaasv1.DatabaseCluster struct with data provided for specified cluster type -func DatabaseClusterForPXC(cluster *dbaasv1beta1.CreatePXCClusterRequest, clusterType ClusterType, backupLocation *models.BackupLocation) (*dbaasv1.DatabaseCluster, *dbaasv1.DatabaseClusterRestore, error) { //nolint:lll - if (cluster.Params.Proxysql != nil) == (cluster.Params.Haproxy != nil) { - return nil, nil, errors.New("pxc cluster must have one and only one proxy type defined") - } - if backupLocation != nil && backupLocation.Type != models.S3BackupLocationType { - return nil, nil, errors.New("only s3 compatible storages are supported for backup/restore") - } - diskSize := resource.NewQuantity(cluster.Params.Pxc.DiskSize, resource.DecimalSI) - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", cluster.Params.Pxc.ComputeResources.CpuM)) - if err != nil { - return nil, nil, err - } - clusterMemory := resource.NewQuantity(cluster.Params.Pxc.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: cluster.Params.Pxc.Image, - DatabaseConfig: cluster.Params.Pxc.Configuration, - ClusterSize: cluster.Params.ClusterSize, - SecretsName: fmt.Sprintf(pxcSecretNameTmpl, cluster.Name), - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: *diskSize, - CPU: cpu, - Memory: *clusterMemory, - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{}, - Backup: &dbaasv1.BackupSpec{}, - }, - } - if cluster.Params.Pxc.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &cluster.Params.Pxc.StorageClass - } - if cluster.Params.Haproxy != nil { - resources, err := convertComputeResource(cluster.Params.Haproxy.ComputeResources) - if err != nil { - return nil, nil, err - } - dbCluster.Spec.LoadBalancer.Image = cluster.Params.Haproxy.Image - dbCluster.Spec.LoadBalancer.Size = cluster.Params.ClusterSize - dbCluster.Spec.LoadBalancer.Resources = resources - dbCluster.Spec.LoadBalancer.Type = "haproxy" - dbCluster.Spec.LoadBalancer.TrafficPolicy = "Cluster" - } - if cluster.Params.Proxysql != nil { - resources, err := convertComputeResource(cluster.Params.Proxysql.ComputeResources) - if err != nil { - return nil, nil, err - } - dbCluster.Spec.LoadBalancer.Size = cluster.Params.ClusterSize - dbCluster.Spec.LoadBalancer.Image = cluster.Params.Proxysql.Image - dbCluster.Spec.LoadBalancer.Resources = resources - dbCluster.Spec.LoadBalancer.Type = "proxysql" - } - if cluster.Params.Backup != nil { - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Enabled = true - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - dbCluster.Spec.Backup.ServiceAccountName = cluster.Params.Backup.ServiceAccount - dbCluster.Spec.Backup.Schedule = []dbaasv1.BackupSchedule{ - { - Name: "schedule", - Enabled: true, - Schedule: cluster.Params.Backup.CronExpression, - Keep: int(cluster.Params.Backup.KeepCopies), - StorageName: storageName, - }, - } - } - if cluster.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if cluster.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - var sourceRanges []string - for _, sourceRange := range cluster.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - - if cluster.Template != nil && cluster.Template.Name != "" && cluster.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = cluster.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = cluster.Template.Kind - } - - if cluster.Params.Restore != nil && cluster.Params.Restore.Destination != "" { - if cluster.Params.Restore.SecretsName != "" { - dbCluster.Spec.SecretsName = cluster.Params.Restore.SecretsName - } - dbCluster.Spec.Backup.Enabled = true - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - - dbRestore := &dbaasv1.DatabaseClusterRestore{ - TypeMeta: metav1.TypeMeta{ - Kind: "DatabaseClusterRestore", - APIVersion: "dbaas.percona.com/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-restore", dbCluster.Name), - }, - Spec: dbaasv1.DatabaseClusterRestoreSpec{ - DatabaseCluster: dbCluster.Name, - DatabaseType: "pxc", - BackupSource: &dbaasv1.BackupSource{ - Destination: cluster.Params.Restore.Destination, - StorageType: dbaasv1.BackupStorageS3, - S3: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - StorageName: storageName, - }, - }, - } - return dbCluster, dbRestore, nil - } - return dbCluster, nil, nil -} - -// DatabaseClusterForPSMDB fills dbaasv1.DatabaseCluster struct with data provided for specified cluster type -func DatabaseClusterForPSMDB(cluster *dbaasv1beta1.CreatePSMDBClusterRequest, clusterType ClusterType, backupLocation *models.BackupLocation, backupImage string) (*dbaasv1.DatabaseCluster, *dbaasv1.DatabaseClusterRestore, error) { //nolint:lll - if backupLocation != nil && backupLocation.Type != models.S3BackupLocationType { - return nil, nil, errors.New("only s3 compatible storages are supported for backup/restore") - } - diskSize := resource.NewQuantity(cluster.Params.Replicaset.DiskSize, resource.DecimalSI) - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", cluster.Params.Replicaset.ComputeResources.CpuM)) - if err != nil { - return nil, nil, err - } - clusterMemory := resource.NewQuantity(cluster.Params.Replicaset.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePSMDB, - DatabaseImage: cluster.Params.Image, - DatabaseConfig: cluster.Params.Replicaset.Configuration, - ClusterSize: cluster.Params.ClusterSize, - SecretsName: fmt.Sprintf(psmdbSecretNameTmpl, cluster.Name), - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: *diskSize, - CPU: cpu, - Memory: *clusterMemory, - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{}, - Backup: &dbaasv1.BackupSpec{}, - }, - } - if cluster.Params.Replicaset.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &cluster.Params.Replicaset.StorageClass - } - dbCluster.Spec.LoadBalancer.Size = cluster.Params.ClusterSize - dbCluster.Spec.LoadBalancer.Type = "mongos" - if cluster.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if cluster.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - if cluster.Params.Backup != nil { - dbCluster.Spec.Backup.Enabled = true - if backupImage != "" { - dbCluster.Spec.Backup.Image = backupImage - } - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - dbCluster.Spec.Backup.ServiceAccountName = cluster.Params.Backup.ServiceAccount - dbCluster.Spec.Backup.Schedule = []dbaasv1.BackupSchedule{ - { - Name: "schedule", - Enabled: true, - Schedule: cluster.Params.Backup.CronExpression, - Keep: int(cluster.Params.Backup.KeepCopies), - StorageName: storageName, - }, - } - } - var sourceRanges []string - for _, sourceRange := range cluster.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - - if cluster.Template != nil && cluster.Template.Name != "" && cluster.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = cluster.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = cluster.Template.Kind - } - - if cluster.Params.Restore != nil && cluster.Params.Restore.Destination != "" { - if cluster.Params.Restore.SecretsName != "" { - dbCluster.Spec.SecretsName = cluster.Params.Restore.SecretsName - } - dbCluster.Spec.Backup.Enabled = true - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - - dbRestore := &dbaasv1.DatabaseClusterRestore{ - TypeMeta: metav1.TypeMeta{ - Kind: "DatabaseClusterRestore", - APIVersion: "dbaas.percona.com/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-restore", dbCluster.Name), - }, - Spec: dbaasv1.DatabaseClusterRestoreSpec{ - DatabaseCluster: dbCluster.Name, - DatabaseType: "psmdb", - BackupSource: &dbaasv1.BackupSource{ - Destination: cluster.Params.Restore.Destination, - StorageType: dbaasv1.BackupStorageS3, - S3: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - StorageName: storageName, - }, - }, - } - return dbCluster, dbRestore, nil - } - return dbCluster, nil, nil -} - -// UpdatePatchForPSMDB returns a patch to update a database cluster -func UpdatePatchForPSMDB(dbCluster *dbaasv1.DatabaseCluster, updateRequest *dbaasv1beta1.UpdatePSMDBClusterRequest, clusterType ClusterType) error { - if updateRequest.Params.Suspend && updateRequest.Params.Resume { - return errSimultaneous - } - dbCluster.TypeMeta = metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - } - if updateRequest.Template != nil && updateRequest.Template.Name != "" && updateRequest.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = updateRequest.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = updateRequest.Template.Kind - } else { - delete(dbCluster.ObjectMeta.Annotations, dbTemplateNameAnnotationKey) - delete(dbCluster.ObjectMeta.Annotations, dbTemplateKindAnnotationKey) - } - if updateRequest.Params.ClusterSize > 0 { - dbCluster.Spec.ClusterSize = updateRequest.Params.ClusterSize - } - if updateRequest.Params.Image != "" { - dbCluster.Spec.DatabaseImage = updateRequest.Params.Image - } - //nolint:nestif - if updateRequest.Params.Replicaset != nil { - if updateRequest.Params.Replicaset.ComputeResources != nil { - if updateRequest.Params.Replicaset.ComputeResources.CpuM > 0 { - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", updateRequest.Params.Replicaset.ComputeResources.CpuM)) - if err != nil { - return err - } - dbCluster.Spec.DBInstance.CPU = cpu - } - if updateRequest.Params.Replicaset.ComputeResources.MemoryBytes > 0 { - clusterMemory := resource.NewQuantity(updateRequest.Params.Replicaset.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster.Spec.DBInstance.Memory = *clusterMemory - } - } - if updateRequest.Params.Replicaset.Configuration != "" { - dbCluster.Spec.DatabaseConfig = updateRequest.Params.Replicaset.Configuration - } - - if updateRequest.Params.Replicaset.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &updateRequest.Params.Replicaset.StorageClass - } - } - if updateRequest.Params.Suspend { - dbCluster.Spec.Pause = true - } - if updateRequest.Params.Resume { - dbCluster.Spec.Pause = false - } - if !updateRequest.Expose { - dbCluster.Spec.LoadBalancer.ExposeType = corev1.ServiceTypeClusterIP - } - if updateRequest.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if updateRequest.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - var sourceRanges []string - for _, sourceRange := range updateRequest.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - if len(sourceRanges) == 0 && len(dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - return nil -} - -// UpdatePatchForPXC returns a patch to update a database cluster -func UpdatePatchForPXC(dbCluster *dbaasv1.DatabaseCluster, updateRequest *dbaasv1beta1.UpdatePXCClusterRequest, clusterType ClusterType) error { //nolint:cyclop - if updateRequest.Params.Suspend && updateRequest.Params.Resume { - return errSimultaneous - } - dbCluster.TypeMeta = metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - } - if updateRequest.Template != nil && updateRequest.Template.Name != "" && updateRequest.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = updateRequest.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = updateRequest.Template.Kind - } else { - delete(dbCluster.ObjectMeta.Annotations, dbTemplateNameAnnotationKey) - delete(dbCluster.ObjectMeta.Annotations, dbTemplateKindAnnotationKey) - } - - if updateRequest.Params.ClusterSize > 0 { - dbCluster.Spec.ClusterSize = updateRequest.Params.ClusterSize - } - if updateRequest.Params.Pxc != nil { - if updateRequest.Params.Pxc.Image != "" { - dbCluster.Spec.DatabaseImage = updateRequest.Params.Pxc.Image - } - if updateRequest.Params.Pxc.Configuration != "" { - dbCluster.Spec.DatabaseConfig = updateRequest.Params.Pxc.Configuration - } - if updateRequest.Params.Pxc.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &updateRequest.Params.Pxc.StorageClass - } - } - - if updateRequest.Params.Pxc != nil && updateRequest.Params.Pxc.ComputeResources != nil { - if updateRequest.Params.Pxc.ComputeResources.CpuM > 0 { - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", updateRequest.Params.Pxc.ComputeResources.CpuM)) - if err != nil { - return err - } - dbCluster.Spec.DBInstance.CPU = cpu - } - if updateRequest.Params.Pxc.ComputeResources.MemoryBytes > 0 { - clusterMemory := resource.NewQuantity(updateRequest.Params.Pxc.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster.Spec.DBInstance.Memory = *clusterMemory - } - } - if updateRequest.Params.Haproxy != nil && updateRequest.Params.Haproxy.ComputeResources != nil { - resources, err := convertComputeResource(updateRequest.Params.Haproxy.ComputeResources) - if err != nil { - return err - } - dbCluster.Spec.LoadBalancer.Resources = resources - } - if updateRequest.Params.Proxysql != nil && updateRequest.Params.Proxysql.ComputeResources != nil { - resources, err := convertComputeResource(updateRequest.Params.Proxysql.ComputeResources) - if err != nil { - return err - } - dbCluster.Spec.LoadBalancer.Resources = resources - } - if updateRequest.Params.Suspend { - dbCluster.Spec.Pause = true - } - if updateRequest.Params.Resume { - dbCluster.Spec.Pause = false - } - if !updateRequest.Expose { - dbCluster.Spec.LoadBalancer.ExposeType = corev1.ServiceTypeClusterIP - } - if updateRequest.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if updateRequest.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - var sourceRanges []string - for _, sourceRange := range updateRequest.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - if len(sourceRanges) == 0 && len(dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - return nil -} - -func SecretForBackup(backupLocation *models.BackupLocation) map[string][]byte { - return map[string][]byte{ - "AWS_ACCESS_KEY_ID": []byte(backupLocation.S3Config.AccessKey), - "AWS_SECRET_ACCESS_KEY": []byte(backupLocation.S3Config.SecretKey), - } -} diff --git a/managed/services/dbaas/kubernetes/types_test.go b/managed/services/dbaas/kubernetes/types_test.go deleted file mode 100644 index 21f132a3f3..0000000000 --- a/managed/services/dbaas/kubernetes/types_test.go +++ /dev/null @@ -1,772 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package kubernetes - -import ( - "testing" - - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" -) - -func TestDatabaseClusterForPXC(t *testing.T) { - t.Parallel() - testCases := []struct { - name string - input *dbaasv1beta1.CreatePXCClusterRequest - clusterType ClusterType - expected *dbaasv1.DatabaseCluster - }{ - { - name: "Basic PXC cluster with ProxySQL", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: false, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Proxysql: &dbaasv1beta1.PXCClusterParams_ProxySQL{ - Image: "something", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 100, - MemoryBytes: 100, - }, - DiskSize: 100, - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "proxysql", - Image: "something", - Size: 1, - Configuration: "", - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("100"), - corev1.ResourceCPU: resource.MustParse("100m"), - }, - }, - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic PXC cluster with HAProxy", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: false, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 100, - MemoryBytes: 100, - }, - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("100"), - corev1.ResourceCPU: resource.MustParse("100m"), - }, - }, - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic PXC cluster with HAProxy without compute resources", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: false, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic exposed PXC cluster with HAProxy (EKS)", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: true, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeEKS, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeLoadBalancer, - Annotations: map[string]string{ - "service.beta.kubernetes.io/aws-load-balancer-nlb-target-type": "ip", - "service.beta.kubernetes.io/aws-load-balancer-scheme": "internet-facing", - "service.beta.kubernetes.io/aws-load-balancer-target-group-attributes": "preserve_client_ip.enabled=true", - }, - - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic exposed PXC cluster with HAProxy and internet facing", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: true, - InternetFacing: true, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeEKS, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeLoadBalancer, - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - Annotations: map[string]string{ - "service.beta.kubernetes.io/aws-load-balancer-nlb-target-type": "ip", - "service.beta.kubernetes.io/aws-load-balancer-scheme": "internet-facing", - "service.beta.kubernetes.io/aws-load-balancer-target-group-attributes": "preserve_client_ip.enabled=true", - "service.beta.kubernetes.io/aws-load-balancer-type": "external", - }, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic exposed PXC cluster with HAProxy", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: true, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeLoadBalancer, - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - } - for _, testCase := range testCases { - tt := testCase - cluster, _, err := DatabaseClusterForPXC(tt.input, tt.clusterType, &models.BackupLocation{Type: models.S3BackupLocationType}) - assert.NoError(t, err, tt.name) - assert.Equal(t, tt.expected, cluster, tt.name) - } -} - -func TestUpdatePatchForPXC(t *testing.T) { - t.Parallel() - storageClass := "gp2" - testCases := []struct { - name string - updateRequest *dbaasv1beta1.UpdatePXCClusterRequest - cluster *dbaasv1.DatabaseCluster - expected *dbaasv1.DatabaseCluster - }{ - { - name: "Empty update does not update anything", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{}, - }, - }, - { - name: "Pause cluster", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - Pause: true, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - Suspend: true, - }, - }, - }, - { - name: "Resume cluster", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - Pause: true, - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - Resume: true, - }, - }, - }, - { - name: "Update Cluster", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "updatedImage", - DatabaseConfig: "", - ClusterSize: 3, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("300m"), - Memory: resource.MustParse("3000"), - StorageClassName: &storageClass, - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("200"), - corev1.ResourceCPU: resource.MustParse("200m"), - }, - }, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - ClusterSize: 3, - Pxc: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC{ - Image: "updatedImage", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 300, - MemoryBytes: 3000, - }, - StorageClass: "gp2", - }, - Haproxy: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 200, - }, - }, - }, - }, - }, - } - - for _, testCase := range testCases { - tt := testCase - err := UpdatePatchForPXC(tt.cluster, tt.updateRequest, ClusterTypeGeneric) - assert.NoError(t, err) - assert.Equal(t, tt.expected, tt.cluster) - } -} diff --git a/managed/services/dbaas/utils/convertors/convertors.go b/managed/services/dbaas/utils/convertors/convertors.go deleted file mode 100644 index b6481ae467..0000000000 --- a/managed/services/dbaas/utils/convertors/convertors.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package convertors provides data size convert functinality. -package convertors - -import ( - "math" - "strconv" - "strings" - "unicode" - - "github.com/pkg/errors" -) - -const ( - kiloByte uint64 = 1000 - kibiByte uint64 = 1024 - megaByte uint64 = kiloByte * 1000 - mibiByte uint64 = kibiByte * 1024 - gigaByte uint64 = megaByte * 1000 - gibiByte uint64 = mibiByte * 1024 - teraByte uint64 = gigaByte * 1000 - tebiByte uint64 = gibiByte * 1024 - petaByte uint64 = teraByte * 1000 - pebiByte uint64 = tebiByte * 1024 - exaByte uint64 = petaByte * 1000 - exbiByte uint64 = pebiByte * 1024 -) - -// StrToBytes converts string containing memory as string to number of bytes the string represents. -func StrToBytes(memory string) (uint64, error) { - if len(memory) == 0 { - return 0, nil - } - i := len(memory) - 1 - for i >= 0 && !unicode.IsDigit(rune(memory[i])) { - i-- - } - var suffix string - if i >= 0 { - suffix = memory[i+1:] - } - - // Resources units map for k8s - // - // Supports the following units - // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory - // - // Support of 'm' unit can be redundant because it's used for CPU limits mostly - suffixMapping := map[string]float64{ - "m": 0.001, - "k": float64(kiloByte), - "Ki": float64(kibiByte), - "M": float64(megaByte), - "Mi": float64(mibiByte), - "G": float64(gigaByte), - "Gi": float64(gibiByte), - "T": float64(teraByte), - "Ti": float64(tebiByte), - "P": float64(petaByte), - "Pi": float64(pebiByte), - "E": float64(exaByte), - "Ei": float64(exbiByte), - "": 1.0, - } - coeficient, ok := suffixMapping[suffix] - if !ok { - return 0, errors.Errorf("suffix '%s' is not supported", suffix) - } - - if suffix != "" { - memory = memory[:i+1] - } - value, err := strconv.ParseFloat(memory, 64) - if err != nil { - return 0, errors.Errorf("given value '%s' is not a number", memory) - } - return uint64(math.Ceil(value * coeficient)), nil -} - -// StrToMilliCPU converts CPU as a string representation to millicpus represented as an integer. -func StrToMilliCPU(cpu string) (uint64, error) { - if cpu == "" { - return 0, nil - } - if strings.HasSuffix(cpu, "m") { - cpu = cpu[:len(cpu)-1] - millis, err := strconv.ParseUint(cpu, 10, 64) - if err != nil { - return 0, err - } - return millis, nil - } - floatCPU, err := strconv.ParseFloat(cpu, 64) - if err != nil { - return 0, err - } - return uint64(floatCPU * 1000), nil -} - -// BytesToStr converts integer of bytes to string. -func BytesToStr(i int64) string { - return strconv.FormatInt(i, 10) -} - -// MilliCPUToStr converts integer of milli CPU to string. -func MilliCPUToStr(i int32) string { - return strconv.FormatInt(int64(i), 10) + "m" -} diff --git a/managed/services/dbaas/utils/convertors/convertors_test.go b/managed/services/dbaas/utils/convertors/convertors_test.go deleted file mode 100644 index fd9ab7b1c6..0000000000 --- a/managed/services/dbaas/utils/convertors/convertors_test.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package convertors - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestConvertToCPUMillis(t *testing.T) { - t.Parallel() - testCases := []struct { - in string - expectedOut uint64 - errShouldBeNil bool - }{ - {in: "100m", expectedOut: 100, errShouldBeNil: true}, - {in: "1", expectedOut: 1000, errShouldBeNil: true}, - {in: "1.252", expectedOut: 1252, errShouldBeNil: true}, - {in: "0.252", expectedOut: 252, errShouldBeNil: true}, - {in: "0.0", expectedOut: 0, errShouldBeNil: true}, - {in: "0.", expectedOut: 0, errShouldBeNil: true}, - {in: ".0", expectedOut: 0, errShouldBeNil: true}, - {in: ".", expectedOut: 0, errShouldBeNil: false}, - {in: "", expectedOut: 0, errShouldBeNil: true}, - {in: "adf", expectedOut: 0, errShouldBeNil: false}, - } - - for _, test := range testCases { - out, err := StrToMilliCPU(test.in) - assert.Equal(t, test.expectedOut, out, "in=%v, out=%v, err=%v", test.in, out, err) - assert.Equal( - t, test.errShouldBeNil, err == nil, - "in=%v, out=%v, errShouldBeNil=%v: actually err == nil is %v\nerr=%v", - test.in, out, test.errShouldBeNil, err == nil, err) - } -} - -func TestConvertToBytes(t *testing.T) { - t.Parallel() - testCases := []struct { - in string - expectedOut uint64 - errShouldBeNil bool - }{ - {in: "3000m", expectedOut: 3, errShouldBeNil: true}, - {in: "100M", expectedOut: 100 * 1000 * 1000, errShouldBeNil: true}, - {in: "100Mi", expectedOut: 100 * 1024 * 1024, errShouldBeNil: true}, - {in: "100", expectedOut: 100, errShouldBeNil: true}, - {in: "1G", expectedOut: 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Gi", expectedOut: 1024 * 1024 * 1024, errShouldBeNil: true}, - {in: "0.5Gi", expectedOut: 1024 * 1024 * 1024 / 2, errShouldBeNil: true}, - {in: "0.3Gi", expectedOut: 322122548, errShouldBeNil: true}, - {in: "Gi", expectedOut: 0, errShouldBeNil: false}, - {in: "", expectedOut: 0, errShouldBeNil: true}, - {in: "1Z", expectedOut: 0, errShouldBeNil: false}, - {in: "1Ki", expectedOut: 1024, errShouldBeNil: true}, - {in: "1k", expectedOut: 1000, errShouldBeNil: true}, - {in: "1T", expectedOut: 1000 * 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Ti", expectedOut: 1024 * 1024 * 1024 * 1024, errShouldBeNil: true}, - {in: "1P", expectedOut: 1000 * 1000 * 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Pi", expectedOut: 1024 * 1024 * 1024 * 1024 * 1024, errShouldBeNil: true}, - {in: "1E", expectedOut: 1000 * 1000 * 1000 * 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Ei", expectedOut: 1024 * 1024 * 1024 * 1024 * 1024 * 1024, errShouldBeNil: true}, - } - - for _, test := range testCases { - out, err := StrToBytes(test.in) - assert.Equal(t, test.expectedOut, out, "in=%v, out=%v, err=%v", test.in, out, err) - assert.Equal( - t, test.errShouldBeNil, err == nil, - "in=%v, out=%v, errShouldBeNil=%v: actually err == nil is %v\nerr=%v", - test.in, out, test.errShouldBeNil, err == nil, err) - } -} diff --git a/managed/services/management/dbaas/components_service.go b/managed/services/management/dbaas/components_service.go deleted file mode 100644 index ffa549968a..0000000000 --- a/managed/services/management/dbaas/components_service.go +++ /dev/null @@ -1,554 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "fmt" - "os" - "regexp" - "sync" - - "github.com/docker/docker/api/types" - "github.com/docker/docker/client" - goversion "github.com/hashicorp/go-version" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/utils/stringset" - pmmversion "github.com/percona/pmm/version" -) - -const ( - psmdbOperatorName = "percona-server-mongodb-operator" - pxcOperatorName = "percona-xtradb-cluster-operator" - defaultNamespace = "default" - // Dev-latest docker image. - devLatest = "perconalab/pmm-client:dev-latest" -) - -// ComponentsService holds unexported fields and public methods to handle Components Service. -type ComponentsService struct { - l *logrus.Entry - db *reform.DB - dbaasClient dbaasClient - // kubeStorage *KubeStorage - versionServiceClient versionService - kubeStorage kubeStorageManager - - dbaasv1beta1.UnimplementedComponentsServer -} - -type installedComponentsVersion struct { - kuberentesClusterName string - pxcOperatorVersion string - psmdbOperatorVersion string -} - -// NewComponentsService creates Components Service. -func NewComponentsService(db *reform.DB, dbaasClient dbaasClient, versionServiceClient versionService, kubeStorage kubeStorageManager) *ComponentsService { - l := logrus.WithField("component", "components_service") - return &ComponentsService{ - l: l, - db: db, - dbaasClient: dbaasClient, - // kubeStorage: NewKubeStorage(db), - versionServiceClient: versionServiceClient, - kubeStorage: kubeStorage, - } -} - -// Enabled returns if service is enabled and can be used. -func (c *ComponentsService) Enabled() bool { - settings, err := models.GetSettings(c.db) - if err != nil { - c.l.WithError(err).Error("can't get settings") - return false - } - return settings.DBaaS.Enabled -} - -// GetPSMDBComponents retrieves all PSMDB components for a specific cluster. -func (c ComponentsService) GetPSMDBComponents(ctx context.Context, req *dbaasv1beta1.GetPSMDBComponentsRequest) (*dbaasv1beta1.GetPSMDBComponentsResponse, error) { - var kubernetesCluster *models.KubernetesCluster - params := componentsParams{ - product: psmdbOperator, - dbVersion: req.DbVersion, - } - if req.KubernetesClusterName != "" { - var err error - kubernetesCluster, err = models.FindKubernetesClusterByName(c.db.Querier, req.KubernetesClusterName) - if err != nil { - return nil, err - } - kubeClient, err := c.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - psmdbVersion, err := kubeClient.GetPSMDBOperatorVersion(ctx) - if err != nil { - return nil, err - } - - params.productVersion = psmdbVersion - } - - versions, err := c.versions(ctx, params, kubernetesCluster) - if err != nil { - return nil, err - } - return &dbaasv1beta1.GetPSMDBComponentsResponse{Versions: versions}, nil -} - -func (c ComponentsService) GetPXCComponents(ctx context.Context, req *dbaasv1beta1.GetPXCComponentsRequest) (*dbaasv1beta1.GetPXCComponentsResponse, error) { - var kubernetesCluster *models.KubernetesCluster - params := componentsParams{ - product: pxcOperator, - dbVersion: req.DbVersion, - } - if req.KubernetesClusterName != "" { - var err error - kubernetesCluster, err = models.FindKubernetesClusterByName(c.db.Querier, req.KubernetesClusterName) - if err != nil { - return nil, err - } - kubeClient, err := c.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - pxcVersion, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - return nil, err - } - - params.productVersion = pxcVersion - } - - versions, err := c.versions(ctx, params, kubernetesCluster) - if err != nil { - return nil, err - } - return &dbaasv1beta1.GetPXCComponentsResponse{Versions: versions}, nil -} - -func (c ComponentsService) ChangePSMDBComponents(_ context.Context, req *dbaasv1beta1.ChangePSMDBComponentsRequest) (*dbaasv1beta1.ChangePSMDBComponentsResponse, error) { - err := c.db.InTransaction(func(tx *reform.TX) error { - kubernetesCluster, e := models.FindKubernetesClusterByName(tx.Querier, req.KubernetesClusterName) - if e != nil { - return e - } - - if req.Mongod != nil { - kubernetesCluster.Mongod, e = setComponent(kubernetesCluster.Mongod, req.Mongod) - if e != nil { - message := fmt.Sprintf("%s, cluster: %s, component: mongod", e.Error(), kubernetesCluster.KubernetesClusterName) - return status.Errorf(codes.InvalidArgument, message) - } - } - - e = tx.Save(kubernetesCluster) - if e != nil { - return e - } - - return nil - }) - if err != nil { - return nil, err - } - - return &dbaasv1beta1.ChangePSMDBComponentsResponse{}, nil -} - -func (c ComponentsService) ChangePXCComponents(ctx context.Context, req *dbaasv1beta1.ChangePXCComponentsRequest) (*dbaasv1beta1.ChangePXCComponentsResponse, error) { - err := c.db.InTransaction(func(tx *reform.TX) error { - kubernetesCluster, e := models.FindKubernetesClusterByName(tx.Querier, req.KubernetesClusterName) - if e != nil { - return e - } - - if req.Pxc != nil { - kubernetesCluster.PXC, e = setComponent(kubernetesCluster.PXC, req.Pxc) - if e != nil { - message := fmt.Sprintf("%s, cluster: %s, component: pxc", e.Error(), kubernetesCluster.KubernetesClusterName) - return status.Errorf(codes.InvalidArgument, message) - } - } - - if req.Proxysql != nil { - kubernetesCluster.ProxySQL, e = setComponent(kubernetesCluster.ProxySQL, req.Proxysql) - if e != nil { - message := fmt.Sprintf("%s, cluster: %s, component: proxySQL", e.Error(), kubernetesCluster.KubernetesClusterName) - return status.Errorf(codes.InvalidArgument, message) - } - } - - if req.Haproxy != nil { - kubernetesCluster.HAProxy, e = setComponent(kubernetesCluster.HAProxy, req.Haproxy) - if e != nil { - message := fmt.Sprintf("%s, cluster: %s, component: HAProxy", e.Error(), kubernetesCluster.KubernetesClusterName) - return status.Errorf(codes.InvalidArgument, message) - } - } - e = tx.Save(kubernetesCluster) - if e != nil { - return e - } - - return nil - }) - if err != nil { - return nil, err - } - - return &dbaasv1beta1.ChangePXCComponentsResponse{}, nil -} - -func (c ComponentsService) installedOperatorsVersion(ctx context.Context, wg *sync.WaitGroup, responseCh chan installedComponentsVersion, kuberentesCluster *models.KubernetesCluster) { //nolint:lll - defer wg.Done() - kubeClient, err := c.kubeStorage.GetOrSetClient(kuberentesCluster.KubernetesClusterName) - if err != nil { - c.l.Errorf("failed to check get kubernetes client: %v", err) - responseCh <- installedComponentsVersion{ - kuberentesClusterName: kuberentesCluster.KubernetesClusterName, - } - return - } - psmdbVersion, err := kubeClient.GetPSMDBOperatorVersion(ctx) - if err != nil { - c.l.Errorf("failed to get psmdb operator version: %v", err) - } - pxcVersion, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - c.l.Errorf("failed to get pxc operator version: %v", err) - } - - responseCh <- installedComponentsVersion{ - kuberentesClusterName: kuberentesCluster.KubernetesClusterName, - pxcOperatorVersion: psmdbVersion, - psmdbOperatorVersion: pxcVersion, - } -} - -func (c ComponentsService) CheckForOperatorUpdate(ctx context.Context, _ *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) { //nolint:lll - if pmmversion.PMMVersion == "" { - return nil, status.Error(codes.Internal, "failed to get current PMM version") - } - - // List all kuberenetes clusters. - clusters, err := models.FindAllKubernetesClusters(c.db.Querier) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - // And get operators version from all of them. - responseCh := make(chan installedComponentsVersion, len(clusters)) - go func() { - wg := &sync.WaitGroup{} - wg.Add(len(clusters)) - for _, cluster := range clusters { - k8sCluster := cluster - go c.installedOperatorsVersion(ctx, wg, responseCh, k8sCluster) - } - wg.Wait() - close(responseCh) - }() - - resp := &dbaasv1beta1.CheckForOperatorUpdateResponse{ - ClusterToComponents: make(map[string]*dbaasv1beta1.ComponentsUpdateInformation), - } - - for _, cluster := range clusters { - kubeClient, err := c.kubeStorage.GetOrSetClient(cluster.KubernetesClusterName) - if err != nil { - c.l.Errorf("Cannot list the subscriptions for the cluster %q: %s", cluster.KubernetesClusterName, err) - continue - } - - subscriptions, err := kubeClient.ListSubscriptions(ctx, "default") - if err != nil { - c.l.Errorf("Cannot list the subscriptions for the cluster %q: %s", cluster.KubernetesClusterName, err) - continue - } - resp.ClusterToComponents[cluster.KubernetesClusterName] = &dbaasv1beta1.ComponentsUpdateInformation{ - ComponentToUpdateInformation: map[string]*dbaasv1beta1.ComponentUpdateInformation{ - psmdbOperator: {}, - pxcOperator: {}, - }, - } - - for _, item := range subscriptions.Items { - if item.Status.CurrentCSV != item.Status.InstalledCSV { - re := regexp.MustCompile(`v(\d+\.\d+\.\d+)$`) - matches := re.FindStringSubmatch(item.Status.CurrentCSV) - if len(matches) == 2 { - switch item.Spec.Package { - case psmdbOperatorName: - resp.ClusterToComponents[cluster.KubernetesClusterName].ComponentToUpdateInformation[psmdbOperator] = &dbaasv1beta1.ComponentUpdateInformation{ - AvailableVersion: matches[1], - } - case pxcOperatorName: - resp.ClusterToComponents[cluster.KubernetesClusterName].ComponentToUpdateInformation[pxcOperator] = &dbaasv1beta1.ComponentUpdateInformation{ - AvailableVersion: matches[1], - } - } - } - } - } - } - - return resp, nil -} - -func (c ComponentsService) versions(ctx context.Context, params componentsParams, cluster *models.KubernetesCluster) ([]*dbaasv1beta1.OperatorVersion, error) { - components, err := c.versionServiceClient.Matrix(ctx, params) - if err != nil { - return nil, err - } - - var mongod, pxc, proxySQL, haproxy *models.Component - if cluster != nil { - mongod = cluster.Mongod - pxc = cluster.PXC - proxySQL = cluster.ProxySQL - haproxy = cluster.HAProxy - } - - versions := make([]*dbaasv1beta1.OperatorVersion, 0, len(components.Versions)) - mongodMinimalVersion, _ := goversion.NewVersion("4.2.0") - pxcMinimalVersion, _ := goversion.NewVersion("8.0.0") - for _, v := range components.Versions { - respVersion := &dbaasv1beta1.OperatorVersion{ - Product: v.Product, - Operator: v.ProductVersion, - Matrix: &dbaasv1beta1.Matrix{ - Mongod: c.matrix(v.Matrix.Mongod, mongodMinimalVersion, mongod), - Pxc: c.matrix(v.Matrix.Pxc, pxcMinimalVersion, pxc), - Pmm: c.matrix(v.Matrix.Pmm, nil, nil), - Proxysql: c.matrix(v.Matrix.Proxysql, nil, proxySQL), - Haproxy: c.matrix(v.Matrix.Haproxy, nil, haproxy), - Backup: c.matrix(v.Matrix.Backup, nil, nil), - Operator: c.matrix(v.Matrix.Operator, nil, nil), - LogCollector: c.matrix(v.Matrix.LogCollector, nil, nil), - }, - } - versions = append(versions, respVersion) - } - - return versions, nil -} - -func (c ComponentsService) matrix(m map[string]componentVersion, minimalVersion *goversion.Version, kc *models.Component) map[string]*dbaasv1beta1.Component { - result := make(map[string]*dbaasv1beta1.Component) - - var lastVersion string - lastVersionParsed, _ := goversion.NewVersion("0.0.0") - for v, component := range m { - parsedVersion, err := goversion.NewVersion(v) - if err != nil { - c.l.Warnf("couldn't parse version %s: %s", v, err.Error()) - continue - } - if minimalVersion != nil && parsedVersion.LessThan(minimalVersion) { - continue - } - result[v] = &dbaasv1beta1.Component{ - ImagePath: component.ImagePath, - ImageHash: component.ImageHash, - Status: component.Status, - Critical: component.Critical, - } - if lastVersionParsed.LessThan(parsedVersion) && component.Status == "recommended" { - lastVersionParsed = parsedVersion - lastVersion = v - } - } - - defaultVersionSet := false - if kc != nil { - if _, ok := result[kc.DefaultVersion]; ok { - result[kc.DefaultVersion].Default = true - defaultVersionSet = true - } - for _, v := range kc.DisabledVersions { - if _, ok := result[v]; ok { - result[v].Disabled = true - } - } - } - if lastVersion != "" && !defaultVersionSet { - result[lastVersion].Default = true - } - return result -} - -func setComponent(kc *models.Component, rc *dbaasv1beta1.ChangeComponent) (*models.Component, error) { - if kc == nil { - kc = &models.Component{} - } - if rc.DefaultVersion != "" { - kc.DefaultVersion = rc.DefaultVersion - } - - disabledVersions := make(map[string]struct{}) - for _, v := range kc.DisabledVersions { - disabledVersions[v] = struct{}{} - } - for _, v := range rc.Versions { - if v.Enable && v.Disable { - return nil, fmt.Errorf("enable and disable for version %s can't be passed together", v.Version) - } - if v.Enable { - delete(disabledVersions, v.Version) - } - if v.Disable { - disabledVersions[v.Version] = struct{}{} - } - } - if _, ok := disabledVersions[kc.DefaultVersion]; ok { - return nil, fmt.Errorf("default version can't be disabled") - } - kc.DisabledVersions = stringset.ToSlice(disabledVersions) - return kc, nil -} - -func (c ComponentsService) InstallOperator(ctx context.Context, req *dbaasv1beta1.InstallOperatorRequest) (*dbaasv1beta1.InstallOperatorResponse, error) { - kubernetesCluster, err := models.FindKubernetesClusterByName(c.db.Querier, req.KubernetesClusterName) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - kubeClient, err := c.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - var component *models.Component - var installFunc func() error - - switch req.OperatorType { - case pxcOperator: - installFunc = func() error { - return kubeClient.UpgradeOperator(ctx, defaultNamespace, pxcOperatorName) - } - component = kubernetesCluster.PXC - case psmdbOperator: - installFunc = func() error { - return kubeClient.UpgradeOperator(ctx, defaultNamespace, psmdbOperatorName) - } - component = kubernetesCluster.Mongod - default: - return nil, errors.Errorf("%q is not supported operator", req.OperatorType) - } - - if component != nil { - // Default version of database could be unsupported be a new operator version. - supported, err := c.versionServiceClient.IsDatabaseVersionSupportedByOperator(ctx, req.OperatorType, req.Version, component.DefaultVersion) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to check if default database version is supported by the operator version: %v", err) - } - if !supported { - return nil, status.Errorf(codes.Internal, - "default database version %s is unsupported by the operator version %s, please change default version.", component.DefaultVersion, req.Version) - } - } - - // Install operator. - if err := installFunc(); err != nil { - return nil, status.Errorf(codes.Internal, "failed to install operator: %v", err) - } - - return &dbaasv1beta1.InstallOperatorResponse{Status: dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_OK}, nil -} - -// DefaultComponent returns the component marked as default in the components list. -func DefaultComponent(m map[string]*dbaasv1beta1.Component) (*dbaasv1beta1.Component, error) { - if len(m) == 0 { - return nil, errNoVersionsFound - } - - for _, component := range m { - if component.Default { - return &dbaasv1beta1.Component{ - ImagePath: component.ImagePath, - ImageHash: component.ImageHash, - Status: component.Status, - Critical: component.Critical, - }, - nil - } - } - - return nil, errors.New("cannot find a default version in the components list") -} - -func getPMMClientImage() string { - pmmClientImage := "perconalab/pmm-client:dev-latest" - - pmmClientImageEnv, ok := os.LookupEnv("PERCONA_TEST_DBAAS_PMM_CLIENT") - if ok { - pmmClientImage = pmmClientImageEnv - return pmmClientImage - } - - if pmmversion.PMMVersion == "" { // No version set, use dev-latest. - return pmmClientImage - } - - v, err := goversion.NewVersion(pmmversion.PMMVersion) //nolint: varnamelen - if err != nil { - return pmmClientImage - } - // if version has a suffix like 1.2.0-dev or 3.4.1-HEAD-something it is an unreleased version. - // Docker image won't exist in the repo so use latest stable. - if v.Core().String() != v.String() { - pmmClientImage = "percona/pmm-client:2" - return pmmClientImage - } - - exists, err := imageExists(context.Background(), pmmClientImage) - // if !exists or there was an error while checking if the image exists, use dev-latest as default. - if !exists || err != nil { - return devLatest - } - - pmmClientImage = "percona/pmm-client:" + v.Core().String() - return pmmClientImage -} - -func imageExists(ctx context.Context, image string) (bool, error) { - cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - if err != nil { - panic(err) - } - defer cli.Close() - - reader, err := cli.ImagePull(ctx, image, types.ImagePullOptions{}) - if err != nil { - if client.IsErrNotFound(err) { - return false, nil - } - - return false, err - } - - reader.Close() - - return true, nil -} diff --git a/managed/services/management/dbaas/components_service_test.go b/managed/services/management/dbaas/components_service_test.go deleted file mode 100644 index 8d5399bf9e..0000000000 --- a/managed/services/management/dbaas/components_service_test.go +++ /dev/null @@ -1,879 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/google/uuid" - goversion "github.com/hashicorp/go-version" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/sirupsen/logrus" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" - "github.com/percona/pmm/utils/logger" - pmmversion "github.com/percona/pmm/version" -) - -const ( - versionServiceURL = "https://check.percona.com/versions/v1" - twoPointEighteen = "2.18.0" -) - -func TestComponentService(t *testing.T) { - const ( - clusterName = "pxcCluster" - kubeConfig = "{}" - ) - - setup := func(t *testing.T) (ctx context.Context, cs dbaasv1beta1.ComponentsServer, dbaasClient *mockDbaasClient, kubeClient *mockKubernetesClient, - kubeStorage *mockKubeStorageManager, - ) { - t.Helper() - - ctx = logger.Set(context.Background(), t.Name()) - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, nil) - - dbaasClient = &mockDbaasClient{} - - kubernetesCluster, err := models.CreateKubernetesCluster(db.Querier, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: clusterName, - KubeConfig: kubeConfig, - }) - require.NoError(t, err) - - t.Cleanup(func() { - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - assert.NoError(t, db.Delete(kubernetesCluster)) - require.NoError(t, sqlDB.Close()) - }) - - vsc := NewVersionServiceClient(versionServiceURL) - kubeStorage = &mockKubeStorageManager{} - kubeClient = &mockKubernetesClient{} - kubeClient.On("GetServerVersion").Return(nil, nil) - cs = NewComponentsService(db, dbaasClient, vsc, kubeStorage) - - return - } - - t.Run("PXC", func(t *testing.T) { - t.Run("BasicGet", func(t *testing.T) { - ctx, cs, _, kubeClient, kubeStorageClient := setup(t) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - - pxcComponents, err := cs.GetPXCComponents(ctx, &dbaasv1beta1.GetPXCComponentsRequest{ - KubernetesClusterName: clusterName, - }) - require.NoError(t, err) - require.NotNil(t, pxcComponents) - - expected := map[string]*dbaasv1beta1.Component{ - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false, Default: true}, - } - require.Equal(t, 1, len(pxcComponents.Versions)) - assert.Equal(t, expected, pxcComponents.Versions[0].Matrix.Pxc) - }) - - t.Run("Change", func(t *testing.T) { - ctx, cs, _, kubeClient, kubeStorageClient := setup(t) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - - resp, err := cs.ChangePXCComponents(ctx, &dbaasv1beta1.ChangePXCComponentsRequest{ - KubernetesClusterName: clusterName, - Pxc: &dbaasv1beta1.ChangeComponent{ - DefaultVersion: "8.0.19-10.1", - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "8.0.20-11.1", - Disable: true, - }, { - Version: "8.0.20-11.2", - Disable: true, - }}, - }, - Proxysql: nil, - }) - require.NoError(t, err) - require.NotNil(t, resp) - - pxcComponents, err := cs.GetPXCComponents(ctx, &dbaasv1beta1.GetPXCComponentsRequest{ - KubernetesClusterName: clusterName, - }) - require.NoError(t, err) - require.NotNil(t, pxcComponents) - - expected := map[string]*dbaasv1beta1.Component{ - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false, Default: true}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false, Disabled: true}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false, Disabled: true}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false}, - } - require.Equal(t, 1, len(pxcComponents.Versions)) - assert.Equal(t, expected, pxcComponents.Versions[0].Matrix.Pxc) - - t.Run("Change Again", func(t *testing.T) { - resp, err := cs.ChangePXCComponents(ctx, &dbaasv1beta1.ChangePXCComponentsRequest{ - KubernetesClusterName: clusterName, - Pxc: &dbaasv1beta1.ChangeComponent{ - DefaultVersion: "8.0.20-11.1", - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "8.0.20-11.1", - Enable: true, - }}, - }, - Proxysql: nil, - }) - require.NoError(t, err) - require.NotNil(t, resp) - - pxcComponents, err := cs.GetPXCComponents(ctx, &dbaasv1beta1.GetPXCComponentsRequest{ - KubernetesClusterName: clusterName, - }) - - require.NoError(t, err) - require.NotNil(t, pxcComponents) - - expected := map[string]*dbaasv1beta1.Component{ - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false, Default: true}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false, Disabled: true}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false}, - } - require.Equal(t, 1, len(pxcComponents.Versions)) - assert.Equal(t, expected, pxcComponents.Versions[0].Matrix.Pxc) - }) - }) - - t.Run("Don't let disable and make default same version", func(t *testing.T) { - ctx, cs, _, _, _ := setup(t) - - resp, err := cs.ChangePXCComponents(ctx, &dbaasv1beta1.ChangePXCComponentsRequest{ - KubernetesClusterName: clusterName, - Pxc: &dbaasv1beta1.ChangeComponent{ - DefaultVersion: "8.0.19-10.1", - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "8.0.19-10.1", - Disable: true, - Enable: false, - }}, - }, - Proxysql: nil, - }) - tests.AssertGRPCError(t, status.New(codes.InvalidArgument, fmt.Sprintf("default version can't be disabled, cluster: %s, component: pxc", clusterName)), err) - require.Nil(t, resp) - }) - - t.Run("enable and disable", func(t *testing.T) { - ctx, cs, _, _, _ := setup(t) - - resp, err := cs.ChangePXCComponents(ctx, &dbaasv1beta1.ChangePXCComponentsRequest{ - KubernetesClusterName: clusterName, - Pxc: nil, - Proxysql: &dbaasv1beta1.ChangeComponent{ - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "8.0.19-10.1", - Disable: true, - Enable: true, - }}, - }, - }) - tests.AssertGRPCError(t, status.New(codes.InvalidArgument, fmt.Sprintf("enable and disable for version 8.0.19-10.1 can't be passed together, cluster: %s, component: proxySQL", clusterName)), err) - require.Nil(t, resp) - }) - }) - - t.Run("PSMDB", func(t *testing.T) { - t.Run("BasicGet", func(t *testing.T) { - ctx, cs, _, kubeClient, kubeStorageClient := setup(t) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - - psmdbComponents, err := cs.GetPSMDBComponents(ctx, &dbaasv1beta1.GetPSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - }) - require.NoError(t, err) - require.NotNil(t, psmdbComponents) - - expected := map[string]*dbaasv1beta1.Component{ - "4.2.7-7": {ImagePath: "percona/percona-server-mongodb:4.2.7-7", ImageHash: "1d8a0859b48a3e9cadf9ad7308ec5aa4b278a64ca32ff5d887156b1b46146b13", Status: "available", Critical: false}, - "4.2.8-8": {ImagePath: "percona/percona-server-mongodb:4.2.8-8", ImageHash: "a66e889d3e986413e41083a9c887f33173da05a41c8bd107cf50eede4588a505", Status: "available", Critical: false}, - "4.2.11-12": {ImagePath: "percona/percona-server-mongodb:4.2.11-12", ImageHash: "1909cb7a6ecea9bf0535b54aa86b9ae74ba2fa303c55cf4a1a54262fb0edbd3c", Status: "recommended", Critical: false}, - "4.4.2-4": {ImagePath: "percona/percona-server-mongodb:4.4.2-4", ImageHash: "991d6049059e5eb1a74981290d829a5fb4ab0554993748fde1e67b2f46f26bf0", Status: "recommended", Critical: false, Default: true}, - } - require.Equal(t, 1, len(psmdbComponents.Versions)) - assert.Equal(t, expected, psmdbComponents.Versions[0].Matrix.Mongod) - }) - - t.Run("Change", func(t *testing.T) { - ctx, cs, _, kubeClient, kubeStorageClient := setup(t) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - - resp, err := cs.ChangePSMDBComponents(ctx, &dbaasv1beta1.ChangePSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - Mongod: &dbaasv1beta1.ChangeComponent{ - DefaultVersion: "4.2.8-8", - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "4.2.7-7", - Disable: true, - }, { - Version: "4.4.2-4", - Disable: true, - }}, - }, - }) - require.NoError(t, err) - require.NotNil(t, resp) - - psmdbComponents, err := cs.GetPSMDBComponents(ctx, &dbaasv1beta1.GetPSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - }) - require.NoError(t, err) - require.NotNil(t, psmdbComponents) - - expected := map[string]*dbaasv1beta1.Component{ - "4.2.7-7": {ImagePath: "percona/percona-server-mongodb:4.2.7-7", ImageHash: "1d8a0859b48a3e9cadf9ad7308ec5aa4b278a64ca32ff5d887156b1b46146b13", Status: "available", Critical: false, Disabled: true}, - "4.2.8-8": {ImagePath: "percona/percona-server-mongodb:4.2.8-8", ImageHash: "a66e889d3e986413e41083a9c887f33173da05a41c8bd107cf50eede4588a505", Status: "available", Critical: false, Default: true}, - "4.2.11-12": {ImagePath: "percona/percona-server-mongodb:4.2.11-12", ImageHash: "1909cb7a6ecea9bf0535b54aa86b9ae74ba2fa303c55cf4a1a54262fb0edbd3c", Status: "recommended", Critical: false}, - "4.4.2-4": {ImagePath: "percona/percona-server-mongodb:4.4.2-4", ImageHash: "991d6049059e5eb1a74981290d829a5fb4ab0554993748fde1e67b2f46f26bf0", Status: "recommended", Critical: false, Disabled: true}, - } - require.Equal(t, 1, len(psmdbComponents.Versions)) - assert.Equal(t, expected, psmdbComponents.Versions[0].Matrix.Mongod) - - t.Run("Change Again", func(t *testing.T) { - resp, err := cs.ChangePSMDBComponents(ctx, &dbaasv1beta1.ChangePSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - Mongod: &dbaasv1beta1.ChangeComponent{ - DefaultVersion: "4.2.11-12", - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "4.4.2-4", - Enable: true, - }, { - Version: "4.2.8-8", - Disable: true, - }}, - }, - }) - require.NoError(t, err) - require.NotNil(t, resp) - - psmdbComponents, err := cs.GetPSMDBComponents(ctx, &dbaasv1beta1.GetPSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - }) - require.NoError(t, err) - require.NotNil(t, psmdbComponents) - - expected := map[string]*dbaasv1beta1.Component{ - "4.2.7-7": {ImagePath: "percona/percona-server-mongodb:4.2.7-7", ImageHash: "1d8a0859b48a3e9cadf9ad7308ec5aa4b278a64ca32ff5d887156b1b46146b13", Status: "available", Critical: false, Disabled: true}, - "4.2.8-8": {ImagePath: "percona/percona-server-mongodb:4.2.8-8", ImageHash: "a66e889d3e986413e41083a9c887f33173da05a41c8bd107cf50eede4588a505", Status: "available", Critical: false, Disabled: true}, - "4.2.11-12": {ImagePath: "percona/percona-server-mongodb:4.2.11-12", ImageHash: "1909cb7a6ecea9bf0535b54aa86b9ae74ba2fa303c55cf4a1a54262fb0edbd3c", Status: "recommended", Critical: false, Default: true}, - "4.4.2-4": {ImagePath: "percona/percona-server-mongodb:4.4.2-4", ImageHash: "991d6049059e5eb1a74981290d829a5fb4ab0554993748fde1e67b2f46f26bf0", Status: "recommended", Critical: false}, - } - require.Equal(t, 1, len(psmdbComponents.Versions)) - assert.Equal(t, expected, psmdbComponents.Versions[0].Matrix.Mongod) - }) - }) - - t.Run("Don't let disable and make default same version", func(t *testing.T) { - ctx, cs, _, _, _ := setup(t) - - resp, err := cs.ChangePSMDBComponents(ctx, &dbaasv1beta1.ChangePSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - Mongod: &dbaasv1beta1.ChangeComponent{ - DefaultVersion: "4.2.11-12", - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "4.2.11-12", - Disable: true, - Enable: false, - }}, - }, - }) - tests.AssertGRPCError(t, status.New(codes.InvalidArgument, fmt.Sprintf("default version can't be disabled, cluster: %s, component: mongod", clusterName)), err) - require.Nil(t, resp) - }) - - t.Run("enable and disable", func(t *testing.T) { - ctx, cs, _, _, _ := setup(t) - - resp, err := cs.ChangePSMDBComponents(ctx, &dbaasv1beta1.ChangePSMDBComponentsRequest{ - KubernetesClusterName: clusterName, - Mongod: &dbaasv1beta1.ChangeComponent{ - Versions: []*dbaasv1beta1.ChangeComponent_ComponentVersion{{ - Version: "4.2.11-12", - Disable: true, - Enable: true, - }}, - }, - }) - tests.AssertGRPCError(t, status.New(codes.InvalidArgument, fmt.Sprintf("enable and disable for version 4.2.11-12 can't be passed together, cluster: %s, component: mongod", clusterName)), err) - require.Nil(t, resp) - }) - }) -} - -func TestComponentServiceMatrix(t *testing.T) { - input := map[string]componentVersion{ - "5.7.26-31.37": {ImagePath: "percona/percona-xtradb-cluster:5.7.26-31.37", ImageHash: "9d43d8e435e4aca5c694f726cc736667cb938158635c5f01a0e9412905f1327f", Status: "available", Critical: false}, - "5.7.27-31.39": {ImagePath: "percona/percona-xtradb-cluster:5.7.27-31.39", ImageHash: "7d8eb4d2031c32c6e96451655f359d8e5e8e047dc95bada9a28c41c158876c26", Status: "available", Critical: false}, - "5.7.28-31.41.2": {ImagePath: "percona/percona-xtradb-cluster:5.7.28-31.41.2", ImageHash: "fccd6525aaeedb5e436e9534e2a63aebcf743c043526dd05dba8519ebddc8b30", Status: "available", Critical: true}, - "5.7.29-31.43": {ImagePath: "percona/percona-xtradb-cluster:5.7.29-31.43", ImageHash: "85fb479de073770280ae601cf3ec22dc5c8cca4c8b0dc893b09503767338e6f9", Status: "available", Critical: false}, - "5.7.30-31.43": {ImagePath: "percona/percona-xtradb-cluster:5.7.30-31.43", ImageHash: "b03a060e9261b37288a2153c78f86dcfc53367c36e1bcdcae046dd2d0b0721af", Status: "available", Critical: false}, - "5.7.31-31.45": {ImagePath: "percona/percona-xtradb-cluster:5.7.31-31.45", ImageHash: "3852cef43cc0c6aa791463ba6279e59dcdac3a4fb1a5616c745c1b3c68041dc2", Status: "available", Critical: false}, - "5.7.31-31.45.2": {ImagePath: "percona/percona-xtradb-cluster:5.7.31-31.45.2", ImageHash: "0decf85c7c7afacc438f5fe355dc8320ea7ffc7018ca2cb6bda3ac0c526ae172", Status: "available", Critical: false}, - "5.7.32-31.47": {ImagePath: "percona/percona-xtradb-cluster:5.7.32-31.47", ImageHash: "7b095019ad354c336494248d6080685022e2ed46e3b53fc103b25cd12c95952b", Status: "recommended", Critical: false}, - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false}, - } - - t.Run("All", func(t *testing.T) { - cs := &ComponentsService{} - m := cs.matrix(input, nil, nil) - - expected := map[string]*dbaasv1beta1.Component{ - "5.7.26-31.37": {ImagePath: "percona/percona-xtradb-cluster:5.7.26-31.37", ImageHash: "9d43d8e435e4aca5c694f726cc736667cb938158635c5f01a0e9412905f1327f", Status: "available", Critical: false}, - "5.7.27-31.39": {ImagePath: "percona/percona-xtradb-cluster:5.7.27-31.39", ImageHash: "7d8eb4d2031c32c6e96451655f359d8e5e8e047dc95bada9a28c41c158876c26", Status: "available", Critical: false}, - "5.7.28-31.41.2": {ImagePath: "percona/percona-xtradb-cluster:5.7.28-31.41.2", ImageHash: "fccd6525aaeedb5e436e9534e2a63aebcf743c043526dd05dba8519ebddc8b30", Status: "available", Critical: true}, - "5.7.29-31.43": {ImagePath: "percona/percona-xtradb-cluster:5.7.29-31.43", ImageHash: "85fb479de073770280ae601cf3ec22dc5c8cca4c8b0dc893b09503767338e6f9", Status: "available", Critical: false}, - "5.7.30-31.43": {ImagePath: "percona/percona-xtradb-cluster:5.7.30-31.43", ImageHash: "b03a060e9261b37288a2153c78f86dcfc53367c36e1bcdcae046dd2d0b0721af", Status: "available", Critical: false}, - "5.7.31-31.45": {ImagePath: "percona/percona-xtradb-cluster:5.7.31-31.45", ImageHash: "3852cef43cc0c6aa791463ba6279e59dcdac3a4fb1a5616c745c1b3c68041dc2", Status: "available", Critical: false}, - "5.7.31-31.45.2": {ImagePath: "percona/percona-xtradb-cluster:5.7.31-31.45.2", ImageHash: "0decf85c7c7afacc438f5fe355dc8320ea7ffc7018ca2cb6bda3ac0c526ae172", Status: "available", Critical: false}, - "5.7.32-31.47": {ImagePath: "percona/percona-xtradb-cluster:5.7.32-31.47", ImageHash: "7b095019ad354c336494248d6080685022e2ed46e3b53fc103b25cd12c95952b", Status: "recommended", Critical: false}, - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false, Default: true}, - } - - assert.Equal(t, expected, m) - }) - - t.Run("Disabled and Default Components", func(t *testing.T) { - cs := &ComponentsService{} - - m := cs.matrix(input, nil, &models.Component{ - DisabledVersions: []string{"8.0.20-11.2", "8.0.20-11.1"}, - DefaultVersion: "8.0.19-10.1", - }) - - expected := map[string]*dbaasv1beta1.Component{ - "5.7.26-31.37": {ImagePath: "percona/percona-xtradb-cluster:5.7.26-31.37", ImageHash: "9d43d8e435e4aca5c694f726cc736667cb938158635c5f01a0e9412905f1327f", Status: "available", Critical: false}, - "5.7.27-31.39": {ImagePath: "percona/percona-xtradb-cluster:5.7.27-31.39", ImageHash: "7d8eb4d2031c32c6e96451655f359d8e5e8e047dc95bada9a28c41c158876c26", Status: "available", Critical: false}, - "5.7.28-31.41.2": {ImagePath: "percona/percona-xtradb-cluster:5.7.28-31.41.2", ImageHash: "fccd6525aaeedb5e436e9534e2a63aebcf743c043526dd05dba8519ebddc8b30", Status: "available", Critical: true}, - "5.7.29-31.43": {ImagePath: "percona/percona-xtradb-cluster:5.7.29-31.43", ImageHash: "85fb479de073770280ae601cf3ec22dc5c8cca4c8b0dc893b09503767338e6f9", Status: "available", Critical: false}, - "5.7.30-31.43": {ImagePath: "percona/percona-xtradb-cluster:5.7.30-31.43", ImageHash: "b03a060e9261b37288a2153c78f86dcfc53367c36e1bcdcae046dd2d0b0721af", Status: "available", Critical: false}, - "5.7.31-31.45": {ImagePath: "percona/percona-xtradb-cluster:5.7.31-31.45", ImageHash: "3852cef43cc0c6aa791463ba6279e59dcdac3a4fb1a5616c745c1b3c68041dc2", Status: "available", Critical: false}, - "5.7.31-31.45.2": {ImagePath: "percona/percona-xtradb-cluster:5.7.31-31.45.2", ImageHash: "0decf85c7c7afacc438f5fe355dc8320ea7ffc7018ca2cb6bda3ac0c526ae172", Status: "available", Critical: false}, - "5.7.32-31.47": {ImagePath: "percona/percona-xtradb-cluster:5.7.32-31.47", ImageHash: "7b095019ad354c336494248d6080685022e2ed46e3b53fc103b25cd12c95952b", Status: "recommended", Critical: false}, - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false, Default: true}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false, Disabled: true}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false, Disabled: true}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false}, - } - - assert.Equal(t, expected, m) - }) - - t.Run("Skip unsupported Components", func(t *testing.T) { - cs := &ComponentsService{} - - minimumSupportedVersion, err := goversion.NewVersion("8.0.0") - require.NoError(t, err) - m := cs.matrix(input, minimumSupportedVersion, &models.Component{ - DisabledVersions: []string{"8.0.21-12.1", "8.0.20-11.1"}, - DefaultVersion: "8.0.20-11.2", - }) - - expected := map[string]*dbaasv1beta1.Component{ - "8.0.19-10.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", Status: "available", Critical: false}, - "8.0.20-11.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", Status: "available", Critical: false, Disabled: true}, - "8.0.20-11.2": {ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.2", ImageHash: "feda5612db18da824e971891d6084465aa9cdc9918c18001cd95ba30916da78b", Status: "available", Critical: false, Default: true}, - "8.0.21-12.1": {ImagePath: "percona/percona-xtradb-cluster:8.0.21-12.1", ImageHash: "d95cf39a58f09759408a00b519fe0d0b19c1b28332ece94349dd5e9cdbda017e", Status: "recommended", Critical: false, Disabled: true}, - } - - assert.Equal(t, expected, m) - }) - - t.Run("EmptyMatrix", func(t *testing.T) { - cs := &ComponentsService{} - m := cs.matrix(make(map[string]componentVersion), nil, nil) - assert.Equal(t, make(map[string]*dbaasv1beta1.Component), m) - }) -} - -func TestFilteringOutOfUnsupportedVersions(t *testing.T) { - t.Parallel() - c := &ComponentsService{ - l: logrus.WithField("component", "components_service"), - versionServiceClient: NewVersionServiceClient(versionServiceURL), - } - - t.Run("mongod", func(t *testing.T) { - t.Parallel() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) - defer cancel() - - params := componentsParams{ - product: psmdbOperator, - productVersion: onePointSix, - } - versions, err := c.versions(ctx, params, nil) - require.NoError(t, err) - parsedSupportedVersion, err := goversion.NewVersion("4.2.0") - require.NoError(t, err) - for _, v := range versions { - for version := range v.Matrix.Mongod { - parsedVersion, err := goversion.NewVersion(version) - require.NoError(t, err) - assert.Truef(t, parsedVersion.GreaterThanOrEqual(parsedSupportedVersion), "%s is not greater or equal to 4.2.0", version) - } - } - }) - - t.Run("pxc", func(t *testing.T) { - t.Parallel() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) - defer cancel() - - params := componentsParams{ - product: pxcOperator, - productVersion: onePointSeven, - } - versions, err := c.versions(ctx, params, nil) - require.NoError(t, err) - parsedSupportedVersion, err := goversion.NewVersion("8.0.0") - require.NoError(t, err) - for _, v := range versions { - for version := range v.Matrix.Pxc { - parsedVersion, err := goversion.NewVersion(version) - require.NoError(t, err) - assert.True(t, parsedVersion.GreaterThanOrEqual(parsedSupportedVersion), "%s is not greater or equal to 8.0.0", version) - } - } - }) -} - -const ( - onePointTen = "1.10.0" - onePointNine = "1.9.0" - onePointEight = "1.8.0" - onePointSeven = "1.7.0" - onePointSix = "1.6.0" - defaultPXCVersion = "5.7.26-31.37" - latestPXCVersion = "8.0.0" - defaultPSMDBVersion = "3.6.18-5.0" - latestPSMDBVersion = "4.5.0" - port = "5497" - clusterName = "installoperator" -) - -func setup(t *testing.T, clusterName string, response *VersionServiceResponse, port string) ( - *reform.Querier, dbaasv1beta1.ComponentsServer, *mockKubernetesClient, - *mockKubeStorageManager, -) { - t.Helper() - - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, nil) - dbaasClient := &mockDbaasClient{} - - kubernetesCluster, err := models.CreateKubernetesCluster(db.Querier, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: clusterName, - KubeConfig: "{}", - }) - require.NoError(t, err) - kubernetesCluster.Mongod = &models.Component{ - DefaultVersion: defaultPSMDBVersion, - } - kubernetesCluster.PXC = &models.Component{ - DefaultVersion: defaultPXCVersion, - } - require.NoError(t, db.Save(kubernetesCluster)) - kubeClient := &mockKubernetesClient{} - - vsc, cleanup := newFakeVersionService(response, port, pxcOperator, psmdbOperator, "pmm-server") - - t.Cleanup(func() { - cleanup(t) - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - assert.NoError(t, db.Delete(kubernetesCluster)) - require.NoError(t, sqlDB.Close()) - }) - - kubeStorage := &mockKubeStorageManager{} - - return db.Querier, NewComponentsService(db, dbaasClient, vsc, kubeStorage), kubeClient, kubeStorage -} - -func TestInstallOperator(t *testing.T) { - pmmversion.PMMVersion = "2.19.0" - - response := &VersionServiceResponse{ - Versions: []Version{ - { - Product: pxcOperator, - ProductVersion: onePointSeven, - Matrix: matrix{ - Pxc: map[string]componentVersion{ - defaultPXCVersion: {}, - }, - }, - }, - { - Product: pxcOperator, - ProductVersion: onePointEight, - Matrix: matrix{ - Pxc: map[string]componentVersion{ - latestPXCVersion: {}, - "5.8.0": {}, - }, - }, - }, - { - Product: psmdbOperator, - ProductVersion: onePointSeven, - Matrix: matrix{ - Mongod: map[string]componentVersion{ - defaultPSMDBVersion: {}, - }, - }, - }, - { - Product: psmdbOperator, - ProductVersion: onePointEight, - Matrix: matrix{ - Mongod: map[string]componentVersion{ - latestPSMDBVersion: {}, - "3.7.0": {}, - }, - }, - }, - { - Product: "pmm-server", - ProductVersion: "2.19.0", - Matrix: matrix{ - PXCOperator: map[string]componentVersion{ - onePointEight: {}, - }, - PSMDBOperator: map[string]componentVersion{ - onePointEight: {}, - }, - }, - }, - }, - } - - t.Run("Defaults not supported", func(t *testing.T) { - _, c, kubeClient, kubeStorageClient := setup(t, clusterName, response, "5497") - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - kubeClient.On("SetKubeConfig", mock.Anything).Return(nil) - kubeClient.On("InstallOLMOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("InstallOperator", mock.Anything, mock.Anything).Return(nil) - - ctx, cancel := context.WithTimeout(context.TODO(), time.Second*5) - defer cancel() - resp, err := c.InstallOperator(ctx, &dbaasv1beta1.InstallOperatorRequest{ - KubernetesClusterName: clusterName, - OperatorType: pxcOperator, - Version: onePointEight, - }) - require.Error(t, err) - assert.Nil(t, resp) - - resp, err = c.InstallOperator(ctx, &dbaasv1beta1.InstallOperatorRequest{ - KubernetesClusterName: clusterName, - OperatorType: psmdbOperator, - Version: onePointEight, - }) - require.Error(t, err) - assert.Nil(t, resp) - }) - - t.Run("Defaults supported", func(t *testing.T) { - db, c, kubeClient, kubeStorageClient := setup(t, clusterName, response, "5497") - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - kubeClient.On("SetKubeConfig", mock.Anything).Return(nil) - kubeClient.On("InstallOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("UpgradeOperator", mock.Anything, mock.Anything, mock.Anything).Return(nil) - - ctx, cancel := context.WithTimeout(context.TODO(), time.Second*5) - defer cancel() - response.Versions[1].Matrix.Pxc[defaultPXCVersion] = componentVersion{} - response.Versions[3].Matrix.Mongod[defaultPSMDBVersion] = componentVersion{} - - kubernetesCluster, err := models.FindKubernetesClusterByName(db, clusterName) - require.NoError(t, err) - kubernetesCluster.Mongod.DefaultVersion = defaultPSMDBVersion - kubernetesCluster.PXC.DefaultVersion = defaultPXCVersion - require.NoError(t, db.Save(kubernetesCluster)) - - resp, err := c.InstallOperator(ctx, &dbaasv1beta1.InstallOperatorRequest{ - KubernetesClusterName: clusterName, - OperatorType: pxcOperator, - Version: onePointEight, - }) - require.NoError(t, err) - assert.Equal(t, dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_OK, resp.Status) - - resp, err = c.InstallOperator(ctx, &dbaasv1beta1.InstallOperatorRequest{ - KubernetesClusterName: clusterName, - OperatorType: psmdbOperator, - Version: onePointEight, - }) - require.NoError(t, err) - assert.Equal(t, dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_OK, resp.Status) - }) -} - -func TestCheckForOperatorUpdate(t *testing.T) { - response := &VersionServiceResponse{ - Versions: []Version{ - { - ProductVersion: onePointSix, - Product: pxcOperator, - }, - { - ProductVersion: onePointSeven, - Product: pxcOperator, - }, - { - ProductVersion: onePointEight, - Product: pxcOperator, - }, - - { - ProductVersion: onePointSix, - Product: psmdbOperator, - }, - { - ProductVersion: onePointSeven, - Product: psmdbOperator, - }, - { - ProductVersion: onePointEight, - Product: psmdbOperator, - }, - - { - ProductVersion: twoPointEighteen, - Product: "pmm-server", - Matrix: matrix{ - PSMDBOperator: map[string]componentVersion{ - onePointEight: {Status: "recommended"}, - onePointSeven: {}, - }, - PXCOperator: map[string]componentVersion{ - onePointEight: {Status: "recommended"}, - onePointSeven: {}, - }, - }, - }, - }, - } - - pmmversion.PMMVersion = twoPointEighteen - ctx := context.Background() - t.Run("Update available", func(t *testing.T) { - clusterName := "update-available" - _, cs, kubeClient, kubeStorageClient := setup(t, clusterName, response, "9873") - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - - mockSubscriptions := &v1alpha1.SubscriptionList{ - Items: []v1alpha1.Subscription{ - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: "space-x", - Name: "psmdb-operator", - }, - Spec: &v1alpha1.SubscriptionSpec{ - Package: "percona-server-mongodb-operator", - CatalogSource: "src", - Channel: "nat-geo", - }, - Status: v1alpha1.SubscriptionStatus{ - CurrentCSV: "percona-server-mongodb-operator-v1.8.0", - InstalledCSV: "percona-server-mongodb-operator-v1.2.2", - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: "space-x", - Name: "pxc-operator", - }, - Spec: &v1alpha1.SubscriptionSpec{ - Package: "percona-xtradb-cluster-operator", - CatalogSource: "src", - Channel: "nat-geo", - }, - Status: v1alpha1.SubscriptionStatus{ - CurrentCSV: "percona-xtradb-cluster-operator-v1.8.0", - InstalledCSV: "percona-xtradb-cluster-operator-v1.2.2", - }, - }, - }, - } - kubeClient.On("ListSubscriptions", mock.Anything, mock.Anything).WaitUntil(time.After(time.Second)).Return(mockSubscriptions, nil) - kubeClient.On("SetKubeConfig", mock.Anything).Return(nil) - resp, err := cs.CheckForOperatorUpdate(ctx, &dbaasv1beta1.CheckForOperatorUpdateRequest{}) - require.NoError(t, err) - cluster := resp.ClusterToComponents[clusterName] - require.NotNil(t, cluster) - require.NotNil(t, cluster.ComponentToUpdateInformation) - require.NotNil(t, cluster.ComponentToUpdateInformation[psmdbOperator]) - require.NotNil(t, cluster.ComponentToUpdateInformation[pxcOperator]) - assert.Equal(t, onePointEight, cluster.ComponentToUpdateInformation[psmdbOperator].AvailableVersion) - assert.Equal(t, onePointEight, cluster.ComponentToUpdateInformation[pxcOperator].AvailableVersion) - }) - t.Run("Update NOT available", func(t *testing.T) { - clusterName := "update-not-available" - _, cs, kubeClient, kubeStorageClient := setup(t, clusterName, response, "7895") - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - - mockSubscriptions := &v1alpha1.SubscriptionList{ - Items: []v1alpha1.Subscription{ - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: "space-x", - Name: "psmdb-operator", - }, - Spec: &v1alpha1.SubscriptionSpec{ - Package: "percona-server-mongodb-operator", - CatalogSource: "src", - Channel: "nat-geo", - }, - Status: v1alpha1.SubscriptionStatus{ - CurrentCSV: "percona-server-mongodb-operator-v1.8.0", - InstalledCSV: "percona-server-mongodb-operator-v1.8.0", - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: "space-x", - Name: "pxc-operator", - }, - Spec: &v1alpha1.SubscriptionSpec{ - Package: "percona-xtradb-cluster-operator", - CatalogSource: "src", - Channel: "nat-geo", - }, - Status: v1alpha1.SubscriptionStatus{ - CurrentCSV: "percona-xtradb-cluster-operator-v1.8.0", - InstalledCSV: "percona-xtradb-cluster-operator-v1.8.0", - }, - }, - }, - } - kubeClient.On("ListSubscriptions", mock.Anything, mock.Anything).WaitUntil(time.After(time.Second)).Return(mockSubscriptions, nil) - kubeClient.On("SetKubeConfig", mock.Anything).Return(nil) - - resp, err := cs.CheckForOperatorUpdate(ctx, &dbaasv1beta1.CheckForOperatorUpdateRequest{}) - require.NoError(t, err) - cluster := resp.ClusterToComponents[clusterName] - require.NotNil(t, cluster) - require.NotNil(t, cluster.ComponentToUpdateInformation) - require.NotNil(t, cluster.ComponentToUpdateInformation[psmdbOperator]) - require.NotNil(t, cluster.ComponentToUpdateInformation[pxcOperator]) - assert.Equal(t, "", cluster.ComponentToUpdateInformation[psmdbOperator].AvailableVersion) - assert.Equal(t, "", cluster.ComponentToUpdateInformation[pxcOperator].AvailableVersion) - }) - t.Run("User's operators version is ahead of version service", func(t *testing.T) { - clusterName := "update-available-pmm-update" - _, cs, kubeClient, kubeStorageClient := setup(t, clusterName, response, "5863") - kubeStorageClient.On("GetOrSetClient", mock.Anything).Return(kubeClient, nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.7.0", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.6.0", nil) - mockSubscriptions := &v1alpha1.SubscriptionList{ - Items: []v1alpha1.Subscription{ - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: "space-x", - Name: "psmdb-operator", - }, - Spec: &v1alpha1.SubscriptionSpec{ - Package: "percona-server-mongodb-operator", - CatalogSource: "src", - Channel: "nat-geo", - }, - Status: v1alpha1.SubscriptionStatus{ - CurrentCSV: "percona-server-mongodb-operator-v1.8.0", - InstalledCSV: "percona-server-mongodb-operator-v1.8.0", - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: "space-x", - Name: "pxc-operator", - }, - Spec: &v1alpha1.SubscriptionSpec{ - Package: "percona-xtradb-cluster-operator", - CatalogSource: "src", - Channel: "nat-geo", - }, - Status: v1alpha1.SubscriptionStatus{ - CurrentCSV: "percona-xtradb-cluster-operator-v1.8.0", - InstalledCSV: "percona-xtradb-cluster-operator-v1.8.0", - }, - }, - }, - } - kubeClient.On("ListSubscriptions", mock.Anything, mock.Anything).WaitUntil(time.After(time.Second)).Return(mockSubscriptions, nil) - kubeClient.On("SetKubeConfig", mock.Anything).Return(nil) - resp, err := cs.CheckForOperatorUpdate(ctx, &dbaasv1beta1.CheckForOperatorUpdateRequest{}) - require.NoError(t, err) - cluster := resp.ClusterToComponents[clusterName] - require.NotNil(t, cluster) - require.NotNil(t, cluster.ComponentToUpdateInformation) - require.NotNil(t, cluster.ComponentToUpdateInformation[psmdbOperator]) - require.NotNil(t, cluster.ComponentToUpdateInformation[pxcOperator]) - assert.Equal(t, "", cluster.ComponentToUpdateInformation[psmdbOperator].AvailableVersion) - assert.Equal(t, "", cluster.ComponentToUpdateInformation[pxcOperator].AvailableVersion) - }) -} diff --git a/managed/services/management/dbaas/db_cluster_service.go b/managed/services/management/dbaas/db_cluster_service.go deleted file mode 100644 index 3746727b5c..0000000000 --- a/managed/services/management/dbaas/db_cluster_service.go +++ /dev/null @@ -1,484 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "fmt" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - corev1 "k8s.io/api/core/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -const ( - dbTemplateKindAnnotationKey = "dbaas.percona.com/dbtemplate-kind" - dbTemplateNameAnnotationKey = "dbaas.percona.com/dbtemplate-name" -) - -// DBClusterService holds unexported field and public methods to handle DB Clusters. -type DBClusterService struct { - db *reform.DB - l *logrus.Entry - grafanaClient grafanaClient - kubeStorage *KubeStorage - versionServiceClient *VersionServiceClient - - dbaasv1beta1.UnimplementedDBClustersServer -} - -// NewDBClusterService creates DB Clusters Service. -func NewDBClusterService( //nolint:ireturn - db *reform.DB, - grafanaClient grafanaClient, - versionServiceClient *VersionServiceClient, -) dbaasv1beta1.DBClustersServer { - l := logrus.WithField("component", "dbaas_db_cluster") - return &DBClusterService{ - db: db, - l: l, - grafanaClient: grafanaClient, - kubeStorage: NewKubeStorage(db), - versionServiceClient: versionServiceClient, - } -} - -// ListDBClusters returns a list of all DB clusters. -func (s DBClusterService) ListDBClusters(ctx context.Context, req *dbaasv1beta1.ListDBClustersRequest) (*dbaasv1beta1.ListDBClustersResponse, error) { - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - dbClusters, err := kubeClient.ListDatabaseClusters(ctx) - if err != nil { - // return nil, errors.Wrap(err, "failed listing database clusters") - dbClusters = &dbaasv1.DatabaseClusterList{Items: []dbaasv1.DatabaseCluster{}} - } - psmdbOperatorVersion, err := kubeClient.GetPSMDBOperatorVersion(ctx) - if err != nil { - s.l.Errorf("failed determining version of psmdb operator: %v", err) - } - - pxcOperatorVersion, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - s.l.Errorf("failed determining version of pxc operator: %v", err) - } - psmdbClusters := []*dbaasv1beta1.PSMDBCluster{} - pxcClusters := []*dbaasv1beta1.PXCCluster{} - - for _, cluster := range dbClusters.Items { - switch cluster.Spec.Database { - case kubernetes.DatabaseTypePXC: - c, err := s.getPXCCluster(ctx, cluster, pxcOperatorVersion) - if err != nil { - s.l.Errorf("failed getting PXC cluster: %v", err) - } - pxcClusters = append(pxcClusters, c) - case kubernetes.DatabaseTypePSMDB: - c, err := s.getPSMDBCluster(ctx, cluster, psmdbOperatorVersion) - if err != nil { - s.l.Errorf("failed getting PSMDB cluster: %v", err) - } - psmdbClusters = append(psmdbClusters, c) - default: - s.l.Errorf("unsupported database type %s", cluster.Spec.Database) - } - } - - return &dbaasv1beta1.ListDBClustersResponse{ - PxcClusters: pxcClusters, - PsmdbClusters: psmdbClusters, - }, nil -} - -func (s DBClusterService) getClusterResource(instance dbaasv1.DBInstanceSpec) (diskSize int64, memory int64, cpu int, err error) { //nolint:nonamedreturns - disk, ok := (&instance.DiskSize).AsInt64() - if ok { - diskSize = disk - } - mem, ok := (&instance.Memory).AsInt64() - if ok { - memory = mem - } - cpuResource := (&instance.CPU).String() - var cpuMillis int64 - if strings.HasSuffix(cpuResource, "m") { - cpuResource = cpuResource[:len(cpuResource)-1] - cpuMillis, err = strconv.ParseInt(cpuResource, 10, 64) - if err != nil { - return - } - } - cpu = int(cpuMillis) - var floatCPU float64 - if cpuMillis == 0 { - floatCPU, err = strconv.ParseFloat(cpuResource, 64) - if err != nil { - return - } - cpu = int(floatCPU * 1000) - } - return -} - -func (s DBClusterService) getPXCCluster(ctx context.Context, cluster dbaasv1.DatabaseCluster, operatorVersion string) (*dbaasv1beta1.PXCCluster, error) { - lbType, internetFacing := cluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] - diskSize, memory, cpu, err := s.getClusterResource(cluster.Spec.DBInstance) - if err != nil { - return nil, err - } - c := &dbaasv1beta1.PXCCluster{ - Name: cluster.Name, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: cluster.Spec.ClusterSize, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - DiskSize: diskSize, - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: int32(cpu), - MemoryBytes: memory, - }, - Configuration: cluster.Spec.DatabaseConfig, - }, - }, - State: dbClusterStates()[cluster.Status.State], - Exposed: cluster.Spec.LoadBalancer.ExposeType == corev1.ServiceTypeNodePort || cluster.Spec.LoadBalancer.ExposeType == corev1.ServiceTypeLoadBalancer, - InternetFacing: internetFacing || lbType == "external", - SourceRanges: cluster.Spec.LoadBalancer.LoadBalancerSourceRanges, - Operation: &dbaasv1beta1.RunningOperation{ - TotalSteps: cluster.Status.Size, - FinishedSteps: cluster.Status.Ready, - Message: cluster.Status.Message, - }, - } - if cluster.Spec.DBInstance.StorageClassName != nil { - c.Params.Pxc.StorageClass = *cluster.Spec.DBInstance.StorageClassName - } - if cluster.Spec.LoadBalancer.Type == "proxysql" { - compute, err := s.getComputeResources(cluster.Spec.LoadBalancer.Resources.Requests) - if err != nil { - s.l.Errorf("could not parse resources for proxysql %v", err) - } - c.Params.Proxysql = &dbaasv1beta1.PXCClusterParams_ProxySQL{ - ComputeResources: compute, - Image: cluster.Spec.LoadBalancer.Image, - } - } - if cluster.Spec.LoadBalancer.Type == "haproxy" { - compute, err := s.getComputeResources(cluster.Spec.LoadBalancer.Resources.Requests) - if err != nil { - s.l.Errorf("could not parse resources for proxysql %v", err) - } - c.Params.Haproxy = &dbaasv1beta1.PXCClusterParams_HAProxy{ - ComputeResources: compute, - Image: cluster.Spec.LoadBalancer.Image, - } - } - imageAndTag := strings.Split(cluster.Spec.DatabaseImage, ":") - if len(imageAndTag) != 2 { - return nil, errors.Errorf("failed to parse Xtradb Cluster version out of %q", cluster.Spec.DatabaseImage) - } - currentDBVersion := imageAndTag[1] - - nextVersionImage, err := s.versionServiceClient.GetNextDatabaseImage(ctx, pxcOperator, operatorVersion, currentDBVersion) - if err != nil { - return nil, err - } - c.AvailableImage = nextVersionImage - c.InstalledImage = cluster.Spec.DatabaseImage - - if cluster.ObjectMeta.Annotations != nil { - templateName, templateNameExists := cluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] - templateKind, templateKindExists := cluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] - if templateNameExists && templateKindExists { - c.Template = &dbaasv1beta1.Template{ - Name: templateName, - Kind: templateKind, - } - } - } - - return c, nil -} - -func (s DBClusterService) getComputeResources(resources corev1.ResourceList) (*dbaasv1beta1.ComputeResources, error) { - compute := &dbaasv1beta1.ComputeResources{} - cpuLimit, ok := resources[corev1.ResourceCPU] - if ok { - cpu := (&cpuLimit).String() - if strings.HasSuffix(cpu, "m") { - cpu = cpu[:len(cpu)-1] - millis, err := strconv.ParseUint(cpu, 10, 64) - if err != nil { - return compute, err - } - compute.CpuM = int32(millis) - } - if compute.CpuM == 0 { - floatCPU, err := strconv.ParseFloat(cpu, 64) - if err != nil { - return compute, err - } - compute.CpuM = int32(floatCPU * 1000) - } - } - memLimit, ok := resources[corev1.ResourceMemory] - if ok { - mem, ok := (&memLimit).AsInt64() - if ok { - compute.MemoryBytes = mem - } - } - return compute, nil -} - -func (s DBClusterService) getPSMDBCluster(ctx context.Context, cluster dbaasv1.DatabaseCluster, operatorVersion string) (*dbaasv1beta1.PSMDBCluster, error) { - diskSize, memory, cpu, err := s.getClusterResource(cluster.Spec.DBInstance) - if err != nil { - return nil, err - } - lbType, internetFacing := cluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] - c := &dbaasv1beta1.PSMDBCluster{ - Name: cluster.Name, - Params: &dbaasv1beta1.PSMDBClusterParams{ - ClusterSize: cluster.Spec.ClusterSize, - Replicaset: &dbaasv1beta1.PSMDBClusterParams_ReplicaSet{ - DiskSize: diskSize, - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: int32(cpu), - MemoryBytes: memory, - }, - Configuration: cluster.Spec.DatabaseConfig, - }, - }, - State: dbClusterStates()[cluster.Status.State], - Exposed: cluster.Spec.LoadBalancer.ExposeType == corev1.ServiceTypeNodePort || cluster.Spec.LoadBalancer.ExposeType == corev1.ServiceTypeLoadBalancer, - InternetFacing: internetFacing || lbType == "external", - SourceRanges: cluster.Spec.LoadBalancer.LoadBalancerSourceRanges, - Operation: &dbaasv1beta1.RunningOperation{ - TotalSteps: cluster.Status.Size, - FinishedSteps: cluster.Status.Ready, - // TODO: Add messages - Message: "", - }, - } - if cluster.Spec.DBInstance.StorageClassName != nil { - c.Params.Replicaset.StorageClass = *cluster.Spec.DBInstance.StorageClassName - } - imageAndTag := strings.Split(cluster.Spec.DatabaseImage, ":") - if len(imageAndTag) != 2 { - return nil, errors.Errorf("failed to parse PSMDB version out of %q", cluster.Spec.DatabaseImage) - } - currentDBVersion := imageAndTag[1] - - nextVersionImage, err := s.versionServiceClient.GetNextDatabaseImage(ctx, psmdbOperator, operatorVersion, currentDBVersion) - if err != nil { - return nil, err - } - c.AvailableImage = nextVersionImage - c.InstalledImage = cluster.Spec.DatabaseImage - - if cluster.ObjectMeta.Annotations != nil { - templateName, templateNameExists := cluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] - templateKind, templateKindExists := cluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] - if templateNameExists && templateKindExists { - c.Template = &dbaasv1beta1.Template{ - Name: templateName, - Kind: templateKind, - } - } - } - - return c, nil -} - -func (s DBClusterService) GetDBCluster(ctx context.Context, req *dbaasv1beta1.GetDBClusterRequest) (*dbaasv1beta1.GetDBClusterResponse, error) { - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - dbCluster, err := kubeClient.GetDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, errors.Wrap(err, "failed getting the database cluster") - } - psmdbOperatorVersion, err := kubeClient.GetPSMDBOperatorVersion(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed getting psmdb operator version") - } - - pxcOperatorVersion, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed getting pxc operator version") - } - resp := &dbaasv1beta1.GetDBClusterResponse{} - if dbCluster.Spec.Database == kubernetes.DatabaseTypePXC && pxcOperatorVersion != "" { - c, err := s.getPXCCluster(ctx, *dbCluster, pxcOperatorVersion) - if err != nil { - return nil, errors.Wrap(err, "failed getting PXC cluster") - } - resp.PxcCluster = c - } - if dbCluster.Spec.Database == kubernetes.DatabaseTypePSMDB && psmdbOperatorVersion != "" { - c, err := s.getPSMDBCluster(ctx, *dbCluster, psmdbOperatorVersion) - if err != nil { - return nil, errors.Wrap(err, "failed getting PSMDB cluster") - } - resp.PsmdbCluster = c - } - return resp, nil -} - -// RestartDBCluster restarts DB cluster by given name and type. -func (s DBClusterService) RestartDBCluster(ctx context.Context, req *dbaasv1beta1.RestartDBClusterRequest) (*dbaasv1beta1.RestartDBClusterResponse, error) { - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - err = kubeClient.RestartDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, err - } - - return &dbaasv1beta1.RestartDBClusterResponse{}, nil -} - -// DeleteDBCluster deletes DB cluster by given name and type. -func (s DBClusterService) DeleteDBCluster(ctx context.Context, req *dbaasv1beta1.DeleteDBClusterRequest) (*dbaasv1beta1.DeleteDBClusterResponse, error) { - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - err = kubeClient.DeleteDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, err - } - - var clusterType string - switch req.ClusterType { - case dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PXC: - clusterType = string(kubernetes.DatabaseTypePXC) - case dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PSMDB: - clusterType = string(kubernetes.DatabaseTypePSMDB) - default: - return nil, status.Error(codes.InvalidArgument, "unexpected DB cluster type") - } - - err = s.grafanaClient.DeleteAPIKeysWithPrefix(ctx, fmt.Sprintf("%s-%s-%s", clusterType, req.KubernetesClusterName, req.Name)) - if err != nil { - // ignore if API Key is not deleted. - s.l.Warnf("Couldn't delete API key: %s", err) - } - - return &dbaasv1beta1.DeleteDBClusterResponse{}, nil -} - -// ListS3Backups returns list of backup artifacts stored on s3 -func (s DBClusterService) ListS3Backups(ctx context.Context, req *dbaasv1beta1.ListS3BackupsRequest) (*dbaasv1beta1.ListS3BackupsResponse, error) { - if req == nil || (req != nil && req.LocationId == "") { - return nil, errors.New("location_id cannot be empty") - } - backupLocation, err := models.FindBackupLocationByID(s.db.Querier, req.LocationId) - if err != nil { - return nil, err - } - if backupLocation.Type != models.S3BackupLocationType { - return nil, errors.New("only s3 compatible storages are supported") - } - sess, err := session.NewSession(&aws.Config{ - Region: aws.String(backupLocation.S3Config.BucketRegion), - Credentials: credentials.NewStaticCredentials( - backupLocation.S3Config.AccessKey, - backupLocation.S3Config.SecretKey, - ""), - }) - if err != nil { - return nil, err - } - s3Client := s3.New(sess) - var items []*dbaasv1beta1.S3Item - obj, err := s3Client.ListObjects(&s3.ListObjectsInput{ - Bucket: aws.String(backupLocation.S3Config.BucketName), - Delimiter: aws.String("/"), - }) - if err != nil { - return nil, err - } - keyMap := make(map[string]struct{}) - for _, item := range obj.Contents { - if *item.Key == ".pmb.init" { - continue - } - parts := strings.Split(*item.Key, "Z_") - if len(parts) == 2 { - if _, ok := keyMap[parts[0]]; !ok { - items = append(items, &dbaasv1beta1.S3Item{ - Key: fmt.Sprintf("s3://%s/%s", backupLocation.S3Config.BucketName, fmt.Sprintf("%sZ", parts[0])), - }) - keyMap[parts[0]] = struct{}{} - } - } - parts = strings.Split(*item.Key, ".md5") - if len(parts) == 2 { - items = append(items, &dbaasv1beta1.S3Item{ - Key: fmt.Sprintf("s3://%s/%s", backupLocation.S3Config.BucketName, parts[0]), - }) - } - } - return &dbaasv1beta1.ListS3BackupsResponse{Backups: items}, nil -} - -// ListSecrets returns list of secret names to the end user -func (s DBClusterService) ListSecrets(ctx context.Context, req *dbaasv1beta1.ListSecretsRequest) (*dbaasv1beta1.ListSecretsResponse, error) { - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - secretsList, err := kubeClient.ListSecrets(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed listing database clusters") - } - secrets := make([]*dbaasv1beta1.Secret, 0, len(secretsList.Items)) - for _, secret := range secretsList.Items { - secrets = append(secrets, &dbaasv1beta1.Secret{ - Name: secret.Name, - }) - } - return &dbaasv1beta1.ListSecretsResponse{Secrets: secrets}, nil -} - -func dbClusterStates() map[dbaasv1.AppState]dbaasv1beta1.DBClusterState { - return map[dbaasv1.AppState]dbaasv1beta1.DBClusterState{ - dbaasv1.AppStateUnknown: dbaasv1beta1.DBClusterState_DB_CLUSTER_STATE_INVALID, - dbaasv1.AppStateInit: dbaasv1beta1.DBClusterState_DB_CLUSTER_STATE_CHANGING, - dbaasv1.AppStateReady: dbaasv1beta1.DBClusterState_DB_CLUSTER_STATE_READY, - dbaasv1.AppStateError: dbaasv1beta1.DBClusterState_DB_CLUSTER_STATE_FAILED, - dbaasv1.AppStateStopping: dbaasv1beta1.DBClusterState_DB_CLUSTER_STATE_CHANGING, - dbaasv1.AppStatePaused: dbaasv1beta1.DBClusterState_DB_CLUSTER_STATE_PAUSED, - } -} diff --git a/managed/services/management/dbaas/db_cluster_service_test.go b/managed/services/management/dbaas/db_cluster_service_test.go deleted file mode 100644 index 88a736f21c..0000000000 --- a/managed/services/management/dbaas/db_cluster_service_test.go +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "fmt" - "testing" - - "github.com/google/uuid" - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" - "github.com/percona/pmm/utils/logger" -) - -const dbKubeconfigTest = ` -{ - "apiVersion": "v1", - "kind": "Config", - "users": [ - { - "name": "percona-xtradb-cluster-operator", - "user": { - "token": "some-token" - } - } - ], - "clusters": [ - { - "cluster": { - "certificate-authority-data": "some-certificate-authority-data", - "server": "https://192.168.0.42:8443" - }, - "name": "self-hosted-cluster" - } - ], - "contexts": [ - { - "context": { - "cluster": "self-hosted-cluster", - "user": "percona-xtradb-cluster-operator" - }, - "name": "svcs-acct-context" - } - ], - "current-context": "svcs-acct-context" -} -` - -const ( - dbKubernetesClusterNameTest = "test-k8s-db-cluster-name" - version230 = "2.30.0" -) - -func TestDBClusterService(t *testing.T) { - setup := func(t *testing.T) (ctx context.Context, db *reform.DB, dbaasClient *mockDbaasClient, grafanaClient *mockGrafanaClient, kubernetesClient *mockKubernetesClient, teardown func(t *testing.T)) { - t.Helper() - - ctx = logger.Set(context.Background(), t.Name()) - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - db = reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - dbaasClient = &mockDbaasClient{} - grafanaClient = &mockGrafanaClient{} - kubernetesClient = &mockKubernetesClient{} - - teardown = func(t *testing.T) { - t.Helper() - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - } - - return - } - - ctx, db, dbaasClient, grafanaClient, kubeClient, teardown := setup(t) - defer teardown(t) - - versionService := NewVersionServiceClient(versionServiceURL) - - ks := NewKubernetesServer(db, dbaasClient, versionService, grafanaClient) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("SetKubeConfig", mock.Anything).Return(nil) - kubeClient.On("InstallOLMOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("InstallOperator", mock.Anything, mock.Anything).Return(nil) - - grafanaClient.On("CreateAdminAPIKey", mock.Anything, mock.Anything).Return(int64(123456), "api-key", nil) - - dbaasClient.On("StartMonitoring", mock.Anything, mock.Anything).Return(&controllerv1beta1.StartMonitoringResponse{}, nil) - kubeClient.On("GetServerVersion").Return(nil, nil) - clients := map[string]kubernetesClient{ - dbKubernetesClusterNameTest: kubeClient, - } - - s := ks.(*kubernetesServer) - s.kubeStorage.clients = clients - ks = s - registerKubernetesClusterResponse, err := ks.RegisterKubernetesCluster(ctx, &dbaasv1beta1.RegisterKubernetesClusterRequest{ - KubernetesClusterName: dbKubernetesClusterNameTest, - KubeAuth: &dbaasv1beta1.KubeAuth{Kubeconfig: dbKubeconfigTest}, - }) - require.NoError(t, err) - assert.NotNil(t, registerKubernetesClusterResponse) - t.Run("BasicListPXCClusters", func(t *testing.T) { - cs := NewDBClusterService(db, grafanaClient, versionService) - s := cs.(*DBClusterService) - s.kubeStorage.clients = clients - mockK8sResp := []dbaasv1.DatabaseCluster{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "first-pxc-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "pxc", - DatabaseImage: "percona/percona-xtradb-cluster:8.0.27-18.1", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "proxysql", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 15, - Size: 15, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "first-psmdb-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "psmdb", - DatabaseImage: "percona/percona-server-mongodb:4.4.5-7", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "mongos", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 10, - Size: 10, - }, - }, - } - - kubeClient.On("ListDatabaseClusters", ctx, mock.Anything).Return(&dbaasv1.DatabaseClusterList{Items: mockK8sResp}, nil) - - resp, err := s.ListDBClusters(ctx, &dbaasv1beta1.ListDBClustersRequest{KubernetesClusterName: dbKubernetesClusterNameTest}) - assert.NoError(t, err) - assert.Len(t, resp.PxcClusters, 1) - require.NotNil(t, resp.PxcClusters[0]) - assert.Equal(t, resp.PxcClusters[0].Name, "first-pxc-test") - assert.Equal(t, int32(5), resp.PxcClusters[0].Params.ClusterSize) - assert.Equal(t, int32(3), resp.PxcClusters[0].Params.Pxc.ComputeResources.CpuM) - assert.Equal(t, int64(256), resp.PxcClusters[0].Params.Pxc.ComputeResources.MemoryBytes) - assert.Equal(t, int32(2), resp.PxcClusters[0].Params.Proxysql.ComputeResources.CpuM) - assert.Equal(t, int64(124), resp.PxcClusters[0].Params.Proxysql.ComputeResources.MemoryBytes) - assert.Equal(t, int32(15), resp.PxcClusters[0].Operation.TotalSteps) - assert.Equal(t, int32(15), resp.PxcClusters[0].Operation.FinishedSteps) - - assert.Len(t, resp.PsmdbClusters, 1) - require.NotNil(t, resp.PsmdbClusters[0]) - assert.Equal(t, resp.PsmdbClusters[0].Name, "first-psmdb-test") - assert.Equal(t, int32(5), resp.PsmdbClusters[0].Params.ClusterSize) - assert.Equal(t, int32(3), resp.PsmdbClusters[0].Params.Replicaset.ComputeResources.CpuM) - assert.Equal(t, int64(256), resp.PsmdbClusters[0].Params.Replicaset.ComputeResources.MemoryBytes) - assert.Equal(t, int32(10), resp.PsmdbClusters[0].Operation.TotalSteps) - assert.Equal(t, int32(10), resp.PsmdbClusters[0].Operation.FinishedSteps) - }) - - t.Run("BasicRestartPXCCluster", func(t *testing.T) { - cs := NewDBClusterService(db, grafanaClient, versionService) - s := cs.(*DBClusterService) - s.kubeStorage.clients = clients - - kubeClient.On("RestartDatabaseCluster", ctx, "third-pxc-test").Return(nil) - - in := dbaasv1beta1.RestartDBClusterRequest{ - KubernetesClusterName: dbKubernetesClusterNameTest, - Name: "third-pxc-test", - ClusterType: dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PXC, - } - - _, err := s.RestartDBCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("BasicRestartPSMDBCluster", func(t *testing.T) { - cs := NewDBClusterService(db, grafanaClient, versionService) - s := cs.(*DBClusterService) - s.kubeStorage.clients = clients - - kubeClient.On("RestartDatabaseCluster", ctx, "third-psmdb-test").Return(nil) - - in := dbaasv1beta1.RestartDBClusterRequest{ - KubernetesClusterName: dbKubernetesClusterNameTest, - Name: "third-psmdb-test", - ClusterType: dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PSMDB, - } - - _, err := s.RestartDBCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("BasicDeletePXCCluster", func(t *testing.T) { - cs := NewDBClusterService(db, grafanaClient, versionService) - s := cs.(*DBClusterService) - s.kubeStorage.clients = clients - dbClusterName := "delete-pxc-test" - - kubeClient.On("DeleteDatabaseCluster", ctx, dbClusterName).Return(nil) - grafanaClient.On("DeleteAPIKeysWithPrefix", ctx, fmt.Sprintf("pxc-%s-%s", dbKubernetesClusterNameTest, dbClusterName)).Return(nil) - - in := dbaasv1beta1.DeleteDBClusterRequest{ - KubernetesClusterName: dbKubernetesClusterNameTest, - Name: dbClusterName, - ClusterType: dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PXC, - } - - _, err := s.DeleteDBCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("BasicDeletePSMDBCluster", func(t *testing.T) { - cs := NewDBClusterService(db, grafanaClient, versionService) - s := cs.(*DBClusterService) - s.kubeStorage.clients = clients - dbClusterName := "delete-psmdb-test" - kubeClient.On("DeleteDatabaseCluster", ctx, dbClusterName).Return(nil) - - grafanaClient.On("DeleteAPIKeysWithPrefix", ctx, fmt.Sprintf("psmdb-%s-%s", dbKubernetesClusterNameTest, dbClusterName)).Return(nil) - - in := dbaasv1beta1.DeleteDBClusterRequest{ - KubernetesClusterName: dbKubernetesClusterNameTest, - Name: dbClusterName, - ClusterType: dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PSMDB, - } - - _, err := s.DeleteDBCluster(ctx, &in) - assert.NoError(t, err) - }) - t.Run("GetComputeResource", func(t *testing.T) { - cs := NewDBClusterService(db, grafanaClient, versionService) - s := cs.(*DBClusterService) - compute, err := s.getComputeResources(corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1000m"), - corev1.ResourceMemory: resource.MustParse("1G"), - }) - assert.NoError(t, err) - assert.Equal(t, &dbaasv1beta1.ComputeResources{ - CpuM: 1000, - MemoryBytes: 1000000000, - }, compute) - }) -} diff --git a/managed/services/management/dbaas/dbaas_initializer.go b/managed/services/management/dbaas/dbaas_initializer.go deleted file mode 100644 index f8b10b6529..0000000000 --- a/managed/services/management/dbaas/dbaas_initializer.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "sync" - "time" - - dbaascontrollerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "gopkg.in/reform.v1" - "k8s.io/client-go/rest" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" -) - -// Initializer initializes dbaas feature -type Initializer struct { - db *reform.DB - l *logrus.Entry - - dbaasClient dbaasClient - kubernetesServer dbaasv1beta1.KubernetesServer - - enabled bool - cancel func() - m sync.Mutex -} - -const ( - defaultClusterName = "default-pmm-cluster" - pxcSecretNameTmpl = "dbaas-%s-pxc-secrets" //nolint:gosec - psmdbSecretNameTmpl = "dbaas-%s-psmdb-secrets" //nolint:gosec -) - -var errClusterExists = errors.New("cluster already exists") - -// NewInitializer returns initialized Initializer structure -func NewInitializer(db *reform.DB, client dbaasClient) *Initializer { - l := logrus.WithField("component", "dbaas_initializer") - return &Initializer{ - db: db, - l: l, - dbaasClient: client, - } -} - -// RegisterKubernetesServer sets the Kubernetes server instance. -func (in *Initializer) RegisterKubernetesServer(k dbaasv1beta1.KubernetesServer) { - in.kubernetesServer = k -} - -// Update updates current dbaas settings -func (in *Initializer) Update(ctx context.Context) error { - settings, err := models.GetSettings(in.db) - if err != nil { - in.l.Errorf("Failed to get settings: %+v.", err) - return err - } - if settings.DBaaS.Enabled { - return in.Enable(ctx) - } - return in.Disable(ctx) -} - -// Enable enables dbaas feature and connects to dbaas-controller -func (in *Initializer) Enable(ctx context.Context) error { - in.m.Lock() - defer in.m.Unlock() - if in.enabled { - return nil - } - timeoutCtx, cancel := context.WithTimeout(ctx, 20*time.Second) - defer cancel() - err := in.dbaasClient.Connect(timeoutCtx) - if err != nil { - return err - } - ctx, in.cancel = context.WithCancel(ctx) - - in.enabled = true - return in.registerInCluster(ctx) -} - -// registerIncluster automatically adds k8s cluster to dbaas when PMM is running inside k8s cluster -func (in *Initializer) registerInCluster(ctx context.Context) error { - kubeConfig, err := in.dbaasClient.GetKubeConfig(ctx, &dbaascontrollerv1beta1.GetKubeconfigRequest{}) - switch { - case err == nil: - // If err is not equal to nil, dont' register cluster and fail silently - err := in.db.InTransaction(func(t *reform.TX) error { - cluster, err := models.FindKubernetesClusterByName(t.Querier, defaultClusterName) - if err != nil { - in.l.Errorf("failed finding cluster: %v", err) - return nil - } - if cluster != nil { - return errClusterExists - } - return nil - }) - if err != nil { - if errors.Is(err, errClusterExists) { - return nil - } - return err - } - if len(kubeConfig.Kubeconfig) != 0 { - req := &dbaasv1beta1.RegisterKubernetesClusterRequest{ - KubernetesClusterName: defaultClusterName, - KubeAuth: &dbaasv1beta1.KubeAuth{ - Kubeconfig: kubeConfig.Kubeconfig, - }, - } - _, err = in.kubernetesServer.RegisterKubernetesCluster(ctx, req) - if err != nil { - return err - } - in.l.Info("Cluster is successfully initialized") - } - case errors.Is(err, rest.ErrNotInCluster): - in.l.Info("PMM is running outside a kubernetes cluster") - default: - in.l.Errorf("failed getting kubeconfig inside cluster: %v", err) - } - return nil -} - -// Disable disconnects from dbaas-controller and disabled dbaas feature -func (in *Initializer) Disable(_ context.Context) error { - in.m.Lock() - defer in.m.Unlock() - if !in.enabled { // Don't disable if already disabled - return nil - } - if in.cancel != nil { - in.cancel() - } - err := in.dbaasClient.Disconnect() - if err != nil { - return err - } - in.enabled = false - return nil -} diff --git a/managed/services/management/dbaas/deps.go b/managed/services/management/dbaas/deps.go deleted file mode 100644 index 84509c0236..0000000000 --- a/managed/services/management/dbaas/deps.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains all APIs related to DBaaS. -// -//nolint:lll -package dbaas - -import ( - "context" - - goversion "github.com/hashicorp/go-version" - olmalpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "google.golang.org/grpc" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - "k8s.io/apimachinery/pkg/version" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -//go:generate ../../../../bin/mockery --name=dbaasClient --case=snake --inpackage --testonly -//go:generate ../../../../bin/mockery --name=versionService --case=snake --inpackage --testonly -//go:generate ../../../../bin/mockery --name=grafanaClient --case=snake --inpackage --testonly -//go:generate ../../../../bin/mockery --name=componentsService --case=snake --inpackage --testonly -//go:generate ../../../../bin/mockery --name=kubernetesClient --case=snake --inpackage --testonly -//go:generate ../../../../bin/mockery --name=kubeStorageManager --case=snake --inpackage --testonly - -type dbaasClient interface { - // Connect connects the client to dbaas-controller API. - Connect(ctx context.Context) error - // Disconnect disconnects the client from dbaas-controller API. - Disconnect() error - // GetLogs gets logs out of cluster containers and events out of pods. - GetLogs(ctx context.Context, in *controllerv1beta1.GetLogsRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetLogsResponse, error) - // GetResources returns all and available resources of a Kubernetes cluster. - GetResources(ctx context.Context, in *controllerv1beta1.GetResourcesRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetResourcesResponse, error) - InstallPXCOperator(ctx context.Context, in *controllerv1beta1.InstallPXCOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPXCOperatorResponse, error) - // InstallPSMDBOperator installs kubernetes psmdb operator. - InstallPSMDBOperator(ctx context.Context, in *controllerv1beta1.InstallPSMDBOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPSMDBOperatorResponse, error) - // StartMonitoring sets up victoria metrics operator to monitor kubernetes cluster. - StartMonitoring(ctx context.Context, in *controllerv1beta1.StartMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StartMonitoringResponse, error) - // StopMonitoring removes victoria metrics operator from the cluster. - StopMonitoring(ctx context.Context, in *controllerv1beta1.StopMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StopMonitoringResponse, error) - // GetKubeConfig gets inluster config and converts it to kubeConfig - GetKubeConfig(ctx context.Context, in *controllerv1beta1.GetKubeconfigRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetKubeconfigResponse, error) -} - -type versionService interface { - // Matrix calls version service with given params and returns components matrix. - Matrix(ctx context.Context, params componentsParams) (*VersionServiceResponse, error) - // GetNextDatabaseImage returns image of the dabase version that is a direct successor of currently installed version. - GetNextDatabaseImage(ctx context.Context, operatorType, operatorVersion, installedDBVersion string) (string, error) - // GetVersionServiceURL version service used by version service client. - GetVersionServiceURL() string - // IsDatabaseVersionSupportedByOperator returns false and err when request to version service fails. Otherwise returns boolen telling - // if given database version is supported by given operator version, error is nil in that case. - IsDatabaseVersionSupportedByOperator(ctx context.Context, operatorType, operatorVersion, databaseVersion string) (bool, error) - // SupportedOperatorVersionsList returns list of operators versions supported by certain PMM version. - SupportedOperatorVersionsList(ctx context.Context, pmmVersion string) (map[string][]string, error) - // LatestOperatorVersion returns latest operators versions available based on given params. - LatestOperatorVersion(ctx context.Context, pmmVersion string) (latestPXCOperatorVersion, latestPSMDBOperatorVersion *goversion.Version, err error) - // NextOperatorVersion returns operator versions that is a direct successor of currently installed one. - // Compatibility with PMM is not taken into account. - NextOperatorVersion(ctx context.Context, operatorType, installedVersion string) (nextOperatorVersion *goversion.Version, err error) -} - -// grafanaClient is a subset of methods of grafana.Client used by this package. -// We use it instead of real type for testing and to avoid dependency cycle. -type grafanaClient interface { - CreateAdminAPIKey(ctx context.Context, name string) (int64, string, error) - DeleteAPIKeysWithPrefix(ctx context.Context, name string) error - DeleteAPIKeyByID(ctx context.Context, id int64) error -} - -type componentsService interface { - GetPSMDBComponents(context.Context, *dbaasv1beta1.GetPSMDBComponentsRequest) (*dbaasv1beta1.GetPSMDBComponentsResponse, error) - GetPXCComponents(context.Context, *dbaasv1beta1.GetPXCComponentsRequest) (*dbaasv1beta1.GetPXCComponentsResponse, error) - ChangePSMDBComponents(context.Context, *dbaasv1beta1.ChangePSMDBComponentsRequest) (*dbaasv1beta1.ChangePSMDBComponentsResponse, error) - ChangePXCComponents(context.Context, *dbaasv1beta1.ChangePXCComponentsRequest) (*dbaasv1beta1.ChangePXCComponentsResponse, error) - CheckForOperatorUpdate(context.Context, *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) - InstallOperator(context.Context, *dbaasv1beta1.InstallOperatorRequest) (*dbaasv1beta1.InstallOperatorResponse, error) -} - -type kubernetesClient interface { //nolint:interfacebloat - SetKubeconfig(string) error - ListDatabaseClusters(context.Context) (*dbaasv1.DatabaseClusterList, error) - GetDatabaseCluster(context.Context, string) (*dbaasv1.DatabaseCluster, error) - RestartDatabaseCluster(context.Context, string) error - PatchDatabaseCluster(*dbaasv1.DatabaseCluster) error - CreateDatabaseCluster(*dbaasv1.DatabaseCluster) error - DeleteDatabaseCluster(context.Context, string) error - GetDefaultStorageClassName(context.Context) (string, error) - GetPXCOperatorVersion(context.Context) (string, error) - GetPSMDBOperatorVersion(context.Context) (string, error) - GetSecret(context.Context, string) (*corev1.Secret, error) - GetClusterType(context.Context) (kubernetes.ClusterType, error) - CreatePMMSecret(string, map[string][]byte) error - GetAllClusterResources(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) (uint64, uint64, uint64, error) - GetConsumedCPUAndMemory(context.Context, string) (uint64, uint64, error) - GetConsumedDiskBytes(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) (uint64, error) - GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) - GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) - CreateRestore(*dbaasv1.DatabaseClusterRestore) error - ListSecrets(context.Context) (*corev1.SecretList, error) - // InstallOLMOperator installs the OLM in the Kubernetes cluster. - InstallOLMOperator(ctx context.Context) error - // InstallOperator installs an operator via OLM. - InstallOperator(ctx context.Context, req kubernetes.InstallOperatorRequest) error - // ListSubscriptions all the subscriptions in the namespace. - ListSubscriptions(ctx context.Context, namespace string) (*olmalpha1.SubscriptionList, error) - // UpgradeOperator upgrades an operator to the next available version. - UpgradeOperator(ctx context.Context, namespace, name string) error - // GetServerVersion returns server version - GetServerVersion() (*version.Info, error) - ListTemplates(ctx context.Context, engine, namespace string) ([]*dbaasv1beta1.Template, error) -} - -type kubeStorageManager interface { - GetOrSetClient(name string) (kubernetesClient, error) - DeleteClient(name string) error -} diff --git a/managed/services/management/dbaas/kube_clients.go b/managed/services/management/dbaas/kube_clients.go deleted file mode 100644 index c6328b4f06..0000000000 --- a/managed/services/management/dbaas/kube_clients.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "sync" - - "github.com/pkg/errors" - "gopkg.in/reform.v1" - - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -// KubeStorage stores kuberenetes clients for DBaaS -type KubeStorage struct { - mu sync.Mutex - db *reform.DB - clients map[string]kubernetesClient -} - -var ErrDatabaseNotSet = errors.New("Database connection not set") - -// NewKubeStorage returns a created KubeStorage -func NewKubeStorage(db *reform.DB) *KubeStorage { - return &KubeStorage{ - db: db, - clients: make(map[string]kubernetesClient), - } -} - -// GetOrSetClient gets client from map or sets a new client to the map -func (k *KubeStorage) GetOrSetClient(name string) (kubernetesClient, error) { //nolint:ireturn - k.mu.Lock() - defer k.mu.Unlock() - kubeClient, ok := k.clients[name] - if ok { - _, err := kubeClient.GetServerVersion() - return kubeClient, err - } - - if k.db == nil { - return nil, ErrDatabaseNotSet - } - - kubernetesCluster, err := models.FindKubernetesClusterByName(k.db.Querier, name) - if err != nil { - return nil, err - } - kubeClient, err = kubernetes.New(kubernetesCluster.KubeConfig) - if err != nil { - return nil, err - } - k.clients[name] = kubeClient - return kubeClient, nil -} - -// DeleteClient deletes client from storage -func (k *KubeStorage) DeleteClient(name string) error { - k.mu.Lock() - defer k.mu.Unlock() - delete(k.clients, name) - return models.RemoveKubernetesCluster(k.db.Querier, name) -} diff --git a/managed/services/management/dbaas/kubeconfig_test.go b/managed/services/management/dbaas/kubeconfig_test.go deleted file mode 100644 index 4e71660870..0000000000 --- a/managed/services/management/dbaas/kubeconfig_test.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "gopkg.in/yaml.v3" -) - -func TestMaskSecrets(t *testing.T) { - t.Parallel() - kubeConfig := &kubectlConfig{} - err := yaml.Unmarshal([]byte(awsIAMAuthenticatorKubeconfigTransformed), kubeConfig) - require.NoError(t, err) - safeConfig, err := kubeConfig.maskSecrets() - require.NoError(t, err) - assert.Equal(t, "", safeConfig.Users[0].User.Exec.Env[1].Value) - assert.Equal(t, "", safeConfig.Users[0].User.Exec.Env[2].Value) -} diff --git a/managed/services/management/dbaas/kubernetes_server.go b/managed/services/management/dbaas/kubernetes_server.go deleted file mode 100644 index fcb9ed9aa6..0000000000 --- a/managed/services/management/dbaas/kubernetes_server.go +++ /dev/null @@ -1,695 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "fmt" - "math/rand" - "os" - "regexp" - "strconv" - "strings" - "sync" - - "github.com/operator-framework/api/pkg/operators/v1alpha1" - dbaascontrollerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - "github.com/percona/promconfig" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - "gopkg.in/yaml.v3" - corev1 "k8s.io/api/core/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" - pmmversion "github.com/percona/pmm/version" -) - -var ( - operatorIsForbiddenRegexp = regexp.MustCompile(`.*\.percona\.com is forbidden`) - resourceDoesntExistsRegexp = regexp.MustCompile(`the server doesn't have a resource type "(PerconaXtraDBCluster|PerconaServerMongoDB)"`) - errKubeconfigIsEmpty = errors.New("kubeconfig is empty") - errMissingRequiredKubeconfigEnvVar = errors.New("required environment variable is not defined in kubeconfig") - - flagClusterName = "--cluster-name" - flagRegion = "--region" - flagRole = "--role-arn" - kubeconfigFlagsConversionMap = map[string]string{flagClusterName: "-i", flagRegion: "--region", flagRole: "-r"} - kubeconfigFlagsList = []string{flagClusterName, flagRegion, flagRole} -) - -type kubernetesServer struct { - l *logrus.Entry - db *reform.DB - dbaasClient dbaasClient - versionService versionService - grafanaClient grafanaClient - kubeStorage *KubeStorage - - dbaasv1beta1.UnimplementedKubernetesServer -} - -// NewKubernetesServer creates Kubernetes Server. -func NewKubernetesServer(db *reform.DB, dbaasClient dbaasClient, versionService versionService, //nolint:ireturn - grafanaClient grafanaClient, -) dbaasv1beta1.KubernetesServer { - l := logrus.WithField("component", "kubernetes_server") - return &kubernetesServer{ - l: l, - db: db, - dbaasClient: dbaasClient, - versionService: versionService, - grafanaClient: grafanaClient, - kubeStorage: NewKubeStorage(db), - } -} - -// Enabled returns if service is enabled and can be used. -func (k *kubernetesServer) Enabled() bool { - settings, err := models.GetSettings(k.db) - if err != nil { - k.l.WithError(err).Error("can't get settings") - return false - } - return settings.DBaaS.Enabled -} - -// convertToOperatorStatus exists mainly to provide an appropriate status when installed operator is unsupported. -// Dbaas-controller does not have a clue what's supported, so we have to do it here. -func (k kubernetesServer) convertToOperatorStatus(versionsList []string, operatorVersion string) dbaasv1beta1.OperatorsStatus { - if operatorVersion == "" { - return dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_NOT_INSTALLED - } - for _, version := range versionsList { - if version == operatorVersion { - return dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_OK - } - } - - allowUnsupportedOperators := os.Getenv("DBAAS_ALLOW_UNSUPPORTED_OPERATORS") - if boolValue, _ := strconv.ParseBool(allowUnsupportedOperators); boolValue { - return dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_OK - } - - return dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_UNSUPPORTED -} - -// ListKubernetesClusters returns a list of all registered Kubernetes clusters. -func (k kubernetesServer) ListKubernetesClusters(ctx context.Context, _ *dbaasv1beta1.ListKubernetesClustersRequest) (*dbaasv1beta1.ListKubernetesClustersResponse, error) { //nolint:lll - kubernetesClusters, err := models.FindAllKubernetesClusters(k.db.Querier) - if err != nil { - return nil, err - } - if len(kubernetesClusters) == 0 { - return &dbaasv1beta1.ListKubernetesClustersResponse{}, nil - } - - operatorsVersions, err := k.versionService.SupportedOperatorVersionsList(ctx, pmmversion.PMMVersion) - if err != nil { - return nil, err - } - - var wg sync.WaitGroup - clusters := make([]*dbaasv1beta1.ListKubernetesClustersResponse_Cluster, len(kubernetesClusters)) - for i, cluster := range kubernetesClusters { - i := i - cluster := cluster - wg.Add(1) - go func(cluster *models.KubernetesCluster) { - defer wg.Done() - clusters[i] = &dbaasv1beta1.ListKubernetesClustersResponse_Cluster{ - KubernetesClusterName: cluster.KubernetesClusterName, - Operators: &dbaasv1beta1.Operators{ - Pxc: &dbaasv1beta1.Operator{}, - Psmdb: &dbaasv1beta1.Operator{}, - Dbaas: &dbaasv1beta1.Operator{}, - }, - } - kubeClient, err := k.kubeStorage.GetOrSetClient(cluster.KubernetesClusterName) - if err != nil { - clusters[i].Status = dbaasv1beta1.KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_UNAVAILABLE - return - } - - clusters[i].Status = dbaasv1beta1.KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_OK - if !cluster.IsReady { - clusters[i].Status = dbaasv1beta1.KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_PROVISIONING - } - pxcVersion, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - k.l.Errorf("couldn't get pxc operator version: %s", err) - } - psmdbVersion, err := kubeClient.GetPSMDBOperatorVersion(ctx) - if err != nil { - k.l.Errorf("couldn't get psmdb operator version: %s", err) - } - - clusters[i].Operators.Pxc.Status = k.convertToOperatorStatus(operatorsVersions[pxcOperator], pxcVersion) - clusters[i].Operators.Psmdb.Status = k.convertToOperatorStatus(operatorsVersions[psmdbOperator], psmdbVersion) - - clusters[i].Operators.Pxc.Version = pxcVersion - clusters[i].Operators.Psmdb.Version = psmdbVersion - - // FIXME: Uncomment it when FE will be ready - // kubeClient, err := kubernetes.New(cluster.KubeConfig) - // if err != nil { - // return - // } - // version, err := kubeClient.GetDBaaSOperatorVersion(ctx) - // if err != nil { - // return - // } - // clusters[i].Operators.Dbaas.Version = version - // clusters[i].Operators.Dbaas.Status = dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_OK - }(cluster) - } - wg.Wait() - return &dbaasv1beta1.ListKubernetesClustersResponse{KubernetesClusters: clusters}, nil -} - -type envVar struct { - Name string `yaml:"name"` - Value string `yaml:"value"` -} - -type kubectlUserExec struct { - APIVersion string `yaml:"apiVersion,omitempty"` - Args []string `yaml:"args,omitempty"` - Command string `yaml:"command,omitempty"` - Env []envVar `yaml:"env,omitempty"` - ProvideClusterInfo bool `yaml:"provideClusterInfo"` -} - -type kubectlUser struct { - ClientCertificateData string `yaml:"client-certificate-data,omitempty"` - ClientKeyData string `yaml:"client-key-data,omitempty"` - Exec kubectlUserExec `yaml:"exec,omitempty"` -} - -type kubectlUserWithName struct { - Name string `yaml:"name,omitempty"` - User *kubectlUser `yaml:"user,omitempty"` -} - -type kubectlConfig struct { - Kind string `yaml:"kind,omitempty"` - APIVersion string `yaml:"apiVersion,omitempty"` - CurrentContext string `yaml:"current-context,omitempty"` - Clusters []interface{} `yaml:"clusters,omitempty"` - Contexts []interface{} `yaml:"contexts,omitempty"` - Preferences map[string]interface{} `yaml:"preferences"` - Users []*kubectlUserWithName `yaml:"users,omitempty"` -} - -func (k *kubectlConfig) maskSecrets() (*kubectlConfig, error) { - nk, ok := promconfig.Copy(k).(*kubectlConfig) - if !ok { - return nil, errors.New("failed to copy config") - } - - for i, user := range nk.Users { - for j, env := range user.User.Exec.Env { - if env.Name == "AWS_ACCESS_KEY_ID" || env.Name == "AWS_SECRET_ACCESS_KEY" { - nk.Users[i].User.Exec.Env[j].Value = "" - } - } - } - return nk, nil -} - -func getFlagValue(args []string, flagName string) string { - for i, arg := range args { - if arg == flagName && i+1 < len(args) { - return args[i+1] - } - } - return "" -} - -func getKubeconfigUserExecEnvValue(envs []envVar, variableName string) string { - for _, env := range envs { - if name := env.Name; name == variableName { - return env.Value - } - } - return "" -} - -// replaceAWSAuthIfPresent replaces use of aws binary with aws-iam-authenticator if use of aws binary is found. -// If such use is not found, it returns passed kubeconfig without any change. -func replaceAWSAuthIfPresent(kubeconfig string, keyID, key string) (string, error) { - if strings.TrimSpace(kubeconfig) == "" { - return "", errKubeconfigIsEmpty - } - var config kubectlConfig - err := yaml.Unmarshal([]byte(kubeconfig), &config) - if err != nil { - return "", err - } - var changed bool - for _, user := range config.Users { - if user.User.Exec.Command == "aws" { - user.User.Exec.Command = "aws-iam-authenticator" - // check and set flags - converted := []string{"token"} - for _, oldFlag := range kubeconfigFlagsList { - if flag := getFlagValue(user.User.Exec.Args, oldFlag); flag != "" { - converted = append(converted, kubeconfigFlagsConversionMap[oldFlag], flag) - } - } - user.User.Exec.Args = converted - changed = true - } - - // check and set authentication environment variables - for _, envVar := range []envVar{{"AWS_ACCESS_KEY_ID", keyID}, {"AWS_SECRET_ACCESS_KEY", key}} { - if value := getKubeconfigUserExecEnvValue(user.User.Exec.Env, envVar.Name); value == "" && envVar.Value != "" { - user.User.Exec.Env = append(user.User.Exec.Env, envVar) - changed = true - } - } - } - if !changed { - return kubeconfig, nil - } - c, err := yaml.Marshal(config) - return string(c), err -} - -// RegisterKubernetesCluster registers an existing Kubernetes cluster in PMM. -func (k kubernetesServer) RegisterKubernetesCluster(ctx context.Context, req *dbaasv1beta1.RegisterKubernetesClusterRequest) (*dbaasv1beta1.RegisterKubernetesClusterResponse, error) { //nolint:lll - var err error - req.KubeAuth.Kubeconfig, err = replaceAWSAuthIfPresent(req.KubeAuth.Kubeconfig, req.AwsAccessKeyId, req.AwsSecretAccessKey) - if err != nil { - if errors.Is(err, errKubeconfigIsEmpty) { - return nil, status.Error(codes.InvalidArgument, "Kubeconfig can't be empty") - } else if errors.Is(err, errMissingRequiredKubeconfigEnvVar) { - return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("Failed to transform kubeconfig to work with aws-iam-authenticator: %s", err)) - } - k.l.Errorf("Replacing `aws` with `aim-authenticator` failed: %s", err) - return nil, status.Error(codes.Internal, "Internal server error") - } - - err = k.db.InTransaction(func(t *reform.TX) error { - _, err := models.CreateKubernetesCluster(t.Querier, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: req.KubernetesClusterName, - KubeConfig: req.KubeAuth.Kubeconfig, - }) - return err - }) - if err != nil { - return nil, err - } - kubeClient, err := k.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - - operatorsToInstall := make(map[string]bool) - operatorsToInstall["olm"] = true - operatorsToInstall["vm"] = true - operatorsToInstall["dbaas"] = true - if pxcVersion, err := kubeClient.GetPXCOperatorVersion(ctx); pxcVersion == "" || err != nil { - operatorsToInstall["pxc"] = true - } - if psmdbVersion, err := kubeClient.GetPSMDBOperatorVersion(ctx); psmdbVersion == "" || err != nil { - operatorsToInstall["psmdb"] = true - } - settings, err := models.GetSettings(k.db.Querier) - if err != nil { - return nil, errors.Wrap(err, "cannot get PMM settings to start Victoria Metrics") - } - var apiKeyID int64 - var apiKey string - apiKeyName := fmt.Sprintf("pmm-vmagent-%s-%d", req.KubernetesClusterName, rand.Int63()) //nolint:gosec - apiKeyID, apiKey, err = k.grafanaClient.CreateAdminAPIKey(ctx, apiKeyName) - if err != nil { - return nil, errors.Wrap(err, "cannot create Grafana admin API key") - } - - go k.setupMonitoring( //nolint:contextcheck - context.TODO(), - operatorsToInstall, - req.KubernetesClusterName, - req.KubeAuth.Kubeconfig, - settings.PMMPublicAddress, - apiKey, - apiKeyID) - - return &dbaasv1beta1.RegisterKubernetesClusterResponse{}, nil -} - -func (k kubernetesServer) setupMonitoring(ctx context.Context, operatorsToInstall map[string]bool, clusterName, kubeConfig, pmmPublicAddress string, - apiKey string, apiKeyID int64, -) { - kubeClient, err := k.kubeStorage.GetOrSetClient(clusterName) - if err != nil { - return - } - errs := k.installDefaultOperators(operatorsToInstall, kubeClient) //nolint:contextcheck - if errs["vm"] != nil { - k.l.Errorf("cannot install vm operator: %s", errs["vm"]) - return - } - - err = k.startMonitoring(ctx, pmmPublicAddress, apiKey, apiKeyID, kubeConfig) - if err != nil { - k.l.Errorf("cannot start monitoring the clusdter: %s", err) - } - - err = models.ChangeKubernetesClusterToReady(k.db.Querier, clusterName) - if err != nil { - k.l.Errorf("couldn't update kubernetes cluster state: %s", err) - } -} - -func (k kubernetesServer) startMonitoring(ctx context.Context, pmmPublicAddress string, apiKey string, - apiKeyID int64, kubeConfig string, -) error { - pmmParams := &dbaascontrollerv1beta1.PMMParams{ - PublicAddress: fmt.Sprintf("https://%s", pmmPublicAddress), - Login: "api_key", - Password: apiKey, - } - - _, err := k.dbaasClient.StartMonitoring(ctx, &dbaascontrollerv1beta1.StartMonitoringRequest{ - KubeAuth: &dbaascontrollerv1beta1.KubeAuth{ - Kubeconfig: kubeConfig, - }, - Pmm: pmmParams, - }) - if err != nil { - e := k.grafanaClient.DeleteAPIKeyByID(ctx, apiKeyID) - if e != nil { - k.l.Warnf("couldn't delete created API Key %v: %s", apiKeyID, e) - } - k.l.Errorf("couldn't start monitoring of the kubernetes cluster: %s", err) - return errors.Wrap(err, "couldn't start monitoring of the kubernetes cluster") - } - - return nil -} - -func (k kubernetesServer) installDefaultOperators(operatorsToInstall map[string]bool, kubeClient kubernetesClient) map[string]error { - ctx := context.TODO() - - retval := make(map[string]error) - - if _, ok := operatorsToInstall["olm"]; ok { - err := kubeClient.InstallOLMOperator(ctx) - if err != nil { - retval["olm"] = err - k.l.Errorf("cannot install OLM operator to register the Kubernetes cluster: %s", err) - } - } - - namespace := "default" - catalogSourceNamespace := "olm" - operatorGroup := "percona-operators-group" - catalogSource := "percona-dbaas-catalog" - - if _, ok := operatorsToInstall["vm"]; ok { - channel, ok := os.LookupEnv("DBAAS_VM_OP_CHANNEL") - if !ok || channel == "" { - channel = "stable-v0" - } - operatorName := "victoriametrics-operator" - params := kubernetes.InstallOperatorRequest{ - Namespace: namespace, - Name: operatorName, - OperatorGroup: operatorGroup, - CatalogSource: catalogSource, - CatalogSourceNamespace: catalogSourceNamespace, - Channel: channel, - InstallPlanApproval: v1alpha1.ApprovalManual, - } - - if err := kubeClient.InstallOperator(ctx, params); err != nil { - retval["vm"] = err - k.l.Errorf("cannot instal PXC operator in the new cluster: %s", err) - } - } - - if _, ok := operatorsToInstall["pxc"]; ok { - channel, ok := os.LookupEnv("DBAAS_PXC_OP_CHANNEL") - if !ok || channel == "" { - channel = "stable-v1" - } - operatorName := "percona-xtradb-cluster-operator" - params := kubernetes.InstallOperatorRequest{ - Namespace: namespace, - Name: operatorName, - OperatorGroup: operatorGroup, - CatalogSource: catalogSource, - CatalogSourceNamespace: catalogSourceNamespace, - Channel: channel, - InstallPlanApproval: v1alpha1.ApprovalManual, - } - - if err := kubeClient.InstallOperator(ctx, params); err != nil { - retval["pxc"] = err - k.l.Errorf("cannot instal PXC operator in the new cluster: %s", err) - } - } - - if _, ok := operatorsToInstall["psmdb"]; ok { - operatorName := "percona-server-mongodb-operator" - channel, ok := os.LookupEnv("DBAAS_PSMDB_OP_CHANNEL") - if !ok || channel == "" { - channel = "stable-v1" - } - params := kubernetes.InstallOperatorRequest{ - Namespace: namespace, - Name: operatorName, - OperatorGroup: operatorGroup, - CatalogSource: catalogSource, - CatalogSourceNamespace: catalogSourceNamespace, - Channel: channel, - InstallPlanApproval: v1alpha1.ApprovalManual, - } - - if err := kubeClient.InstallOperator(ctx, params); err != nil { - retval["psmdb"] = err - k.l.Errorf("cannot instal PXC operator in the new cluster: %s", err) - } - } - - if _, ok := operatorsToInstall["dbaas"]; ok { - operatorName := "dbaas-operator" - channel, ok := os.LookupEnv("DBAAS_DBAAS_OP_CHANNEL") - if !ok || channel == "" { - channel = "stable-v0" - } - params := kubernetes.InstallOperatorRequest{ - Namespace: namespace, - Name: operatorName, - OperatorGroup: operatorGroup, - CatalogSource: "percona-dbaas-catalog", - CatalogSourceNamespace: catalogSourceNamespace, - Channel: channel, - InstallPlanApproval: v1alpha1.ApprovalManual, - } - - if err := kubeClient.InstallOperator(ctx, params); err != nil { - retval["vm"] = err - k.l.Errorf("cannot instal PXC operator in the new cluster: %s", err) - } - } - - return retval -} - -// UnregisterKubernetesCluster removes a registered Kubernetes cluster from PMM. -func (k kubernetesServer) UnregisterKubernetesCluster(ctx context.Context, req *dbaasv1beta1.UnregisterKubernetesClusterRequest) (*dbaasv1beta1.UnregisterKubernetesClusterResponse, error) { //nolint:lll - err := k.db.InTransaction(func(t *reform.TX) error { - kubernetesCluster, err := models.FindKubernetesClusterByName(t.Querier, req.KubernetesClusterName) - if err != nil { - return err - } - - _, err = k.dbaasClient.StopMonitoring(ctx, &dbaascontrollerv1beta1.StopMonitoringRequest{ - KubeAuth: &dbaascontrollerv1beta1.KubeAuth{ - Kubeconfig: kubernetesCluster.KubeConfig, - }, - }) - - if err != nil { - k.l.Warnf("cannot stop monitoring: %s", err) - } - if req.Force { - return models.RemoveKubernetesCluster(t.Querier, req.KubernetesClusterName) - } - - kubeClient, err := k.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return err - } - - out, err := kubeClient.ListDatabaseClusters(ctx) - - switch { - case err != nil && accessError(err): - k.l.Warn(err) - case err != nil: - return err - case len(out.Items) != 0: - return status.Errorf(codes.FailedPrecondition, "Kubernetes cluster %s has database clusters", req.KubernetesClusterName) - } - - return models.RemoveKubernetesCluster(t.Querier, req.KubernetesClusterName) - }) - if err != nil { - return nil, err - } - - return &dbaasv1beta1.UnregisterKubernetesClusterResponse{}, nil -} - -// GetKubernetesCluster return KubeAuth with Kubernetes config. -func (k kubernetesServer) GetKubernetesCluster(_ context.Context, req *dbaasv1beta1.GetKubernetesClusterRequest) (*dbaasv1beta1.GetKubernetesClusterResponse, error) { - kubernetesCluster, err := models.FindKubernetesClusterByName(k.db.Querier, req.KubernetesClusterName) - if err != nil { - return nil, err - } - config := &kubectlConfig{} - err = yaml.Unmarshal([]byte(kubernetesCluster.KubeConfig), config) - if err != nil { - return nil, err - } - safeKubeConfig, err := config.maskSecrets() - if err != nil { - return nil, err - } - kubeConfig, err := yaml.Marshal(safeKubeConfig) - if err != nil { - return nil, err - } - - return &dbaasv1beta1.GetKubernetesClusterResponse{ - KubeAuth: &dbaasv1beta1.KubeAuth{ - Kubeconfig: string(kubeConfig), - }, - }, nil -} - -func accessError(err error) bool { - if err == nil { - return false - } - accessErrors := []*regexp.Regexp{ - operatorIsForbiddenRegexp, - resourceDoesntExistsRegexp, - } - - for _, regex := range accessErrors { - if regex.MatchString(err.Error()) { - logrus.Warn(err.Error()) - return true - } - } - return false -} - -// GetResources returns all and available resources of a Kubernetes cluster. -func (k kubernetesServer) GetResources(ctx context.Context, req *dbaasv1beta1.GetResourcesRequest) (*dbaasv1beta1.GetResourcesResponse, error) { - kubeClient, err := k.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - - // Get cluster type - clusterType, err := kubeClient.GetClusterType(ctx) - if err != nil { - return nil, err - } - - var volumes *corev1.PersistentVolumeList - if clusterType == kubernetes.ClusterTypeEKS { - volumes, err = kubeClient.GetPersistentVolumes(ctx) - if err != nil { - return nil, err - } - } - allCPUMillis, allMemoryBytes, allDiskBytes, err := kubeClient.GetAllClusterResources(ctx, clusterType, volumes) - if err != nil { - return nil, err - } - - consumedCPUMillis, consumedMemoryBytes, err := kubeClient.GetConsumedCPUAndMemory(ctx, "") - if err != nil { - return nil, err - } - - consumedDiskBytes, err := kubeClient.GetConsumedDiskBytes(ctx, clusterType, volumes) - if err != nil { - return nil, err - } - - availableCPUMillis := allCPUMillis - consumedCPUMillis - // handle underflow - if availableCPUMillis > allCPUMillis { - availableCPUMillis = 0 - } - availableMemoryBytes := allMemoryBytes - consumedMemoryBytes - // handle underflow - if availableMemoryBytes > allMemoryBytes { - availableMemoryBytes = 0 - } - availableDiskBytes := allDiskBytes - consumedDiskBytes - // handle underflow - if availableDiskBytes > allDiskBytes { - availableDiskBytes = 0 - } - - return &dbaasv1beta1.GetResourcesResponse{ - All: &dbaasv1beta1.Resources{ - CpuM: allCPUMillis, - MemoryBytes: allMemoryBytes, - DiskSize: allDiskBytes, - }, - Available: &dbaasv1beta1.Resources{ - CpuM: availableCPUMillis, - MemoryBytes: availableMemoryBytes, - DiskSize: availableDiskBytes, - }, - }, nil -} - -// ListStorageClasses returns the names of all storage classes available in a Kubernetes cluster. -func (k kubernetesServer) ListStorageClasses(ctx context.Context, req *dbaasv1beta1.ListStorageClassesRequest) (*dbaasv1beta1.ListStorageClassesResponse, error) { - kubeClient, err := k.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - - storageClasses, err := kubeClient.GetStorageClasses(ctx) - if err != nil { - return nil, err - } - - storageClassesNames := make([]string, 0, len(storageClasses.Items)) - for _, storageClass := range storageClasses.Items { - storageClassesNames = append(storageClassesNames, storageClass.Name) - } - - return &dbaasv1beta1.ListStorageClassesResponse{ - StorageClasses: storageClassesNames, - }, nil -} diff --git a/managed/services/management/dbaas/kubernetes_server_test.go b/managed/services/management/dbaas/kubernetes_server_test.go deleted file mode 100644 index a1d21b60a9..0000000000 --- a/managed/services/management/dbaas/kubernetes_server_test.go +++ /dev/null @@ -1,750 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "testing" - "time" - - "github.com/google/uuid" - goversion "github.com/hashicorp/go-version" - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" - "github.com/percona/pmm/utils/logger" - pmmversion "github.com/percona/pmm/version" -) - -func TestKubernetesServer(t *testing.T) { - setup := func(t *testing.T) (ctx context.Context, ks dbaasv1beta1.KubernetesServer, dbaasClient *mockDbaasClient, - kubeClient *mockKubernetesClient, grafanaClient *mockGrafanaClient, - versionService *mockVersionService, teardown func(t *testing.T), - ) { - t.Helper() - - ctx = logger.Set(context.Background(), t.Name()) - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - // To enable verbose queries output use: - // db = reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - db := reform.NewDB(sqlDB, postgresql.Dialect, nil) - dbaasClient = &mockDbaasClient{} - kubeClient = &mockKubernetesClient{} - grafanaClient = &mockGrafanaClient{} - - teardown = func(t *testing.T) { - t.Helper() - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - require.NoError(t, sqlDB.Close()) - } - // versionService = NewVersionServiceClient("https://check-dev.percona.com/versions/v1") - versionService = &mockVersionService{} - ks = NewKubernetesServer(db, dbaasClient, versionService, grafanaClient) - s := ks.(*kubernetesServer) - clients := map[string]kubernetesClient{ - clusterName: kubeClient, - } - s.kubeStorage.clients = clients - ks = s - return - } - - // This is for local testing. When running local tests, if pmmversion.PMMVersion is empty - // these lines in kubernetes_server.go will throw an error and tests won't finish. - // - // pmmVersion, err := goversion.NewVersion(pmmversion.PMMVersion) - // if err != nil { - // return nil, status.Error(codes.Internal, err.Error()) - // } - // - if pmmversion.PMMVersion == "" { - pmmversion.PMMVersion = version230 - } - - t.Run("Basic", func(t *testing.T) { - ctx, ks, dbaasClient, kubeClient, grafanaClient, versionService, teardown := setup(t) - kubeClient.On("SetKubeconfig", mock.Anything).Return(nil) - kubeClient.On("SetKubeconfig", mock.Anything).Return(nil) - defer teardown(t) - - v1120, _ := goversion.NewVersion("1.12.0") - versionService.On("LatestOperatorVersion", mock.Anything, mock.Anything).Return(v1120, v1120, nil) - - clusters, err := ks.ListKubernetesClusters(ctx, &dbaasv1beta1.ListKubernetesClustersRequest{}) - require.NoError(t, err) - require.Empty(t, clusters.KubernetesClusters) - - kubeconfig := "preferences: {}\n" - - grafanaClient.On("CreateAdminAPIKey", mock.Anything, mock.Anything).Return(int64(123456), "api-key", nil) - kubeClient.On("InstallOLMOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("InstallOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return(onePointEight, nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("", nil) - kubeClient.On("GetServerVersion").Return(nil, nil) - dbaasClient.On("StartMonitoring", mock.Anything, mock.Anything).WaitUntil(time.After(time.Second)).Return(&controllerv1beta1.StartMonitoringResponse{}, nil) - - kubernetesClusterName := "test-cluster" - clients := map[string]kubernetesClient{ - kubernetesClusterName: kubeClient, - } - s := ks.(*kubernetesServer) - s.kubeStorage.clients = clients - ks = s - registerKubernetesClusterResponse, err := ks.RegisterKubernetesCluster(ctx, &dbaasv1beta1.RegisterKubernetesClusterRequest{ - KubernetesClusterName: kubernetesClusterName, - KubeAuth: &dbaasv1beta1.KubeAuth{Kubeconfig: kubeconfig}, - }) - require.NoError(t, err) - assert.NotNil(t, registerKubernetesClusterResponse) - - getClusterResponse, err := ks.GetKubernetesCluster(ctx, &dbaasv1beta1.GetKubernetesClusterRequest{ - KubernetesClusterName: kubernetesClusterName, - }) - require.NoError(t, err) - assert.NotNil(t, getClusterResponse) - assert.NotNil(t, getClusterResponse.KubeAuth) - assert.Equal(t, kubeconfig, getClusterResponse.KubeAuth.Kubeconfig) - - supportedOperatorVersions := map[string][]string{ - "pxc-operator": { - "1.10.0", - "1.11.0", - "1.9.0", - }, - "psmdb-operator": { - "1.11.0", - "1.12.0", - "1.10.0", - }, - } - versionService.On("SupportedOperatorVersionsList", mock.Anything, mock.Anything).Return(supportedOperatorVersions, nil) - - clusters, err = ks.ListKubernetesClusters(ctx, &dbaasv1beta1.ListKubernetesClustersRequest{}) - assert.NoError(t, err) - assert.Equal(t, 1, len(clusters.KubernetesClusters)) - expected := []*dbaasv1beta1.ListKubernetesClustersResponse_Cluster{ - { - KubernetesClusterName: kubernetesClusterName, - Operators: &dbaasv1beta1.Operators{ - Pxc: &dbaasv1beta1.Operator{Status: dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_NOT_INSTALLED}, - Psmdb: &dbaasv1beta1.Operator{Version: onePointEight, Status: dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_UNSUPPORTED}, - Dbaas: &dbaasv1beta1.Operator{Version: "", Status: dbaasv1beta1.OperatorsStatus_OPERATORS_STATUS_INVALID}, - }, - Status: dbaasv1beta1.KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_OK, - }, - } - - // These 2 lines below will fail if you don't run the entire test suit since they depend on previous tests to set the values. - assert.Equal(t, expected[0].Operators, clusters.KubernetesClusters[0].Operators) - assert.Equal(t, expected[0].KubernetesClusterName, clusters.KubernetesClusters[0].KubernetesClusterName) - assert.True( - t, - clusters.KubernetesClusters[0].Status == dbaasv1beta1.KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_OK || - clusters.KubernetesClusters[0].Status == dbaasv1beta1.KubernetesClusterStatus_KUBERNETES_CLUSTER_STATUS_PROVISIONING, - ) - mockK8sResp := []dbaasv1.DatabaseCluster{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "first-pxc-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "pxc", - DatabaseImage: "percona/percona-xtradb-cluster:8.0.27-18.1", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "proxysql", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 15, - Size: 15, - }, - }, - } - - dbaasClient.On("StopMonitoring", mock.Anything, mock.Anything).Return(&controllerv1beta1.StopMonitoringResponse{}, nil) - listDatabaseMock := kubeClient.On("ListDatabaseClusters", ctx) - listDatabaseMock.Return(&dbaasv1.DatabaseClusterList{Items: mockK8sResp}, nil) - - _, err = ks.UnregisterKubernetesCluster(ctx, &dbaasv1beta1.UnregisterKubernetesClusterRequest{ - KubernetesClusterName: kubernetesClusterName, - }) - tests.AssertGRPCError(t, status.Newf(codes.FailedPrecondition, "Kubernetes cluster %s has database clusters", kubernetesClusterName), err) - - mockK8sResp = []dbaasv1.DatabaseCluster{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "first-psmdb-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "psmdb", - DatabaseImage: "percona/percona-server-mongodb:4.4.5-7", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "mongos", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 10, - Size: 10, - }, - }, - } - listDatabaseMock.Return(&dbaasv1.DatabaseClusterList{Items: mockK8sResp}, nil) - tests.AssertGRPCError(t, status.Newf(codes.FailedPrecondition, "Kubernetes cluster %s has database clusters", kubernetesClusterName), err) - mockK8sResp = []dbaasv1.DatabaseCluster{} - - listDatabaseMock.Return(&dbaasv1.DatabaseClusterList{Items: mockK8sResp}, nil) - unregisterKubernetesClusterResponse, err := ks.UnregisterKubernetesCluster(ctx, &dbaasv1beta1.UnregisterKubernetesClusterRequest{ - KubernetesClusterName: kubernetesClusterName, - }) - require.NoError(t, err) - assert.NotNil(t, unregisterKubernetesClusterResponse) - - clusters, err = ks.ListKubernetesClusters(ctx, &dbaasv1beta1.ListKubernetesClustersRequest{}) - assert.NoError(t, err) - assert.Empty(t, clusters.KubernetesClusters) - - // Let goroutines to finish their tasks - // TODO: @gen1us2k find a better solution to prevent datarace. - time.Sleep(3 * time.Second) - }) -} - -func TestGetResources(t *testing.T) { - const ( - clusterName = "test-cluster" - kubeConfig = `apiVersion: v1 -kind: Config -clusters: -- cluster: - server: https://localhost:6443 - name: local -contexts: -- context: - cluster: local - user: local - name: local -current-context: local` - ) - setup := func(t *testing.T) (ks dbaasv1beta1.KubernetesServer, kubeClient *mockKubernetesClient, teardown func(t *testing.T)) { - t.Helper() - - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - dbaasClient := &mockDbaasClient{} - kubeClient = &mockKubernetesClient{} - grafanaClient := &mockGrafanaClient{} - - kubernetesCluster, err := models.CreateKubernetesCluster(db.Querier, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: clusterName, - KubeConfig: kubeConfig, - }) - require.NoError(t, err) - - teardown = func(t *testing.T) { - t.Helper() - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - assert.NoError(t, db.Delete(kubernetesCluster)) - require.NoError(t, sqlDB.Close()) - } - versionService := NewVersionServiceClient("https://check-dev.percona.com/versions/v1") - ks = NewKubernetesServer(db, dbaasClient, versionService, grafanaClient) - s := ks.(*kubernetesServer) - kubeClient.On("GetServerVersion").Return(nil, nil) - clients := map[string]kubernetesClient{ - clusterName: kubeClient, - } - s.kubeStorage.clients = clients - ks = s - return - } - t.Run("GetResources", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("GetClusterType", mock.Anything).Return(kubernetes.ClusterTypeMinikube, nil) - kubeClient.On("GetAllClusterResources", mock.Anything, kubernetes.ClusterTypeMinikube, mock.Anything).Return(uint64(100), uint64(200), uint64(300), nil) - kubeClient.On("GetConsumedCPUAndMemory", mock.Anything, "").Return(uint64(50), uint64(100), nil) - kubeClient.On("GetConsumedDiskBytes", mock.Anything, kubernetes.ClusterTypeMinikube, mock.Anything).Return(uint64(150), nil) - - resp, err := ks.GetResources(context.Background(), &dbaasv1beta1.GetResourcesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.Nil(t, err) - assert.Equal(t, &dbaasv1beta1.GetResourcesResponse{ - All: &dbaasv1beta1.Resources{ - CpuM: 100, - MemoryBytes: 200, - DiskSize: 300, - }, - Available: &dbaasv1beta1.Resources{ - CpuM: 50, - MemoryBytes: 100, - DiskSize: 150, - }, - }, resp) - }) - - t.Run("GetResources invalid cluster name", func(t *testing.T) { - ks, _, teardown := setup(t) - defer teardown(t) - - _, err := ks.GetResources(context.Background(), &dbaasv1beta1.GetResourcesRequest{ - KubernetesClusterName: "invalid-cluster", - }) - assert.NotNil(t, err) - }) - - t.Run("GetResources GetClusterType error", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("GetClusterType", mock.Anything).Return(kubernetes.ClusterTypeUnknown, errors.New("error")) - kubeClient.On("GetServerVersion").Return(nil, nil) - - _, err := ks.GetResources(context.Background(), &dbaasv1beta1.GetResourcesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.NotNil(t, err) - }) - - t.Run("GetResources GetAllClusterResources error", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("GetClusterType", mock.Anything).Return(kubernetes.ClusterTypeMinikube, nil) - - kubeClient.On("GetAllClusterResources", mock.Anything, kubernetes.ClusterTypeMinikube, mock.Anything).Return(uint64(0), uint64(0), uint64(0), errors.New("error")) - - _, err := ks.GetResources(context.Background(), &dbaasv1beta1.GetResourcesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.NotNil(t, err) - }) - - t.Run("GetResources GetConsumedCPUAndMemory error", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("GetClusterType", mock.Anything).Return(kubernetes.ClusterTypeMinikube, nil) - kubeClient.On("GetAllClusterResources", mock.Anything, kubernetes.ClusterTypeMinikube, mock.Anything).Return(uint64(100), uint64(200), uint64(300), nil) - - kubeClient.On("GetConsumedCPUAndMemory", mock.Anything, "").Return(uint64(0), uint64(0), errors.New("error")) - - _, err := ks.GetResources(context.Background(), &dbaasv1beta1.GetResourcesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.NotNil(t, err) - }) - - t.Run("GetResources GetConsumedDiskBytes error", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("GetClusterType", mock.Anything).Return(kubernetes.ClusterTypeMinikube, nil) - kubeClient.On("GetAllClusterResources", mock.Anything, kubernetes.ClusterTypeMinikube, mock.Anything).Return(uint64(100), uint64(200), uint64(300), nil) - kubeClient.On("GetConsumedCPUAndMemory", mock.Anything, "").Return(uint64(50), uint64(100), nil) - - kubeClient.On("GetConsumedDiskBytes", mock.Anything, kubernetes.ClusterTypeMinikube, mock.Anything).Return(uint64(0), errors.New("error")) - - _, err := ks.GetResources(context.Background(), &dbaasv1beta1.GetResourcesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.NotNil(t, err) - }) -} - -func TestListStorageClasses(t *testing.T) { - const ( - clusterName = "test-cluster" - kubeConfig = `apiVersion: v1 -kind: Config -clusters: -- cluster: - server: https://localhost:6443 - name: local -contexts: -- context: - cluster: local - user: local - name: local -current-context: local` - ) - setup := func(t *testing.T) (ks dbaasv1beta1.KubernetesServer, kubeClient *mockKubernetesClient, teardown func(t *testing.T)) { - t.Helper() - - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - dbaasClient := &mockDbaasClient{} - kubeClient = &mockKubernetesClient{} - grafanaClient := &mockGrafanaClient{} - - kubernetesCluster, err := models.CreateKubernetesCluster(db.Querier, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: clusterName, - KubeConfig: kubeConfig, - }) - require.NoError(t, err) - - teardown = func(t *testing.T) { - t.Helper() - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - assert.NoError(t, db.Delete(kubernetesCluster)) - require.NoError(t, sqlDB.Close()) - } - versionService := NewVersionServiceClient("https://check-dev.percona.com/versions/v1") - ks = NewKubernetesServer(db, dbaasClient, versionService, grafanaClient) - s := ks.(*kubernetesServer) - clients := map[string]kubernetesClient{ - clusterName: kubeClient, - } - s.kubeStorage.clients = clients - ks = s - return - } - t.Run("ListStorageClasses", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("SetKubeconfig", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("GetStorageClasses", mock.Anything).Return(&storagev1.StorageClassList{ - Items: []storagev1.StorageClass{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "local-storage", - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "standard", - }, - }, - }, - }, nil) - kubeClient.On("GetServerVersion").Return(nil, nil) - resp, err := ks.ListStorageClasses(context.Background(), &dbaasv1beta1.ListStorageClassesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.Nil(t, err) - assert.Equal(t, &dbaasv1beta1.ListStorageClassesResponse{ - StorageClasses: []string{ - "local-storage", - "standard", - }, - }, resp) - }) - - t.Run("ListStorageClasses invalid cluster name", func(t *testing.T) { - ks, _, teardown := setup(t) - defer teardown(t) - - _, err := ks.ListStorageClasses(context.Background(), &dbaasv1beta1.ListStorageClassesRequest{ - KubernetesClusterName: "invalid-cluster", - }) - assert.NotNil(t, err) - }) - - t.Run("ListStorageClasses GetStorageClasses error", func(t *testing.T) { - ks, kubeClient, teardown := setup(t) - defer teardown(t) - - kubeClient.On("SetKubeconfig", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("GetServerVersion").Return(nil, nil) - - kubeClient.On("GetStorageClasses", mock.Anything).Return(nil, errors.New("error")) - - _, err := ks.ListStorageClasses(context.Background(), &dbaasv1beta1.ListStorageClassesRequest{ - KubernetesClusterName: "test-cluster", - }) - assert.NotNil(t, err) - }) -} - -func TestGetFlagValue(t *testing.T) { - t.Parallel() - testCases := []struct { - args []string - flagName string - expectedValue string - }{ - { - args: []string{"token", "--foo", "bar"}, - flagName: "--foo", - expectedValue: "bar", - }, - { - args: []string{"token", "--foo", "bar"}, - flagName: "--bar", - expectedValue: "", - }, - { - args: []string{"token", "--foo"}, - flagName: "--foo", - expectedValue: "", - }, - } - for _, tt := range testCases { - value := getFlagValue(tt.args, tt.flagName) - assert.Equal(t, tt.expectedValue, value) - } -} - -const awsIAMAuthenticatorKubeconfig = `kind: Config -apiVersion: v1 -current-context: arn:aws:eks:zone-2:123465545:cluster/cluster -clusters: - - cluster: - certificate-authority-data: base64data - name: arn:aws:eks:zone-2:123465545:cluster/cluster - server: https://DDDDD.bla.zone-2.eks.amazonaws.com -contexts: - - context: - cluster: arn:aws:eks:zone-2:123465545:cluster/cluster - name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: arn:aws:eks:zone-2:123465545:cluster/cluster -preferences: {} -users: - - name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - args: - - token - - -i - - test-cluster1 - - --region - - zone-2 - command: aws-iam-authenticator - env: - - name: AWS_STS_REGIONAL_ENDPOINTS - value: regional - provideClusterInfo: false -` - -const awsIAMAuthenticatorKubeconfigTransformed = `kind: Config -apiVersion: v1 -current-context: arn:aws:eks:zone-2:123465545:cluster/cluster -clusters: - - cluster: - certificate-authority-data: base64data - name: arn:aws:eks:zone-2:123465545:cluster/cluster - server: https://DDDDD.bla.zone-2.eks.amazonaws.com -contexts: - - context: - cluster: arn:aws:eks:zone-2:123465545:cluster/cluster - name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: arn:aws:eks:zone-2:123465545:cluster/cluster -preferences: {} -users: - - name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - args: - - token - - -i - - test-cluster1 - - --region - - zone-2 - command: aws-iam-authenticator - env: - - name: AWS_STS_REGIONAL_ENDPOINTS - value: regional - - name: AWS_ACCESS_KEY_ID - value: keyID - - name: AWS_SECRET_ACCESS_KEY - value: key - provideClusterInfo: false -` - -const awsKubeconfig = `apiVersion: v1 -clusters: -- cluster: - certificate-authority-data: base64data - name: arn:aws:eks:zone-2:123465545:cluster/cluster - server: https://DDDDD.bla.zone-2.eks.amazonaws.com -contexts: -- context: - cluster: arn:aws:eks:zone-2:123465545:cluster/cluster - name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: arn:aws:eks:zone-2:123465545:cluster/cluster -current-context: "arn:aws:eks:zone-2:123465545:cluster/cluster" -kind: Config -preferences: {} -users: -- name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - args: - - eks - - get-token - - --cluster-name - - test-cluster1 - - --region - - zone-2 - command: aws - env: - - name: AWS_STS_REGIONAL_ENDPOINTS - value: regional - provideClusterInfo: false -` - -const awsKubeconfigWithKeys = `apiVersion: v1 -clusters: -- cluster: - certificate-authority-data: base64data - name: arn:aws:eks:zone-2:123465545:cluster/cluster - server: https://DDDDD.bla.zone-2.eks.amazonaws.com -contexts: -- context: - cluster: arn:aws:eks:zone-2:123465545:cluster/cluster - name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: arn:aws:eks:zone-2:123465545:cluster/cluster -current-context: "arn:aws:eks:zone-2:123465545:cluster/cluster" -kind: Config -preferences: {} -users: -- name: arn:aws:eks:zone-2:123465545:cluster/cluster - user: - exec: - apiVersion: client.authentication.k8s.io/v1alpha1 - args: - - eks - - get-token - - --cluster-name - - test-cluster1 - - --region - - zone-2 - command: aws - env: - - name: AWS_STS_REGIONAL_ENDPOINTS - value: regional - - name: AWS_ACCESS_KEY_ID - value: keyID - - name: AWS_SECRET_ACCESS_KEY - value: key - provideClusterInfo: false -` - -func TestUseIAMAuthenticator(t *testing.T) { //nolint:tparallel - t.Parallel() - testCases := []struct { - name string - kubeconfig string - expectedError error - expectedTransform string - keyID string - key string - }{ - { - name: "transform aws to aws-iam-authenticator with keys", - kubeconfig: awsKubeconfig, - expectedTransform: awsIAMAuthenticatorKubeconfigTransformed, - expectedError: nil, - keyID: "keyID", - key: "key", - }, - { - name: "transform aws with keys to aws-iam-authenticator", - kubeconfig: awsKubeconfigWithKeys, - expectedTransform: awsIAMAuthenticatorKubeconfigTransformed, - expectedError: nil, - }, - { - name: "transform aws to aws-iam-authenticator without keys", - kubeconfig: awsKubeconfig, - expectedTransform: awsIAMAuthenticatorKubeconfig, - expectedError: nil, - }, - { - name: "add environment variables to aws-iam-authenticator", - kubeconfig: awsIAMAuthenticatorKubeconfig, - expectedTransform: awsIAMAuthenticatorKubeconfigTransformed, - expectedError: nil, - keyID: "keyID", - key: "key", - }, - { - name: "return error if kubeconfig is empty", - kubeconfig: " ", - expectedTransform: "", - expectedError: errKubeconfigIsEmpty, - }, - { - name: "don't transform aws-iam-authenticator with keys", - kubeconfig: awsIAMAuthenticatorKubeconfigTransformed, - expectedTransform: awsIAMAuthenticatorKubeconfigTransformed, - expectedError: nil, - }, - } - for i, tt := range testCases { - t.Run(tt.name, func(t *testing.T) { - value, err := replaceAWSAuthIfPresent(tt.kubeconfig, tt.keyID, tt.key) - assert.ErrorIsf(t, err, tt.expectedError, "Errors don't match in the test case number %d.", i) - assert.Equalf(t, tt.expectedTransform, value, "Given and expected kubeconfigs don't match in the test case number %d.", i) - }) - } -} diff --git a/managed/services/management/dbaas/logs_service.go b/managed/services/management/dbaas/logs_service.go deleted file mode 100644 index 6cef57780c..0000000000 --- a/managed/services/management/dbaas/logs_service.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - - "github.com/sirupsen/logrus" - "gopkg.in/reform.v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -// overallLinesLimit defines how many last lines of logs we should return upon -// calling the getClusterLogs method. -const overallLinesLimit = 1000 - -// LogsService implements dbaasv1beta1.LogsAPIServer methods. -type LogsService struct { - l *logrus.Entry - db *reform.DB - - dbaasv1beta1.UnimplementedLogsAPIServer -} - -type tuple struct { - statuses []corev1.ContainerStatus - containers []corev1.Container -} - -// NewLogsService creates new LogsService. -func NewLogsService(db *reform.DB) dbaasv1beta1.LogsAPIServer { //nolint:ireturn - l := logrus.WithField("component", "logs_api") - return &LogsService{db: db, l: l} -} - -// Enabled returns if service is enabled and can be used. -func (s *LogsService) Enabled() bool { - settings, err := models.GetSettings(s.db) - if err != nil { - s.l.WithError(err).Error("can't get settings") - return false - } - return settings.DBaaS.Enabled -} - -// GetLogs returns container's logs of a database cluster and its pods events. -func (s LogsService) GetLogs(ctx context.Context, in *dbaasv1beta1.GetLogsRequest) (*dbaasv1beta1.GetLogsResponse, error) { - kubernetesCluster, err := models.FindKubernetesClusterByName(s.db.Querier, in.KubernetesClusterName) - if err != nil { - return nil, err - } - - kClient, err := kubernetes.New(kubernetesCluster.KubeConfig) - if err != nil { - // return nil, status.Error(codes.Internal, "Cannot initialize K8s kClient: "+err.Error()) - return nil, err - } - - labelSelector := &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "app.kubernetes.io/instance": in.ClusterName, - }, - } - - pods, err := kClient.GetPods(ctx, "", labelSelector) - if err != nil { - return nil, err - } - - // Every pod has at least one contaier, set cap to that value. - response := make([]*dbaasv1beta1.Logs, 0, len(pods.Items)) - for _, pod := range pods.Items { - tuples := []tuple{ - { - statuses: pod.Status.ContainerStatuses, - containers: pod.Spec.Containers, - }, - { - statuses: pod.Status.InitContainerStatuses, - containers: pod.Spec.InitContainers, - }, - } - // Get all logs from all regular containers and all init containers. - for _, t := range tuples { - for _, container := range t.containers { - logs, err := kClient.GetLogs( - ctx, t.statuses, pod.Name, container.Name) - if err != nil { - return nil, err - } - - response = append(response, &dbaasv1beta1.Logs{ - Pod: pod.Name, - Container: container.Name, - Logs: logs, - }) - } - } - - // Get pod's events. - events, err := kClient.GetEvents(ctx, pod.Name) - if err != nil { - return nil, err - } - - response = append(response, &dbaasv1beta1.Logs{ - Pod: pod.Name, - Container: "", - Logs: events, - }) - } - - // Limit number of overall log lines. - limitLines(response, overallLinesLimit) - - return &dbaasv1beta1.GetLogsResponse{ - Logs: response, - }, nil -} - -// limitLines limits each entry's logs lines count in the way the overall sum of -// all log lines is equal to given limit. -func limitLines(logs []*dbaasv1beta1.Logs, limit int) { - counts := make([]int, len(logs)) - lastSum := -1 - var newSum int - for newSum < limit && newSum > lastSum { - lastSum = newSum - for i, item := range logs { - if counts[i] < len(item.Logs) { - counts[i]++ - newSum++ - if newSum == limit { - break - } - } - } - } - - // Do the actual slicing. - for i, item := range logs { - logs[i].Logs = item.Logs[len(item.Logs)-counts[i]:] - } -} diff --git a/managed/services/management/dbaas/mock_components_service_test.go b/managed/services/management/dbaas/mock_components_service_test.go deleted file mode 100644 index a20e4ba5f5..0000000000 --- a/managed/services/management/dbaas/mock_components_service_test.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package dbaas - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" -) - -// mockComponentsService is an autogenerated mock type for the componentsService type -type mockComponentsService struct { - mock.Mock -} - -// ChangePSMDBComponents provides a mock function with given fields: _a0, _a1 -func (_m *mockComponentsService) ChangePSMDBComponents(_a0 context.Context, _a1 *dbaasv1beta1.ChangePSMDBComponentsRequest) (*dbaasv1beta1.ChangePSMDBComponentsResponse, error) { - ret := _m.Called(_a0, _a1) - - var r0 *dbaasv1beta1.ChangePSMDBComponentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.ChangePSMDBComponentsRequest) (*dbaasv1beta1.ChangePSMDBComponentsResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.ChangePSMDBComponentsRequest) *dbaasv1beta1.ChangePSMDBComponentsResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dbaasv1beta1.ChangePSMDBComponentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *dbaasv1beta1.ChangePSMDBComponentsRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ChangePXCComponents provides a mock function with given fields: _a0, _a1 -func (_m *mockComponentsService) ChangePXCComponents(_a0 context.Context, _a1 *dbaasv1beta1.ChangePXCComponentsRequest) (*dbaasv1beta1.ChangePXCComponentsResponse, error) { - ret := _m.Called(_a0, _a1) - - var r0 *dbaasv1beta1.ChangePXCComponentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.ChangePXCComponentsRequest) (*dbaasv1beta1.ChangePXCComponentsResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.ChangePXCComponentsRequest) *dbaasv1beta1.ChangePXCComponentsResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dbaasv1beta1.ChangePXCComponentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *dbaasv1beta1.ChangePXCComponentsRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CheckForOperatorUpdate provides a mock function with given fields: _a0, _a1 -func (_m *mockComponentsService) CheckForOperatorUpdate(_a0 context.Context, _a1 *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error) { - ret := _m.Called(_a0, _a1) - - var r0 *dbaasv1beta1.CheckForOperatorUpdateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.CheckForOperatorUpdateRequest) (*dbaasv1beta1.CheckForOperatorUpdateResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.CheckForOperatorUpdateRequest) *dbaasv1beta1.CheckForOperatorUpdateResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dbaasv1beta1.CheckForOperatorUpdateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *dbaasv1beta1.CheckForOperatorUpdateRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPSMDBComponents provides a mock function with given fields: _a0, _a1 -func (_m *mockComponentsService) GetPSMDBComponents(_a0 context.Context, _a1 *dbaasv1beta1.GetPSMDBComponentsRequest) (*dbaasv1beta1.GetPSMDBComponentsResponse, error) { - ret := _m.Called(_a0, _a1) - - var r0 *dbaasv1beta1.GetPSMDBComponentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.GetPSMDBComponentsRequest) (*dbaasv1beta1.GetPSMDBComponentsResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.GetPSMDBComponentsRequest) *dbaasv1beta1.GetPSMDBComponentsResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dbaasv1beta1.GetPSMDBComponentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *dbaasv1beta1.GetPSMDBComponentsRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPXCComponents provides a mock function with given fields: _a0, _a1 -func (_m *mockComponentsService) GetPXCComponents(_a0 context.Context, _a1 *dbaasv1beta1.GetPXCComponentsRequest) (*dbaasv1beta1.GetPXCComponentsResponse, error) { - ret := _m.Called(_a0, _a1) - - var r0 *dbaasv1beta1.GetPXCComponentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.GetPXCComponentsRequest) (*dbaasv1beta1.GetPXCComponentsResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.GetPXCComponentsRequest) *dbaasv1beta1.GetPXCComponentsResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dbaasv1beta1.GetPXCComponentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *dbaasv1beta1.GetPXCComponentsRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// InstallOperator provides a mock function with given fields: _a0, _a1 -func (_m *mockComponentsService) InstallOperator(_a0 context.Context, _a1 *dbaasv1beta1.InstallOperatorRequest) (*dbaasv1beta1.InstallOperatorResponse, error) { - ret := _m.Called(_a0, _a1) - - var r0 *dbaasv1beta1.InstallOperatorResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.InstallOperatorRequest) (*dbaasv1beta1.InstallOperatorResponse, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *dbaasv1beta1.InstallOperatorRequest) *dbaasv1beta1.InstallOperatorResponse); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dbaasv1beta1.InstallOperatorResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *dbaasv1beta1.InstallOperatorRequest) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockComponentsService creates a new instance of mockComponentsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockComponentsService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockComponentsService { - mock := &mockComponentsService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dbaas/mock_dbaas_client_test.go b/managed/services/management/dbaas/mock_dbaas_client_test.go deleted file mode 100644 index 7fdada79d6..0000000000 --- a/managed/services/management/dbaas/mock_dbaas_client_test.go +++ /dev/null @@ -1,290 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package dbaas - -import ( - context "context" - - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - mock "github.com/stretchr/testify/mock" - grpc "google.golang.org/grpc" -) - -// mockDbaasClient is an autogenerated mock type for the dbaasClient type -type mockDbaasClient struct { - mock.Mock -} - -// Connect provides a mock function with given fields: ctx -func (_m *mockDbaasClient) Connect(ctx context.Context) error { - ret := _m.Called(ctx) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Disconnect provides a mock function with given fields: -func (_m *mockDbaasClient) Disconnect() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetKubeConfig provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) GetKubeConfig(ctx context.Context, in *controllerv1beta1.GetKubeconfigRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetKubeconfigResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.GetKubeconfigResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.GetKubeconfigRequest, ...grpc.CallOption) (*controllerv1beta1.GetKubeconfigResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.GetKubeconfigRequest, ...grpc.CallOption) *controllerv1beta1.GetKubeconfigResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.GetKubeconfigResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.GetKubeconfigRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLogs provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) GetLogs(ctx context.Context, in *controllerv1beta1.GetLogsRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetLogsResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.GetLogsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.GetLogsRequest, ...grpc.CallOption) (*controllerv1beta1.GetLogsResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.GetLogsRequest, ...grpc.CallOption) *controllerv1beta1.GetLogsResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.GetLogsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.GetLogsRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetResources provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) GetResources(ctx context.Context, in *controllerv1beta1.GetResourcesRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetResourcesResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.GetResourcesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.GetResourcesRequest, ...grpc.CallOption) (*controllerv1beta1.GetResourcesResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.GetResourcesRequest, ...grpc.CallOption) *controllerv1beta1.GetResourcesResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.GetResourcesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.GetResourcesRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// InstallPSMDBOperator provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) InstallPSMDBOperator(ctx context.Context, in *controllerv1beta1.InstallPSMDBOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPSMDBOperatorResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.InstallPSMDBOperatorResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.InstallPSMDBOperatorRequest, ...grpc.CallOption) (*controllerv1beta1.InstallPSMDBOperatorResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.InstallPSMDBOperatorRequest, ...grpc.CallOption) *controllerv1beta1.InstallPSMDBOperatorResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.InstallPSMDBOperatorResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.InstallPSMDBOperatorRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// InstallPXCOperator provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) InstallPXCOperator(ctx context.Context, in *controllerv1beta1.InstallPXCOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPXCOperatorResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.InstallPXCOperatorResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.InstallPXCOperatorRequest, ...grpc.CallOption) (*controllerv1beta1.InstallPXCOperatorResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.InstallPXCOperatorRequest, ...grpc.CallOption) *controllerv1beta1.InstallPXCOperatorResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.InstallPXCOperatorResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.InstallPXCOperatorRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// StartMonitoring provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) StartMonitoring(ctx context.Context, in *controllerv1beta1.StartMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StartMonitoringResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.StartMonitoringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.StartMonitoringRequest, ...grpc.CallOption) (*controllerv1beta1.StartMonitoringResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.StartMonitoringRequest, ...grpc.CallOption) *controllerv1beta1.StartMonitoringResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.StartMonitoringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.StartMonitoringRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// StopMonitoring provides a mock function with given fields: ctx, in, opts -func (_m *mockDbaasClient) StopMonitoring(ctx context.Context, in *controllerv1beta1.StopMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StopMonitoringResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - var r0 *controllerv1beta1.StopMonitoringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.StopMonitoringRequest, ...grpc.CallOption) (*controllerv1beta1.StopMonitoringResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *controllerv1beta1.StopMonitoringRequest, ...grpc.CallOption) *controllerv1beta1.StopMonitoringResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*controllerv1beta1.StopMonitoringResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *controllerv1beta1.StopMonitoringRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockDbaasClient creates a new instance of mockDbaasClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockDbaasClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockDbaasClient { - mock := &mockDbaasClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dbaas/mock_grafana_client_test.go b/managed/services/management/dbaas/mock_grafana_client_test.go deleted file mode 100644 index 965fe4d243..0000000000 --- a/managed/services/management/dbaas/mock_grafana_client_test.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package dbaas - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockGrafanaClient is an autogenerated mock type for the grafanaClient type -type mockGrafanaClient struct { - mock.Mock -} - -// CreateAdminAPIKey provides a mock function with given fields: ctx, name -func (_m *mockGrafanaClient) CreateAdminAPIKey(ctx context.Context, name string) (int64, string, error) { - ret := _m.Called(ctx, name) - - var r0 int64 - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string) (int64, string, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Get(0).(int64) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) string); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { - r2 = rf(ctx, name) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// DeleteAPIKeyByID provides a mock function with given fields: ctx, id -func (_m *mockGrafanaClient) DeleteAPIKeyByID(ctx context.Context, id int64) error { - ret := _m.Called(ctx, id) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DeleteAPIKeysWithPrefix provides a mock function with given fields: ctx, name -func (_m *mockGrafanaClient) DeleteAPIKeysWithPrefix(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGrafanaClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockGrafanaClient { - mock := &mockGrafanaClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dbaas/mock_kube_storage_manager_test.go b/managed/services/management/dbaas/mock_kube_storage_manager_test.go deleted file mode 100644 index 34e485e121..0000000000 --- a/managed/services/management/dbaas/mock_kube_storage_manager_test.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package dbaas - -import mock "github.com/stretchr/testify/mock" - -// mockKubeStorageManager is an autogenerated mock type for the kubeStorageManager type -type mockKubeStorageManager struct { - mock.Mock -} - -// DeleteClient provides a mock function with given fields: name -func (_m *mockKubeStorageManager) DeleteClient(name string) error { - ret := _m.Called(name) - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetOrSetClient provides a mock function with given fields: name -func (_m *mockKubeStorageManager) GetOrSetClient(name string) (kubernetesClient, error) { - ret := _m.Called(name) - - var r0 kubernetesClient - var r1 error - if rf, ok := ret.Get(0).(func(string) (kubernetesClient, error)); ok { - return rf(name) - } - if rf, ok := ret.Get(0).(func(string) kubernetesClient); ok { - r0 = rf(name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(kubernetesClient) - } - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockKubeStorageManager creates a new instance of mockKubeStorageManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockKubeStorageManager(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockKubeStorageManager { - mock := &mockKubeStorageManager{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dbaas/mock_kubernetes_client_test.go b/managed/services/management/dbaas/mock_kubernetes_client_test.go deleted file mode 100644 index 0e50992466..0000000000 --- a/managed/services/management/dbaas/mock_kubernetes_client_test.go +++ /dev/null @@ -1,600 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package dbaas - -import ( - context "context" - - v1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" - v1 "github.com/percona/dbaas-operator/api/v1" - mock "github.com/stretchr/testify/mock" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - version "k8s.io/apimachinery/pkg/version" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - kubernetes "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -// mockKubernetesClient is an autogenerated mock type for the kubernetesClient type -type mockKubernetesClient struct { - mock.Mock -} - -// CreateDatabaseCluster provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) CreateDatabaseCluster(_a0 *v1.DatabaseCluster) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(*v1.DatabaseCluster) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CreatePMMSecret provides a mock function with given fields: _a0, _a1 -func (_m *mockKubernetesClient) CreatePMMSecret(_a0 string, _a1 map[string][]byte) error { - ret := _m.Called(_a0, _a1) - - var r0 error - if rf, ok := ret.Get(0).(func(string, map[string][]byte) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CreateRestore provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) CreateRestore(_a0 *v1.DatabaseClusterRestore) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(*v1.DatabaseClusterRestore) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DeleteDatabaseCluster provides a mock function with given fields: _a0, _a1 -func (_m *mockKubernetesClient) DeleteDatabaseCluster(_a0 context.Context, _a1 string) error { - ret := _m.Called(_a0, _a1) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetAllClusterResources provides a mock function with given fields: _a0, _a1, _a2 -func (_m *mockKubernetesClient) GetAllClusterResources(_a0 context.Context, _a1 kubernetes.ClusterType, _a2 *corev1.PersistentVolumeList) (uint64, uint64, uint64, error) { - ret := _m.Called(_a0, _a1, _a2) - - var r0 uint64 - var r1 uint64 - var r2 uint64 - var r3 error - if rf, ok := ret.Get(0).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) (uint64, uint64, uint64, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) uint64); ok { - r0 = rf(_a0, _a1, _a2) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) uint64); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Get(1).(uint64) - } - - if rf, ok := ret.Get(2).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) uint64); ok { - r2 = rf(_a0, _a1, _a2) - } else { - r2 = ret.Get(2).(uint64) - } - - if rf, ok := ret.Get(3).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) error); ok { - r3 = rf(_a0, _a1, _a2) - } else { - r3 = ret.Error(3) - } - - return r0, r1, r2, r3 -} - -// GetClusterType provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) GetClusterType(_a0 context.Context) (kubernetes.ClusterType, error) { - ret := _m.Called(_a0) - - var r0 kubernetes.ClusterType - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (kubernetes.ClusterType, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) kubernetes.ClusterType); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(kubernetes.ClusterType) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetConsumedCPUAndMemory provides a mock function with given fields: _a0, _a1 -func (_m *mockKubernetesClient) GetConsumedCPUAndMemory(_a0 context.Context, _a1 string) (uint64, uint64, error) { - ret := _m.Called(_a0, _a1) - - var r0 uint64 - var r1 uint64 - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string) (uint64, uint64, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, string) uint64); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) uint64); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Get(1).(uint64) - } - - if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { - r2 = rf(_a0, _a1) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// GetConsumedDiskBytes provides a mock function with given fields: _a0, _a1, _a2 -func (_m *mockKubernetesClient) GetConsumedDiskBytes(_a0 context.Context, _a1 kubernetes.ClusterType, _a2 *corev1.PersistentVolumeList) (uint64, error) { - ret := _m.Called(_a0, _a1, _a2) - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) (uint64, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) uint64); ok { - r0 = rf(_a0, _a1, _a2) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context, kubernetes.ClusterType, *corev1.PersistentVolumeList) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDatabaseCluster provides a mock function with given fields: _a0, _a1 -func (_m *mockKubernetesClient) GetDatabaseCluster(_a0 context.Context, _a1 string) (*v1.DatabaseCluster, error) { - ret := _m.Called(_a0, _a1) - - var r0 *v1.DatabaseCluster - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1.DatabaseCluster, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1.DatabaseCluster); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.DatabaseCluster) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDefaultStorageClassName provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) GetDefaultStorageClassName(_a0 context.Context) (string, error) { - ret := _m.Called(_a0) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) string); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPSMDBOperatorVersion provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) GetPSMDBOperatorVersion(_a0 context.Context) (string, error) { - ret := _m.Called(_a0) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) string); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPXCOperatorVersion provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) GetPXCOperatorVersion(_a0 context.Context) (string, error) { - ret := _m.Called(_a0) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) string); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPersistentVolumes provides a mock function with given fields: ctx -func (_m *mockKubernetesClient) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.PersistentVolumeList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.PersistentVolumeList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.PersistentVolumeList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.PersistentVolumeList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSecret provides a mock function with given fields: _a0, _a1 -func (_m *mockKubernetesClient) GetSecret(_a0 context.Context, _a1 string) (*corev1.Secret, error) { - ret := _m.Called(_a0, _a1) - - var r0 *corev1.Secret - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*corev1.Secret, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *corev1.Secret); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Secret) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetServerVersion provides a mock function with given fields: -func (_m *mockKubernetesClient) GetServerVersion() (*version.Info, error) { - ret := _m.Called() - - var r0 *version.Info - var r1 error - if rf, ok := ret.Get(0).(func() (*version.Info, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() *version.Info); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*version.Info) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetStorageClasses provides a mock function with given fields: ctx -func (_m *mockKubernetesClient) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - ret := _m.Called(ctx) - - var r0 *storagev1.StorageClassList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*storagev1.StorageClassList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *storagev1.StorageClassList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*storagev1.StorageClassList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// InstallOLMOperator provides a mock function with given fields: ctx -func (_m *mockKubernetesClient) InstallOLMOperator(ctx context.Context) error { - ret := _m.Called(ctx) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// InstallOperator provides a mock function with given fields: ctx, req -func (_m *mockKubernetesClient) InstallOperator(ctx context.Context, req kubernetes.InstallOperatorRequest) error { - ret := _m.Called(ctx, req) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, kubernetes.InstallOperatorRequest) error); ok { - r0 = rf(ctx, req) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ListDatabaseClusters provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) ListDatabaseClusters(_a0 context.Context) (*v1.DatabaseClusterList, error) { - ret := _m.Called(_a0) - - var r0 *v1.DatabaseClusterList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*v1.DatabaseClusterList, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *v1.DatabaseClusterList); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.DatabaseClusterList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListSecrets provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) ListSecrets(_a0 context.Context) (*corev1.SecretList, error) { - ret := _m.Called(_a0) - - var r0 *corev1.SecretList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.SecretList, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.SecretList); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.SecretList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListSubscriptions provides a mock function with given fields: ctx, namespace -func (_m *mockKubernetesClient) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - ret := _m.Called(ctx, namespace) - - var r0 *v1alpha1.SubscriptionList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.SubscriptionList, error)); ok { - return rf(ctx, namespace) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.SubscriptionList); ok { - r0 = rf(ctx, namespace) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.SubscriptionList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListTemplates provides a mock function with given fields: ctx, engine, namespace -func (_m *mockKubernetesClient) ListTemplates(ctx context.Context, engine string, namespace string) ([]*dbaasv1beta1.Template, error) { - ret := _m.Called(ctx, engine, namespace) - - var r0 []*dbaasv1beta1.Template - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]*dbaasv1beta1.Template, error)); ok { - return rf(ctx, engine, namespace) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) []*dbaasv1beta1.Template); ok { - r0 = rf(ctx, engine, namespace) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*dbaasv1beta1.Template) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, engine, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// PatchDatabaseCluster provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) PatchDatabaseCluster(_a0 *v1.DatabaseCluster) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(*v1.DatabaseCluster) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RestartDatabaseCluster provides a mock function with given fields: _a0, _a1 -func (_m *mockKubernetesClient) RestartDatabaseCluster(_a0 context.Context, _a1 string) error { - ret := _m.Called(_a0, _a1) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SetKubeconfig provides a mock function with given fields: _a0 -func (_m *mockKubernetesClient) SetKubeconfig(_a0 string) error { - ret := _m.Called(_a0) - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// UpgradeOperator provides a mock function with given fields: ctx, namespace, name -func (_m *mockKubernetesClient) UpgradeOperator(ctx context.Context, namespace string, name string) error { - ret := _m.Called(ctx, namespace, name) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, namespace, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockKubernetesClient creates a new instance of mockKubernetesClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockKubernetesClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockKubernetesClient { - mock := &mockKubernetesClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dbaas/mock_version_service_test.go b/managed/services/management/dbaas/mock_version_service_test.go deleted file mode 100644 index e94bbe15db..0000000000 --- a/managed/services/management/dbaas/mock_version_service_test.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by mockery v2.32.0. DO NOT EDIT. - -package dbaas - -import ( - context "context" - - version "github.com/hashicorp/go-version" - mock "github.com/stretchr/testify/mock" -) - -// mockVersionService is an autogenerated mock type for the versionService type -type mockVersionService struct { - mock.Mock -} - -// GetNextDatabaseImage provides a mock function with given fields: ctx, operatorType, operatorVersion, installedDBVersion -func (_m *mockVersionService) GetNextDatabaseImage(ctx context.Context, operatorType string, operatorVersion string, installedDBVersion string) (string, error) { - ret := _m.Called(ctx, operatorType, operatorVersion, installedDBVersion) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (string, error)); ok { - return rf(ctx, operatorType, operatorVersion, installedDBVersion) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) string); ok { - r0 = rf(ctx, operatorType, operatorVersion, installedDBVersion) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, operatorType, operatorVersion, installedDBVersion) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetVersionServiceURL provides a mock function with given fields: -func (_m *mockVersionService) GetVersionServiceURL() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// IsDatabaseVersionSupportedByOperator provides a mock function with given fields: ctx, operatorType, operatorVersion, databaseVersion -func (_m *mockVersionService) IsDatabaseVersionSupportedByOperator(ctx context.Context, operatorType string, operatorVersion string, databaseVersion string) (bool, error) { - ret := _m.Called(ctx, operatorType, operatorVersion, databaseVersion) - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (bool, error)); ok { - return rf(ctx, operatorType, operatorVersion, databaseVersion) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) bool); ok { - r0 = rf(ctx, operatorType, operatorVersion, databaseVersion) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, operatorType, operatorVersion, databaseVersion) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LatestOperatorVersion provides a mock function with given fields: ctx, pmmVersion -func (_m *mockVersionService) LatestOperatorVersion(ctx context.Context, pmmVersion string) (*version.Version, *version.Version, error) { - ret := _m.Called(ctx, pmmVersion) - - var r0 *version.Version - var r1 *version.Version - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*version.Version, *version.Version, error)); ok { - return rf(ctx, pmmVersion) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *version.Version); ok { - r0 = rf(ctx, pmmVersion) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*version.Version) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) *version.Version); ok { - r1 = rf(ctx, pmmVersion) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*version.Version) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { - r2 = rf(ctx, pmmVersion) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// Matrix provides a mock function with given fields: ctx, params -func (_m *mockVersionService) Matrix(ctx context.Context, params componentsParams) (*VersionServiceResponse, error) { - ret := _m.Called(ctx, params) - - var r0 *VersionServiceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, componentsParams) (*VersionServiceResponse, error)); ok { - return rf(ctx, params) - } - if rf, ok := ret.Get(0).(func(context.Context, componentsParams) *VersionServiceResponse); ok { - r0 = rf(ctx, params) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*VersionServiceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, componentsParams) error); ok { - r1 = rf(ctx, params) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NextOperatorVersion provides a mock function with given fields: ctx, operatorType, installedVersion -func (_m *mockVersionService) NextOperatorVersion(ctx context.Context, operatorType string, installedVersion string) (*version.Version, error) { - ret := _m.Called(ctx, operatorType, installedVersion) - - var r0 *version.Version - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*version.Version, error)); ok { - return rf(ctx, operatorType, installedVersion) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *version.Version); ok { - r0 = rf(ctx, operatorType, installedVersion) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*version.Version) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, operatorType, installedVersion) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SupportedOperatorVersionsList provides a mock function with given fields: ctx, pmmVersion -func (_m *mockVersionService) SupportedOperatorVersionsList(ctx context.Context, pmmVersion string) (map[string][]string, error) { - ret := _m.Called(ctx, pmmVersion) - - var r0 map[string][]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (map[string][]string, error)); ok { - return rf(ctx, pmmVersion) - } - if rf, ok := ret.Get(0).(func(context.Context, string) map[string][]string); ok { - r0 = rf(ctx, pmmVersion) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string][]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, pmmVersion) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockVersionService creates a new instance of mockVersionService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockVersionService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockVersionService { - mock := &mockVersionService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dbaas/psmdb_cluster_service.go b/managed/services/management/dbaas/psmdb_cluster_service.go deleted file mode 100644 index 66365ae9b9..0000000000 --- a/managed/services/management/dbaas/psmdb_cluster_service.go +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - cryptoRand "crypto/rand" - "fmt" - "math/big" - "math/rand" - "regexp" - "strings" - - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "gopkg.in/reform.v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -const ( - psmdbDefaultClusterSize = 3 - psmdbDefaultCPUM = 1000 - psmdbDefaultMemoryBytes = 2000000000 - psmdbDefaultDiskSize = 25000000000 -) - -// PSMDBClusterService implements PSMDBClusterServer methods. -type PSMDBClusterService struct { - db *reform.DB - l *logrus.Entry - grafanaClient grafanaClient - componentsService componentsService - kubeStorage *KubeStorage - versionServiceURL string - - dbaasv1beta1.UnimplementedPSMDBClustersServer -} - -// NewPSMDBClusterService creates PSMDB Service. -func NewPSMDBClusterService(db *reform.DB, grafanaClient grafanaClient, //nolint:ireturn - componentsService componentsService, versionServiceURL string, -) dbaasv1beta1.PSMDBClustersServer { - l := logrus.WithField("component", "psmdb_cluster") - return &PSMDBClusterService{ - db: db, - l: l, - grafanaClient: grafanaClient, - componentsService: componentsService, - kubeStorage: NewKubeStorage(db), - versionServiceURL: versionServiceURL, - } -} - -// Enabled returns if service is enabled and can be used. -func (s *PSMDBClusterService) Enabled() bool { - settings, err := models.GetSettings(s.db) - if err != nil { - s.l.WithError(err).Error("can't get settings") - return false - } - return settings.DBaaS.Enabled -} - -// GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name. -func (s PSMDBClusterService) GetPSMDBClusterCredentials(ctx context.Context, req *dbaasv1beta1.GetPSMDBClusterCredentialsRequest) (*dbaasv1beta1.GetPSMDBClusterCredentialsResponse, error) { //nolint:lll - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - dbCluster, err := kubeClient.GetDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, errors.Wrap(err, "failed getting database cluster") - } - secret, err := kubeClient.GetSecret(ctx, dbCluster.Spec.SecretsName) - if err != nil { - return nil, errors.Wrap(err, "failed getting secret") - } - - resp := dbaasv1beta1.GetPSMDBClusterCredentialsResponse{ - ConnectionCredentials: &dbaasv1beta1.GetPSMDBClusterCredentialsResponse_PSMDBCredentials{ - Username: string(secret.Data["MONGODB_USER_ADMIN_USER"]), - Password: string(secret.Data["MONGODB_USER_ADMIN_PASSWORD"]), - Host: dbCluster.Status.Host, - Port: 27017, - Replicaset: "rs0", - }, - } - - return &resp, nil -} - -// CreatePSMDBCluster creates PSMDB cluster with given parameters. -// -//nolint:dupl -func (s PSMDBClusterService) CreatePSMDBCluster(ctx context.Context, req *dbaasv1beta1.CreatePSMDBClusterRequest) (*dbaasv1beta1.CreatePSMDBClusterResponse, error) { //nolint:lll - settings, err := models.GetSettings(s.db.Querier) - if err != nil { - return nil, err - } - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - - psmdbComponents, err := s.componentsService.GetPSMDBComponents(ctx, &dbaasv1beta1.GetPSMDBComponentsRequest{ - KubernetesClusterName: req.KubernetesClusterName, - }) - if err != nil { - return nil, errors.Wrap(err, "cannot get the list of PSMDB components") - } - if psmdbComponents == nil || len(psmdbComponents.Versions) < 1 { - return nil, errors.New("version service returned an empty list for the PSMDB components") - } - - var backupImage string - backupComponent, err := DefaultComponent(psmdbComponents.Versions[0].Matrix.Backup) - if err != nil { - s.l.Warnf("Cannot get the backup component: %s", err) - } else { - backupImage = backupComponent.ImagePath - } - - if err := s.fillDefaults(req, psmdbComponents); err != nil { - return nil, errors.Wrap(err, "cannot create PSMDB cluster") - } - if req.Params.Replicaset.StorageClass == "" { - className, err := kubeClient.GetDefaultStorageClassName(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed to get storage classes") - } - req.Params.Replicaset.StorageClass = className - } - clusterType, err := kubeClient.GetClusterType(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed getting cluster type") - } - backupLocation, err := s.getBackupLocation(req) - if err != nil { - return nil, errors.Wrap(err, "failed getting backup location") - } - dbCluster, dbRestore, err := kubernetes.DatabaseClusterForPSMDB(req, clusterType, backupLocation, backupImage) - if err != nil { - return nil, errors.Wrap(err, "failed to create CR specification") - } - - secrets := map[string][]byte{ - "MONGODB_BACKUP_USER": []byte("backup"), - "MONGODB_CLUSTER_ADMIN_USER": []byte("clusterAdmin"), - "MONGODB_CLUSTER_MONITOR_USER": []byte("clusterMonitor"), - "MONGODB_USER_ADMIN_USER": []byte("userAdmin"), - } - passwords, err := generatePasswords(map[string][]byte{ - "MONGODB_BACKUP_PASSWORD": {}, - "MONGODB_CLUSTER_ADMIN_PASSWORD": {}, - "MONGODB_CLUSTER_MONITOR_PASSWORD": {}, - "MONGODB_USER_ADMIN_PASSWORD": {}, - }) - if err != nil { - return nil, err - } - for k, v := range passwords { - secrets[k] = v - } - var apiKeyID int64 - if settings.PMMPublicAddress != "" { - var apiKey string - apiKeyName := fmt.Sprintf("psmdb-%s-%s-%d", req.KubernetesClusterName, req.Name, rand.Int63()) //nolint:gosec - apiKeyID, apiKey, err = s.grafanaClient.CreateAdminAPIKey(ctx, apiKeyName) - if err != nil { - return nil, err - } - dbCluster.Spec.Monitoring.PMM.PublicAddress = settings.PMMPublicAddress - dbCluster.Spec.Monitoring.PMM.Login = "api_key" - dbCluster.Spec.Monitoring.PMM.Image = getPMMClientImage() //nolint:contextcheck - secrets["PMM_SERVER_USER"] = []byte("api_key") - secrets["PMM_SERVER_PASSWORD"] = []byte(apiKey) - } - if req.Params.Restore == nil || (req.Params.Restore != nil && req.Params.Restore.SecretsName == "") { - err = kubeClient.CreatePMMSecret(dbCluster.Spec.SecretsName, secrets) - if err != nil { - return nil, err - } - } - - err = kubeClient.CreateDatabaseCluster(dbCluster) - if err != nil { - if apiKeyID != 0 { - e := s.grafanaClient.DeleteAPIKeyByID(ctx, apiKeyID) - if e != nil { - s.l.Warnf("couldn't delete created API Key %v: %s", apiKeyID, e) - } - } - return nil, err - } - if req.Params.Backup != nil || req.Params.Restore != nil && backupLocation != nil { - secretsName := fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName) - secrets := kubernetes.SecretForBackup(backupLocation) - if err := kubeClient.CreatePMMSecret(secretsName, secrets); err != nil { - return nil, errors.Wrap(err, "failed to create a secret") - } - } - if dbRestore != nil { - if err := kubeClient.CreateRestore(dbRestore); err != nil { - return nil, err - } - } - - return &dbaasv1beta1.CreatePSMDBClusterResponse{}, nil -} - -func (s PSMDBClusterService) fillDefaults( - req *dbaasv1beta1.CreatePSMDBClusterRequest, psmdbComponents *dbaasv1beta1.GetPSMDBComponentsResponse, -) error { - if req.Name != "" { - r := regexp.MustCompile("^[a-z]([-a-z0-9]*[a-z0-9])?$") - if !r.MatchString(req.Name) { - return errInvalidClusterName - } - } - if req.Params == nil { - req.Params = &dbaasv1beta1.PSMDBClusterParams{} - } - - if req.Params.ClusterSize < 1 { - req.Params.ClusterSize = psmdbDefaultClusterSize - } - - if req.Params.Replicaset == nil { - req.Params.Replicaset = &dbaasv1beta1.PSMDBClusterParams_ReplicaSet{} - } - - if req.Params.Replicaset.DiskSize == 0 { - req.Params.Replicaset.DiskSize = psmdbDefaultDiskSize - } - - if req.Params.Replicaset.ComputeResources == nil { - req.Params.Replicaset.ComputeResources = &dbaasv1beta1.ComputeResources{ - CpuM: psmdbDefaultCPUM, - MemoryBytes: psmdbDefaultMemoryBytes, - } - } - if req.Params.Replicaset.ComputeResources.CpuM == 0 { - req.Params.Replicaset.ComputeResources.CpuM = psmdbDefaultCPUM - } - if req.Params.Replicaset.ComputeResources.MemoryBytes == 0 { - req.Params.Replicaset.ComputeResources.MemoryBytes = psmdbDefaultMemoryBytes - } - - psmdbComponent, err := DefaultComponent(psmdbComponents.Versions[0].Matrix.Mongod) - if err != nil { - return errors.Wrap(err, "cannot get the recommended MongoDB image name") - } - - if req.Params.Image == "" { - req.Params.Image = psmdbComponent.ImagePath - } - - if req.Name == "" { - // Image is a string like this: percona/percona-server-mongodb:4.2.12-13 - // We need only the version part to build the cluster name. - parts := strings.Split(req.Params.Image, ":") - - // This is to generate an unique name. - uuids := strings.ReplaceAll(uuid.New().String(), "-", "") - uuids = uuids[len(uuids)-5:] - - req.Name = fmt.Sprintf("psmdb-%s-%s", strings.ReplaceAll(parts[len(parts)-1], ".", "-"), uuids) - if len(req.Name) > 22 { // Kubernetes limitation - req.Name = req.Name[:21] - } - } - // } - - return nil -} - -// UpdatePSMDBCluster updates PSMDB cluster. -func (s PSMDBClusterService) UpdatePSMDBCluster(ctx context.Context, req *dbaasv1beta1.UpdatePSMDBClusterRequest) (*dbaasv1beta1.UpdatePSMDBClusterResponse, error) { - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - dbCluster, err := kubeClient.GetDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, err - } - clusterType, err := kubeClient.GetClusterType(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed getting cluster type") - } - err = kubernetes.UpdatePatchForPSMDB(dbCluster, req, clusterType) - if err != nil { - return nil, err - } - - err = kubeClient.PatchDatabaseCluster(dbCluster) - if err != nil { - return nil, err - } - - return &dbaasv1beta1.UpdatePSMDBClusterResponse{}, nil -} - -func (s PSMDBClusterService) getBackupLocation(req *dbaasv1beta1.CreatePSMDBClusterRequest) (*models.BackupLocation, error) { - if req.Params != nil && req.Params.Backup != nil && req.Params.Backup.LocationId != "" { - return models.FindBackupLocationByID(s.db.Querier, req.Params.Backup.LocationId) - } - if req.Params != nil && req.Params.Restore != nil && req.Params.Restore.LocationId != "" { - return models.FindBackupLocationByID(s.db.Querier, req.Params.Restore.LocationId) - } - return nil, nil //nolint:nilnil -} - -// GetPSMDBClusterResources returns expected resources to be consumed by the cluster. -func (s PSMDBClusterService) GetPSMDBClusterResources(ctx context.Context, req *dbaasv1beta1.GetPSMDBClusterResourcesRequest) (*dbaasv1beta1.GetPSMDBClusterResourcesResponse, error) { //nolint:lll - settings, err := models.GetSettings(s.db.Querier) - if err != nil { - return nil, err - } - - clusterSize := uint64(req.Params.ClusterSize) - memory := uint64(req.Params.Replicaset.ComputeResources.MemoryBytes) * 2 * clusterSize - cpu := uint64(req.Params.Replicaset.ComputeResources.CpuM) * 2 * clusterSize - disk := uint64(req.Params.Replicaset.DiskSize)*3 + uint64(req.Params.Replicaset.DiskSize)*clusterSize - - if settings.PMMPublicAddress != "" { - memory += (3 + 2*clusterSize) * 500000000 - cpu += (3 + 2*clusterSize) * 500 - } - - return &dbaasv1beta1.GetPSMDBClusterResourcesResponse{ - Expected: &dbaasv1beta1.Resources{ - CpuM: cpu, - MemoryBytes: memory, - DiskSize: disk, - }, - }, nil -} - -const ( - passwordLength = 24 -) - -func generatePasswords(secrets map[string][]byte) (map[string][]byte, error) { - for key := range secrets { - password, err := generatePassword(passwordLength) - if err != nil { - return nil, errors.Wrapf(err, "failed to generate password for %s", key) - } - secrets[key] = []byte(password) - } - return secrets, nil -} - -func generatePassword(n int) (string, error) { - // PSMDB do not support all special characters in password https://jira.percona.com/browse/K8SPSMDB-364 - symbols := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") - symbolsLen := len(symbols) - b := make([]rune, n) - for i := range b { - randomIndex, err := cryptoRand.Int(cryptoRand.Reader, big.NewInt(int64(symbolsLen))) - if err != nil { - return "", err - } - b[i] = symbols[randomIndex.Uint64()] - } - return string(b), nil -} diff --git a/managed/services/management/dbaas/psmdb_cluster_service_test.go b/managed/services/management/dbaas/psmdb_cluster_service_test.go deleted file mode 100644 index f9791dfe9c..0000000000 --- a/managed/services/management/dbaas/psmdb_cluster_service_test.go +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains all logic related to dbaas services. -package dbaas - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/google/uuid" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" - "github.com/percona/pmm/utils/logger" - pmmversion "github.com/percona/pmm/version" -) - -const psmdbKubeconfTest = ` -{ - "apiVersion": "v1", - "kind": "Config", - "users": [ - { - "name": "percona-server-mongodb-operator", - "user": { - "token": "some-token" - } - } - ], - "clusters": [ - { - "cluster": { - "certificate-authority-data": "some-certificate-authority-data", - "server": "https://192.168.0.42:8443" - }, - "name": "self-hosted-cluster" - } - ], - "contexts": [ - { - "context": { - "cluster": "self-hosted-cluster", - "user": "percona-server-mongodb-operator" - }, - "name": "svcs-acct-context" - } - ], - "current-context": "svcs-acct-context" -} -` -const psmdbKubernetesClusterNameTest = "test-k8s-cluster-name" - -func TestPSMDBClusterService(t *testing.T) { - // This is for local testing. When running local tests, if pmmversion.PMMVersion is empty - // these lines in kubernetes_server.go will throw an error and tests won't finish. - // - // pmmVersion, err := goversion.NewVersion(pmmversion.PMMVersion) - // if err != nil { - // return nil, status.Error(codes.Internal, err.Error()) - // } - // - if pmmversion.PMMVersion == "" { - pmmversion.PMMVersion = "2.30.0" - } - setup := func(t *testing.T) (ctx context.Context, db *reform.DB, dbaasClient *mockDbaasClient, grafanaClient *mockGrafanaClient, - kubeClient *mockKubernetesClient, componentsService *mockComponentsService, teardown func(t *testing.T), - ) { - t.Helper() - - ctx = logger.Set(context.Background(), t.Name()) - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - // To enable queries logs, use: - // db = reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - db = reform.NewDB(sqlDB, postgresql.Dialect, nil) - dbaasClient = &mockDbaasClient{} - grafanaClient = &mockGrafanaClient{} - kubeClient = &mockKubernetesClient{} - componentsService = &mockComponentsService{} - - teardown = func(t *testing.T) { - t.Helper() - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - require.NoError(t, sqlDB.Close()) - } - - return - } - - ctx, db, dbaasClient, grafanaClient, kubeClient, componentsService, teardown := setup(t) - defer teardown(t) - versionService := NewVersionServiceClient(versionServiceURL) - ks := NewKubernetesServer(db, dbaasClient, versionService, grafanaClient) - - grafanaClient.On("CreateAdminAPIKey", mock.Anything, mock.Anything).Return(int64(0), "", nil) - kubeClient.On("CreatePMMSecret", mock.Anything, mock.Anything).Return(nil, nil) - kubeClient.On("GetClusterType", ctx).Return(kubernetes.ClusterTypeGeneric, nil) - kubeClient.On("GetDefaultStorageClassName", mock.Anything).Return("", nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("InstallOLMOperator", mock.Anything, mock.Anything).WaitUntil(time.After(time.Second)).Return(nil) - kubeClient.On("InstallOperator", mock.Anything, mock.Anything).WaitUntil(time.After(time.Second)).Return(nil) - - kubeClient.On("GetServerVersion").Return(nil, nil) - clients := map[string]kubernetesClient{ - psmdbKubernetesClusterNameTest: kubeClient, - } - s := ks.(*kubernetesServer) - s.kubeStorage.clients = clients - ks = s - registerKubernetesClusterResponse, err := ks.RegisterKubernetesCluster(ctx, &dbaasv1beta1.RegisterKubernetesClusterRequest{ - KubernetesClusterName: psmdbKubernetesClusterNameTest, - KubeAuth: &dbaasv1beta1.KubeAuth{Kubeconfig: psmdbKubeconfTest}, - }) - require.NoError(t, err) - assert.NotNil(t, registerKubernetesClusterResponse) - versionService = NewVersionServiceClient(versionServiceURL) - - //nolint:dupl - t.Run("BasicCreatePSMDBClusters", func(t *testing.T) { - mockGetPSMDBComponentsResponse := &dbaasv1beta1.GetPSMDBComponentsResponse{ - Versions: []*dbaasv1beta1.OperatorVersion{ - { - Product: "psmdb-operator", - Operator: "1.6.0", - Matrix: &dbaasv1beta1.Matrix{ - Mongod: map[string]*dbaasv1beta1.Component{ - "4.2.11-12": { - ImagePath: "percona/percona-server-mongodb:4.2.11-12", - ImageHash: "1909cb7a6ecea9bf0535b54aa86b9ae74ba2fa303c55cf4a1a54262fb0edbd3c", - Status: "recommended", - Critical: false, - Default: false, - Disabled: false, - }, - "4.2.7-7": { - ImagePath: "percona/percona-server-mongodb:4.2.7-7", - ImageHash: "1d8a0859b48a3e9cadf9ad7308ec5aa4b278a64ca32ff5d887156b1b46146b13", - Status: "available", - Critical: false, - Default: false, - Disabled: false, - }, - "4.4.2-4": { - ImagePath: "percona/percona-server-mongodb:4.4.2-4", - ImageHash: "991d6049059e5eb1a74981290d829a5fb4ab0554993748fde1e67b2f46f26bf0", - Status: "recommended", - Critical: false, - Default: true, - Disabled: false, - }, - "4.2.8-8": { - ImagePath: "percona/percona-server-mongodb:4.2.8-8", - ImageHash: "a66e889d3e986413e41083a9c887f33173da05a41c8bd107cf50eede4588a505", - Status: "available", - Critical: false, - Default: false, - Disabled: false, - }, - }, - }, - }, - }, - } - cs := NewPSMDBClusterService(db, grafanaClient, componentsService, versionService.GetVersionServiceURL()) - s := cs.(*PSMDBClusterService) - s.kubeStorage.clients = clients - - componentsService.On("GetPSMDBComponents", mock.Anything, mock.Anything).Return(mockGetPSMDBComponentsResponse, nil) - kubeClient.On("CreateDatabaseCluster", mock.Anything).Return(nil) - - in := dbaasv1beta1.CreatePSMDBClusterRequest{ - KubernetesClusterName: psmdbKubernetesClusterNameTest, - Name: "third-psmdb-test", - Params: &dbaasv1beta1.PSMDBClusterParams{ - ClusterSize: 5, - Replicaset: &dbaasv1beta1.PSMDBClusterParams_ReplicaSet{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 3, - MemoryBytes: 256, - }, - DiskSize: 1024 * 1024 * 1024, - }, - Image: "path", - }, - } - - _, err := s.CreatePSMDBCluster(ctx, &in) - assert.NoError(t, err) - }) - - // Pass the minimum parameters to use the defaults set by the fillDefaults function - t.Run("CreatePSMDBClustersMinimumParams", func(t *testing.T) { - psmdbComponents := &dbaasv1beta1.GetPSMDBComponentsResponse{ - Versions: []*dbaasv1beta1.OperatorVersion{ - { - Product: "psmdb-operator", - Operator: "1.11.0", - Matrix: &dbaasv1beta1.Matrix{ - Mongod: map[string]*dbaasv1beta1.Component{ - "4.2.11-12": { - ImagePath: "percona/percona-server-mongodb:4.2.11-12", - ImageHash: "1909cb7a6ecea9bf0535b54aa86b9ae74ba2fa303c55cf4a1a54262fb0edbd3c", - Status: "available", - Critical: false, - Default: false, - Disabled: false, - }, - "4.2.12-13": { - ImagePath: "percona/percona-server-mongodb:4.2.12-13", - ImageHash: "dda89e647ea5aa1266055ef465d66a139722d9e3f78a839a90a9f081b09ce26d", - Status: "available", - Critical: false, - Default: false, - Disabled: false, - }, - "4.2.17-17": { - ImagePath: "percona/percona-server-mongodb:4.2.17-17", - ImageHash: "dde894b50568e088b28767ff18cfbdfe6b2496f12eddb14743d3d33c105e3f01", - Status: "recommended", - Critical: false, - Default: true, - Disabled: false, - }, - }, - }, - }, - }, - } - componentsService.On("GetPSMDBComponents", ctx, mock.Anything).Return(psmdbComponents, nil) - - cs := NewPSMDBClusterService(db, grafanaClient, componentsService, versionService.GetVersionServiceURL()) - s := cs.(*PSMDBClusterService) - s.kubeStorage.clients = clients - kubeClient.On("CreateDatabaseCluster", mock.Anything).Return(nil) - - in := dbaasv1beta1.CreatePSMDBClusterRequest{ - KubernetesClusterName: psmdbKubernetesClusterNameTest, - } - - _, err := s.CreatePSMDBCluster(ctx, &in) - assert.NoError(t, err) - }) - - //nolint:dupl - t.Run("BasicUpdatePSMDBCluster", func(t *testing.T) { - cs := NewPSMDBClusterService(db, grafanaClient, componentsService, versionService.GetVersionServiceURL()) - s := cs.(*PSMDBClusterService) - s.kubeStorage.clients = clients - dbMock := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "third-psmdb-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "psmdb", - DatabaseImage: "percona/percona-server-mongodb:4.4.5-7", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "mongos", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 10, - Size: 10, - }, - } - - kubeClient.On("GetDatabaseCluster", ctx, "third-psmdb-test").Return(dbMock, nil) - kubeClient.On("PatchDatabaseCluster", mock.Anything).Return(nil) - - in := dbaasv1beta1.UpdatePSMDBClusterRequest{ - KubernetesClusterName: psmdbKubernetesClusterNameTest, - Name: "third-psmdb-test", - Params: &dbaasv1beta1.UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams{ - ClusterSize: 8, - Replicaset: &dbaasv1beta1.UpdatePSMDBClusterRequest_UpdatePSMDBClusterParams_ReplicaSet{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1, - MemoryBytes: 256, - }, - }, - }, - } - - _, err := s.UpdatePSMDBCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("BasicGetPSMDBClusterCredentials", func(t *testing.T) { - cs := NewPSMDBClusterService(db, grafanaClient, componentsService, versionService.GetVersionServiceURL()) - s := cs.(*PSMDBClusterService) - s.kubeStorage.clients = clients - mockReq := &corev1.Secret{ - Data: map[string][]byte{ - "MONGODB_USER_ADMIN_USER": []byte("userAdmin"), - "MONGODB_USER_ADMIN_PASSWORD": []byte("userAdmin123"), - }, - } - dbMock := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "another-third-psmdb-test", - }, - Spec: dbaasv1.DatabaseSpec{ - SecretsName: fmt.Sprintf(psmdbSecretNameTmpl, "another-third-psmdb-test"), - }, - Status: dbaasv1.DatabaseClusterStatus{ - Host: "hostname", - }, - } - - kubeClient.On("GetDatabaseCluster", ctx, "another-third-psmdb-test").Return(dbMock, nil) - - kubeClient.On("GetSecret", ctx, fmt.Sprintf(psmdbSecretNameTmpl, "another-third-psmdb-test")).Return(mockReq, nil) - - in := dbaasv1beta1.GetPSMDBClusterCredentialsRequest{ - KubernetesClusterName: psmdbKubernetesClusterNameTest, - Name: "another-third-psmdb-test", - } - - cluster, err := s.GetPSMDBClusterCredentials(ctx, &in) - - assert.NoError(t, err) - assert.Equal(t, "hostname", cluster.ConnectionCredentials.Host) - }) - - t.Run("BasicGetPSMDBClusterResources", func(t *testing.T) { - cs := NewPSMDBClusterService(db, grafanaClient, componentsService, versionService.GetVersionServiceURL()) - s := cs.(*PSMDBClusterService) - s.kubeStorage.clients = clients - - in := dbaasv1beta1.GetPSMDBClusterResourcesRequest{ - Params: &dbaasv1beta1.PSMDBClusterParams{ - ClusterSize: 4, - Replicaset: &dbaasv1beta1.PSMDBClusterParams_ReplicaSet{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 2000, - MemoryBytes: 2000000000, - }, - DiskSize: 2000000000, - }, - }, - } - - actual, err := s.GetPSMDBClusterResources(ctx, &in) - assert.NoError(t, err) - assert.Equal(t, uint64(16000000000), actual.Expected.MemoryBytes) - assert.Equal(t, uint64(16000), actual.Expected.CpuM) - assert.Equal(t, uint64(14000000000), actual.Expected.DiskSize) - }) -} diff --git a/managed/services/management/dbaas/pxc_cluster_service.go b/managed/services/management/dbaas/pxc_cluster_service.go deleted file mode 100644 index e9b007a197..0000000000 --- a/managed/services/management/dbaas/pxc_cluster_service.go +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains all logic related to dbaas services. -package dbaas - -import ( - "context" - "fmt" - "math/rand" - "regexp" - "strings" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "gopkg.in/reform.v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -const ( - pxcDefaultClusterSize = 3 - pxcDefaultCPUM = 1000 - pxcDefaultMemoryBytes = 2000000000 - pxcDefaultDiskSize = 25000000000 - proxyDefaultCPUM = 500 - proxyDefaultMemoryBytes = 500000000 - haProxyTemplate = "percona/percona-xtradb-cluster-operator:%s-haproxy" - proxySQLTemplate = "percona/percona-xtradb-cluster-operator:%s-proxysql" -) - -var errInvalidClusterName = errors.New("invalid cluster name. It must start with a letter and have only letters, numbers and -") - -// PXCClustersService implements PXCClusterServer methods. -type PXCClustersService struct { - db *reform.DB - l *logrus.Entry - grafanaClient grafanaClient - componentsService componentsService - kubeStorage *KubeStorage - versionServiceURL string - - dbaasv1beta1.UnimplementedPXCClustersServer -} - -// NewPXCClusterService creates PXC Service. -func NewPXCClusterService(db *reform.DB, grafanaClient grafanaClient, componentsService componentsService, //nolint:ireturn - versionServiceURL string, -) dbaasv1beta1.PXCClustersServer { - l := logrus.WithField("component", "pxc_cluster") - return &PXCClustersService{ - db: db, - l: l, - grafanaClient: grafanaClient, - versionServiceURL: versionServiceURL, - componentsService: componentsService, - kubeStorage: NewKubeStorage(db), - } -} - -// GetPXCClusterCredentials returns a PXC cluster credentials. -func (s PXCClustersService) GetPXCClusterCredentials(ctx context.Context, req *dbaasv1beta1.GetPXCClusterCredentialsRequest) (*dbaasv1beta1.GetPXCClusterCredentialsResponse, error) { //nolint:lll - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - dbCluster, err := kubeClient.GetDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, errors.Wrap(err, "failed getting database cluster") - } - secret, err := kubeClient.GetSecret(ctx, dbCluster.Spec.SecretsName) - if err != nil { - return nil, errors.Wrap(err, "failed getting secret") - } - - resp := dbaasv1beta1.GetPXCClusterCredentialsResponse{ - ConnectionCredentials: &dbaasv1beta1.PXCClusterConnectionCredentials{ - Username: "root", - Password: string(secret.Data["root"]), - Host: dbCluster.Status.Host, - Port: 3306, - }, - } - - return &resp, nil -} - -// CreatePXCCluster creates PXC cluster with given parameters. -// -//nolint:dupl -func (s PXCClustersService) CreatePXCCluster(ctx context.Context, req *dbaasv1beta1.CreatePXCClusterRequest) (*dbaasv1beta1.CreatePXCClusterResponse, error) { - settings, err := models.GetSettings(s.db.Querier) - if err != nil { - return nil, errInvalidClusterName - } - - if req.Params == nil { - req.Params = &dbaasv1beta1.PXCClusterParams{} - } - // Check if one and only one of proxies is set. - if req.Params.Proxysql != nil && req.Params.Haproxy != nil { - return nil, errors.New("pxc cluster must have one and only one proxy type defined") - } - - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - - if err := s.fillDefaults(ctx, req.KubernetesClusterName, req, kubeClient); err != nil { - return nil, errors.Wrap(err, "cannot create pxc cluster") - } - - if req.Params.Pxc.StorageClass == "" { - className, err := kubeClient.GetDefaultStorageClassName(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed to get storage classes") - } - req.Params.Pxc.StorageClass = className - } - clusterType, err := kubeClient.GetClusterType(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed getting cluster type") - } - backupLocation, err := s.getBackupLocation(req) - if err != nil { - return nil, errors.Wrap(err, "failed getting backup location") - } - dbCluster, dbRestore, err := kubernetes.DatabaseClusterForPXC(req, clusterType, backupLocation) - if err != nil { - return nil, errors.Wrap(err, "failed to create CR specification") - } - - secrets, err := generatePasswords(map[string][]byte{ - "root": {}, - "xtrabackup": {}, - "monitor": {}, - "clustercheck": {}, - "proxyadmin": {}, - "operator": {}, - "replication": {}, - }) - if err != nil { - return nil, err - } - var apiKeyID int64 - if settings.PMMPublicAddress != "" { - var apiKey string - apiKeyName := fmt.Sprintf("pxc-%s-%s-%d", req.KubernetesClusterName, req.Name, rand.Int63()) //nolint:gosec - apiKeyID, apiKey, err = s.grafanaClient.CreateAdminAPIKey(ctx, apiKeyName) - if err != nil { - return nil, err - } - dbCluster.Spec.Monitoring.PMM.PublicAddress = settings.PMMPublicAddress - dbCluster.Spec.Monitoring.PMM.Login = "api_key" - dbCluster.Spec.Monitoring.PMM.Image = getPMMClientImage() //nolint:contextcheck - - secrets["pmmserver"] = []byte(apiKey) - } - if req.Params.Restore == nil || (req.Params.Restore != nil && req.Params.Restore.SecretsName == "") { - err = kubeClient.CreatePMMSecret(dbCluster.Spec.SecretsName, secrets) - if err != nil { - return nil, err - } - } - err = kubeClient.CreateDatabaseCluster(dbCluster) - - if err != nil { - if apiKeyID != 0 { - e := s.grafanaClient.DeleteAPIKeyByID(ctx, apiKeyID) - if e != nil { - s.l.Warnf("couldn't delete created API Key %v: %s", apiKeyID, e) - } - } - } - if req.Params.Backup != nil || req.Params.Restore != nil && backupLocation != nil { - secretsName := fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName) - secrets := kubernetes.SecretForBackup(backupLocation) - if err := kubeClient.CreatePMMSecret(secretsName, secrets); err != nil { - return nil, errors.Wrap(err, "failed to create a secret") - } - } - if dbRestore != nil { - if err := kubeClient.CreateRestore(dbRestore); err != nil { - return nil, err - } - } - return &dbaasv1beta1.CreatePXCClusterResponse{}, nil -} - -//nolint:cyclop -func (s PXCClustersService) fillDefaults(ctx context.Context, kubernetesClusterName string, - req *dbaasv1beta1.CreatePXCClusterRequest, kubeClient kubernetesClient, -) error { - if req.Name != "" { - r := regexp.MustCompile("^[a-z]([-a-z0-9]*[a-z0-9])?$") - if !r.MatchString(req.Name) { - return errInvalidClusterName - } - } - if req.Params == nil { - req.Params = &dbaasv1beta1.PXCClusterParams{} - } - - if req.Params.ClusterSize < 1 { - req.Params.ClusterSize = pxcDefaultClusterSize - } - - if req.Params.Pxc == nil { - req.Params.Pxc = &dbaasv1beta1.PXCClusterParams_PXC{} - } - - if req.Params.Pxc.DiskSize == 0 { - req.Params.Pxc.DiskSize = pxcDefaultDiskSize - } - - if req.Params.Pxc.ComputeResources == nil { - req.Params.Pxc.ComputeResources = &dbaasv1beta1.ComputeResources{ - CpuM: pxcDefaultCPUM, - MemoryBytes: pxcDefaultMemoryBytes, - } - } - if req.Params.Pxc.ComputeResources.CpuM == 0 { - req.Params.Pxc.ComputeResources.CpuM = pxcDefaultCPUM - } - if req.Params.Pxc.ComputeResources.MemoryBytes == 0 { - req.Params.Pxc.ComputeResources.MemoryBytes = pxcDefaultMemoryBytes - } - - // If none of them was specified, use HAProxy by default. - if req.Params.Proxysql == nil && req.Params.Haproxy == nil { - req.Params.Haproxy = &dbaasv1beta1.PXCClusterParams_HAProxy{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: proxyDefaultCPUM, - MemoryBytes: proxyDefaultMemoryBytes, - }, - } - } - - if req.Params.Haproxy != nil { - if req.Params.Haproxy.ComputeResources == nil { - req.Params.Haproxy.ComputeResources = &dbaasv1beta1.ComputeResources{ - CpuM: proxyDefaultCPUM, - MemoryBytes: proxyDefaultMemoryBytes, - } - } - if req.Params.Haproxy.ComputeResources.CpuM == 0 { - req.Params.Haproxy.ComputeResources.CpuM = proxyDefaultCPUM - } - if req.Params.Haproxy.ComputeResources.MemoryBytes == 0 { - req.Params.Haproxy.ComputeResources.MemoryBytes = proxyDefaultMemoryBytes - } - if req.Params.Haproxy.Image == "" { - // PXC operator requires to specify HAproxy image - // It uses default operator distribution based on version - // following the template operatorimage:version-haproxy - version, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - return err - } - req.Params.Haproxy.Image = fmt.Sprintf(haProxyTemplate, version) - } - } - - if req.Params.Proxysql != nil { - if req.Params.Proxysql.ComputeResources == nil { - req.Params.Proxysql.ComputeResources = &dbaasv1beta1.ComputeResources{ - CpuM: proxyDefaultCPUM, - MemoryBytes: proxyDefaultMemoryBytes, - } - } - if req.Params.Proxysql.ComputeResources.CpuM == 0 { - req.Params.Proxysql.ComputeResources.CpuM = proxyDefaultCPUM - } - if req.Params.Proxysql.ComputeResources.MemoryBytes == 0 { - req.Params.Proxysql.ComputeResources.MemoryBytes = proxyDefaultMemoryBytes - } - if req.Params.Proxysql.Image == "" { - // PXC operator requires to specify ProxySQL image - // It uses default operator distribution based on version - // following the template operatorimage:version-proxysql - version, err := kubeClient.GetPXCOperatorVersion(ctx) - if err != nil { - return err - } - req.Params.Proxysql.Image = fmt.Sprintf(proxySQLTemplate, version) - } - } - - // Only call the version service if it is really needed. - if req.Name == "" || req.Params.Pxc.Image == "" { - pxcComponents, err := s.componentsService.GetPXCComponents(ctx, &dbaasv1beta1.GetPXCComponentsRequest{ - KubernetesClusterName: kubernetesClusterName, - }) - if err != nil { - return errors.New("cannot get the list of PXC components") - } - - component, err := DefaultComponent(pxcComponents.Versions[0].Matrix.Pxc) - if err != nil { - return errors.Wrap(err, "cannot get the recommended PXC image name") - } - - if req.Params.Pxc.Image == "" { - req.Params.Pxc.Image = component.ImagePath - } - - if req.Name == "" { - // Image is a string like this: percona/percona-server-mongodb:4.2.12-13 - // We need only the version part to build the cluster name. - parts := strings.Split(req.Params.Pxc.Image, ":") - req.Name = fmt.Sprintf("pxc-%s-%04d", strings.ReplaceAll(parts[len(parts)-1], ".", "-"), rand.Int63n(9999)) //nolint:gosec - if len(req.Name) > 22 { // Kubernetes limitation - req.Name = req.Name[:21] - } - } - } - - return nil -} - -// UpdatePXCCluster updates PXC cluster. -// -//nolint:dupl -func (s PXCClustersService) UpdatePXCCluster(ctx context.Context, req *dbaasv1beta1.UpdatePXCClusterRequest) (*dbaasv1beta1.UpdatePXCClusterResponse, error) { - if (req.Params.Proxysql != nil) && (req.Params.Haproxy != nil) { - return nil, errors.New("can't update both proxies, only one is in use") - } - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - dbCluster, err := kubeClient.GetDatabaseCluster(ctx, req.Name) - if err != nil { - return nil, err - } - clusterType, err := kubeClient.GetClusterType(ctx) - if err != nil { - return nil, errors.Wrap(err, "failed getting cluster type") - } - err = kubernetes.UpdatePatchForPXC(dbCluster, req, clusterType) - if err != nil { - return nil, errors.Wrap(err, "failed to create CR specification") - } - - err = kubeClient.PatchDatabaseCluster(dbCluster) - - if err != nil { - return nil, err - } - - return &dbaasv1beta1.UpdatePXCClusterResponse{}, nil -} - -// GetPXCClusterResources returns expected resources to be consumed by the cluster. -func (s PXCClustersService) GetPXCClusterResources(_ context.Context, req *dbaasv1beta1.GetPXCClusterResourcesRequest) (*dbaasv1beta1.GetPXCClusterResourcesResponse, error) { //nolint:lll - settings, err := models.GetSettings(s.db.Querier) - if err != nil { - return nil, err - } - - clusterSize := uint64(req.Params.ClusterSize) - var proxyComputeResources *dbaasv1beta1.ComputeResources - var disk uint64 - if req.Params.Proxysql != nil { - disk = uint64(req.Params.Proxysql.DiskSize) * clusterSize - proxyComputeResources = req.Params.Proxysql.ComputeResources - } else { - proxyComputeResources = req.Params.Haproxy.ComputeResources - } - memory := uint64(req.Params.Pxc.ComputeResources.MemoryBytes+proxyComputeResources.MemoryBytes) * clusterSize - cpu := uint64(req.Params.Pxc.ComputeResources.CpuM+proxyComputeResources.CpuM) * clusterSize - disk += uint64(req.Params.Pxc.DiskSize) * clusterSize - - if settings.PMMPublicAddress != "" { - memory += 1000000000 * clusterSize - cpu += 1000 * clusterSize - } - - return &dbaasv1beta1.GetPXCClusterResourcesResponse{ - Expected: &dbaasv1beta1.Resources{ - CpuM: cpu, - MemoryBytes: memory, - DiskSize: disk, - }, - }, nil -} - -func (s PXCClustersService) getBackupLocation(req *dbaasv1beta1.CreatePXCClusterRequest) (*models.BackupLocation, error) { - if req.Params != nil && req.Params.Backup != nil && req.Params.Backup.LocationId != "" { - return models.FindBackupLocationByID(s.db.Querier, req.Params.Backup.LocationId) - } - if req.Params != nil && req.Params.Restore != nil && req.Params.Restore.LocationId != "" { - return models.FindBackupLocationByID(s.db.Querier, req.Params.Restore.LocationId) - } - return nil, nil //nolint:nilnil -} diff --git a/managed/services/management/dbaas/pxc_cluster_service_test.go b/managed/services/management/dbaas/pxc_cluster_service_test.go deleted file mode 100644 index da64a7f261..0000000000 --- a/managed/services/management/dbaas/pxc_cluster_service_test.go +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains all logic related to dbaas services. -package dbaas - -import ( - "context" - "fmt" - "sync" - "testing" - "time" - - "github.com/google/uuid" - goversion "github.com/hashicorp/go-version" - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/stretchr/testify/assert" - mock "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" - "github.com/percona/pmm/utils/logger" - pmmversion "github.com/percona/pmm/version" -) - -const pxcKubeconfigTest = ` -{ - "apiVersion": "v1", - "kind": "Config", - "users": [ - { - "name": "percona-xtradb-cluster-operator", - "user": { - "token": "some-token" - } - } - ], - "clusters": [ - { - "cluster": { - "certificate-authority-data": "some-certificate-authority-data", - "server": "https://192.168.0.42:8443" - }, - "name": "self-hosted-cluster" - } - ], - "contexts": [ - { - "context": { - "cluster": "self-hosted-cluster", - "user": "percona-xtradb-cluster-operator" - }, - "name": "svcs-acct-context" - } - ], - "current-context": "svcs-acct-context" -} -` -const pxcKubernetesClusterNameTest = "test-k8s-cluster-name" - -func TestPXCClusterService(t *testing.T) { //nolint:tparallel - // This is for local testing. When running local tests, if pmmversion.PMMVersion is empty - // these lines in kubernetes_server.go will throw an error and tests won't finish. - // - // pmmVersion, err := goversion.NewVersion(pmmversion.PMMVersion) - // if err != nil { - // return nil, status.Error(codes.Internal, err.Error()) - // } - // - if pmmversion.PMMVersion == "" { - pmmversion.PMMVersion = "2.30.0" - } - setup := func(t *testing.T) (ctx context.Context, db *reform.DB, dbaasClient *mockDbaasClient, grafanaClient *mockGrafanaClient, - componentsService *mockComponentsService, kubeClient *mockKubernetesClient, teardown func(t *testing.T), - ) { - t.Helper() - - ctx = logger.Set(context.Background(), t.Name()) - uuid.SetRand(&tests.IDReader{}) - - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - db = reform.NewDB(sqlDB, postgresql.Dialect, nil) - dbaasClient = &mockDbaasClient{} - grafanaClient = &mockGrafanaClient{} - kubeClient = &mockKubernetesClient{} - componentsService = &mockComponentsService{} - - teardown = func(t *testing.T) { - t.Helper() - uuid.SetRand(nil) - dbaasClient.AssertExpectations(t) - } - - return - } - - ctx, db, dbaasClient, grafanaClient, componentsClient, kubeClient, teardown := setup(t) - t.Cleanup(func() { teardown(t) }) - - versionService := &mockVersionService{} - v1120, _ := goversion.NewVersion("1.12.0") - versionService.On("LatestOperatorVersion", mock.Anything, mock.Anything).Return(v1120, v1120, nil) - versionService.On("GetVersionServiceURL", mock.Anything).Return("", nil) - - ks := NewKubernetesServer(db, dbaasClient, versionService, grafanaClient) - - grafanaClient.On("CreateAdminAPIKey", mock.Anything, mock.Anything).Return(int64(123456), "api-key", nil) - kubeClient.On("InstallOLMOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("InstallOperator", mock.Anything, mock.Anything).Return(nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - - wg := sync.WaitGroup{} - wg.Add(1) - dbaasClient.On("StartMonitoring", mock.Anything, mock.Anything).WaitUntil(time.After(15*time.Second)). - Return(&controllerv1beta1.StartMonitoringResponse{}, nil).Run(func(a mock.Arguments) { - // StartMonitoring if being called in a go-routine. Since we cannot forsee when the runtime scheduler - // is going to assing some time to this go-routine, the waitgroup is being used to signal than the test - // can continue. - wg.Done() - }) - - kubeClient.On("GetServerVersion").Return(nil, nil) - clients := map[string]kubernetesClient{ - pxcKubernetesClusterNameTest: kubeClient, - } - s := ks.(*kubernetesServer) - s.kubeStorage.clients = clients - ks = s - registerKubernetesClusterResponse, err := ks.RegisterKubernetesCluster(ctx, &dbaasv1beta1.RegisterKubernetesClusterRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - KubeAuth: &dbaasv1beta1.KubeAuth{Kubeconfig: pxcKubeconfigTest}, - }) - require.NoError(t, err) - assert.NotNil(t, registerKubernetesClusterResponse) - - wg.Wait() - - kubeClient.On("SetKubeconfig", mock.Anything).Return(nil) - kubeClient.On("GetPSMDBOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("GetPXCOperatorVersion", mock.Anything, mock.Anything).Return("1.11.0", nil) - kubeClient.On("GetDefaultStorageClassName", mock.Anything).Return("", nil) - kubeClient.On("GetClusterType", ctx).Return(kubernetes.ClusterTypeGeneric, nil) - kubeClient.On("CreatePMMSecret", mock.Anything, mock.Anything).Return(nil, nil) - - //nolint:dupl - t.Run("BasicCreatePXCClusters", func(t *testing.T) { - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - kubeClient.On("CreateDatabaseCluster", mock.Anything).Return(nil) - - in := dbaasv1beta1.CreatePXCClusterRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: "third-pxc-test", - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 5, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 3, - MemoryBytes: 256, - }, - DiskSize: 1024 * 1024 * 1024, - Image: "path", - }, - Proxysql: &dbaasv1beta1.PXCClusterParams_ProxySQL{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 2, - MemoryBytes: 124, - }, - DiskSize: 1024 * 1024 * 1024, - }, - }, - } - - _, err := s.CreatePXCCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("CreatePXCClusterMinimumParams", func(t *testing.T) { - pxcComponents := &dbaasv1beta1.GetPXCComponentsResponse{ - Versions: []*dbaasv1beta1.OperatorVersion{ - { - Product: "pxc-operator", - Operator: "1.10.0", - Matrix: &dbaasv1beta1.Matrix{ - Pxc: map[string]*dbaasv1beta1.Component{ - "8.0.19-10.1": { - ImagePath: "percona/percona-xtradb-cluster:8.0.19-10.1", - ImageHash: "1058ae8eded735ebdf664807aad7187942fc9a1170b3fd0369574cb61206b63a", - Status: "available", - Critical: false, - Default: false, - Disabled: false, - }, - "8.0.20-11.1": { - ImagePath: "percona/percona-xtradb-cluster:8.0.20-11.1", - ImageHash: "54b1b2f5153b78b05d651034d4603a13e685cbb9b45bfa09a39864fa3f169349", - Status: "available", - Critical: false, - Default: false, - Disabled: false, - }, - "8.0.25-15.1": { - ImagePath: "percona/percona-xtradb-cluster:8.0.25-15.1", - ImageHash: "529e979c86442429e6feabef9a2d9fc362f4626146f208fbfac704e145a492dd", - Status: "recommended", - Critical: false, - Default: true, - Disabled: false, - }, - }, - }, - }, - }, - } - componentsClient.On("GetPXCComponents", ctx, mock.Anything).Return(pxcComponents, nil) - kubeClient.On("CreateDatabaseCluster", mock.Anything).Return(nil) - - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - - in := dbaasv1beta1.CreatePXCClusterRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: "fourth-pxc-test", - } - - _, err := s.CreatePXCCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("BasicGetPXCClusterCredentials", func(t *testing.T) { - name := "third-pxc-test" - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - - mockReq := &corev1.Secret{ - Data: map[string][]byte{ - "root": []byte("root_password"), - }, - } - dbMock := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Host: "hostname", - }, - Spec: dbaasv1.DatabaseSpec{ - SecretsName: fmt.Sprintf(pxcSecretNameTmpl, name), - }, - } - - kubeClient.On("GetDatabaseCluster", ctx, name).Return(dbMock, nil) - - kubeClient.On("GetSecret", ctx, mock.Anything).Return(mockReq, nil) - - in := dbaasv1beta1.GetPXCClusterCredentialsRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: name, - } - - actual, err := s.GetPXCClusterCredentials(ctx, &in) - assert.NoError(t, err) - assert.Equal(t, actual.ConnectionCredentials.Username, "root") - assert.Equal(t, actual.ConnectionCredentials.Password, "root_password") - assert.Equal(t, actual.ConnectionCredentials.Host, "hostname", name) - assert.Equal(t, actual.ConnectionCredentials.Port, int32(3306)) - }) - - t.Run("BasicGetPXCClusterCredentialsWithHost", func(t *testing.T) { // Real kubernetes will have ingress - name := "another-third-pxc-test" - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - mockReq := &corev1.Secret{ - Data: map[string][]byte{ - "root": []byte("root_password"), - }, - } - dbMock := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - }, - Spec: dbaasv1.DatabaseSpec{ - SecretsName: fmt.Sprintf(pxcSecretNameTmpl, name), - }, - Status: dbaasv1.DatabaseClusterStatus{ - Host: "amazing.com", - }, - } - - kubeClient.On("GetDatabaseCluster", ctx, name).Return(dbMock, nil) - - kubeClient.On("GetSecret", ctx, fmt.Sprintf(pxcSecretNameTmpl, name)).Return(mockReq, nil) - - in := dbaasv1beta1.GetPXCClusterCredentialsRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: name, - } - - actual, err := s.GetPXCClusterCredentials(ctx, &in) - assert.NoError(t, err) - assert.Equal(t, "root", actual.ConnectionCredentials.Username) - assert.Equal(t, "root_password", actual.ConnectionCredentials.Password) - assert.Equal(t, "amazing.com", actual.ConnectionCredentials.Host) - assert.Equal(t, int32(3306), actual.ConnectionCredentials.Port) - }) - - //nolint:dupl - t.Run("BasicUpdatePXCCluster", func(t *testing.T) { - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - - dbMock := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "first-pxc-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "pxc", - DatabaseImage: "percona/percona-xtradb-cluster:8.0.27-18.1", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "proxysql", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 15, - Size: 15, - }, - } - kubeClient.On("GetDatabaseCluster", ctx, "first-pxc-test").Return(dbMock, nil) - kubeClient.On("PatchDatabaseCluster", mock.Anything).Return(nil) - in := dbaasv1beta1.UpdatePXCClusterRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: "third-pxc-test", - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - ClusterSize: 8, - Pxc: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1, - MemoryBytes: 256, - }, - Image: "path", - }, - Proxysql: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams_ProxySQL{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1, - MemoryBytes: 124, - }, - }, - }, - } - - _, err := s.UpdatePXCCluster(ctx, &in) - assert.NoError(t, err) - }) - - //nolint:dupl - t.Run("BasicSuspendResumePXCCluster", func(t *testing.T) { - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - dbMock := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "forth-pxc-test", - }, - Spec: dbaasv1.DatabaseSpec{ - Database: "pxc", - DatabaseImage: "percona/percona-xtradb-cluster:8.0.27-18.1", - ClusterSize: 5, - DBInstance: dbaasv1.DBInstanceSpec{ - CPU: resource.MustParse("3m"), - Memory: resource.MustParse("256"), - DiskSize: resource.MustParse("1073741824"), - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "proxysql", - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2m"), - corev1.ResourceMemory: resource.MustParse("124"), - }, - }, - }, - }, - Status: dbaasv1.DatabaseClusterStatus{ - Ready: 15, - Size: 15, - }, - } - kubeClient.On("GetDatabaseCluster", ctx, "forth-pxc-test").Return(dbMock, nil) - kubeClient.On("PatchDatabaseCluster", mock.Anything).Return(nil) - - in := dbaasv1beta1.UpdatePXCClusterRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: "forth-pxc-test", - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - Suspend: true, - }, - } - _, err := s.UpdatePXCCluster(ctx, &in) - assert.NoError(t, err) - - in = dbaasv1beta1.UpdatePXCClusterRequest{ - KubernetesClusterName: pxcKubernetesClusterNameTest, - Name: "forth-pxc-test", - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - Resume: true, - }, - } - _, err = s.UpdatePXCCluster(ctx, &in) - assert.NoError(t, err) - }) - - t.Run("BasicGetXtraDBClusterResources", func(t *testing.T) { - t.Parallel() - t.Run("ProxySQL", func(t *testing.T) { - t.Parallel() - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - v := int64(1000000000) - r := int64(2000000000) - - in := dbaasv1beta1.GetPXCClusterResourcesRequest{ - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1000, - MemoryBytes: v, - }, - DiskSize: v, - }, - Proxysql: &dbaasv1beta1.PXCClusterParams_ProxySQL{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1000, - MemoryBytes: v, - }, - DiskSize: v, - }, - }, - } - - actual, err := s.GetPXCClusterResources(ctx, &in) - assert.NoError(t, err) - assert.Equal(t, uint64(r), actual.Expected.MemoryBytes) - assert.Equal(t, uint64(2000), actual.Expected.CpuM) - assert.Equal(t, uint64(r), actual.Expected.DiskSize) - }) - - t.Run("HAProxy", func(t *testing.T) { - t.Parallel() - cs := NewPXCClusterService(db, grafanaClient, componentsClient, versionService.GetVersionServiceURL()) - s := cs.(*PXCClustersService) - s.kubeStorage.clients = clients - v := int64(1000000000) - - in := dbaasv1beta1.GetPXCClusterResourcesRequest{ - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1000, - MemoryBytes: v, - }, - DiskSize: v, - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 1000, - MemoryBytes: v, - }, - }, - }, - } - - actual, err := s.GetPXCClusterResources(ctx, &in) - assert.NoError(t, err) - assert.Equal(t, uint64(2000000000), actual.Expected.MemoryBytes) - assert.Equal(t, uint64(2000), actual.Expected.CpuM) - assert.Equal(t, uint64(v), actual.Expected.DiskSize) - }) - }) -} diff --git a/managed/services/management/dbaas/template_service.go b/managed/services/management/dbaas/template_service.go deleted file mode 100644 index 527e667857..0000000000 --- a/managed/services/management/dbaas/template_service.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/services/dbaas/kubernetes" -) - -type TemplateService struct { - db *reform.DB - l *logrus.Entry - kubeStorage *KubeStorage - - dbaasv1beta1.UnimplementedTemplatesServer -} - -// NewTemplateService creates DB Clusters Service. -func NewTemplateService(db *reform.DB) dbaasv1beta1.TemplatesServer { //nolint:ireturn - l := logrus.WithField("component", "dbaas_db_cluster") - return &TemplateService{ - db: db, - l: l, - kubeStorage: NewKubeStorage(db), - } -} - -// ListTemplates returns a list of templates. -func (s TemplateService) ListTemplates(ctx context.Context, req *dbaasv1beta1.ListTemplatesRequest) (*dbaasv1beta1.ListTemplatesResponse, error) { - var clusterType string - switch req.ClusterType { - case dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PXC: - clusterType = string(kubernetes.DatabaseTypePXC) - case dbaasv1beta1.DBClusterType_DB_CLUSTER_TYPE_PSMDB: - clusterType = string(kubernetes.DatabaseTypePSMDB) - default: - return nil, status.Error(codes.InvalidArgument, "unexpected DB cluster type") - } - - kubeClient, err := s.kubeStorage.GetOrSetClient(req.KubernetesClusterName) - if err != nil { - return nil, err - } - - // XXX: using defaultNamespace because that's where the operator is - // installed, must be the same as defined in kubernetes_server.go - templates, err := kubeClient.ListTemplates(ctx, clusterType, defaultNamespace) - if err != nil { - return nil, errors.Wrap(err, "failed listing templates") - } - - return &dbaasv1beta1.ListTemplatesResponse{ - Templates: templates, - }, nil -} diff --git a/managed/services/management/dbaas/version_service_client.go b/managed/services/management/dbaas/version_service_client.go deleted file mode 100644 index db0fb82cb7..0000000000 --- a/managed/services/management/dbaas/version_service_client.go +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "encoding/json" - "io" - "net" - "net/http" - "net/url" - "strings" - "sync" - "time" - - goversion "github.com/hashicorp/go-version" - "github.com/pkg/errors" - prom "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" - - "github.com/percona/pmm/managed/utils/irt" -) - -const ( - psmdbOperator = "psmdb-operator" - pxcOperator = "pxc-operator" -) - -var errNoVersionsFound = errors.New("no versions to compare current version with found") - -// componentVersion contains info about exact component version. -type componentVersion struct { - ImagePath string `json:"imagePath"` - ImageHash string `json:"imageHash"` - Status string `json:"status"` - Critical bool `json:"critical"` -} - -type matrix struct { - Mongod map[string]componentVersion `json:"mongod"` - Pxc map[string]componentVersion `json:"pxc"` - Pmm map[string]componentVersion `json:"pmm"` - Proxysql map[string]componentVersion `json:"proxysql"` - Haproxy map[string]componentVersion `json:"haproxy"` - Backup map[string]componentVersion `json:"backup"` - Operator map[string]componentVersion `json:"operator"` - LogCollector map[string]componentVersion `json:"logCollector"` - PXCOperator map[string]componentVersion `json:"pxcOperator,omitempty"` - PSMDBOperator map[string]componentVersion `json:"psmdbOperator,omitempty"` -} - -type Version struct { - Product string `json:"product"` - ProductVersion string `json:"operator"` - Matrix matrix `json:"matrix"` -} - -// VersionServiceResponse represents response from version service API. -type VersionServiceResponse struct { - Versions []Version `json:"versions"` -} - -// componentsParams contains params to filter components in version service API. -type componentsParams struct { - product string - productVersion string - dbVersion string -} - -// cache isn't supposed to be big, so we don't clear it. -type versionResponseCache struct { - updateTime time.Time - response VersionServiceResponse -} - -// VersionServiceClient represents a client for Version Service API. -type VersionServiceClient struct { - url string - http *http.Client - irtm prom.Collector - cacheLock sync.Mutex - cache map[string]versionResponseCache - l *logrus.Entry -} - -// NewVersionServiceClient creates a new client for given version service URL. -func NewVersionServiceClient(url string) *VersionServiceClient { - var t http.RoundTripper = &http.Transport{ - DialContext: (&net.Dialer{ - Timeout: 3 * time.Second, - KeepAlive: 30 * time.Second, - }).DialContext, - MaxIdleConns: 50, - IdleConnTimeout: 90 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - } - - if logrus.GetLevel() >= logrus.TraceLevel { - t = irt.WithLogger(t, logrus.WithField("component", "versionService/client").Tracef) - } - t, irtm := irt.WithMetrics(t, "versionService_client") - - return &VersionServiceClient{ - url: url, - http: &http.Client{ - Transport: t, - }, - irtm: irtm, - cache: make(map[string]versionResponseCache), - l: logrus.WithField("component", "VersionServiceClient"), - } -} - -// Describe implements prometheus.Collector. -func (c *VersionServiceClient) Describe(ch chan<- *prom.Desc) { - c.irtm.Describe(ch) -} - -// Collect implements prometheus.Collector. -func (c *VersionServiceClient) Collect(ch chan<- prom.Metric) { - c.irtm.Collect(ch) -} - -// Matrix calls version service with given params and returns components matrix. -func (c *VersionServiceClient) Matrix(ctx context.Context, params componentsParams) (*VersionServiceResponse, error) { - paths := []string{c.url, params.product} - if params.productVersion != "" { - paths = append(paths, params.productVersion) - if params.dbVersion != "" { - paths = append(paths, params.dbVersion) - } - } - fullURL := strings.Join(paths, "/") - c.cacheLock.Lock() - defer c.cacheLock.Unlock() - if val, ok := c.cache[fullURL]; ok && val.updateTime.After(time.Now().Add(-30*time.Minute)) { - c.l.Debugf("cache for %s is used", fullURL) - return &val.response, nil - } - req, err := http.NewRequestWithContext(ctx, http.MethodGet, fullURL, nil) - if err != nil { - return nil, err - } - resp, err := c.http.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() //nolint:gosec - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, err - } - - var vsResponse VersionServiceResponse - err = json.Unmarshal(body, &vsResponse) - if err != nil { - return nil, err - } - c.cache[fullURL] = versionResponseCache{ - updateTime: time.Now(), - response: vsResponse, - } - - return &vsResponse, nil -} - -// IsDatabaseVersionSupportedByOperator returns false and err when request to version service fails. Otherwise returns boolean telling -// if given database version is supported by given operator version, error is nil in that case. -func (c *VersionServiceClient) IsDatabaseVersionSupportedByOperator(ctx context.Context, operatorType, operatorVersion, databaseVersion string) (bool, error) { - m, err := c.Matrix(ctx, componentsParams{ - product: operatorType, - productVersion: operatorVersion, - dbVersion: databaseVersion, - }) - if err != nil { - return false, err - } - return len(m.Versions) != 0, nil -} - -// SupportedOperatorVersionsList returns list of operators versions supported by certain PMM version. -func (c *VersionServiceClient) SupportedOperatorVersionsList(ctx context.Context, pmmVersion string) (map[string][]string, error) { - pmm, err := goversion.NewVersion(pmmVersion) - if err != nil { - return nil, err - } - - resp, err := c.Matrix(ctx, componentsParams{product: "pmm-server", productVersion: pmm.Core().String()}) - if err != nil { - return nil, err - } - - if len(resp.Versions) == 0 { - return make(map[string][]string), nil - } - - operatorVersions := map[string][]string{ - pxcOperator: {}, - psmdbOperator: {}, - } - - for v := range resp.Versions[0].Matrix.PXCOperator { - operatorVersions[pxcOperator] = append(operatorVersions[pxcOperator], v) - } - - for v := range resp.Versions[0].Matrix.PSMDBOperator { - operatorVersions[psmdbOperator] = append(operatorVersions[psmdbOperator], v) - } - return operatorVersions, nil -} - -func latestRecommended(m map[string]componentVersion) (*goversion.Version, error) { - if len(m) == 0 { - return nil, errNoVersionsFound - } - latest := goversion.Must(goversion.NewVersion("0.0.0")) - for version, component := range m { - parsedVersion, err := goversion.NewVersion(version) - if err != nil { - return nil, err - } - if parsedVersion.GreaterThan(latest) && component.Status == "recommended" { - latest = parsedVersion - } - } - return latest, nil -} - -// LatestOperatorVersion return latest recommended PXC and PSMDB operators for given PMM version. -func (c *VersionServiceClient) LatestOperatorVersion(ctx context.Context, pmmVersion string) (*goversion.Version, *goversion.Version, error) { - if pmmVersion == "" { - return nil, nil, errors.New("given PMM version is empty") - } - params := componentsParams{ - product: "pmm-server", - productVersion: pmmVersion, - } - resp, err := c.Matrix(ctx, params) - if err != nil { - return nil, nil, err - } - if len(resp.Versions) != 1 { - return nil, nil, nil // no deps for the PMM version passed to c.Matrix - } - pmmVersionDeps := resp.Versions[0] - latestPSMDBOperator, err := latestRecommended(pmmVersionDeps.Matrix.PSMDBOperator) - if err != nil { - return nil, nil, err - } - latestPXCOperator, err := latestRecommended(pmmVersionDeps.Matrix.PXCOperator) - return latestPXCOperator, latestPSMDBOperator, err -} - -// GetNextDatabaseImage returns image of the version that is a direct successor of currently installed version. -// It returns empty string if update is not available or error occurred. -func (c *VersionServiceClient) GetNextDatabaseImage(ctx context.Context, operatorType, operatorVersion, installedDBVersion string) (string, error) { - // Get dependencies of operator type at given version. - params := componentsParams{ - product: operatorType, - productVersion: operatorVersion, - } - matrix, err := c.Matrix(ctx, params) - if err != nil { - return "", err - } - if len(matrix.Versions) != 1 { - return "", nil - } - operatorDependencies := matrix.Versions[0] - - // Choose proper versions map. - var versions map[string]componentVersion - switch operatorType { - case psmdbOperator: - versions = operatorDependencies.Matrix.Mongod - case pxcOperator: - versions = operatorDependencies.Matrix.Pxc - default: - return "", errors.Errorf("%q operator not supported", operatorType) - } - - // Convert slice of version structs to slice of strings so it can be used in generic function next. - stringVersions := make([]string, 0, len(versions)) - for version := range versions { - stringVersions = append(stringVersions, version) - } - - // Get direct successor of installed version. - nextVersion, err := next(stringVersions, installedDBVersion) - if err != nil { - return "", err - } - if nextVersion == nil { - return "", nil - } - return versions[nextVersion.String()].ImagePath, nil -} - -// GetVersionServiceURL returns base URL for version service currently used -func (c *VersionServiceClient) GetVersionServiceURL() string { - url, err := url.Parse(c.url) - if err != nil { - c.l.Warnf("failed to parse url %q: %v", c.url, err) - return c.url - } - return url.Scheme + "://" + url.Host -} - -// NextOperatorVersion returns operator version that is direct successor of currently installed one. -// It returns nil if update is not available or error occurred. It does not take PMM version into consideration. -// We need to upgrade to current + 1 version for upgrade to be successful. So even if dbaas-controller does not support the -// operator, we need to upgrade to it on our way to supported one. -func (c *VersionServiceClient) NextOperatorVersion( - ctx context.Context, - operatorType, - installedVersion string, -) (*goversion.Version, error) { - if installedVersion == "" { - return nil, nil //nolint:nilnil - } - // Get all operator versions - params := componentsParams{ - product: operatorType, - } - matrix, err := c.Matrix(ctx, params) - if err != nil { - return nil, err - } - if len(matrix.Versions) == 0 { - return nil, nil //nolint:nilnil - } - - // Convert slice of version structs to slice of strings so it can be used in generic function next. - versions := make([]string, 0, len(matrix.Versions)) - for _, version := range matrix.Versions { - versions = append(versions, version.ProductVersion) - } - - // Find next versions if installed. - if installedVersion != "" { - return next(versions, installedVersion) - } - return nil, nil //nolint:nilnil -} - -// next direct successor of given installed version, returns nil if there is none. -// An error is returned if any of given version can't be parsed. It's nil otherwise. -func next(versions []string, installedVersion string) (*goversion.Version, error) { - if len(versions) == 0 { - return nil, errNoVersionsFound - } - // Get versions greater than currently installed one. - var nextVersion *goversion.Version - installed, err := goversion.NewVersion(installedVersion) - if err != nil { - return nil, err - } - - for _, version := range versions { - v, err := goversion.NewVersion(version) - if err != nil { - return nil, err - } - if v.GreaterThan(installed) && (nextVersion == nil || nextVersion.GreaterThan(v)) { - nextVersion = v - } - } - - return nextVersion, nil -} diff --git a/managed/services/management/dbaas/version_service_client_test.go b/managed/services/management/dbaas/version_service_client_test.go deleted file mode 100644 index 3eb41bff61..0000000000 --- a/managed/services/management/dbaas/version_service_client_test.go +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package dbaas - -import ( - "context" - "encoding/json" - "log" - "net" - "net/http" - "strings" - "testing" - "time" - - goversion "github.com/hashicorp/go-version" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestVersionServiceClient(t *testing.T) { - c := NewVersionServiceClient(versionServiceURL) - - for _, tt := range []struct { - params componentsParams - }{ - {params: componentsParams{product: psmdbOperator}}, - {params: componentsParams{product: psmdbOperator, productVersion: onePointSix}}, - {params: componentsParams{product: psmdbOperator, productVersion: onePointSeven, dbVersion: "4.2.8-8"}}, - {params: componentsParams{product: pxcOperator}}, - {params: componentsParams{product: pxcOperator, productVersion: onePointSeven}}, - {params: componentsParams{product: pxcOperator, productVersion: onePointSeven, dbVersion: "8.0.20-11.2"}}, - } { - t.Run("NotEmptyMatrix", func(t *testing.T) { - response, err := c.Matrix(context.TODO(), tt.params) - require.NoError(t, err) - require.NotEmpty(t, response.Versions) - for _, v := range response.Versions { - switch tt.params.product { - case psmdbOperator: - assert.NotEmpty(t, v.Matrix.Mongod) - case pxcOperator: - assert.NotEmpty(t, v.Matrix.Pxc) - assert.NotEmpty(t, v.Matrix.Proxysql) - } - assert.NotEmpty(t, v.Matrix.Backup) - } - }) - } -} - -type fakeLatestVersionServer struct { - response *VersionServiceResponse - components []string -} - -func (f fakeLatestVersionServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { - encoder := json.NewEncoder(w) - var response *VersionServiceResponse - var certainVersionRequested bool - var component string - for _, c := range f.components { - if strings.Contains(r.URL.Path, c) { - component = c - certainVersionRequested = strings.Contains(r.URL.Path, component+"/") - break - } - } - - switch { - case certainVersionRequested: - segments := strings.Split(r.URL.Path, "/") - version := segments[len(segments)-2] - var dbVersion string - // handle product/version/applyversion - if _, err := goversion.NewVersion(version); err == nil { - dbVersion = segments[len(segments)-1] - } else { - version = segments[len(segments)-1] - } - for _, v := range f.response.Versions { - if v.ProductVersion == version && v.Product == component { - if dbVersion != "" { - var database map[string]componentVersion - switch component { - case pxcOperator: - database = v.Matrix.Pxc - case psmdbOperator: - database = v.Matrix.Mongod - default: - panic(component + " not supported") - } - if _, ok := database[dbVersion]; !ok { - response = nil - break - } - } - response = &VersionServiceResponse{ - Versions: []Version{v}, - } - break - } - } - case component != "": - response = &VersionServiceResponse{} - for _, v := range f.response.Versions { - if v.Product == component { - response.Versions = append(response.Versions, v) - } - } - default: - panic("path " + r.URL.Path + " not expected") - } - - err := encoder.Encode(response) - if err != nil { - log.Fatal(err) - } -} - -// newFakeVersionService creates new fake version service on given port. -// It returns values based on given response but only for specified components. -func newFakeVersionService(response *VersionServiceResponse, port string, components ...string) (versionService, func(*testing.T)) { - if len(components) == 0 { - panic("failed to create fake version service, at least one component has to be given, none received") - } - var httpServer *http.Server - waitForListener := make(chan struct{}) - server := fakeLatestVersionServer{ - response: response, - components: components, - } - fakeHostAndPort := "localhost:" + port - go func() { - httpServer = &http.Server{Addr: fakeHostAndPort, Handler: server} //nolint:gosec - listener, err := net.Listen("tcp", fakeHostAndPort) - if err != nil { - log.Fatal(err) - } - close(waitForListener) - _ = httpServer.Serve(listener) - }() - <-waitForListener - - return NewVersionServiceClient("http://" + fakeHostAndPort + "/versions/v1"), func(t *testing.T) { - t.Helper() - assert.NoError(t, httpServer.Shutdown(context.TODO())) - } -} - -func TestOperatorVersionGetting(t *testing.T) { - t.Parallel() - t.Run("Invalid url", func(t *testing.T) { - t.Parallel() - c := NewVersionServiceClient("wrongschema://check.percona.com/versions/invalid") - ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) - defer cancel() - pxcOperatorVersion, psmdbOperatorVersion, err := c.LatestOperatorVersion(ctx, "2.19") - assert.Error(t, err, "err is expected") - assert.Nil(t, pxcOperatorVersion) - assert.Nil(t, psmdbOperatorVersion) - }) - response := &VersionServiceResponse{ - Versions: []Version{ - { - ProductVersion: onePointSix, - Product: pxcOperator, - }, - { - ProductVersion: onePointSeven, - Product: pxcOperator, - }, - { - ProductVersion: onePointEight, - Product: pxcOperator, - }, - - { - ProductVersion: onePointSix, - Product: psmdbOperator, - }, - { - ProductVersion: onePointSeven, - Product: psmdbOperator, - }, - { - ProductVersion: onePointEight, - Product: psmdbOperator, - }, - - { - ProductVersion: twoPointEighteen, - Product: "pmm-server", - Matrix: matrix{ - PXCOperator: map[string]componentVersion{ - onePointEight: {Status: "recommended"}, - onePointSeven: {}, - }, - PSMDBOperator: map[string]componentVersion{ - onePointTen: {Status: "available"}, - onePointNine: {Status: "recommended"}, - onePointEight: {}, - onePointSeven: {}, - }, - }, - }, - }, - } - c, cleanup := newFakeVersionService(response, "5897", "pmm-server", psmdbOperator, pxcOperator) - t.Cleanup(func() { cleanup(t) }) - t.Run("Get latest", func(t *testing.T) { - t.Parallel() - ctx := context.Background() - pxcOperatorVersion, psmdbOperatorVersion, err := c.LatestOperatorVersion(ctx, twoPointEighteen) - require.NoError(t, err, "request to fakeserver for latest version should not fail") - assert.Equal(t, onePointEight, pxcOperatorVersion.String()) - assert.Equal(t, onePointNine, psmdbOperatorVersion.String()) - }) - t.Run("Get latest, PMM version unknown by version service", func(t *testing.T) { - t.Parallel() - ctx := context.Background() - pxcOperatorVersion, psmdbOperatorVersion, err := c.LatestOperatorVersion(ctx, "2.2200.0") - require.NoError(t, err, "request to fakeserver for latest version should not fail") - assert.Nil(t, pxcOperatorVersion) - assert.Nil(t, psmdbOperatorVersion) - }) - t.Run("Get next, update not available", func(t *testing.T) { - t.Parallel() - ctx := context.Background() - pxcOperatorVersion, err := c.NextOperatorVersion(ctx, pxcOperator, onePointEight) - require.NoError(t, err, "request to fakeserver for latest version should not fail") - psmdbOperatorVersion, err := c.NextOperatorVersion(ctx, psmdbOperator, onePointEight) - require.NoError(t, err, "request to fakeserver for latest version should not fail") - assert.Nil(t, pxcOperatorVersion) - assert.Nil(t, psmdbOperatorVersion) - }) - t.Run("Get next, update available", func(t *testing.T) { - t.Parallel() - ctx := context.Background() - pxcOperatorVersion, err := c.NextOperatorVersion(ctx, pxcOperator, onePointSix) - require.NoError(t, err, "request to fakeserver for latest version should not fail") - psmdbOperatorVersion, err := c.NextOperatorVersion(ctx, psmdbOperator, onePointSeven) - require.NoError(t, err, "request to fakeserver for latest version should not fail") - assert.Equal(t, onePointSeven, pxcOperatorVersion.String()) - assert.Equal(t, onePointEight, psmdbOperatorVersion.String()) - }) -} - -const ( - pxcImage = "percona/percona-xtradb-cluster" - psmdbImage = "percona/percona-server-mongodb" -) - -func TestGetNextDatabaseVersion(t *testing.T) { //nolint:tparallel - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100) - response := &VersionServiceResponse{ - Versions: []Version{ - { - ProductVersion: "1.8.0", - Product: pxcOperator, - Matrix: matrix{ - Pxc: map[string]componentVersion{ - "5.7.26-31.37": {ImagePath: pxcImage + ":5.7.26-31.37"}, - "5.7.29-31.43": {ImagePath: pxcImage + ":5.7.29-31.43"}, - "5.7.31-31.45.2": {ImagePath: pxcImage + ":5.7.31-31.45.2"}, - }, - }, - }, - { - ProductVersion: "1.8.0", - Product: psmdbOperator, - Matrix: matrix{ - Mongod: map[string]componentVersion{ - "3.6.19-7.0": {ImagePath: psmdbImage + ":3.6.19-7.0"}, - "3.6.18-5.0": {ImagePath: psmdbImage + ":3.6.18-5.0"}, - "3.6.23-13.0": {ImagePath: psmdbImage + ":3.6.23-13.0"}, - }, - }, - }, - }, - } - c, cleanup := newFakeVersionService(response, "5899", pxcOperator, psmdbOperator) - t.Cleanup(func() { cleanup(t); cancel() }) - t.Run("Update available", func(t *testing.T) { - t.Parallel() - nextVersionImage, err := c.GetNextDatabaseImage(ctx, pxcOperator, "1.8.0", "5.7.26-31.37") - require.NoError(t, err) - assert.Equal(t, pxcImage+":5.7.29-31.43", nextVersionImage) - - nextVersionImage, err = c.GetNextDatabaseImage(ctx, psmdbOperator, "1.8.0", "3.6.19-7.0") - require.NoError(t, err) - assert.Equal(t, psmdbImage+":3.6.23-13.0", nextVersionImage) - - // older than supported version of database - nextVersionImage, err = c.GetNextDatabaseImage(ctx, pxcOperator, "1.8.0", "5.0.0") - require.NoError(t, err) - assert.Equal(t, pxcImage+":5.7.26-31.37", nextVersionImage) - }) - t.Run("Update not available", func(t *testing.T) { - t.Parallel() - nextVersionImage, err := c.GetNextDatabaseImage(ctx, pxcOperator, "1.8.0", "5.7.31-31.45.2") - require.NoError(t, err) - assert.Equal(t, "", nextVersionImage) - - nextVersionImage, err = c.GetNextDatabaseImage(ctx, psmdbOperator, "1.8.0", "3.6.23-13.0") - require.NoError(t, err) - assert.Equal(t, "", nextVersionImage) - - // more up to date than is supported - nextVersionImage, err = c.GetNextDatabaseImage(ctx, psmdbOperator, "1.8.0", "4.0.0") - require.NoError(t, err) - assert.Equal(t, "", nextVersionImage) - }) -} diff --git a/managed/services/server/server.go b/managed/services/server/server.go index 258fb7647f..51cb30a2ed 100644 --- a/managed/services/server/server.go +++ b/managed/services/server/server.go @@ -62,7 +62,6 @@ type Server struct { awsInstanceChecker *AWSInstanceChecker grafanaClient grafanaClient rulesService rulesService - dbaasInitializer dbaasInitializer emailer emailer l *logrus.Entry @@ -78,11 +77,6 @@ type Server struct { serverpb.UnimplementedServerServer } -type dbaasInitializer interface { - Enable(ctx context.Context) error - Disable(ctx context.Context) error -} - type pmmUpdateAuth struct { AuthToken string `json:"auth_token"` } @@ -102,7 +96,6 @@ type Params struct { AwsInstanceChecker *AWSInstanceChecker GrafanaClient grafanaClient RulesService rulesService - DBaaSInitializer dbaasInitializer Emailer emailer } @@ -128,7 +121,6 @@ func NewServer(params *Params) (*Server, error) { awsInstanceChecker: params.AwsInstanceChecker, grafanaClient: params.GrafanaClient, rulesService: params.RulesService, - dbaasInitializer: params.DBaaSInitializer, emailer: params.Emailer, l: logrus.WithField("component", "server"), pmmUpdateAuthFile: path, @@ -445,7 +437,6 @@ func (s *Server) convertSettings(settings *models.Settings, connectedToPlatform AwsPartitions: settings.AWSPartitions, AlertManagerUrl: settings.AlertManagerURL, SttEnabled: !settings.SaaS.STTDisabled, - DbaasEnabled: settings.DBaaS.Enabled, AzurediscoverEnabled: settings.Azurediscover.Enabled, PmmPublicAddress: settings.PMMPublicAddress, @@ -546,11 +537,6 @@ func (s *Server) validateChangeSettingsRequest(ctx context.Context, req *serverp return status.Error(codes.FailedPrecondition, "Azure Discover is enabled via ENABLE_AZUREDISCOVER environment variable.") } - // ignore req.DisableDbaas when DBaaS is enabled through env var. - if req.DisableDbaas && s.envSettings.EnableDBaaS { - return status.Error(codes.FailedPrecondition, "DBaaS is enabled via ENABLE_DBAAS or via deprecated PERCONA_TEST_DBAAS environment variable.") - } - if !canUpdateDurationSetting(metricsRes.GetHr().AsDuration(), s.envSettings.MetricsResolutions.HR) { return status.Error(codes.FailedPrecondition, "High resolution for metrics is set via METRICS_RESOLUTION_HR (or METRICS_RESOLUTION) environment variable.") } @@ -622,9 +608,6 @@ func (s *Server) ChangeSettings(ctx context.Context, req *serverpb.ChangeSetting EnableBackupManagement: req.EnableBackupManagement, DisableBackupManagement: req.DisableBackupManagement, - EnableDBaaS: req.EnableDbaas, - DisableDBaaS: req.DisableDbaas, - EnableAccessControl: req.EnableAccessControl, DisableAccessControl: req.DisableAccessControl, } @@ -731,22 +714,6 @@ func (s *Server) ChangeSettings(ctx context.Context, req *serverpb.ChangeSetting } } - // When DBaaS is enabled, connect to the dbaas-controller API. - if !oldSettings.DBaaS.Enabled && newSettings.DBaaS.Enabled { - err := s.dbaasInitializer.Enable(ctx) - if err != nil { - return nil, err - } - } - - // When DBaaS is disabled, disconnect from the dbaas-controller API. - if oldSettings.DBaaS.Enabled && !newSettings.DBaaS.Enabled { - err := s.dbaasInitializer.Disable(ctx) - if err != nil { - return nil, err - } - } - if isAgentsStateUpdateNeeded(req.MetricsResolutions) { if err := s.agentsState.UpdateAgentsState(ctx); err != nil { return nil, err diff --git a/managed/services/server/server_test.go b/managed/services/server/server_test.go index 004df80387..a1ca570718 100644 --- a/managed/services/server/server_test.go +++ b/managed/services/server/server_test.go @@ -234,7 +234,6 @@ func TestServer(t *testing.T) { server := newServer(t) server.UpdateSettingsFromEnv([]string{ - "ENABLE_DBAAS=1", "ENABLE_ALERTING=1", "ENABLE_AZUREDISCOVER=1", }) @@ -250,7 +249,6 @@ func TestServer(t *testing.T) { settings, err := server.GetSettings(ctx, &serverpb.GetSettingsRequest{}) require.NoError(t, err) - assert.True(t, settings.Settings.DbaasEnabled) assert.True(t, settings.Settings.AlertingEnabled) assert.True(t, settings.Settings.AzurediscoverEnabled) }) diff --git a/managed/services/supervisord/logs_test.go b/managed/services/supervisord/logs_test.go index 118a42bac1..e1dbe08cc7 100644 --- a/managed/services/supervisord/logs_test.go +++ b/managed/services/supervisord/logs_test.go @@ -168,10 +168,6 @@ func TestFiles(t *testing.T) { continue } - if f.Name == "dbaas-controller.log" { - continue - } - if f.Name == "supervisorctl_status.log" { // FIXME: this fails following the transition to EL9 continue @@ -209,9 +205,6 @@ func TestZip(t *testing.T) { "systemctl_status.log", "prometheus.base.yml", } - if os.Getenv("ENABLE_DBAAS") == "1" { - additionalFiles = append(additionalFiles, "dbaas-controller.log") - } // zip file includes client files expected := append(commonExpectedFiles, additionalFiles...) //nolint:gocritic diff --git a/managed/services/supervisord/supervisord.go b/managed/services/supervisord/supervisord.go index 40f7e21061..4f51fb0a86 100644 --- a/managed/services/supervisord/supervisord.go +++ b/managed/services/supervisord/supervisord.go @@ -433,7 +433,6 @@ func (s *Service) marshalConfig(tmpl *template.Template, settings *models.Settin "DataRetentionDays": int(settings.DataRetention.Hours() / 24), "VMAlertFlags": s.vmParams.VMAlertFlags, "VMDBCacheDisable": !settings.VictoriaMetrics.CacheEnabled, - "PerconaTestDbaas": settings.DBaaS.Enabled, "ClickhouseAddr": clickhouseAddr, "ClickhouseDataSourceAddr": clickhouseDataSourceAddr, "ClickhouseDatabase": clickhouseDatabase, @@ -605,22 +604,6 @@ var interfaceToBind = envvars.GetInterfaceToBind() //nolint:lll var templates = template.Must(template.New("").Option("missingkey=error").Parse(` -{{define "dbaas-controller"}} -[program:dbaas-controller] -priority = 6 -command = /usr/sbin/dbaas-controller -user = pmm -autorestart = {{ .PerconaTestDbaas }} -autostart = {{ .PerconaTestDbaas }} -startretries = 10 -startsecs = 1 -stopsignal = TERM -stopwaitsecs = 300 -stdout_logfile = /srv/logs/dbaas-controller.log -stdout_logfile_maxbytes = 10MB -stdout_logfile_backups = 3 -redirect_stderr = true -{{end}} {{define "prometheus"}} [program:prometheus] diff --git a/managed/services/supervisord/supervisord_test.go b/managed/services/supervisord/supervisord_test.go index ed6e515ff5..0bdf2ab1f3 100644 --- a/managed/services/supervisord/supervisord_test.go +++ b/managed/services/supervisord/supervisord_test.go @@ -19,7 +19,6 @@ import ( "os" "path/filepath" "testing" - "text/template" "time" "github.com/AlekSi/pointer" @@ -46,9 +45,6 @@ func TestConfig(t *testing.T) { for _, tmpl := range templates.Templates() { n := tmpl.Name() - if n == "" || n == "dbaas-controller" { - continue - } tmpl := tmpl t.Run(tmpl.Name(), func(t *testing.T) { @@ -62,53 +58,6 @@ func TestConfig(t *testing.T) { } } -func TestDBaaSController(t *testing.T) { - t.Parallel() - gRPCMessageMaxSize := uint32(100 * 1024 * 1024) - - pmmUpdateCheck := NewPMMUpdateChecker(logrus.WithField("component", "supervisord/pmm-update-checker_logs")) - configDir := filepath.Join("..", "..", "testdata", "supervisord.d") - vmParams := &models.VictoriaMetricsParams{} - s := New(configDir, pmmUpdateCheck, vmParams, models.PGParams{}, gRPCMessageMaxSize) - - var tp *template.Template - for _, tmpl := range templates.Templates() { - if tmpl.Name() == "dbaas-controller" { - tp = tmpl - break - } - } - - tests := []struct { - Enabled bool - File string - }{ - { - Enabled: true, - File: "dbaas-controller_enabled", - }, - { - Enabled: false, - File: "dbaas-controller_disabled", - }, - } - for _, test := range tests { - st := models.Settings{ - DBaaS: struct { - Enabled bool `json:"enabled"` - }{ - Enabled: test.Enabled, - }, - } - - expected, err := os.ReadFile(filepath.Join(configDir, test.File+".ini")) //nolint:gosec - require.NoError(t, err) - actual, err := s.marshalConfig(tp, &st, nil) - require.NoError(t, err) - assert.Equal(t, string(expected), string(actual)) - } -} - func TestParseStatus(t *testing.T) { t.Parallel() diff --git a/managed/services/telemetry/config.default.yml b/managed/services/telemetry/config.default.yml index 74924104e0..9c49134f0d 100644 --- a/managed/services/telemetry/config.default.yml +++ b/managed/services/telemetry/config.default.yml @@ -56,15 +56,6 @@ telemetry: - metric_name: "pmm_server_alert_manager_enabled" column: "alert_manager_set" - - - id: PMMServerDBaaSEnabled - source: PMMDB_SELECT - query: (CASE WHEN dbaas->'enabled' = 'true' THEN '1' ELSE '0' END) AS dbaas_enabled FROM settings s, jsonb_extract_path(s.settings, 'dbaas') AS dbaas - summary: "PMM Server DBaaS feature enabled/disabled" - data: - - metric_name: "pmm_server_dbaas_enabled" - column: "dbaas_enabled" - - id: PMMServerAccessControlEnabled source: PMMDB_SELECT query: (CASE WHEN access_control->'enabled' = 'true' THEN '1' ELSE '0' END) AS access_control_enabled FROM settings s, jsonb_extract_path(s.settings, 'access_control') AS access_control @@ -666,32 +657,6 @@ telemetry: - metric_name: "pmm_server_node_os_pretty_name_and_version" label: "pretty_name" - # DBaaS - - id: DBaaSServicesCount - source: PMMDB_SELECT - query: count(service_name) AS count from services where service_name ~ concat('default-', cluster,'-(pxc|rs0)-\d+') - summary: "DBaaS Services Count" - data: - - metric_name: "dbaas_services_count" - column: "count" - - - id: DBaaSClustersCount - source: PMMDB_SELECT - query: count(distinct cluster) AS count from services where service_name ~ concat('default-', cluster,'-(pxc|rs0)-\d+') - summary: "DBaaS Clusters Count" - data: - - metric_name: "dbaas_clusters_count" - column: "count" - - # K8s Clusters - - id: K8sClustersCount - source: PMMDB_SELECT - query: count(*) AS count FROM kubernetes_clusters - summary: "K8s Clusters Count" - data: - - metric_name: "k8s_clusters_count" - column: "count" - # Advisor - id: AdvisorChecksAvailable source: VM @@ -870,31 +835,31 @@ telemetry: j.job_status bm_job_status, coalesce(bl_backup.type, bl_restore.type, 'N/A') bm_location_type, count(*) count - from (select type, - "data"->"type"->>'mode' mod, - "data"->"type"->>'data_model' dm, + from (select type, + "data"->"type"->>'mode' mod, + "data"->"type"->>'data_model' dm, "data"->"type"->>'artifact_id' artifact_id, "data"->"type"->>'restore_id' restore_id, case error when '' then 'success' else 'failed' end job_status - from jobs - where created_at BETWEEN NOW() - INTERVAL '24 HOURS' AND NOW() + from jobs + where created_at BETWEEN NOW() - INTERVAL '24 HOURS' AND NOW() group by type, mod, dm, artifact_id, restore_id, job_status) j left join artifacts a_backup on a_backup.id = j.artifact_id left join backup_locations bl_backup - on bl_backup.id = a_backup.location_id + on bl_backup.id = a_backup.location_id left join restore_history rh on rh.id = j.restore_id left join artifacts a_restore on a_restore.id = rh.artifact_id left join backup_locations bl_restore on bl_restore.id = a_restore.location_id - group by - bm_job_type, - bm_backup_mode, - bm_data_model, - bm_job_run_type, - bm_job_status, + group by + bm_job_type, + bm_backup_mode, + bm_data_model, + bm_job_run_type, + bm_job_status, bm_location_type transform: type: JSON diff --git a/managed/services/victoriametrics/prometheus.go b/managed/services/victoriametrics/prometheus.go index 304c20742c..a7a45eb155 100644 --- a/managed/services/victoriametrics/prometheus.go +++ b/managed/services/victoriametrics/prometheus.go @@ -204,14 +204,10 @@ func AddScrapeConfigs(l *logrus.Entry, cfg *config.Config, q *reform.Querier, s } // AddInternalServicesToScrape adds internal services metrics to scrape targets. -func AddInternalServicesToScrape(cfg *config.Config, s models.MetricsResolutions, dbaas bool) { +func AddInternalServicesToScrape(cfg *config.Config, s models.MetricsResolutions) { cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForAlertmanager(s.MR), scrapeConfigForGrafana(s.MR), scrapeConfigForPMMManaged(s.MR), scrapeConfigForQANAPI2(s.MR)) - // TODO Refactor to remove boolean positional parameter when Prometheus is removed - if dbaas { - cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForDBaaSController(s.MR)) - } } diff --git a/managed/services/victoriametrics/scrape_configs.go b/managed/services/victoriametrics/scrape_configs.go index 977a7b5dbd..247f37f34e 100644 --- a/managed/services/victoriametrics/scrape_configs.go +++ b/managed/services/victoriametrics/scrape_configs.go @@ -107,21 +107,6 @@ func scrapeConfigForQANAPI2(interval time.Duration) *config.ScrapeConfig { } } -func scrapeConfigForDBaaSController(interval time.Duration) *config.ScrapeConfig { - return &config.ScrapeConfig{ - JobName: "dbaas-controller", - ScrapeInterval: config.Duration(interval), - ScrapeTimeout: scrapeTimeout(interval), - MetricsPath: "/debug/metrics", - ServiceDiscoveryConfig: config.ServiceDiscoveryConfig{ - StaticConfigs: []*config.Group{{ - Targets: []string{"127.0.0.1:20203"}, - Labels: map[string]string{"instance": "pmm-server"}, - }}, - }, - } -} - func mergeLabels(node *models.Node, service *models.Service, agent *models.Agent) (map[string]string, error) { res, err := models.MergeLabels(node, service, agent) if err != nil { diff --git a/managed/services/victoriametrics/victoriametrics.go b/managed/services/victoriametrics/victoriametrics.go index 13a468be87..81ca55d1f4 100644 --- a/managed/services/victoriametrics/victoriametrics.go +++ b/managed/services/victoriametrics/victoriametrics.go @@ -332,7 +332,7 @@ func (svc *Service) populateConfig(cfg *config.Config) error { } cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForVictoriaMetrics(s.HR)) cfg.ScrapeConfigs = append(cfg.ScrapeConfigs, scrapeConfigForVMAlert(s.HR)) - AddInternalServicesToScrape(cfg, s, settings.DBaaS.Enabled) + AddInternalServicesToScrape(cfg, s) return AddScrapeConfigs(svc.l, cfg, tx.Querier, &s, nil, false) }) } diff --git a/managed/testdata/supervisord.d/dbaas-controller_disabled.ini b/managed/testdata/supervisord.d/dbaas-controller_disabled.ini deleted file mode 100644 index 49e1216a58..0000000000 --- a/managed/testdata/supervisord.d/dbaas-controller_disabled.ini +++ /dev/null @@ -1,16 +0,0 @@ -; Managed by pmm-managed. DO NOT EDIT. - -[program:dbaas-controller] -priority = 6 -command = /usr/sbin/dbaas-controller -user = pmm -autorestart = false -autostart = false -startretries = 10 -startsecs = 1 -stopsignal = TERM -stopwaitsecs = 300 -stdout_logfile = /srv/logs/dbaas-controller.log -stdout_logfile_maxbytes = 10MB -stdout_logfile_backups = 3 -redirect_stderr = true diff --git a/managed/testdata/supervisord.d/dbaas-controller_enabled.ini b/managed/testdata/supervisord.d/dbaas-controller_enabled.ini deleted file mode 100644 index a2d8f7d51f..0000000000 --- a/managed/testdata/supervisord.d/dbaas-controller_enabled.ini +++ /dev/null @@ -1,16 +0,0 @@ -; Managed by pmm-managed. DO NOT EDIT. - -[program:dbaas-controller] -priority = 6 -command = /usr/sbin/dbaas-controller -user = pmm -autorestart = true -autostart = true -startretries = 10 -startsecs = 1 -stopsignal = TERM -stopwaitsecs = 300 -stdout_logfile = /srv/logs/dbaas-controller.log -stdout_logfile_maxbytes = 10MB -stdout_logfile_backups = 3 -redirect_stderr = true diff --git a/managed/utils/envvars/parser.go b/managed/utils/envvars/parser.go index 4bd4fc67f2..37607de517 100644 --- a/managed/utils/envvars/parser.go +++ b/managed/utils/envvars/parser.go @@ -31,14 +31,11 @@ import ( ) const ( - defaultPlatformAddress = "https://check.percona.com" - envPlatformAddress = "PERCONA_TEST_PLATFORM_ADDRESS" - envPlatformInsecure = "PERCONA_TEST_PLATFORM_INSECURE" - envPlatformPublicKey = "PERCONA_TEST_PLATFORM_PUBLIC_KEY" - evnInterfaceToBind = "PERCONA_TEST_INTERFACE_TO_BIND" - // TODO REMOVE PERCONA_TEST_DBAAS IN FUTURE RELEASES. - envTestDbaas = "PERCONA_TEST_DBAAS" - envEnableDbaas = "ENABLE_DBAAS" + defaultPlatformAddress = "https://check.percona.com" + envPlatformAddress = "PERCONA_TEST_PLATFORM_ADDRESS" + envPlatformInsecure = "PERCONA_TEST_PLATFORM_INSECURE" + envPlatformPublicKey = "PERCONA_TEST_PLATFORM_PUBLIC_KEY" + evnInterfaceToBind = "PERCONA_TEST_INTERFACE_TO_BIND" envEnableAccessControl = "ENABLE_RBAC" envPlatformAPITimeout = "PERCONA_PLATFORM_API_TIMEOUT" defaultPlatformAPITimeout = 30 * time.Second @@ -63,7 +60,6 @@ func (e InvalidDurationError) Error() string { return string(e) } // - DATA_RETENTION is the duration of how long keep time-series data in ClickHouse; // - ENABLE_ALERTING enables Integrated Alerting; // - ENABLE_AZUREDISCOVER enables Azure Discover; -// - ENABLE_DBAAS enables Database as a Service feature, it's a replacement for deprecated PERCONA_TEST_DBAAS which still works but will be removed eventually; // - ENABLE_RBAC enables Access control; // - the environment variables prefixed with GF_ passed as related to Grafana. // - the environment variables relating to proxies @@ -165,18 +161,6 @@ func ParseEnvVars(envs []string) (envSettings *models.ChangeSettingsParams, errs case "PMM_INSTALL_METHOD": continue - case envEnableDbaas, envTestDbaas: - envSettings.EnableDBaaS, err = strconv.ParseBool(v) - if err != nil { - err = fmt.Errorf("invalid value %q for environment variable %q", v, k) - errs = append(errs, err) - continue - } - envSettings.DisableDBaaS = !envSettings.EnableDBaaS - if k == envTestDbaas { - warns = append(warns, fmt.Sprintf("environment variable %q IS DEPRECATED AND WILL BE REMOVED, USE %q INSTEAD", envTestDbaas, envEnableDbaas)) - } - case envEnableAccessControl: envSettings.EnableAccessControl, err = strconv.ParseBool(v) if err != nil { diff --git a/migrate-dbaas.py b/migrate-dbaas.py deleted file mode 100644 index 1b7b56adf4..0000000000 --- a/migrate-dbaas.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env python3 -import json -import subprocess - - -def get_clusters(cluster_type): - output = subprocess.check_output(["kubectl", "get", cluster_type, "-o", "json"]) - return json.loads(output) - - -def create_cluster(cluster): - cluster_name = cluster["metadata"]["name"] - p = subprocess.Popen(["kubectl", "apply", "-f", "-"], stdin=subprocess.PIPE) - p.communicate(json.dumps(cluster).encode('utf-8')) - output = subprocess.check_output(["kubectl", "get", "db", cluster_name, "-o", "json"]) - uid = json.loads(output).get("metadata", {}).get("uid") - meta_patch = { - "metadata": { - "ownerReferences": [ - { - "apiVersion": "dbaas.percona.com/v1", - "blockOwnerDeletion": True, - "controller": True, - "kind": "DatabaseCluster", - "name": cluster_name, - "uid": uid, - }, - ], - } - } - cluster_type = cluster["spec"]["databaseType"] - - print(subprocess.check_output(["kubectl", "patch", f"{cluster_type}/{cluster_name}","--type", "merge", "-p", json.dumps(meta_patch)])) - - - -def strip_none(data): - if isinstance(data, dict): - return {k:strip_none(v) for k, v in data.items() if k is not None and v is not None} - elif isinstance(data, list): - return [strip_none(item) for item in data if item is not None] - elif isinstance(data, tuple): - return tuple(strip_none(item) for item in data if item is not None) - elif isinstance(data, set): - return {strip_none(item) for item in data if item is not None} - else: - return data - - -def convert_pxc(cluster): - database_cluster = { - "apiVersion": "dbaas.percona.com/v1", - "kind": "DatabaseCluster", - "metadata": { - "name": cluster.get("metadata", {}).get("name", ""), - }, - "spec": { - "databaseType": "pxc", - "databaseConfig": cluster.get("spec", {}).get("pxc", {}).get("configuration", ""), - "databaseImage": cluster.get("spec", {}).get("pxc", {}).get("image", ""), - "secretsName": cluster.get("spec", {}).get("secretsName", ""), - "pause": cluster.get("spec", {}).get("pxc", {}).get("pause", None), - "clusterSize": cluster.get("spec", {}).get("pxc", {}).get("size"), - "loadBalancer": { - }, - "monitoring": {}, - "dbInstance": {} - } - } - if cluster.get("spec", {}).get("haproxy", None): - lb = cluster.get("spec", {}).get("haproxy", {}) - database_cluster["spec"]["loadBalancer"] = { - "type": "haproxy", - "exposeType": lb.get("serviceType", None), - "image": lb.get("image"), - "size": lb.get("size"), - "configuration": lb.get("configuration", None), - "annotations": lb.get("annotations", None), - "trafficPolicy": lb.get("externalTrafficPolicy", None), - "resources": lb.get("resources"), - } - - if cluster.get("spec", {}).get("proxysql", None): - lb = cluster.get("spec", {}).get("proxysql", {}) - database_cluster["spec"]["loadBalancer"] = { - "type": "proxysql", - "exposeType": lb.get("serviceType", None), - "image": lb.get("image"), - "size": lb.get("size"), - "configuration": lb.get("configuration", None), - "annotations": lb.get("annotations", None), - "trafficPolicy": lb.get("externalTrafficPolicy", None), - "resources": lb.get("resources"), - } - if cluster.get("spec", {}).get("pmm", {}).get("enabled", False): - mon = cluster.get("spec", {}).get("pmm", {}) - database_cluster["spec"]["monitoring"] = { - "pmm" : { - "image": mon.get("image"), - "serverHost": mon.get("serverHost", None), - "serverUser": mon.get("serverUser", None), - "publicAddress": mon.get("serverHost", None), - "login": mon.get("serverUser", None), - "password": mon.get("password", None), - }, - "resources": mon.get("resources"), - - } - volume_spec = cluster.get("spec", {}).get("pxc", {}).get("volumeSpec", {}).get("persistentVolumeClaim", {}) - limits = cluster.get("spec", {}).get("pxc", {}).get("resources", {}).get("limits", {}) - database_cluster["spec"]["dbInstance"] = { - "cpu": limits.get("cpu"), - "memory": limits.get("memory"), - "diskSize": volume_spec.get("resources", {}).get("requests", {}).get("storage"), - "storageClassName": volume_spec.get("storageClassName", None) - } - - - return database_cluster - - -def convert_psmdb(cluster): - database_cluster = { - "apiVersion": "dbaas.percona.com/v1", - "kind": "DatabaseCluster", - "metadata": { - "name": cluster.get("metadata", {}).get("name", ""), - }, - "spec": { - "databaseType": "psmdb", - "databaseImage": cluster.get("spec", {}).get("image"), - "secretsName": cluster.get("spec", {}).get("secrets", {}).get("users"), - "pause": cluster.get("spec", {}).get("pause", None), - "loadBalancer": { - }, - "monitoring": {}, - "dbInstance": {} - } - } - replsets = cluster.get("spec", {}).get("replsets", []) - - if len(replsets) == 0: - print("Cluster has no replicasets configured. Skipping") - return - - database_cluster["spec"]["databaseConfig"] = replsets[0].get("configuration", "") - database_cluster["spec"]["clusterSize"] = replsets[0].get("size") - - mongos = cluster.get("spec", {}).get("sharding", {}).get("mongos", None) - if mongos: - database_cluster["spec"]["loadBalancer"] = { - "type": "mongos", - "exposeType": mongos.get("expose", {}).get("exposeType", None), - "image": mongos.get("image"), - "size": mongos.get("size"), - "configuration": mongos.get("configuration", None), - "annotations": mongos.get("expose", {}).get("serviceAnnotations", None), - "loadBalancerSourceRanges": mongos.get("expose", {}).get("loadBalancerSourceRanges", None), - "trafficPolicy": mongos.get("externalTrafficPolicy", None), - "resources": mongos.get("resources"), - } - if cluster.get("spec", {}).get("pmm", {}).get("enabled", False): - mon = cluster.get("spec", {}).get("pmm", {}) - database_cluster["spec"]["monitoring"] = { - "pmm" : { - "image": mon.get("image"), - "serverHost": mon.get("serverHost", None), - "serverUser": mon.get("serverUser", None), - "publicAddress": mon.get("serverHost", None), - "login": mon.get("serverUser", None), - "password": mon.get("password", None), - }, - "resources": mon.get("resources"), - - } - volume_spec = replsets[0].get("volumeSpec", {}).get("persistentVolumeClaim", {}) - limits = replsets[0].get("resources", {}).get("limits", {}) - database_cluster["spec"]["dbInstance"] = { - "cpu": limits.get("cpu"), - "memory": limits.get("memory"), - "diskSize": volume_spec.get("resources", {}).get("requests", {}).get("storage"), - "storageClassName": volume_spec.get("storageClassName", None) - } - - - return database_cluster - - -if __name__ == '__main__': - clusters = [] - for cluster in get_clusters("pxc").get("items", []): - del cluster["status"] - clusters.append(convert_pxc(cluster)) - - for cluster in get_clusters("psmdb").get("items", []): - del cluster["status"] - clusters.append(convert_psmdb(cluster)) - - for cluster in clusters: - create_cluster(strip_none(cluster)) From cd285e615e3ff51451b705ba655ddd89a3e79109 Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 13:49:35 +0600 Subject: [PATCH 02/11] EVEREST-287 Updated files --- Makefile.include | 4 - api-tests/server/logs_test.go | 6 - api/agentlocalpb/agentlocal.pb.go | 35 +- api/agentlocalpb/agentlocal.pb.gw.go | 32 +- api/agentlocalpb/agentlocal.swagger.json | 289 ++ api/agentlocalpb/agentlocal_grpc.pb.go | 5 +- .../client/agent_local/reload_parameters.go | 2 + .../client/agent_local/reload_responses.go | 9 +- .../client/agent_local/status2_parameters.go | 3 + .../client/agent_local/status2_responses.go | 16 +- .../client/agent_local/status_parameters.go | 2 + .../client/agent_local/status_responses.go | 17 +- api/agentpb/agent.pb.go | 223 +- api/agentpb/agent.pb.validate.go | 3 +- api/agentpb/agent.swagger.json | 2478 ++++++++++++ api/agentpb/agent_grpc.pb.go | 4 +- api/agentpb/collector.pb.go | 41 +- api/agentpb/collector.swagger.json | 50 + api/inventorypb/agent_status.pb.go | 16 +- api/inventorypb/agent_status.swagger.json | 44 + api/inventorypb/agents.pb.go | 236 +- api/inventorypb/agents.pb.gw.go | 140 +- api/inventorypb/agents.swagger.json | 3567 +++++++++++++++++ api/inventorypb/agents_grpc.pb.go | 34 +- .../add_azure_database_exporter_parameters.go | 2 + .../add_azure_database_exporter_responses.go | 13 +- .../add_external_exporter_parameters.go | 2 + .../agents/add_external_exporter_responses.go | 13 +- .../add_mongo_db_exporter_parameters.go | 2 + .../agents/add_mongo_db_exporter_responses.go | 13 +- .../add_my_s_q_ld_exporter_parameters.go | 2 + .../add_my_s_q_ld_exporter_responses.go | 13 +- .../agents/add_node_exporter_parameters.go | 2 + .../agents/add_node_exporter_responses.go | 13 +- .../client/agents/add_pmm_agent_parameters.go | 2 + .../client/agents/add_pmm_agent_responses.go | 13 +- .../add_postgres_exporter_parameters.go | 2 + .../agents/add_postgres_exporter_responses.go | 13 +- .../add_proxy_sql_exporter_parameters.go | 2 + .../add_proxy_sql_exporter_responses.go | 13 +- ..._qan_mongo_db_profiler_agent_parameters.go | 2 + ...d_qan_mongo_db_profiler_agent_responses.go | 13 +- ...qan_my_sql_perf_schema_agent_parameters.go | 2 + ..._qan_my_sql_perf_schema_agent_responses.go | 13 +- ...add_qan_my_sql_slowlog_agent_parameters.go | 2 + .../add_qan_my_sql_slowlog_agent_responses.go | 13 +- ...re_sql_pg_stat_monitor_agent_parameters.go | 2 + ...gre_sql_pg_stat_monitor_agent_responses.go | 13 +- ...tgre_sql_pg_statements_agent_parameters.go | 2 + ...stgre_sql_pg_statements_agent_responses.go | 13 +- .../agents/add_rds_exporter_parameters.go | 2 + .../agents/add_rds_exporter_responses.go | 13 +- ...ange_azure_database_exporter_parameters.go | 2 + ...hange_azure_database_exporter_responses.go | 15 +- .../change_external_exporter_parameters.go | 2 + .../change_external_exporter_responses.go | 15 +- .../change_mongo_db_exporter_parameters.go | 2 + .../change_mongo_db_exporter_responses.go | 15 +- .../change_my_s_q_ld_exporter_parameters.go | 2 + .../change_my_s_q_ld_exporter_responses.go | 15 +- .../agents/change_node_exporter_parameters.go | 2 + .../agents/change_node_exporter_responses.go | 15 +- .../change_postgres_exporter_parameters.go | 2 + .../change_postgres_exporter_responses.go | 15 +- .../change_proxy_sql_exporter_parameters.go | 2 + .../change_proxy_sql_exporter_responses.go | 15 +- ..._qan_mongo_db_profiler_agent_parameters.go | 2 + ...e_qan_mongo_db_profiler_agent_responses.go | 15 +- ...qan_my_sql_perf_schema_agent_parameters.go | 2 + ..._qan_my_sql_perf_schema_agent_responses.go | 15 +- ...nge_qan_my_sql_slowlog_agent_parameters.go | 2 + ...ange_qan_my_sql_slowlog_agent_responses.go | 15 +- ...re_sql_pg_stat_monitor_agent_parameters.go | 2 + ...gre_sql_pg_stat_monitor_agent_responses.go | 15 +- ...tgre_sql_pg_statements_agent_parameters.go | 2 + ...stgre_sql_pg_statements_agent_responses.go | 15 +- .../agents/change_rds_exporter_parameters.go | 2 + .../agents/change_rds_exporter_responses.go | 15 +- .../agents/get_agent_logs_parameters.go | 2 + .../client/agents/get_agent_logs_responses.go | 11 +- .../client/agents/get_agent_parameters.go | 2 + .../json/client/agents/get_agent_responses.go | 41 +- .../client/agents/list_agents_parameters.go | 2 + .../client/agents/list_agents_responses.go | 71 +- .../client/agents/remove_agent_parameters.go | 2 + .../client/agents/remove_agent_responses.go | 10 +- .../nodes/add_container_node_parameters.go | 2 + .../nodes/add_container_node_responses.go | 13 +- .../nodes/add_generic_node_parameters.go | 2 + .../nodes/add_generic_node_responses.go | 13 +- ...d_remote_azure_database_node_parameters.go | 2 + ...dd_remote_azure_database_node_responses.go | 13 +- .../nodes/add_remote_node_parameters.go | 2 + .../client/nodes/add_remote_node_responses.go | 13 +- .../nodes/add_remote_rds_node_parameters.go | 2 + .../nodes/add_remote_rds_node_responses.go | 13 +- .../json/client/nodes/get_node_parameters.go | 2 + .../json/client/nodes/get_node_responses.go | 21 +- .../client/nodes/list_nodes_parameters.go | 2 + .../json/client/nodes/list_nodes_responses.go | 31 +- .../client/nodes/remove_node_parameters.go | 2 + .../client/nodes/remove_node_responses.go | 10 +- .../services/add_custom_labels_parameters.go | 2 + .../services/add_custom_labels_responses.go | 10 +- .../add_external_service_parameters.go | 2 + .../add_external_service_responses.go | 13 +- .../add_ha_proxy_service_parameters.go | 2 + .../add_ha_proxy_service_responses.go | 13 +- .../add_mongo_db_service_parameters.go | 2 + .../add_mongo_db_service_responses.go | 13 +- .../services/add_my_sql_service_parameters.go | 2 + .../services/add_my_sql_service_responses.go | 13 +- .../add_postgre_sql_service_parameters.go | 2 + .../add_postgre_sql_service_responses.go | 13 +- .../add_proxy_sql_service_parameters.go | 2 + .../add_proxy_sql_service_responses.go | 13 +- .../client/services/get_service_parameters.go | 2 + .../client/services/get_service_responses.go | 23 +- .../list_active_service_types_parameters.go | 2 + .../list_active_service_types_responses.go | 10 +- .../services/list_services_parameters.go | 2 + .../services/list_services_responses.go | 35 +- .../remove_custom_labels_parameters.go | 2 + .../remove_custom_labels_responses.go | 10 +- .../services/remove_service_parameters.go | 2 + .../services/remove_service_responses.go | 10 +- api/inventorypb/log_level.pb.go | 16 +- api/inventorypb/log_level.swagger.json | 44 + api/inventorypb/nodes.pb.go | 80 +- api/inventorypb/nodes.pb.gw.go | 48 +- api/inventorypb/nodes.swagger.json | 854 ++++ api/inventorypb/nodes_grpc.pb.go | 11 +- api/inventorypb/services.pb.go | 104 +- api/inventorypb/services.pb.gw.go | 64 +- api/inventorypb/services.swagger.json | 1214 ++++++ api/inventorypb/services_grpc.pb.go | 15 +- api/managementpb/actions.pb.go | 78 +- api/managementpb/actions.pb.gw.go | 76 +- api/managementpb/actions.swagger.json | 1051 +++++ api/managementpb/actions_grpc.pb.go | 18 +- api/managementpb/agent/agent.pb.go | 32 +- api/managementpb/agent/agent.pb.gw.go | 28 +- api/managementpb/agent/agent.swagger.json | 386 ++ api/managementpb/agent/agent_grpc.pb.go | 4 +- .../client/agent/list_agents_parameters.go | 2 + .../client/agent/list_agents_responses.go | 23 +- api/managementpb/alerting/alerting.pb.go | 79 +- api/managementpb/alerting/alerting.pb.gw.go | 36 +- .../alerting/alerting.swagger.json | 632 +++ api/managementpb/alerting/alerting_grpc.pb.go | 8 +- .../client/alerting/create_rule_parameters.go | 2 + .../client/alerting/create_rule_responses.go | 18 +- .../alerting/create_template_parameters.go | 2 + .../alerting/create_template_responses.go | 10 +- .../alerting/delete_template_parameters.go | 2 + .../alerting/delete_template_responses.go | 10 +- .../alerting/list_templates_parameters.go | 2 + .../alerting/list_templates_responses.go | 29 +- .../alerting/update_template_parameters.go | 2 + .../alerting/update_template_responses.go | 10 +- api/managementpb/alerting/params.pb.go | 18 +- api/managementpb/alerting/params.swagger.json | 44 + api/managementpb/annotation.pb.go | 18 +- api/managementpb/annotation.pb.gw.go | 28 +- api/managementpb/annotation.swagger.json | 116 + api/managementpb/annotation_grpc.pb.go | 4 +- api/managementpb/azure/azure.pb.go | 30 +- api/managementpb/azure/azure.pb.gw.go | 24 +- api/managementpb/azure/azure.swagger.json | 321 ++ api/managementpb/azure/azure_grpc.pb.go | 5 +- .../add_azure_database_parameters.go | 2 + .../add_azure_database_responses.go | 10 +- .../discover_azure_database_parameters.go | 2 + .../discover_azure_database_responses.go | 15 +- api/managementpb/backup/artifacts.pb.go | 42 +- api/managementpb/backup/artifacts.pb.gw.go | 28 +- .../backup/artifacts.swagger.json | 364 ++ api/managementpb/backup/artifacts_grpc.pb.go | 6 +- api/managementpb/backup/backups.pb.go | 71 +- api/managementpb/backup/backups.pb.gw.go | 48 +- api/managementpb/backup/backups.swagger.json | 812 ++++ api/managementpb/backup/backups_grpc.pb.go | 11 +- api/managementpb/backup/common.pb.go | 28 +- api/managementpb/backup/common.swagger.json | 44 + api/managementpb/backup/errors.pb.go | 20 +- api/managementpb/backup/errors.swagger.json | 44 + .../artifacts/delete_artifact_parameters.go | 2 + .../artifacts/delete_artifact_responses.go | 10 +- .../artifacts/list_artifacts_parameters.go | 2 + .../artifacts/list_artifacts_responses.go | 24 +- .../list_pitr_timeranges_parameters.go | 2 + .../list_pitr_timeranges_responses.go | 15 +- .../change_scheduled_backup_parameters.go | 2 + .../change_scheduled_backup_responses.go | 10 +- .../client/backups/get_logs_parameters.go | 2 + .../json/client/backups/get_logs_responses.go | 15 +- ...artifact_compatible_services_parameters.go | 2 + ..._artifact_compatible_services_responses.go | 19 +- .../list_scheduled_backups_parameters.go | 2 + .../list_scheduled_backups_responses.go | 14 +- .../remove_scheduled_backup_parameters.go | 2 + .../remove_scheduled_backup_responses.go | 10 +- .../backups/restore_backup_parameters.go | 2 + .../backups/restore_backup_responses.go | 11 +- .../backups/schedule_backup_parameters.go | 2 + .../backups/schedule_backup_responses.go | 11 +- .../client/backups/start_backup_parameters.go | 2 + .../client/backups/start_backup_responses.go | 11 +- .../locations/add_location_parameters.go | 2 + .../locations/add_location_responses.go | 15 +- .../locations/change_location_parameters.go | 2 + .../locations/change_location_responses.go | 14 +- .../locations/list_locations_parameters.go | 2 + .../locations/list_locations_responses.go | 18 +- .../locations/remove_location_parameters.go | 2 + .../locations/remove_location_responses.go | 10 +- .../test_location_config_parameters.go | 2 + .../test_location_config_responses.go | 14 +- .../list_restore_history_parameters.go | 2 + .../list_restore_history_responses.go | 14 +- api/managementpb/backup/locations.pb.go | 40 +- api/managementpb/backup/locations.pb.gw.go | 36 +- .../backup/locations.swagger.json | 369 ++ api/managementpb/backup/locations_grpc.pb.go | 8 +- api/managementpb/backup/restores.pb.go | 28 +- api/managementpb/backup/restores.pb.gw.go | 28 +- api/managementpb/backup/restores.swagger.json | 180 + api/managementpb/backup/restores_grpc.pb.go | 4 +- api/managementpb/boolean_flag.pb.go | 16 +- api/managementpb/boolean_flag.swagger.json | 44 + api/managementpb/checks.pb.go | 74 +- api/managementpb/checks.pb.gw.go | 48 +- api/managementpb/checks.swagger.json | 732 ++++ api/managementpb/checks_grpc.pb.go | 11 +- api/managementpb/external.pb.go | 31 +- api/managementpb/external.pb.gw.go | 28 +- api/managementpb/external.swagger.json | 343 ++ api/managementpb/external_grpc.pb.go | 4 +- api/managementpb/haproxy.pb.go | 31 +- api/managementpb/haproxy.pb.gw.go | 28 +- api/managementpb/haproxy.swagger.json | 331 ++ api/managementpb/haproxy_grpc.pb.go | 4 +- api/managementpb/ia/alerts.pb.go | 43 +- api/managementpb/ia/alerts.pb.gw.go | 24 +- api/managementpb/ia/alerts.swagger.json | 716 ++++ api/managementpb/ia/alerts_grpc.pb.go | 5 +- api/managementpb/ia/channels.pb.go | 53 +- api/managementpb/ia/channels.pb.gw.go | 32 +- api/managementpb/ia/channels.swagger.json | 497 +++ api/managementpb/ia/channels_grpc.pb.go | 7 +- .../client/alerts/list_alerts_parameters.go | 2 + .../client/alerts/list_alerts_responses.go | 57 +- .../client/alerts/toggle_alerts_parameters.go | 2 + .../client/alerts/toggle_alerts_responses.go | 10 +- .../client/channels/add_channel_parameters.go | 2 + .../client/channels/add_channel_responses.go | 25 +- .../channels/change_channel_parameters.go | 2 + .../channels/change_channel_responses.go | 24 +- .../channels/list_channels_parameters.go | 2 + .../channels/list_channels_responses.go | 33 +- .../channels/remove_channel_parameters.go | 2 + .../channels/remove_channel_responses.go | 10 +- .../rules/create_alert_rule_parameters.go | 2 + .../rules/create_alert_rule_responses.go | 19 +- .../rules/delete_alert_rule_parameters.go | 2 + .../rules/delete_alert_rule_responses.go | 10 +- .../rules/list_alert_rules_parameters.go | 2 + .../rules/list_alert_rules_responses.go | 55 +- .../rules/toggle_alert_rule_parameters.go | 2 + .../rules/toggle_alert_rule_responses.go | 10 +- .../rules/update_alert_rule_parameters.go | 2 + .../rules/update_alert_rule_responses.go | 18 +- api/managementpb/ia/rules.pb.go | 77 +- api/managementpb/ia/rules.pb.gw.go | 36 +- api/managementpb/ia/rules.pb.validate.go | 3 +- api/managementpb/ia/rules.swagger.json | 897 +++++ api/managementpb/ia/rules_grpc.pb.go | 8 +- api/managementpb/ia/status.pb.go | 16 +- api/managementpb/ia/status.swagger.json | 44 + .../actions/cancel_action_parameters.go | 2 + .../client/actions/cancel_action_responses.go | 10 +- .../client/actions/get_action_parameters.go | 2 + .../client/actions/get_action_responses.go | 11 +- ...tart_mongo_db_explain_action_parameters.go | 2 + ...start_mongo_db_explain_action_responses.go | 11 +- .../start_my_sql_explain_action_parameters.go | 2 + .../start_my_sql_explain_action_responses.go | 11 +- ...t_my_sql_explain_json_action_parameters.go | 2 + ...rt_my_sql_explain_json_action_responses.go | 11 +- ...lain_traditional_json_action_parameters.go | 2 + ...plain_traditional_json_action_responses.go | 11 +- ...sql_show_create_table_action_parameters.go | 2 + ..._sql_show_create_table_action_responses.go | 11 +- ...art_my_sql_show_index_action_parameters.go | 2 + ...tart_my_sql_show_index_action_responses.go | 11 +- ...sql_show_table_status_action_parameters.go | 2 + ..._sql_show_table_status_action_responses.go | 11 +- ...sql_show_create_table_action_parameters.go | 2 + ..._sql_show_create_table_action_responses.go | 11 +- ...ostgre_sql_show_index_action_parameters.go | 2 + ...postgre_sql_show_index_action_responses.go | 11 +- ...t_pt_mongo_db_summary_action_parameters.go | 2 + ...rt_pt_mongo_db_summary_action_responses.go | 11 +- ...art_pt_my_sql_summary_action_parameters.go | 2 + ...tart_pt_my_sql_summary_action_responses.go | 11 +- .../start_pt_pg_summary_action_parameters.go | 2 + .../start_pt_pg_summary_action_responses.go | 11 +- .../start_pt_summary_action_parameters.go | 2 + .../start_pt_summary_action_responses.go | 11 +- .../annotation/add_annotation_parameters.go | 2 + .../annotation/add_annotation_responses.go | 10 +- .../external/add_external_parameters.go | 2 + .../client/external/add_external_responses.go | 17 +- .../ha_proxy/add_ha_proxy_parameters.go | 2 + .../client/ha_proxy/add_ha_proxy_responses.go | 17 +- .../mongo_db/add_mongo_db_parameters.go | 2 + .../client/mongo_db/add_mongo_db_responses.go | 19 +- .../client/my_sql/add_my_sql_parameters.go | 2 + .../client/my_sql/add_my_sql_responses.go | 21 +- .../client/node/register_node_parameters.go | 2 + .../client/node/register_node_responses.go | 17 +- .../postgre_sql/add_postgre_sql_parameters.go | 2 + .../postgre_sql/add_postgre_sql_responses.go | 21 +- .../proxy_sql/add_proxy_sql_parameters.go | 2 + .../proxy_sql/add_proxy_sql_responses.go | 17 +- .../json/client/rds/add_rds_parameters.go | 2 + .../json/client/rds/add_rds_responses.go | 27 +- .../client/rds/discover_rds_parameters.go | 2 + .../json/client/rds/discover_rds_responses.go | 15 +- .../change_security_checks_parameters.go | 2 + .../change_security_checks_responses.go | 14 +- .../get_failed_checks_parameters.go | 2 + .../get_failed_checks_responses.go | 19 +- .../get_security_check_results_parameters.go | 2 + .../get_security_check_results_responses.go | 14 +- .../list_advisors_parameters.go | 2 + .../list_advisors_responses.go | 18 +- .../list_failed_services_parameters.go | 2 + .../list_failed_services_responses.go | 14 +- .../list_security_checks_parameters.go | 2 + .../list_security_checks_responses.go | 14 +- .../start_security_checks_parameters.go | 2 + .../start_security_checks_responses.go | 10 +- .../toggle_check_alert_parameters.go | 2 + .../toggle_check_alert_responses.go | 10 +- .../service/remove_service_parameters.go | 2 + .../service/remove_service_responses.go | 10 +- api/managementpb/metrics.pb.go | 16 +- api/managementpb/metrics.swagger.json | 44 + api/managementpb/mongodb.pb.go | 35 +- api/managementpb/mongodb.pb.gw.go | 28 +- api/managementpb/mongodb.swagger.json | 531 +++ api/managementpb/mongodb_grpc.pb.go | 4 +- api/managementpb/mysql.pb.go | 37 +- api/managementpb/mysql.pb.gw.go | 28 +- api/managementpb/mysql.swagger.json | 645 +++ api/managementpb/mysql_grpc.pb.go | 4 +- api/managementpb/node.pb.go | 33 +- api/managementpb/node.pb.gw.go | 28 +- api/managementpb/node.swagger.json | 319 ++ .../client/mgmt_node/get_node_parameters.go | 2 + .../client/mgmt_node/get_node_responses.go | 21 +- .../client/mgmt_node/list_nodes_parameters.go | 2 + .../client/mgmt_node/list_nodes_responses.go | 23 +- api/managementpb/node/node.pb.go | 43 +- api/managementpb/node/node.pb.gw.go | 24 +- api/managementpb/node/node.swagger.json | 305 ++ api/managementpb/node/node_grpc.pb.go | 5 +- api/managementpb/node_grpc.pb.go | 4 +- api/managementpb/pagination.pb.go | 18 +- api/managementpb/pagination.swagger.json | 44 + api/managementpb/postgresql.pb.go | 37 +- api/managementpb/postgresql.pb.gw.go | 28 +- api/managementpb/postgresql.swagger.json | 584 +++ api/managementpb/postgresql_grpc.pb.go | 4 +- api/managementpb/proxysql.pb.go | 33 +- api/managementpb/proxysql.pb.gw.go | 28 +- api/managementpb/proxysql.swagger.json | 409 ++ api/managementpb/proxysql_grpc.pb.go | 4 +- api/managementpb/rds.pb.go | 51 +- api/managementpb/rds.pb.gw.go | 24 +- api/managementpb/rds.swagger.json | 895 +++++ api/managementpb/rds_grpc.pb.go | 5 +- .../client/role/assign_roles_parameters.go | 2 + .../client/role/assign_roles_responses.go | 10 +- .../client/role/create_role_parameters.go | 2 + .../json/client/role/create_role_responses.go | 11 +- .../client/role/delete_role_parameters.go | 2 + .../json/client/role/delete_role_responses.go | 10 +- .../json/client/role/get_role_parameters.go | 2 + .../json/client/role/get_role_responses.go | 11 +- .../json/client/role/list_roles_parameters.go | 2 + .../json/client/role/list_roles_responses.go | 14 +- .../role/set_default_role_parameters.go | 2 + .../client/role/set_default_role_responses.go | 10 +- .../client/role/update_role_parameters.go | 2 + .../json/client/role/update_role_responses.go | 10 +- api/managementpb/role/role.pb.go | 44 +- api/managementpb/role/role.pb.gw.go | 44 +- api/managementpb/role/role.swagger.json | 440 ++ api/managementpb/role/role_grpc.pb.go | 10 +- api/managementpb/service.pb.go | 29 +- api/managementpb/service.pb.gw.go | 28 +- api/managementpb/service.swagger.json | 118 + .../mgmt_service/list_services_parameters.go | 2 + .../mgmt_service/list_services_responses.go | 27 +- api/managementpb/service/service.pb.go | 37 +- api/managementpb/service/service.pb.gw.go | 28 +- api/managementpb/service/service.swagger.json | 500 +++ api/managementpb/service/service_grpc.pb.go | 4 +- api/managementpb/service_grpc.pb.go | 4 +- api/managementpb/severity.pb.go | 16 +- api/managementpb/severity.swagger.json | 44 + .../client/platform/connect_parameters.go | 2 + .../json/client/platform/connect_responses.go | 10 +- .../client/platform/disconnect_parameters.go | 2 + .../client/platform/disconnect_responses.go | 10 +- .../get_contact_information_parameters.go | 2 + .../get_contact_information_responses.go | 12 +- ...ch_organization_entitlements_parameters.go | 2 + ...rch_organization_entitlements_responses.go | 16 +- .../search_organization_tickets_parameters.go | 2 + .../search_organization_tickets_responses.go | 14 +- .../client/platform/server_info_parameters.go | 2 + .../client/platform/server_info_responses.go | 10 +- .../client/platform/user_status_parameters.go | 2 + .../client/platform/user_status_responses.go | 10 +- api/platformpb/platform.pb.go | 56 +- api/platformpb/platform.pb.gw.go | 44 +- api/platformpb/platform.swagger.json | 525 +++ api/platformpb/platform_grpc.pb.go | 10 +- api/qanpb/collector.pb.go | 35 +- api/qanpb/collector.swagger.json | 1066 +++++ api/qanpb/collector_grpc.pb.go | 4 +- api/qanpb/filters.pb.go | 28 +- api/qanpb/filters.pb.gw.go | 28 +- api/qanpb/filters.swagger.json | 165 + api/qanpb/filters_grpc.pb.go | 4 +- .../json/client/filters/get_parameters.go | 2 + .../json/client/filters/get_responses.go | 23 +- .../get_metrics_names_parameters.go | 2 + .../get_metrics_names_responses.go | 10 +- ...lain_fingerprint_by_query_id_parameters.go | 2 + ...plain_fingerprint_by_query_id_responses.go | 11 +- .../get_histogram_parameters.go | 2 + .../object_details/get_histogram_responses.go | 19 +- .../object_details/get_labels_parameters.go | 2 + .../object_details/get_labels_responses.go | 15 +- .../object_details/get_metrics_parameters.go | 2 + .../object_details/get_metrics_responses.go | 29 +- .../get_query_example_parameters.go | 2 + .../get_query_example_responses.go | 19 +- .../get_query_plan_parameters.go | 2 + .../get_query_plan_responses.go | 11 +- .../object_details/query_exists_parameters.go | 2 + .../object_details/query_exists_responses.go | 10 +- .../schema_by_query_id_parameters.go | 2 + .../schema_by_query_id_responses.go | 11 +- .../client/profile/get_report_parameters.go | 2 + .../client/profile/get_report_responses.go | 29 +- api/qanpb/metrics_names.pb.go | 20 +- api/qanpb/metrics_names.pb.gw.go | 28 +- api/qanpb/metrics_names.swagger.json | 100 + api/qanpb/metrics_names_grpc.pb.go | 4 +- api/qanpb/object_details.pb.go | 76 +- api/qanpb/object_details.pb.gw.go | 48 +- api/qanpb/object_details.swagger.json | 1100 +++++ api/qanpb/object_details_grpc.pb.go | 11 +- api/qanpb/profile.pb.go | 32 +- api/qanpb/profile.pb.gw.go | 28 +- api/qanpb/profile.swagger.json | 578 +++ api/qanpb/profile_grpc.pb.go | 4 +- api/qanpb/qan.pb.go | 24 +- api/qanpb/qan.swagger.json | 44 + api/serverpb/httperror.pb.go | 18 +- api/serverpb/httperror.swagger.json | 46 + .../server/aws_instance_check_parameters.go | 2 + .../server/aws_instance_check_responses.go | 10 +- .../server/change_settings_parameters.go | 2 + .../server/change_settings_responses.go | 29 +- .../client/server/check_updates_parameters.go | 2 + .../client/server/check_updates_responses.go | 15 +- .../client/server/get_settings_parameters.go | 2 + .../client/server/get_settings_responses.go | 20 +- .../json/client/server/logs_parameters.go | 3 + .../json/client/server/logs_responses.go | 6 +- .../client/server/readiness_parameters.go | 1 + .../json/client/server/readiness_responses.go | 9 +- .../client/server/start_update_parameters.go | 2 + .../client/server/start_update_responses.go | 10 +- ...test_email_alerting_settings_parameters.go | 2 + .../test_email_alerting_settings_responses.go | 12 +- .../client/server/update_status_parameters.go | 2 + .../client/server/update_status_responses.go | 11 +- .../json/client/server/version_parameters.go | 3 + .../json/client/server/version_responses.go | 14 +- api/serverpb/server.pb.go | 70 +- api/serverpb/server.pb.gw.go | 54 +- api/serverpb/server.swagger.json | 835 ++++ api/serverpb/server_grpc.pb.go | 12 +- api/uieventspb/server.pb.go | 28 +- api/uieventspb/server.pb.gw.go | 28 +- api/uieventspb/server.swagger.json | 202 + api/uieventspb/server_grpc.pb.go | 4 +- .../json/client/user/get_user_parameters.go | 1 + .../json/client/user/get_user_responses.go | 10 +- .../json/client/user/list_users_parameters.go | 1 + .../json/client/user/list_users_responses.go | 14 +- .../client/user/update_user_parameters.go | 2 + .../json/client/user/update_user_responses.go | 11 +- api/userpb/user.pb.go | 26 +- api/userpb/user.pb.gw.go | 28 +- api/userpb/user.swagger.json | 190 + api/userpb/user_grpc.pb.go | 6 +- build/docker/server/README.md | 1 - .../rpm/server/SPECS/dbaas-controller.spec | 59 - build/scripts/build-server-rpm-all | 2 - docker-compose.yml | 27 +- docs/dbaas/olm.md | 118 - .../roles/dashboards_upgrade/tasks/main.yml | 4 - update/ansible/playbook/tasks/update.yml | 2 - 521 files changed, 31020 insertions(+), 2403 deletions(-) create mode 100644 api/agentlocalpb/agentlocal.swagger.json create mode 100644 api/agentpb/agent.swagger.json create mode 100644 api/agentpb/collector.swagger.json create mode 100644 api/inventorypb/agent_status.swagger.json create mode 100644 api/inventorypb/agents.swagger.json create mode 100644 api/inventorypb/log_level.swagger.json create mode 100644 api/inventorypb/nodes.swagger.json create mode 100644 api/inventorypb/services.swagger.json create mode 100644 api/managementpb/actions.swagger.json create mode 100644 api/managementpb/agent/agent.swagger.json create mode 100644 api/managementpb/alerting/alerting.swagger.json create mode 100644 api/managementpb/alerting/params.swagger.json create mode 100644 api/managementpb/annotation.swagger.json create mode 100644 api/managementpb/azure/azure.swagger.json create mode 100644 api/managementpb/backup/artifacts.swagger.json create mode 100644 api/managementpb/backup/backups.swagger.json create mode 100644 api/managementpb/backup/common.swagger.json create mode 100644 api/managementpb/backup/errors.swagger.json create mode 100644 api/managementpb/backup/locations.swagger.json create mode 100644 api/managementpb/backup/restores.swagger.json create mode 100644 api/managementpb/boolean_flag.swagger.json create mode 100644 api/managementpb/checks.swagger.json create mode 100644 api/managementpb/external.swagger.json create mode 100644 api/managementpb/haproxy.swagger.json create mode 100644 api/managementpb/ia/alerts.swagger.json create mode 100644 api/managementpb/ia/channels.swagger.json create mode 100644 api/managementpb/ia/rules.swagger.json create mode 100644 api/managementpb/ia/status.swagger.json create mode 100644 api/managementpb/metrics.swagger.json create mode 100644 api/managementpb/mongodb.swagger.json create mode 100644 api/managementpb/mysql.swagger.json create mode 100644 api/managementpb/node.swagger.json create mode 100644 api/managementpb/node/node.swagger.json create mode 100644 api/managementpb/pagination.swagger.json create mode 100644 api/managementpb/postgresql.swagger.json create mode 100644 api/managementpb/proxysql.swagger.json create mode 100644 api/managementpb/rds.swagger.json create mode 100644 api/managementpb/role/role.swagger.json create mode 100644 api/managementpb/service.swagger.json create mode 100644 api/managementpb/service/service.swagger.json create mode 100644 api/managementpb/severity.swagger.json create mode 100644 api/platformpb/platform.swagger.json create mode 100644 api/qanpb/collector.swagger.json create mode 100644 api/qanpb/filters.swagger.json create mode 100644 api/qanpb/metrics_names.swagger.json create mode 100644 api/qanpb/object_details.swagger.json create mode 100644 api/qanpb/profile.swagger.json create mode 100644 api/qanpb/qan.swagger.json create mode 100644 api/serverpb/httperror.swagger.json create mode 100644 api/serverpb/server.swagger.json create mode 100644 api/uieventspb/server.swagger.json create mode 100644 api/userpb/user.swagger.json delete mode 100644 build/packages/rpm/server/SPECS/dbaas-controller.spec delete mode 100644 docs/dbaas/olm.md diff --git a/Makefile.include b/Makefile.include index 03e9c96e99..4559845dba 100644 --- a/Makefile.include +++ b/Makefile.include @@ -9,10 +9,6 @@ help: ## Display this help message @grep -h '^[a-zA-Z]' $(MAKEFILE_LIST) | \ awk -F ':.*?## ' 'NF==2 {printf " %-26s%s\n", $$1, $$2}' @echo - @echo "To test DBaaS components with minikube:" - @echo "Start minikube: minikube start --cpus=2 --nodes=3 --kubernetes-version=v1.20.0" - @echo "ENABLE_DBAAS=1 NETWORK=minikube make env-up" - @echo "DBAAS_ALLOW_UNSUPPORTED_OPERATORS=1 DBAAS_PXC_OP_CHANNEL=fast-v1 ENABLE_DBAAS=1 NETWORK=minikube make env-up" @echo Check the docker-compose.yml file to see which environment variables are available. init: ## Install tools diff --git a/api-tests/server/logs_test.go b/api-tests/server/logs_test.go index d0ae29faa7..6f376a94aa 100644 --- a/api-tests/server/logs_test.go +++ b/api-tests/server/logs_test.go @@ -18,7 +18,6 @@ package server import ( "archive/zip" "bytes" - "os" "sort" "strings" "testing" @@ -84,11 +83,6 @@ func TestDownloadLogs(t *testing.T) { "vmproxy.log", } - if os.Getenv("PERCONA_TEST_DBAAS") == "1" { - expected = append(expected, "dbaas-controller.log") - sort.Strings(expected) - } - actual := make([]string, 0, len(zipR.File)) for _, file := range zipR.File { // skip with dynamic IDs now @TODO use regex to match ~ "client/pmm-agent/NODE_EXPORTER 297b465c-a767-4bc5-809d-d394a83c7086.log" diff --git a/api/agentlocalpb/agentlocal.pb.go b/api/agentlocalpb/agentlocal.pb.go index 1e3c06fd6f..ec8ab262ef 100644 --- a/api/agentlocalpb/agentlocal.pb.go +++ b/api/agentlocalpb/agentlocal.pb.go @@ -7,15 +7,13 @@ package agentlocalpb import ( - reflect "reflect" - sync "sync" - + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -539,21 +537,18 @@ func file_agentlocalpb_agentlocal_proto_rawDescGZIP() []byte { return file_agentlocalpb_agentlocal_proto_rawDescData } -var ( - file_agentlocalpb_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_agentlocalpb_agentlocal_proto_goTypes = []interface{}{ - (*ServerInfo)(nil), // 0: agentlocal.ServerInfo - (*AgentInfo)(nil), // 1: agentlocal.AgentInfo - (*StatusRequest)(nil), // 2: agentlocal.StatusRequest - (*StatusResponse)(nil), // 3: agentlocal.StatusResponse - (*ReloadRequest)(nil), // 4: agentlocal.ReloadRequest - (*ReloadResponse)(nil), // 5: agentlocal.ReloadResponse - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (inventorypb.AgentType)(0), // 7: inventory.AgentType - (inventorypb.AgentStatus)(0), // 8: inventory.AgentStatus - } -) - +var file_agentlocalpb_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_agentlocalpb_agentlocal_proto_goTypes = []interface{}{ + (*ServerInfo)(nil), // 0: agentlocal.ServerInfo + (*AgentInfo)(nil), // 1: agentlocal.AgentInfo + (*StatusRequest)(nil), // 2: agentlocal.StatusRequest + (*StatusResponse)(nil), // 3: agentlocal.StatusResponse + (*ReloadRequest)(nil), // 4: agentlocal.ReloadRequest + (*ReloadResponse)(nil), // 5: agentlocal.ReloadResponse + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (inventorypb.AgentType)(0), // 7: inventory.AgentType + (inventorypb.AgentStatus)(0), // 8: inventory.AgentStatus +} var file_agentlocalpb_agentlocal_proto_depIdxs = []int32{ 6, // 0: agentlocal.ServerInfo.latency:type_name -> google.protobuf.Duration 6, // 1: agentlocal.ServerInfo.clock_drift:type_name -> google.protobuf.Duration diff --git a/api/agentlocalpb/agentlocal.pb.gw.go b/api/agentlocalpb/agentlocal.pb.gw.go index b21fe20e57..4ba7d81cb0 100644 --- a/api/agentlocalpb/agentlocal.pb.gw.go +++ b/api/agentlocalpb/agentlocal.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -47,6 +45,7 @@ func request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,9 +62,12 @@ func local_request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Ma msg, err := server.Status(ctx, &protoReq) return msg, metadata, err + } -var filter_AgentLocal_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_AgentLocal_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -80,6 +82,7 @@ func request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Marshale msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +98,7 @@ func local_request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Ma msg, err := server.Status(ctx, &protoReq) return msg, metadata, err + } func request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +115,7 @@ func request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.Reload(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +132,7 @@ func local_request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Ma msg, err := server.Reload(ctx, &protoReq) return msg, metadata, err + } // RegisterAgentLocalHandlerServer registers the http handlers for service AgentLocal to "mux". @@ -134,6 +140,7 @@ func local_request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Ma // 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 RegisterAgentLocalHandlerFromEndpoint instead. func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServer) error { + mux.Handle("POST", pattern_AgentLocal_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,6 +163,7 @@ func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentLocal_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -180,6 +188,7 @@ func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AgentLocal_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -204,6 +213,7 @@ func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -246,6 +256,7 @@ func RegisterAgentLocalHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentLocalClient" to call the correct interceptors. func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalClient) error { + mux.Handle("POST", pattern_AgentLocal_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -265,6 +276,7 @@ func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentLocal_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -286,6 +298,7 @@ func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AgentLocal_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -307,6 +320,7 @@ func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/agentlocalpb/agentlocal.swagger.json b/api/agentlocalpb/agentlocal.swagger.json new file mode 100644 index 0000000000..c74d3fab94 --- /dev/null +++ b/api/agentlocalpb/agentlocal.swagger.json @@ -0,0 +1,289 @@ +{ + "swagger": "2.0", + "info": { + "title": "agentlocalpb/agentlocal.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AgentLocal" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/local/Reload": { + "post": { + "summary": "Reload reloads pmm-agent configuration.", + "operationId": "Reload", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/agentlocalReloadResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/agentlocalReloadRequest" + } + } + ], + "tags": [ + "AgentLocal" + ] + } + }, + "/local/Status": { + "get": { + "summary": "Status returns current pmm-agent status.", + "operationId": "Status2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/agentlocalStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "get_network_info", + "description": "Returns network info (latency and clock_drift) if true.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "AgentLocal" + ] + }, + "post": { + "summary": "Status returns current pmm-agent status.", + "operationId": "Status", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/agentlocalStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/agentlocalStatusRequest" + } + } + ], + "tags": [ + "AgentLocal" + ] + } + } + }, + "definitions": { + "agentlocalAgentInfo": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "agent_type": { + "$ref": "#/definitions/inventoryAgentType" + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus" + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "The current listen port of this Agent (exporter or vmagent).\nZero for other Agent types, or if unknown or not yet supported." + }, + "process_exec_path": { + "type": "string" + } + }, + "description": "AgentInfo contains information about Agent managed by pmm-agent." + }, + "agentlocalReloadRequest": { + "type": "object" + }, + "agentlocalReloadResponse": { + "type": "object", + "description": "ReloadRequest may not be received by the client due to pmm-agent restart." + }, + "agentlocalServerInfo": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "PMM Server URL in a form https://HOST:PORT/." + }, + "insecure_tls": { + "type": "boolean", + "description": "PMM Server's TLS certificate validation should be skipped if true." + }, + "connected": { + "type": "boolean", + "description": "True if pmm-agent is currently connected to the server." + }, + "version": { + "type": "string", + "description": "PMM Server version (if agent is connected)." + }, + "latency": { + "type": "string", + "description": "Ping time from pmm-agent to pmm-managed (if agent is connected)." + }, + "clock_drift": { + "type": "string", + "description": "Clock drift from PMM Server (if agent is connected)." + } + }, + "description": "ServerInfo contains information about the PMM Server." + }, + "agentlocalStatusRequest": { + "type": "object", + "properties": { + "get_network_info": { + "type": "boolean", + "description": "Returns network info (latency and clock_drift) if true." + } + } + }, + "agentlocalStatusResponse": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "runs_on_node_id": { + "type": "string" + }, + "server_info": { + "$ref": "#/definitions/agentlocalServerInfo" + }, + "agents_info": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/agentlocalAgentInfo" + } + }, + "config_filepath": { + "type": "string", + "description": "Config file path if pmm-agent was started with one." + }, + "agent_version": { + "type": "string", + "description": "PMM Agent version." + }, + "node_name": { + "type": "string" + }, + "connection_uptime": { + "type": "number", + "format": "float", + "title": "Shows connection uptime in percentage between agent and server" + } + } + }, + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryAgentType": { + "type": "string", + "enum": [ + "AGENT_TYPE_INVALID", + "PMM_AGENT", + "VM_AGENT", + "NODE_EXPORTER", + "MYSQLD_EXPORTER", + "MONGODB_EXPORTER", + "POSTGRES_EXPORTER", + "PROXYSQL_EXPORTER", + "QAN_MYSQL_PERFSCHEMA_AGENT", + "QAN_MYSQL_SLOWLOG_AGENT", + "QAN_MONGODB_PROFILER_AGENT", + "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "RDS_EXPORTER", + "EXTERNAL_EXPORTER", + "AZURE_DATABASE_EXPORTER" + ], + "default": "AGENT_TYPE_INVALID", + "description": "AgentType describes supported Agent types." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/agentlocalpb/agentlocal_grpc.pb.go b/api/agentlocalpb/agentlocal_grpc.pb.go index 1eeb25c672..e87fe9cd5c 100644 --- a/api/agentlocalpb/agentlocal_grpc.pb.go +++ b/api/agentlocalpb/agentlocal_grpc.pb.go @@ -8,7 +8,6 @@ package agentlocalpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -72,12 +71,12 @@ type AgentLocalServer interface { } // UnimplementedAgentLocalServer must be embedded to have forward compatible implementations. -type UnimplementedAgentLocalServer struct{} +type UnimplementedAgentLocalServer struct { +} func (UnimplementedAgentLocalServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } - func (UnimplementedAgentLocalServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Reload not implemented") } diff --git a/api/agentlocalpb/json/client/agent_local/reload_parameters.go b/api/agentlocalpb/json/client/agent_local/reload_parameters.go index 99cb61bfaf..2b88f1c563 100644 --- a/api/agentlocalpb/json/client/agent_local/reload_parameters.go +++ b/api/agentlocalpb/json/client/agent_local/reload_parameters.go @@ -60,6 +60,7 @@ ReloadParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ReloadParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ReloadParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ReloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocalpb/json/client/agent_local/reload_responses.go b/api/agentlocalpb/json/client/agent_local/reload_responses.go index ce4fcb8c03..7913d61dd4 100644 --- a/api/agentlocalpb/json/client/agent_local/reload_responses.go +++ b/api/agentlocalpb/json/client/agent_local/reload_responses.go @@ -60,12 +60,12 @@ type ReloadOK struct { func (o *ReloadOK) Error() string { return fmt.Sprintf("[POST /local/Reload][%d] reloadOk %+v", 200, o.Payload) } - func (o *ReloadOK) GetPayload() interface{} { return o.Payload } func (o *ReloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ReloadDefault) Code() int { func (o *ReloadDefault) Error() string { return fmt.Sprintf("[POST /local/Reload][%d] Reload default %+v", o._statusCode, o.Payload) } - func (o *ReloadDefault) GetPayload() *ReloadDefaultBody { return o.Payload } func (o *ReloadDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ReloadDefaultBody) // response payload @@ -121,6 +121,7 @@ ReloadDefaultBody reload default body swagger:model ReloadDefaultBody */ type ReloadDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -186,7 +187,9 @@ func (o *ReloadDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -197,6 +200,7 @@ func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -225,6 +229,7 @@ ReloadDefaultBodyDetailsItems0 reload default body details items0 swagger:model ReloadDefaultBodyDetailsItems0 */ type ReloadDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agentlocalpb/json/client/agent_local/status2_parameters.go b/api/agentlocalpb/json/client/agent_local/status2_parameters.go index 75d8c38d16..c60f9ca220 100644 --- a/api/agentlocalpb/json/client/agent_local/status2_parameters.go +++ b/api/agentlocalpb/json/client/agent_local/status2_parameters.go @@ -61,6 +61,7 @@ Status2Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type Status2Params struct { + /* GetNetworkInfo. Returns network info (latency and clock_drift) if true. @@ -133,6 +134,7 @@ func (o *Status2Params) SetGetNetworkInfo(getNetworkInfo *bool) { // WriteToRequest writes these params to a swagger request func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -148,6 +150,7 @@ func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qGetNetworkInfo := swag.FormatBool(qrGetNetworkInfo) if qGetNetworkInfo != "" { + if err := r.SetQueryParam("get_network_info", qGetNetworkInfo); err != nil { return err } diff --git a/api/agentlocalpb/json/client/agent_local/status2_responses.go b/api/agentlocalpb/json/client/agent_local/status2_responses.go index e4b3cec66a..0b3dd3f133 100644 --- a/api/agentlocalpb/json/client/agent_local/status2_responses.go +++ b/api/agentlocalpb/json/client/agent_local/status2_responses.go @@ -62,12 +62,12 @@ type Status2OK struct { func (o *Status2OK) Error() string { return fmt.Sprintf("[GET /local/Status][%d] status2Ok %+v", 200, o.Payload) } - func (o *Status2OK) GetPayload() *Status2OKBody { return o.Payload } func (o *Status2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(Status2OKBody) // response payload @@ -104,12 +104,12 @@ func (o *Status2Default) Code() int { func (o *Status2Default) Error() string { return fmt.Sprintf("[GET /local/Status][%d] Status2 default %+v", o._statusCode, o.Payload) } - func (o *Status2Default) GetPayload() *Status2DefaultBody { return o.Payload } func (o *Status2Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(Status2DefaultBody) // response payload @@ -125,6 +125,7 @@ Status2DefaultBody status2 default body swagger:model Status2DefaultBody */ type Status2DefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *Status2DefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -229,6 +233,7 @@ Status2DefaultBodyDetailsItems0 status2 default body details items0 swagger:model Status2DefaultBodyDetailsItems0 */ type Status2DefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ Status2OKBody status2 OK body swagger:model Status2OKBody */ type Status2OKBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -373,7 +379,9 @@ func (o *Status2OKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentsInfo); i++ { + if o.AgentsInfo[i] != nil { if err := o.AgentsInfo[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -384,12 +392,14 @@ func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats s return err } } + } return nil } func (o *Status2OKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { + if o.ServerInfo != nil { if err := o.ServerInfo.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -427,6 +437,7 @@ Status2OKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model Status2OKBodyAgentsInfoItems0 */ type Status2OKBodyAgentsInfoItems0 struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -640,6 +651,7 @@ Status2OKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model Status2OKBodyServerInfo */ type Status2OKBodyServerInfo struct { + // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentlocalpb/json/client/agent_local/status_parameters.go b/api/agentlocalpb/json/client/agent_local/status_parameters.go index bcd6f41c92..df5607cccf 100644 --- a/api/agentlocalpb/json/client/agent_local/status_parameters.go +++ b/api/agentlocalpb/json/client/agent_local/status_parameters.go @@ -60,6 +60,7 @@ StatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StatusParams struct { + // Body. Body StatusBody @@ -129,6 +130,7 @@ func (o *StatusParams) SetBody(body StatusBody) { // WriteToRequest writes these params to a swagger request func (o *StatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocalpb/json/client/agent_local/status_responses.go b/api/agentlocalpb/json/client/agent_local/status_responses.go index fa69048f34..e9bf238296 100644 --- a/api/agentlocalpb/json/client/agent_local/status_responses.go +++ b/api/agentlocalpb/json/client/agent_local/status_responses.go @@ -62,12 +62,12 @@ type StatusOK struct { func (o *StatusOK) Error() string { return fmt.Sprintf("[POST /local/Status][%d] statusOk %+v", 200, o.Payload) } - func (o *StatusOK) GetPayload() *StatusOKBody { return o.Payload } func (o *StatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusOKBody) // response payload @@ -104,12 +104,12 @@ func (o *StatusDefault) Code() int { func (o *StatusDefault) Error() string { return fmt.Sprintf("[POST /local/Status][%d] Status default %+v", o._statusCode, o.Payload) } - func (o *StatusDefault) GetPayload() *StatusDefaultBody { return o.Payload } func (o *StatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusDefaultBody) // response payload @@ -125,6 +125,7 @@ StatusBody status body swagger:model StatusBody */ type StatusBody struct { + // Returns network info (latency and clock_drift) if true. GetNetworkInfo bool `json:"get_network_info,omitempty"` } @@ -162,6 +163,7 @@ StatusDefaultBody status default body swagger:model StatusDefaultBody */ type StatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -227,7 +229,9 @@ func (o *StatusDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,6 +242,7 @@ func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -266,6 +271,7 @@ StatusDefaultBodyDetailsItems0 status default body details items0 swagger:model StatusDefaultBodyDetailsItems0 */ type StatusDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -303,6 +309,7 @@ StatusOKBody status OK body swagger:model StatusOKBody */ type StatusOKBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -410,7 +417,9 @@ func (o *StatusOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentsInfo); i++ { + if o.AgentsInfo[i] != nil { if err := o.AgentsInfo[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -421,12 +430,14 @@ func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats st return err } } + } return nil } func (o *StatusOKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { + if o.ServerInfo != nil { if err := o.ServerInfo.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -464,6 +475,7 @@ StatusOKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model StatusOKBodyAgentsInfoItems0 */ type StatusOKBodyAgentsInfoItems0 struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -677,6 +689,7 @@ StatusOKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model StatusOKBodyServerInfo */ type StatusOKBodyServerInfo struct { + // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentpb/agent.pb.go b/api/agentpb/agent.pb.go index 81d6fde6bb..87e12b2407 100644 --- a/api/agentpb/agent.pb.go +++ b/api/agentpb/agent.pb.go @@ -7,17 +7,15 @@ package agentpb import ( - reflect "reflect" - sync "sync" - + inventorypb "github.com/percona/pmm/api/inventorypb" + backup "github.com/percona/pmm/api/managementpb/backup" status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - inventorypb "github.com/percona/pmm/api/inventorypb" - backup "github.com/percona/pmm/api/managementpb/backup" + reflect "reflect" + sync "sync" ) const ( @@ -7572,114 +7570,111 @@ func file_agentpb_agent_proto_rawDescGZIP() []byte { return file_agentpb_agent_proto_rawDescData } -var ( - file_agentpb_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_agentpb_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 89) - file_agentpb_agent_proto_goTypes = []interface{}{ - (MysqlExplainOutputFormat)(0), // 0: agent.MysqlExplainOutputFormat - (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.StartActionRequest.RestartSystemServiceParams.SystemService - (*TextFiles)(nil), // 2: agent.TextFiles - (*Ping)(nil), // 3: agent.Ping - (*Pong)(nil), // 4: agent.Pong - (*QANCollectRequest)(nil), // 5: agent.QANCollectRequest - (*QANCollectResponse)(nil), // 6: agent.QANCollectResponse - (*StateChangedRequest)(nil), // 7: agent.StateChangedRequest - (*StateChangedResponse)(nil), // 8: agent.StateChangedResponse - (*SetStateRequest)(nil), // 9: agent.SetStateRequest - (*SetStateResponse)(nil), // 10: agent.SetStateResponse - (*QueryActionValue)(nil), // 11: agent.QueryActionValue - (*QueryActionSlice)(nil), // 12: agent.QueryActionSlice - (*QueryActionMap)(nil), // 13: agent.QueryActionMap - (*QueryActionBinary)(nil), // 14: agent.QueryActionBinary - (*QueryActionResult)(nil), // 15: agent.QueryActionResult - (*StartActionRequest)(nil), // 16: agent.StartActionRequest - (*StartActionResponse)(nil), // 17: agent.StartActionResponse - (*StopActionRequest)(nil), // 18: agent.StopActionRequest - (*StopActionResponse)(nil), // 19: agent.StopActionResponse - (*ActionResultRequest)(nil), // 20: agent.ActionResultRequest - (*ActionResultResponse)(nil), // 21: agent.ActionResultResponse - (*PBMSwitchPITRRequest)(nil), // 22: agent.PBMSwitchPITRRequest - (*PBMSwitchPITRResponse)(nil), // 23: agent.PBMSwitchPITRResponse - (*AgentLogsRequest)(nil), // 24: agent.AgentLogsRequest - (*AgentLogsResponse)(nil), // 25: agent.AgentLogsResponse - (*CheckConnectionRequest)(nil), // 26: agent.CheckConnectionRequest - (*CheckConnectionResponse)(nil), // 27: agent.CheckConnectionResponse - (*JobStatusRequest)(nil), // 28: agent.JobStatusRequest - (*JobStatusResponse)(nil), // 29: agent.JobStatusResponse - (*S3LocationConfig)(nil), // 30: agent.S3LocationConfig - (*FilesystemLocationConfig)(nil), // 31: agent.FilesystemLocationConfig - (*StartJobRequest)(nil), // 32: agent.StartJobRequest - (*StartJobResponse)(nil), // 33: agent.StartJobResponse - (*StopJobRequest)(nil), // 34: agent.StopJobRequest - (*StopJobResponse)(nil), // 35: agent.StopJobResponse - (*JobResult)(nil), // 36: agent.JobResult - (*JobProgress)(nil), // 37: agent.JobProgress - (*GetVersionsRequest)(nil), // 38: agent.GetVersionsRequest - (*GetVersionsResponse)(nil), // 39: agent.GetVersionsResponse - (*AgentMessage)(nil), // 40: agent.AgentMessage - (*ServerMessage)(nil), // 41: agent.ServerMessage - nil, // 42: agent.TextFiles.FilesEntry - (*SetStateRequest_AgentProcess)(nil), // 43: agent.SetStateRequest.AgentProcess - nil, // 44: agent.SetStateRequest.AgentProcessesEntry - (*SetStateRequest_BuiltinAgent)(nil), // 45: agent.SetStateRequest.BuiltinAgent - nil, // 46: agent.SetStateRequest.BuiltinAgentsEntry - nil, // 47: agent.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 48: agent.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 49: agent.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 50: agent.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 51: agent.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 52: agent.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 53: agent.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 54: agent.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 55: agent.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 56: agent.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTPgSummaryParams)(nil), // 57: agent.StartActionRequest.PTPgSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 58: agent.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_PTMySQLSummaryParams)(nil), // 59: agent.StartActionRequest.PTMySQLSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 60: agent.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 61: agent.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 62: agent.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 63: agent.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 64: agent.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 65: agent.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 66: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 67: agent.StartActionRequest.MongoDBQueryReplSetGetStatusParams - (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 68: agent.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - (*StartActionRequest_RestartSystemServiceParams)(nil), // 69: agent.StartActionRequest.RestartSystemServiceParams - (*CheckConnectionResponse_Stats)(nil), // 70: agent.CheckConnectionResponse.Stats - (*StartJobRequest_MySQLBackup)(nil), // 71: agent.StartJobRequest.MySQLBackup - (*StartJobRequest_MySQLRestoreBackup)(nil), // 72: agent.StartJobRequest.MySQLRestoreBackup - (*StartJobRequest_MongoDBBackup)(nil), // 73: agent.StartJobRequest.MongoDBBackup - (*StartJobRequest_MongoDBRestoreBackup)(nil), // 74: agent.StartJobRequest.MongoDBRestoreBackup - (*JobResult_Error)(nil), // 75: agent.JobResult.Error - (*JobResult_MongoDBBackup)(nil), // 76: agent.JobResult.MongoDBBackup - (*JobResult_MySQLBackup)(nil), // 77: agent.JobResult.MySQLBackup - (*JobResult_MySQLRestoreBackup)(nil), // 78: agent.JobResult.MySQLRestoreBackup - (*JobResult_MongoDBRestoreBackup)(nil), // 79: agent.JobResult.MongoDBRestoreBackup - (*JobProgress_MySQLBackup)(nil), // 80: agent.JobProgress.MySQLBackup - (*JobProgress_MySQLRestoreBackup)(nil), // 81: agent.JobProgress.MySQLRestoreBackup - (*JobProgress_Logs)(nil), // 82: agent.JobProgress.Logs - (*GetVersionsRequest_MySQLd)(nil), // 83: agent.GetVersionsRequest.MySQLd - (*GetVersionsRequest_Xtrabackup)(nil), // 84: agent.GetVersionsRequest.Xtrabackup - (*GetVersionsRequest_Xbcloud)(nil), // 85: agent.GetVersionsRequest.Xbcloud - (*GetVersionsRequest_Qpress)(nil), // 86: agent.GetVersionsRequest.Qpress - (*GetVersionsRequest_MongoDB)(nil), // 87: agent.GetVersionsRequest.MongoDB - (*GetVersionsRequest_PBM)(nil), // 88: agent.GetVersionsRequest.PBM - (*GetVersionsRequest_Software)(nil), // 89: agent.GetVersionsRequest.Software - (*GetVersionsResponse_Version)(nil), // 90: agent.GetVersionsResponse.Version - (*timestamppb.Timestamp)(nil), // 91: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 92: agent.MetricsBucket - (inventorypb.AgentStatus)(0), // 93: inventory.AgentStatus - (*durationpb.Duration)(nil), // 94: google.protobuf.Duration - (inventorypb.ServiceType)(0), // 95: inventory.ServiceType - (*status.Status)(nil), // 96: google.rpc.Status - (inventorypb.AgentType)(0), // 97: inventory.AgentType - (backup.DataModel)(0), // 98: backup.v1.DataModel - (*backup.PbmMetadata)(nil), // 99: backup.v1.PbmMetadata - (*backup.Metadata)(nil), // 100: backup.v1.Metadata - } -) - +var file_agentpb_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_agentpb_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 89) +var file_agentpb_agent_proto_goTypes = []interface{}{ + (MysqlExplainOutputFormat)(0), // 0: agent.MysqlExplainOutputFormat + (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.StartActionRequest.RestartSystemServiceParams.SystemService + (*TextFiles)(nil), // 2: agent.TextFiles + (*Ping)(nil), // 3: agent.Ping + (*Pong)(nil), // 4: agent.Pong + (*QANCollectRequest)(nil), // 5: agent.QANCollectRequest + (*QANCollectResponse)(nil), // 6: agent.QANCollectResponse + (*StateChangedRequest)(nil), // 7: agent.StateChangedRequest + (*StateChangedResponse)(nil), // 8: agent.StateChangedResponse + (*SetStateRequest)(nil), // 9: agent.SetStateRequest + (*SetStateResponse)(nil), // 10: agent.SetStateResponse + (*QueryActionValue)(nil), // 11: agent.QueryActionValue + (*QueryActionSlice)(nil), // 12: agent.QueryActionSlice + (*QueryActionMap)(nil), // 13: agent.QueryActionMap + (*QueryActionBinary)(nil), // 14: agent.QueryActionBinary + (*QueryActionResult)(nil), // 15: agent.QueryActionResult + (*StartActionRequest)(nil), // 16: agent.StartActionRequest + (*StartActionResponse)(nil), // 17: agent.StartActionResponse + (*StopActionRequest)(nil), // 18: agent.StopActionRequest + (*StopActionResponse)(nil), // 19: agent.StopActionResponse + (*ActionResultRequest)(nil), // 20: agent.ActionResultRequest + (*ActionResultResponse)(nil), // 21: agent.ActionResultResponse + (*PBMSwitchPITRRequest)(nil), // 22: agent.PBMSwitchPITRRequest + (*PBMSwitchPITRResponse)(nil), // 23: agent.PBMSwitchPITRResponse + (*AgentLogsRequest)(nil), // 24: agent.AgentLogsRequest + (*AgentLogsResponse)(nil), // 25: agent.AgentLogsResponse + (*CheckConnectionRequest)(nil), // 26: agent.CheckConnectionRequest + (*CheckConnectionResponse)(nil), // 27: agent.CheckConnectionResponse + (*JobStatusRequest)(nil), // 28: agent.JobStatusRequest + (*JobStatusResponse)(nil), // 29: agent.JobStatusResponse + (*S3LocationConfig)(nil), // 30: agent.S3LocationConfig + (*FilesystemLocationConfig)(nil), // 31: agent.FilesystemLocationConfig + (*StartJobRequest)(nil), // 32: agent.StartJobRequest + (*StartJobResponse)(nil), // 33: agent.StartJobResponse + (*StopJobRequest)(nil), // 34: agent.StopJobRequest + (*StopJobResponse)(nil), // 35: agent.StopJobResponse + (*JobResult)(nil), // 36: agent.JobResult + (*JobProgress)(nil), // 37: agent.JobProgress + (*GetVersionsRequest)(nil), // 38: agent.GetVersionsRequest + (*GetVersionsResponse)(nil), // 39: agent.GetVersionsResponse + (*AgentMessage)(nil), // 40: agent.AgentMessage + (*ServerMessage)(nil), // 41: agent.ServerMessage + nil, // 42: agent.TextFiles.FilesEntry + (*SetStateRequest_AgentProcess)(nil), // 43: agent.SetStateRequest.AgentProcess + nil, // 44: agent.SetStateRequest.AgentProcessesEntry + (*SetStateRequest_BuiltinAgent)(nil), // 45: agent.SetStateRequest.BuiltinAgent + nil, // 46: agent.SetStateRequest.BuiltinAgentsEntry + nil, // 47: agent.SetStateRequest.AgentProcess.TextFilesEntry + nil, // 48: agent.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 49: agent.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 50: agent.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 51: agent.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 52: agent.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 53: agent.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 54: agent.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 55: agent.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 56: agent.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTPgSummaryParams)(nil), // 57: agent.StartActionRequest.PTPgSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 58: agent.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_PTMySQLSummaryParams)(nil), // 59: agent.StartActionRequest.PTMySQLSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 60: agent.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 61: agent.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 62: agent.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 63: agent.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 64: agent.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 65: agent.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 66: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 67: agent.StartActionRequest.MongoDBQueryReplSetGetStatusParams + (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 68: agent.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + (*StartActionRequest_RestartSystemServiceParams)(nil), // 69: agent.StartActionRequest.RestartSystemServiceParams + (*CheckConnectionResponse_Stats)(nil), // 70: agent.CheckConnectionResponse.Stats + (*StartJobRequest_MySQLBackup)(nil), // 71: agent.StartJobRequest.MySQLBackup + (*StartJobRequest_MySQLRestoreBackup)(nil), // 72: agent.StartJobRequest.MySQLRestoreBackup + (*StartJobRequest_MongoDBBackup)(nil), // 73: agent.StartJobRequest.MongoDBBackup + (*StartJobRequest_MongoDBRestoreBackup)(nil), // 74: agent.StartJobRequest.MongoDBRestoreBackup + (*JobResult_Error)(nil), // 75: agent.JobResult.Error + (*JobResult_MongoDBBackup)(nil), // 76: agent.JobResult.MongoDBBackup + (*JobResult_MySQLBackup)(nil), // 77: agent.JobResult.MySQLBackup + (*JobResult_MySQLRestoreBackup)(nil), // 78: agent.JobResult.MySQLRestoreBackup + (*JobResult_MongoDBRestoreBackup)(nil), // 79: agent.JobResult.MongoDBRestoreBackup + (*JobProgress_MySQLBackup)(nil), // 80: agent.JobProgress.MySQLBackup + (*JobProgress_MySQLRestoreBackup)(nil), // 81: agent.JobProgress.MySQLRestoreBackup + (*JobProgress_Logs)(nil), // 82: agent.JobProgress.Logs + (*GetVersionsRequest_MySQLd)(nil), // 83: agent.GetVersionsRequest.MySQLd + (*GetVersionsRequest_Xtrabackup)(nil), // 84: agent.GetVersionsRequest.Xtrabackup + (*GetVersionsRequest_Xbcloud)(nil), // 85: agent.GetVersionsRequest.Xbcloud + (*GetVersionsRequest_Qpress)(nil), // 86: agent.GetVersionsRequest.Qpress + (*GetVersionsRequest_MongoDB)(nil), // 87: agent.GetVersionsRequest.MongoDB + (*GetVersionsRequest_PBM)(nil), // 88: agent.GetVersionsRequest.PBM + (*GetVersionsRequest_Software)(nil), // 89: agent.GetVersionsRequest.Software + (*GetVersionsResponse_Version)(nil), // 90: agent.GetVersionsResponse.Version + (*timestamppb.Timestamp)(nil), // 91: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 92: agent.MetricsBucket + (inventorypb.AgentStatus)(0), // 93: inventory.AgentStatus + (*durationpb.Duration)(nil), // 94: google.protobuf.Duration + (inventorypb.ServiceType)(0), // 95: inventory.ServiceType + (*status.Status)(nil), // 96: google.rpc.Status + (inventorypb.AgentType)(0), // 97: inventory.AgentType + (backup.DataModel)(0), // 98: backup.v1.DataModel + (*backup.PbmMetadata)(nil), // 99: backup.v1.PbmMetadata + (*backup.Metadata)(nil), // 100: backup.v1.Metadata +} var file_agentpb_agent_proto_depIdxs = []int32{ 42, // 0: agent.TextFiles.files:type_name -> agent.TextFiles.FilesEntry 91, // 1: agent.Pong.current_time:type_name -> google.protobuf.Timestamp diff --git a/api/agentpb/agent.pb.validate.go b/api/agentpb/agent.pb.validate.go index 75971959e9..732541f073 100644 --- a/api/agentpb/agent.pb.validate.go +++ b/api/agentpb/agent.pb.validate.go @@ -18,8 +18,9 @@ import ( "google.golang.org/protobuf/types/known/anypb" - inventorypb "github.com/percona/pmm/api/inventorypb" backupv1 "github.com/percona/pmm/api/managementpb/backup" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) // ensure the imports are used diff --git a/api/agentpb/agent.swagger.json b/api/agentpb/agent.swagger.json new file mode 100644 index 0000000000..36457a3ca2 --- /dev/null +++ b/api/agentpb/agent.swagger.json @@ -0,0 +1,2478 @@ +{ + "swagger": "2.0", + "info": { + "title": "agentpb/agent.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Agent" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "CheckConnectionResponseStats": { + "type": "object", + "properties": { + "table_count": { + "type": "integer", + "format": "int32", + "description": "A number of tables, 0 if unknown." + } + }, + "description": "Stats contains various Service statistics." + }, + "GetVersionsRequestMySQLd": { + "type": "object", + "description": "MySQLd is used for mysqld binary version retrieving using `mysqld --version`." + }, + "GetVersionsRequestPBM": { + "type": "object", + "description": "PBM is used for pbm (Percona Backup for MongoDB) binary version retrieving." + }, + "GetVersionsRequestQpress": { + "type": "object", + "description": "Qpress is used for qpress binary version retrieving." + }, + "GetVersionsRequestSoftware": { + "type": "object", + "properties": { + "mysqld": { + "$ref": "#/definitions/GetVersionsRequestMySQLd" + }, + "xtrabackup": { + "$ref": "#/definitions/GetVersionsRequestXtrabackup" + }, + "xbcloud": { + "$ref": "#/definitions/GetVersionsRequestXbcloud" + }, + "qpress": { + "$ref": "#/definitions/GetVersionsRequestQpress" + }, + "mongod": { + "$ref": "#/definitions/agentGetVersionsRequestMongoDB" + }, + "pbm": { + "$ref": "#/definitions/GetVersionsRequestPBM" + } + }, + "description": "Software is used to select software for which retrieve version." + }, + "GetVersionsRequestXbcloud": { + "type": "object", + "description": "Xbcloud is used for xbcloud binary version retrieving." + }, + "GetVersionsRequestXtrabackup": { + "type": "object", + "description": "Xtrabackup is used for xtrabackup binary version retrieving." + }, + "GetVersionsResponseVersion": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "error": { + "type": "string" + } + }, + "description": "Version contains the version field of the requested software and\nthe error field which is set in case of version retrieving error." + }, + "JobProgressLogs": { + "type": "object", + "properties": { + "chunk_id": { + "type": "integer", + "format": "int64" + }, + "data": { + "type": "string" + }, + "done": { + "type": "boolean" + } + }, + "description": "Logs contains generic logs from job." + }, + "JobResultError": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "description": "Error contains job error message." + }, + "MetricsBucketCommon": { + "type": "object", + "properties": { + "queryid": { + "type": "string", + "description": "md5 of digest_text/fingerprint." + }, + "explain_fingerprint": { + "type": "string", + "description": "contains fingerprint prepared by sql parser, which can be different than fingerprint." + }, + "placeholders_count": { + "type": "integer", + "format": "int64", + "description": "ammount of variables in query." + }, + "comments": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "List of keys and values of comments." + }, + "fingerprint": { + "type": "string", + "description": "digest_text - query signature. Query without values." + }, + "database": { + "type": "string", + "description": "Dimension Group.\n\nMongoDB or PostgreSQL database.\nSeveral databases can't be combined in a single declarative query." + }, + "schema": { + "type": "string", + "description": "MySQL database or PostgreSQL schema.\nSeveral schemas can be combined in a single declarative query." + }, + "tables": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tables or Collections list." + }, + "username": { + "type": "string", + "description": "client user name." + }, + "client_host": { + "type": "string", + "description": "client IP or hostname." + }, + "agent_id": { + "type": "string", + "description": "Identifier of agent that collect and send metrics." + }, + "agent_type": { + "$ref": "#/definitions/inventoryAgentType", + "description": "Metrics source.\n\nPeriod and Query Example Group." + }, + "period_start_unix_secs": { + "type": "integer", + "format": "int64", + "description": "Time when collection of bucket started." + }, + "period_length_secs": { + "type": "integer", + "format": "int64", + "description": "Duration of bucket." + }, + "example": { + "type": "string", + "description": "One of query example from set found in bucket." + }, + "example_format": { + "$ref": "#/definitions/agentExampleFormat", + "description": "Deprecated: should not be used, should be removed." + }, + "example_type": { + "$ref": "#/definitions/agentExampleType" + }, + "is_truncated": { + "type": "boolean", + "description": "Indicates if the query example is truncated.\n\nMetrics." + }, + "num_queries_with_warnings": { + "type": "number", + "format": "float", + "description": "How many queries was with warnings in bucket." + }, + "num_queries_with_errors": { + "type": "number", + "format": "float", + "description": "How many queries was with error in bucket." + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uint64" + }, + "description": "List of errors: {code: count}." + }, + "num_queries": { + "type": "number", + "format": "float", + "description": "Amount queries in this bucket." + }, + "m_query_time_cnt": { + "type": "number", + "format": "float", + "description": "How many times query_time was found." + }, + "m_query_time_sum": { + "type": "number", + "format": "float", + "description": "The statement execution time in seconds." + }, + "m_query_time_min": { + "type": "number", + "format": "float", + "description": "Smallest value of query_time in bucket." + }, + "m_query_time_max": { + "type": "number", + "format": "float", + "description": "Biggest value of query_time in bucket." + }, + "m_query_time_p99": { + "type": "number", + "format": "float", + "description": "99 percentile of value of query_time in bucket." + } + }, + "description": "Common contains common fields for all DBs." + }, + "MetricsBucketMySQL": { + "type": "object", + "properties": { + "m_lock_time_cnt": { + "type": "number", + "format": "float" + }, + "m_lock_time_sum": { + "type": "number", + "format": "float", + "description": "The time to acquire locks in seconds." + }, + "m_lock_time_min": { + "type": "number", + "format": "float" + }, + "m_lock_time_max": { + "type": "number", + "format": "float" + }, + "m_lock_time_p99": { + "type": "number", + "format": "float" + }, + "m_rows_sent_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_sent_sum": { + "type": "number", + "format": "float", + "description": "The number of rows sent to the client." + }, + "m_rows_sent_min": { + "type": "number", + "format": "float" + }, + "m_rows_sent_max": { + "type": "number", + "format": "float" + }, + "m_rows_sent_p99": { + "type": "number", + "format": "float" + }, + "m_rows_examined_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_examined_sum": { + "type": "number", + "format": "float", + "description": "Number of rows scanned - SELECT." + }, + "m_rows_examined_min": { + "type": "number", + "format": "float" + }, + "m_rows_examined_max": { + "type": "number", + "format": "float" + }, + "m_rows_examined_p99": { + "type": "number", + "format": "float" + }, + "m_rows_affected_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_affected_sum": { + "type": "number", + "format": "float", + "description": "Number of rows changed - UPDATE, DELETE, INSERT." + }, + "m_rows_affected_min": { + "type": "number", + "format": "float" + }, + "m_rows_affected_max": { + "type": "number", + "format": "float" + }, + "m_rows_affected_p99": { + "type": "number", + "format": "float" + }, + "m_rows_read_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_read_sum": { + "type": "number", + "format": "float", + "description": "The number of rows read from tables." + }, + "m_rows_read_min": { + "type": "number", + "format": "float" + }, + "m_rows_read_max": { + "type": "number", + "format": "float" + }, + "m_rows_read_p99": { + "type": "number", + "format": "float" + }, + "m_merge_passes_cnt": { + "type": "number", + "format": "float" + }, + "m_merge_passes_sum": { + "type": "number", + "format": "float", + "description": "The number of merge passes that the sort algorithm has had to do." + }, + "m_merge_passes_min": { + "type": "number", + "format": "float" + }, + "m_merge_passes_max": { + "type": "number", + "format": "float" + }, + "m_merge_passes_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_sum": { + "type": "number", + "format": "float", + "description": "Counts the number of page read operations scheduled." + }, + "m_innodb_io_r_ops_min": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_max": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_sum": { + "type": "number", + "format": "float", + "description": "Similar to innodb_IO_r_ops, but the unit is bytes." + }, + "m_innodb_io_r_bytes_min": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_max": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_sum": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." + }, + "m_innodb_io_r_wait_min": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_max": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_sum": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query waited for row locks." + }, + "m_innodb_rec_lock_wait_min": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_max": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_sum": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." + }, + "m_innodb_queue_wait_min": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_max": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_sum": { + "type": "number", + "format": "float", + "description": "Counts approximately the number of unique pages the query accessed." + }, + "m_innodb_pages_distinct_min": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_max": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_p99": { + "type": "number", + "format": "float" + }, + "m_query_length_cnt": { + "type": "number", + "format": "float" + }, + "m_query_length_sum": { + "type": "number", + "format": "float", + "description": "Shows how long the query is." + }, + "m_query_length_min": { + "type": "number", + "format": "float" + }, + "m_query_length_max": { + "type": "number", + "format": "float" + }, + "m_query_length_p99": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_cnt": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_sum": { + "type": "number", + "format": "float", + "description": "The number of bytes sent to all clients." + }, + "m_bytes_sent_min": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_max": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_p99": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_sum": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on memory for the query." + }, + "m_tmp_tables_min": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_max": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_p99": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_sum": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on disk for the query." + }, + "m_tmp_disk_tables_min": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_max": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_p99": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_sum": { + "type": "number", + "format": "float", + "description": "Total Size in bytes for all temporary tables used in the query." + }, + "m_tmp_table_sizes_min": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_max": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_p99": { + "type": "number", + "format": "float" + }, + "m_qc_hit_cnt": { + "type": "number", + "format": "float", + "description": "Boolean metrics:\n- *_cnt - how many times this metric was met.\n- *_sum - how many times this metric was true." + }, + "m_qc_hit_sum": { + "type": "number", + "format": "float", + "description": "Query Cache hits." + }, + "m_full_scan_cnt": { + "type": "number", + "format": "float" + }, + "m_full_scan_sum": { + "type": "number", + "format": "float", + "description": "The query performed a full table scan." + }, + "m_full_join_cnt": { + "type": "number", + "format": "float" + }, + "m_full_join_sum": { + "type": "number", + "format": "float", + "description": "The query performed a full join (a join without indexes)." + }, + "m_tmp_table_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sum": { + "type": "number", + "format": "float", + "description": "The query created an implicit internal temporary table." + }, + "m_tmp_table_on_disk_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_table_on_disk_sum": { + "type": "number", + "format": "float", + "description": "The querys temporary table was stored on disk." + }, + "m_filesort_cnt": { + "type": "number", + "format": "float" + }, + "m_filesort_sum": { + "type": "number", + "format": "float", + "description": "The query used a filesort." + }, + "m_filesort_on_disk_cnt": { + "type": "number", + "format": "float" + }, + "m_filesort_on_disk_sum": { + "type": "number", + "format": "float", + "description": "The filesort was performed on disk." + }, + "m_select_full_range_join_cnt": { + "type": "number", + "format": "float" + }, + "m_select_full_range_join_sum": { + "type": "number", + "format": "float", + "description": "The number of joins that used a range search on a reference table." + }, + "m_select_range_cnt": { + "type": "number", + "format": "float" + }, + "m_select_range_sum": { + "type": "number", + "format": "float", + "description": "The number of joins that used ranges on the first table." + }, + "m_select_range_check_cnt": { + "type": "number", + "format": "float" + }, + "m_select_range_check_sum": { + "type": "number", + "format": "float", + "description": "The number of joins without keys that check for key usage after each row." + }, + "m_sort_range_cnt": { + "type": "number", + "format": "float" + }, + "m_sort_range_sum": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done using ranges." + }, + "m_sort_rows_cnt": { + "type": "number", + "format": "float" + }, + "m_sort_rows_sum": { + "type": "number", + "format": "float", + "description": "The number of sorted rows." + }, + "m_sort_scan_cnt": { + "type": "number", + "format": "float" + }, + "m_sort_scan_sum": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done by scanning the table." + }, + "m_no_index_used_cnt": { + "type": "number", + "format": "float" + }, + "m_no_index_used_sum": { + "type": "number", + "format": "float", + "description": "The number of queries without index." + }, + "m_no_good_index_used_cnt": { + "type": "number", + "format": "float" + }, + "m_no_good_index_used_sum": { + "type": "number", + "format": "float", + "description": "The number of queries without good index." + } + }, + "description": "MySQL contains metrics for MySQL." + }, + "MetricsBucketPostgreSQL": { + "type": "object", + "properties": { + "m_rows_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_sum": { + "type": "number", + "format": "float", + "description": "The number of rows sent to the client." + }, + "m_shared_blks_hit_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_hit_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared block cache hits by the statement." + }, + "m_shared_blks_read_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_read_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks read by the statement." + }, + "m_shared_blks_dirtied_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_dirtied_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks dirtied by the statement." + }, + "m_shared_blks_written_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_written_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks written by the statement." + }, + "m_local_blks_hit_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_hit_sum": { + "type": "number", + "format": "float", + "description": "Total number of local block cache hits by the statement." + }, + "m_local_blks_read_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_read_sum": { + "type": "number", + "format": "float", + "description": "Total number of local blocks read by the statement." + }, + "m_local_blks_dirtied_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_dirtied_sum": { + "type": "number", + "format": "float", + "description": "Total number of local blocks dirtied by the statement." + }, + "m_local_blks_written_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_written_sum": { + "type": "number", + "format": "float", + "description": "Total number of local blocks written by the statement." + }, + "m_temp_blks_read_cnt": { + "type": "number", + "format": "float" + }, + "m_temp_blks_read_sum": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks read by the statement." + }, + "m_temp_blks_written_cnt": { + "type": "number", + "format": "float" + }, + "m_temp_blks_written_sum": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks written by the statement." + }, + "m_blk_read_time_cnt": { + "type": "number", + "format": "float" + }, + "m_blk_read_time_sum": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_blk_write_time_cnt": { + "type": "number", + "format": "float" + }, + "m_blk_write_time_sum": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_cpu_user_time_cnt": { + "type": "number", + "format": "float" + }, + "m_cpu_user_time_sum": { + "type": "number", + "format": "float", + "description": "Total time user spent in query." + }, + "m_cpu_sys_time_cnt": { + "type": "number", + "format": "float" + }, + "m_cpu_sys_time_sum": { + "type": "number", + "format": "float", + "description": "Total time system spent in query." + }, + "cmd_type": { + "type": "string", + "description": "Type of SQL command." + }, + "m_plans_calls_sum": { + "type": "number", + "format": "float", + "description": "Total number of planned calls.", + "title": "pg_stat_monitor 0.9 metrics" + }, + "m_plans_calls_cnt": { + "type": "number", + "format": "float" + }, + "m_wal_records_sum": { + "type": "number", + "format": "float", + "description": "Total number of WAL (Write-ahead logging) records." + }, + "m_wal_records_cnt": { + "type": "number", + "format": "float" + }, + "m_wal_fpi_sum": { + "type": "number", + "format": "float", + "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." + }, + "m_wal_fpi_cnt": { + "type": "number", + "format": "float" + }, + "m_wal_bytes_sum": { + "type": "number", + "format": "float", + "description": "Total bytes of WAL (Write-ahead logging) records." + }, + "m_wal_bytes_cnt": { + "type": "number", + "format": "float" + }, + "m_plan_time_sum": { + "type": "number", + "format": "float", + "description": "Sum, count, min, max of plan time." + }, + "m_plan_time_cnt": { + "type": "number", + "format": "float" + }, + "m_plan_time_min": { + "type": "number", + "format": "float" + }, + "m_plan_time_max": { + "type": "number", + "format": "float" + }, + "top_queryid": { + "type": "string", + "title": "Metrics skipped due to different bucket_time in pg_stat_monitor (1min in PMM, 5min in pg_stat_monitor):\nmin_time, max_time, mean_time\nplan_mean_time\nstddev_time\nOther metrics skipped (empty values, codes):\ncmd_type_text, elevel, sqlcode, message, state_code, state" + }, + "top_query": { + "type": "string" + }, + "application_name": { + "type": "string" + }, + "planid": { + "type": "string" + }, + "query_plan": { + "type": "string" + }, + "histogram_items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/agentHistogramItem" + } + } + }, + "description": "PostgreSQL contains metrics for PostgreSQL." + }, + "RestartSystemServiceParamsSystemService": { + "type": "string", + "enum": [ + "SYSTEM_SERVICE_INVALID", + "MONGOD", + "PBM_AGENT" + ], + "default": "SYSTEM_SERVICE_INVALID", + "title": "SystemService is a systemctl service that can be restarted from PMM server" + }, + "SetStateRequestAgentProcess": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/inventoryAgentType" + }, + "template_left_delim": { + "type": "string" + }, + "template_right_delim": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "type": "array", + "items": { + "type": "string" + } + }, + "text_files": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "redact_words": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "AgentProcess describes desired configuration of a single agent process started by pmm-agent." + }, + "SetStateRequestBuiltinAgent": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/inventoryAgentType" + }, + "dsn": { + "type": "string" + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disables query examples for QAN Agents if true." + }, + "max_query_log_size": { + "type": "string", + "format": "int64", + "description": "Instructs QAN Agents to rotate query log file or table at this size if \u003e 0." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls": { + "type": "boolean", + "description": "TLS in enabled if true." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "BuiltinAgent describes desired configuration of a single built-in agent for pmm-agent." + }, + "StartActionRequestMongoDBExplainParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "query": { + "type": "string" + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBExplainParams describes MongoDB EXPLAIN action parameters." + }, + "StartActionRequestMongoDBQueryBuildInfoParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBQueryBuildInfoParams describes MongoDB buildInfo query action parameters." + }, + "StartActionRequestMongoDBQueryGetCmdLineOptsParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBQueryGetCmdLineOptsParams describes MongoDB getCmdLineOpts query action parameters." + }, + "StartActionRequestMongoDBQueryGetDiagnosticDataParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBQueryGetDiagnosticDataParams describes MongoDB getDiagnosticData query action parameters." + }, + "StartActionRequestMongoDBQueryGetParameterParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBQueryGetParameterParams describes MongoDB getParameter query action parameters." + }, + "StartActionRequestMongoDBQueryReplSetGetStatusParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBQueryReplSetGetStatusParams describes MongoDB replSetGetStatus query action parameters." + }, + "StartActionRequestMySQLExplainParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "query": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "schema": { + "type": "string" + }, + "output_format": { + "$ref": "#/definitions/agentMysqlExplainOutputFormat" + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "MySQLExplainParams describes MySQL EXPLAIN action parameters." + }, + "StartActionRequestMySQLQuerySelectParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "query": { + "type": "string", + "description": "Query suffix (without leading SELECT)." + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "MySQLQuerySelectParams describes MySQL SELECT query action parameters." + }, + "StartActionRequestMySQLQueryShowParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "query": { + "type": "string", + "description": "Query suffix (without leading SHOW)." + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "MySQLQueryShowParams describes MySQL SHOW query action parameters." + }, + "StartActionRequestMySQLShowCreateTableParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "table": { + "type": "string" + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "MySQLShowCreateTableParams describes MySQL SHOW CREATE TABLE action parameters." + }, + "StartActionRequestMySQLShowIndexParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "table": { + "type": "string" + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "MySQLShowIndexParams describes MySQL SHOW INDEX action parameters." + }, + "StartActionRequestMySQLShowTableStatusParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "table": { + "type": "string" + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "MySQLShowTableStatusParams describes MySQL SHOW TABLE STATUS action parameters." + }, + "StartActionRequestPTMongoDBSummaryParams": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "description": "PTMongoDBSummaryParams describes parameters for PT MongoDB summary." + }, + "StartActionRequestPTMySQLSummaryParams": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int64" + }, + "socket": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "description": "PTMySQLSummaryParams describes parameters for PT MySQL summary." + }, + "StartActionRequestPTPgSummaryParams": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "description": "PTPgSummaryParams describes parameters for PT PG summary." + }, + "StartActionRequestPTSummaryParams": { + "type": "object", + "description": "PTSummaryParams describes parameters for PT summary." + }, + "StartActionRequestPostgreSQLQuerySelectParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "query": { + "type": "string", + "description": "Query suffix (without leading SELECT)." + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "PostgreSQLQuerySelectParams describes PostgreSQL SELECT query action parameters." + }, + "StartActionRequestPostgreSQLQueryShowParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "PostgreSQLQueryShowParams describes PostgreSQL SHOW query action parameters." + }, + "StartActionRequestPostgreSQLShowCreateTableParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "table": { + "type": "string" + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "PostgreSQLShowCreateTableParams describes PostgreSQL SHOW CREATE TABLE action parameters." + }, + "StartActionRequestPostgreSQLShowIndexParams": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "table": { + "type": "string" + }, + "tls_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "PostgreSQLShowIndexParams describes PostgreSQL SHOW INDEX action parameters." + }, + "StartActionRequestRestartSystemServiceParams": { + "type": "object", + "properties": { + "system_service": { + "$ref": "#/definitions/RestartSystemServiceParamsSystemService" + } + }, + "description": "RestartSystemServiceParams describes an action request to restart a systemctl service on a node." + }, + "agentActionResultRequest": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique action ID." + }, + "output": { + "type": "string", + "format": "byte", + "description": "New chunk of action output." + }, + "done": { + "type": "boolean", + "description": "True if action is finished." + }, + "error": { + "type": "string", + "description": "Error message if action failed." + } + }, + "description": "ActionResultRequest is an AgentMessage containing action run status and new chunk of output." + }, + "agentActionResultResponse": { + "type": "object", + "description": "ActionResultResponse is an ServerMessage for ActionResultRequest acceptance." + }, + "agentAgentLogsRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "limit": { + "type": "integer", + "format": "int64" + } + }, + "description": "AgentLogsRequest is an ServerMessage asking logs by Agent ID." + }, + "agentAgentLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "string" + } + }, + "agent_config_log_lines_count": { + "type": "integer", + "format": "int64" + } + }, + "description": "AgentLogsResponse is an AgentMessage containing logs by Agent ID." + }, + "agentCheckConnectionRequest": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/inventoryServiceType", + "description": "Service type." + }, + "dsn": { + "type": "string", + "description": "DSN for the service. May contain connection (dial) timeout." + }, + "timeout": { + "type": "string", + "description": "Timeout for the whole request." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "TLS certificate wont be verified." + } + }, + "description": "CheckConnectionRequest is a ServerMessage asking pmm-agent to check connection with Service." + }, + "agentCheckConnectionResponse": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Error message if connection check failed." + }, + "stats": { + "$ref": "#/definitions/CheckConnectionResponseStats" + } + }, + "description": "CheckConnectionResponse is an AgentMessage containing a result of connection check." + }, + "agentExampleFormat": { + "type": "string", + "enum": [ + "EXAMPLE_FORMAT_INVALID", + "EXAMPLE", + "FINGERPRINT" + ], + "default": "EXAMPLE_FORMAT_INVALID", + "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed." + }, + "agentExampleType": { + "type": "string", + "enum": [ + "EXAMPLE_TYPE_INVALID", + "RANDOM", + "SLOWEST", + "FASTEST", + "WITH_ERROR" + ], + "default": "EXAMPLE_TYPE_INVALID", + "description": "ExampleType is a type of query example selected for this query class in given period of time." + }, + "agentFilesystemLocationConfig": { + "type": "object", + "properties": { + "path": { + "type": "string" + } + }, + "description": "FilesystemLocationConfig represents path for storing backup artifacts locally." + }, + "agentGetVersionsRequest": { + "type": "object", + "properties": { + "softwares": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/GetVersionsRequestSoftware" + } + } + }, + "description": "GetVersionsRequest represents a request for version retrieving of different software." + }, + "agentGetVersionsRequestMongoDB": { + "type": "object", + "description": "MongoDB is used for mongod binary version retrieving." + }, + "agentGetVersionsResponse": { + "type": "object", + "properties": { + "versions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/GetVersionsResponseVersion" + } + } + }, + "description": "GetVersionsResponse represents a response containing versions of software in the same order as in the request." + }, + "agentHistogramItem": { + "type": "object", + "properties": { + "range": { + "type": "string" + }, + "frequency": { + "type": "integer", + "format": "int64" + } + }, + "description": "HistogramItem represents one item in histogram." + }, + "agentJobProgress": { + "type": "object", + "properties": { + "job_id": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "mysql_backup": { + "$ref": "#/definitions/agentJobProgressMySQLBackup" + }, + "mysql_restore_backup": { + "$ref": "#/definitions/agentJobProgressMySQLRestoreBackup" + }, + "logs": { + "$ref": "#/definitions/JobProgressLogs" + } + }, + "description": "JobProgress represents job progress messages like percentage of completion, status updates, etc." + }, + "agentJobProgressMySQLBackup": { + "type": "object", + "description": "MySQLBackup contains backup job status update." + }, + "agentJobProgressMySQLRestoreBackup": { + "type": "object", + "description": "MySQLRestoreBackup contains restore backup job status update." + }, + "agentJobResult": { + "type": "object", + "properties": { + "job_id": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/JobResultError" + }, + "mysql_backup": { + "$ref": "#/definitions/agentJobResultMySQLBackup" + }, + "mysql_restore_backup": { + "$ref": "#/definitions/agentJobResultMySQLRestoreBackup" + }, + "mongodb_backup": { + "$ref": "#/definitions/agentJobResultMongoDBBackup" + }, + "mongodb_restore_backup": { + "$ref": "#/definitions/agentJobResultMongoDBRestoreBackup" + } + }, + "description": "JobResult represents job result." + }, + "agentJobResultMongoDBBackup": { + "type": "object", + "properties": { + "is_sharded_cluster": { + "type": "boolean" + }, + "metadata": { + "$ref": "#/definitions/v1Metadata", + "description": "Contains additional data describing artifact." + } + }, + "description": "MongoDBBackup contains result for MongoDB backup job." + }, + "agentJobResultMongoDBRestoreBackup": { + "type": "object", + "description": "MongoDBRestoreBackup contains result for MongoDB restore backup job." + }, + "agentJobResultMySQLBackup": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1Metadata", + "description": "Contains additional data describing artifact." + } + }, + "description": "MySQLBackup contains result for MySQL backup job." + }, + "agentJobResultMySQLRestoreBackup": { + "type": "object", + "description": "MySQLRestoreBackup contains result for MySQL restore backup job." + }, + "agentJobStatusRequest": { + "type": "object", + "properties": { + "job_id": { + "type": "string" + } + }, + "description": "JobStatusRequest is a ServerMessage asking pmm-agent for job status." + }, + "agentJobStatusResponse": { + "type": "object", + "properties": { + "alive": { + "type": "boolean" + } + }, + "description": "JobStatusResponse is an AgentMessage containing job status." + }, + "agentMetricsBucket": { + "type": "object", + "properties": { + "common": { + "$ref": "#/definitions/MetricsBucketCommon" + }, + "mysql": { + "$ref": "#/definitions/MetricsBucketMySQL" + }, + "mongodb": { + "$ref": "#/definitions/agentMetricsBucketMongoDB" + }, + "postgresql": { + "$ref": "#/definitions/MetricsBucketPostgreSQL" + } + }, + "description": "MetricsBucket is aggregated message created by pmm-agent.\nContains information about one query selected in defined way from query class in specific period of time." + }, + "agentMetricsBucketMongoDB": { + "type": "object", + "properties": { + "m_docs_returned_cnt": { + "type": "number", + "format": "float" + }, + "m_docs_returned_sum": { + "type": "number", + "format": "float", + "description": "The number of returned documents." + }, + "m_docs_returned_min": { + "type": "number", + "format": "float" + }, + "m_docs_returned_max": { + "type": "number", + "format": "float" + }, + "m_docs_returned_p99": { + "type": "number", + "format": "float" + }, + "m_response_length_cnt": { + "type": "number", + "format": "float" + }, + "m_response_length_sum": { + "type": "number", + "format": "float", + "description": "The response length of the query result in bytes." + }, + "m_response_length_min": { + "type": "number", + "format": "float" + }, + "m_response_length_max": { + "type": "number", + "format": "float" + }, + "m_response_length_p99": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_cnt": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_sum": { + "type": "number", + "format": "float", + "description": "The number of scanned documents." + }, + "m_docs_scanned_min": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_max": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_p99": { + "type": "number", + "format": "float" + } + }, + "description": "MongoDB contains metrics for Mongo DB." + }, + "agentMysqlExplainOutputFormat": { + "type": "string", + "enum": [ + "MYSQL_EXPLAIN_OUTPUT_FORMAT_INVALID", + "MYSQL_EXPLAIN_OUTPUT_FORMAT_DEFAULT", + "MYSQL_EXPLAIN_OUTPUT_FORMAT_JSON", + "MYSQL_EXPLAIN_OUTPUT_FORMAT_TRADITIONAL_JSON" + ], + "default": "MYSQL_EXPLAIN_OUTPUT_FORMAT_INVALID", + "description": "MysqlExplainOutputFormat output formats supported by MySQL Explain action.\n\n - MYSQL_EXPLAIN_OUTPUT_FORMAT_DEFAULT: EXPLAIN FORMAT=TRADITIONAL, returns result as text\n - MYSQL_EXPLAIN_OUTPUT_FORMAT_JSON: EXPLAIN FORMAT=JSON\n - MYSQL_EXPLAIN_OUTPUT_FORMAT_TRADITIONAL_JSON: EXPLAIN FORMAT=TRADITIONAL, returns result as JSON" + }, + "agentPBMSwitchPITRRequest": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "description": "DSN for the MongoDB service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + }, + "enabled": { + "type": "boolean", + "description": "Specifies if PITR should be enabled or disabled." + } + }, + "description": "PBMSwitchPITRRequest is a ServerMessage asking pmm-agent to switch PITR pbm feature." + }, + "agentPBMSwitchPITRResponse": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "Error message." + } + }, + "description": "PBMSwitchPITRResponse is an AgentMessage for PBMSwitchPITRRequest success result." + }, + "agentPing": { + "type": "object", + "description": "Ping is a AgentMessage/ServerMessage for checking connectivity, latency and clock drift." + }, + "agentPong": { + "type": "object", + "properties": { + "current_time": { + "type": "string", + "format": "date-time" + } + }, + "description": "Pong is an AgentMessage/ServerMessage with current time for measuring clock drift." + }, + "agentQANCollectRequest": { + "type": "object", + "properties": { + "metrics_bucket": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/agentMetricsBucket" + } + } + }, + "description": "QANCollectRequest is an AgentMessage for sending QAN data for qan-api." + }, + "agentQANCollectResponse": { + "type": "object", + "description": "QANCollectResponse is a ServerMessage for QAN data acceptance." + }, + "agentS3LocationConfig": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "access_key": { + "type": "string" + }, + "secret_key": { + "type": "string" + }, + "bucket_name": { + "type": "string" + }, + "bucket_region": { + "type": "string" + } + }, + "description": "S3LocationConfig represents S3 bucket configuration." + }, + "agentServerMessage": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/rpcStatus", + "description": "The responder sets the status field in two situations:\n1. When it received a request with the payload field not set.\n That means that responded is older than the requester, and doesn't know about newer payload types.\n Status code UNIMPLEMENTED (12) is reserved for that case.\n2. When the payload is set, but the request can't be performed due to some error." + }, + "pong": { + "$ref": "#/definitions/agentPong", + "title": "responses from server" + }, + "state_changed": { + "$ref": "#/definitions/agentStateChangedResponse" + }, + "qan_collect": { + "$ref": "#/definitions/agentQANCollectResponse" + }, + "action_result": { + "$ref": "#/definitions/agentActionResultResponse" + }, + "ping": { + "$ref": "#/definitions/agentPing", + "title": "requests from server" + }, + "set_state": { + "$ref": "#/definitions/agentSetStateRequest" + }, + "start_action": { + "$ref": "#/definitions/agentStartActionRequest" + }, + "stop_action": { + "$ref": "#/definitions/agentStopActionRequest" + }, + "check_connection": { + "$ref": "#/definitions/agentCheckConnectionRequest" + }, + "start_job": { + "$ref": "#/definitions/agentStartJobRequest" + }, + "stop_job": { + "$ref": "#/definitions/agentStopJobRequest" + }, + "job_status": { + "$ref": "#/definitions/agentJobStatusRequest" + }, + "get_versions": { + "$ref": "#/definitions/agentGetVersionsRequest" + }, + "pbm_switch_pitr": { + "$ref": "#/definitions/agentPBMSwitchPITRRequest" + }, + "agent_logs": { + "$ref": "#/definitions/agentAgentLogsRequest" + } + }, + "title": "TODO https://jira.percona.com/browse/PMM-3449" + }, + "agentSetStateRequest": { + "type": "object", + "properties": { + "agent_processes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SetStateRequestAgentProcess" + } + }, + "builtin_agents": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SetStateRequestBuiltinAgent" + } + } + }, + "description": "SetStateRequest is a ServerMessage asking pmm-agent to run agents according to desired state." + }, + "agentSetStateResponse": { + "type": "object", + "description": "SetStateResponse is an AgentMessage for SetStateRequest acceptance.\n\nTODO https://jira.percona.com/browse/PMM-4691" + }, + "agentStartActionRequest": { + "type": "object", + "properties": { + "action_id": { + "type": "string" + }, + "mysql_explain_params": { + "$ref": "#/definitions/StartActionRequestMySQLExplainParams" + }, + "mysql_show_create_table_params": { + "$ref": "#/definitions/StartActionRequestMySQLShowCreateTableParams" + }, + "mysql_show_table_status_params": { + "$ref": "#/definitions/StartActionRequestMySQLShowTableStatusParams" + }, + "mysql_show_index_params": { + "$ref": "#/definitions/StartActionRequestMySQLShowIndexParams" + }, + "postgresql_show_create_table_params": { + "$ref": "#/definitions/StartActionRequestPostgreSQLShowCreateTableParams" + }, + "postgresql_show_index_params": { + "$ref": "#/definitions/StartActionRequestPostgreSQLShowIndexParams" + }, + "mongodb_explain_params": { + "$ref": "#/definitions/StartActionRequestMongoDBExplainParams" + }, + "pt_summary_params": { + "$ref": "#/definitions/StartActionRequestPTSummaryParams" + }, + "pt_pg_summary_params": { + "$ref": "#/definitions/StartActionRequestPTPgSummaryParams" + }, + "pt_mongodb_summary_params": { + "$ref": "#/definitions/StartActionRequestPTMongoDBSummaryParams" + }, + "pt_mysql_summary_params": { + "$ref": "#/definitions/StartActionRequestPTMySQLSummaryParams" + }, + "mysql_query_show_params": { + "$ref": "#/definitions/StartActionRequestMySQLQueryShowParams" + }, + "mysql_query_select_params": { + "$ref": "#/definitions/StartActionRequestMySQLQuerySelectParams" + }, + "postgresql_query_show_params": { + "$ref": "#/definitions/StartActionRequestPostgreSQLQueryShowParams" + }, + "postgresql_query_select_params": { + "$ref": "#/definitions/StartActionRequestPostgreSQLQuerySelectParams" + }, + "mongodb_query_getparameter_params": { + "$ref": "#/definitions/StartActionRequestMongoDBQueryGetParameterParams" + }, + "mongodb_query_buildinfo_params": { + "$ref": "#/definitions/StartActionRequestMongoDBQueryBuildInfoParams" + }, + "mongodb_query_getcmdlineopts_params": { + "$ref": "#/definitions/StartActionRequestMongoDBQueryGetCmdLineOptsParams" + }, + "mongodb_query_replsetgetstatus_params": { + "$ref": "#/definitions/StartActionRequestMongoDBQueryReplSetGetStatusParams" + }, + "mongodb_query_getdiagnosticdata_params": { + "$ref": "#/definitions/StartActionRequestMongoDBQueryGetDiagnosticDataParams" + }, + "restart_sys_service_params": { + "$ref": "#/definitions/StartActionRequestRestartSystemServiceParams" + }, + "timeout": { + "type": "string", + "description": "Timeout for the whole action. If zero or absent, pmm-agent will pick one itself." + } + }, + "description": "StartActionRequest is a ServerMessage asking pmm-agent to start action." + }, + "agentStartActionResponse": { + "type": "object", + "description": "StartActionResponse is an AgentMessage for StartActionRequest acceptance." + }, + "agentStartJobRequest": { + "type": "object", + "properties": { + "job_id": { + "type": "string" + }, + "timeout": { + "type": "string", + "description": "Timeout for the job." + }, + "mysql_backup": { + "$ref": "#/definitions/agentStartJobRequestMySQLBackup" + }, + "mysql_restore_backup": { + "$ref": "#/definitions/agentStartJobRequestMySQLRestoreBackup" + }, + "mongodb_backup": { + "$ref": "#/definitions/agentStartJobRequestMongoDBBackup" + }, + "mongodb_restore_backup": { + "$ref": "#/definitions/agentStartJobRequestMongoDBRestoreBackup" + } + }, + "description": "StartJobRequest is a ServerMessage asking pmm-agent to start job." + }, + "agentStartJobRequestMongoDBBackup": { + "type": "object", + "properties": { + "user": { + "type": "string", + "title": "Database user;" + }, + "password": { + "type": "string", + "description": "Database password." + }, + "address": { + "type": "string", + "description": "Database address. Can't be specified with socket." + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Database port. Can't be specified with socket." + }, + "socket": { + "type": "string", + "description": "Database unix socket. Can't be specified with address/port." + }, + "name": { + "type": "string", + "description": "Backup name." + }, + "enable_pitr": { + "type": "boolean", + "description": "Enable Point-in-Time recovery feature." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model (physical or logical)." + }, + "s3_config": { + "$ref": "#/definitions/agentS3LocationConfig" + }, + "filesystem_config": { + "$ref": "#/definitions/agentFilesystemLocationConfig" + }, + "folder": { + "type": "string", + "description": "Folder to store artifact on a storage." + }, + "dsn": { + "type": "string", + "description": "DSN for the MongoDB service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBBackup is job for backup MongoDB service." + }, + "agentStartJobRequestMongoDBRestoreBackup": { + "type": "object", + "properties": { + "user": { + "type": "string", + "title": "Database user;" + }, + "password": { + "type": "string", + "description": "Database password." + }, + "address": { + "type": "string", + "description": "Database address. Can't be specified with socket." + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Database port. Can't be specified with socket." + }, + "socket": { + "type": "string", + "description": "Database unix socket. Can't be specified with address/port." + }, + "name": { + "type": "string", + "description": "Backup name." + }, + "pitr_timestamp": { + "type": "string", + "format": "date-time", + "description": "Point-in-Time recovery timestamp." + }, + "s3_config": { + "$ref": "#/definitions/agentS3LocationConfig" + }, + "filesystem_config": { + "$ref": "#/definitions/agentFilesystemLocationConfig" + }, + "folder": { + "type": "string", + "description": "Folder to store artifact on a storage." + }, + "pbm_metadata": { + "$ref": "#/definitions/v1PbmMetadata", + "description": "Extra data for backup tool." + }, + "dsn": { + "type": "string", + "description": "DSN for the MongoDB service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." + }, + "text_files": { + "$ref": "#/definitions/agentTextFiles", + "description": "Contains files and their contents which can be used in DSN." + } + }, + "description": "MongoDBRestoreBackup is job for MongoDB restore backup service." + }, + "agentStartJobRequestMySQLBackup": { + "type": "object", + "properties": { + "user": { + "type": "string", + "title": "Database user;" + }, + "password": { + "type": "string", + "description": "Database password." + }, + "address": { + "type": "string", + "description": "Database address. Can't be specified with socket." + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Database port. Can't be specified with socket." + }, + "socket": { + "type": "string", + "description": "Database unix socket. Can't be specified with address/port." + }, + "name": { + "type": "string", + "description": "Backup name." + }, + "s3_config": { + "$ref": "#/definitions/agentS3LocationConfig" + }, + "folder": { + "type": "string", + "description": "Folder to store artifact on a storage." + } + }, + "description": "MySQLBackup is job for backup MySQL service." + }, + "agentStartJobRequestMySQLRestoreBackup": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier where the backup should be restored." + }, + "name": { + "type": "string", + "description": "Backup name." + }, + "s3_config": { + "$ref": "#/definitions/agentS3LocationConfig" + }, + "folder": { + "type": "string", + "description": "Folder to store artifact on a storage." + } + }, + "description": "MySQLRestoreBackup is job for MySQL restore backup service." + }, + "agentStartJobResponse": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "description": "StartJobResponse is an AgentMessage for StartJobRequest acceptance." + }, + "agentStateChangedRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus" + }, + "listen_port": { + "type": "integer", + "format": "int64" + }, + "process_exec_path": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "description": "StateChangedRequest is an AgentMessage describing actual agent status." + }, + "agentStateChangedResponse": { + "type": "object", + "description": "StateChangedResponse is a ServerMessage for StateChangedRequest acceptance." + }, + "agentStopActionRequest": { + "type": "object", + "properties": { + "action_id": { + "type": "string" + } + }, + "description": "StopActionRequest is a ServerMessage asking pmm-agent to stop action." + }, + "agentStopActionResponse": { + "type": "object", + "description": "StopActionResponse is an AgentMessage for StopActionRequest acceptance." + }, + "agentStopJobRequest": { + "type": "object", + "properties": { + "job_id": { + "type": "string" + } + }, + "description": "StopJobRequest is a ServerMessage asking pmm-agent to stop job." + }, + "agentStopJobResponse": { + "type": "object", + "description": "StopJobResponse is an AgentMessage for StopJobRequest acceptance." + }, + "agentTextFiles": { + "type": "object", + "properties": { + "files": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "files contains files which can be used to connect to DB (certificates, keys and etc)." + }, + "template_left_delim": { + "type": "string", + "description": "template_left_delim is used to replace placeholders in templates (DSN and etc.) with paths to files." + }, + "template_right_delim": { + "type": "string", + "description": "template_right_delim is used to replace placeholders in templates (DSN and etc.) with paths to files." + } + }, + "description": "TextFiles contains files which can be used to connect to DB (certificates, keys and etc)." + }, + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryAgentType": { + "type": "string", + "enum": [ + "AGENT_TYPE_INVALID", + "PMM_AGENT", + "VM_AGENT", + "NODE_EXPORTER", + "MYSQLD_EXPORTER", + "MONGODB_EXPORTER", + "POSTGRES_EXPORTER", + "PROXYSQL_EXPORTER", + "QAN_MYSQL_PERFSCHEMA_AGENT", + "QAN_MYSQL_SLOWLOG_AGENT", + "QAN_MONGODB_PROFILER_AGENT", + "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "RDS_EXPORTER", + "EXTERNAL_EXPORTER", + "AZURE_DATABASE_EXPORTER" + ], + "default": "AGENT_TYPE_INVALID", + "description": "AgentType describes supported Agent types." + }, + "inventoryServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_INVALID", + "MYSQL_SERVICE", + "MONGODB_SERVICE", + "POSTGRESQL_SERVICE", + "PROXYSQL_SERVICE", + "HAPROXY_SERVICE", + "EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_INVALID", + "description": "ServiceType describes supported Service types." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "v1DataModel": { + "type": "string", + "enum": [ + "DATA_MODEL_INVALID", + "PHYSICAL", + "LOGICAL" + ], + "default": "DATA_MODEL_INVALID", + "description": "DataModel is a model used for performing a backup." + }, + "v1File": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "is_directory": { + "type": "boolean" + } + }, + "description": "File represents file or folder on a storage." + }, + "v1Metadata": { + "type": "object", + "properties": { + "file_list": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1File" + }, + "description": "List of files backup consists of." + }, + "restore_to": { + "type": "string", + "format": "date-time", + "description": "Exact time DB can be restored to." + }, + "pbm_metadata": { + "$ref": "#/definitions/v1PbmMetadata" + } + }, + "description": "Metadata contains extra artifact data like files it consists of, tool specific data, etc." + }, + "v1PbmMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of backup in backup tool representation." + } + }, + "description": "PbmMetadata contains additional data for pbm cli tools." + } + } +} diff --git a/api/agentpb/agent_grpc.pb.go b/api/agentpb/agent_grpc.pb.go index d828d8cc68..04847447fc 100644 --- a/api/agentpb/agent_grpc.pb.go +++ b/api/agentpb/agent_grpc.pb.go @@ -8,7 +8,6 @@ package agentpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -80,7 +79,8 @@ type AgentServer interface { } // UnimplementedAgentServer must be embedded to have forward compatible implementations. -type UnimplementedAgentServer struct{} +type UnimplementedAgentServer struct { +} func (UnimplementedAgentServer) Connect(Agent_ConnectServer) error { return status.Errorf(codes.Unimplemented, "method Connect not implemented") diff --git a/api/agentpb/collector.pb.go b/api/agentpb/collector.pb.go index 6119d23c42..2af375ad29 100644 --- a/api/agentpb/collector.pb.go +++ b/api/agentpb/collector.pb.go @@ -7,13 +7,11 @@ package agentpb import ( - reflect "reflect" - sync "sync" - + inventorypb "github.com/percona/pmm/api/inventorypb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -2834,24 +2832,21 @@ func file_agentpb_collector_proto_rawDescGZIP() []byte { return file_agentpb_collector_proto_rawDescData } -var ( - file_agentpb_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_agentpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_agentpb_collector_proto_goTypes = []interface{}{ - (ExampleFormat)(0), // 0: agent.ExampleFormat - (ExampleType)(0), // 1: agent.ExampleType - (*MetricsBucket)(nil), // 2: agent.MetricsBucket - (*HistogramItem)(nil), // 3: agent.HistogramItem - (*MetricsBucket_Common)(nil), // 4: agent.MetricsBucket.Common - (*MetricsBucket_MySQL)(nil), // 5: agent.MetricsBucket.MySQL - (*MetricsBucket_MongoDB)(nil), // 6: agent.MetricsBucket.MongoDB - (*MetricsBucket_PostgreSQL)(nil), // 7: agent.MetricsBucket.PostgreSQL - nil, // 8: agent.MetricsBucket.Common.CommentsEntry - nil, // 9: agent.MetricsBucket.Common.ErrorsEntry - (inventorypb.AgentType)(0), // 10: inventory.AgentType - } -) - +var file_agentpb_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_agentpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_agentpb_collector_proto_goTypes = []interface{}{ + (ExampleFormat)(0), // 0: agent.ExampleFormat + (ExampleType)(0), // 1: agent.ExampleType + (*MetricsBucket)(nil), // 2: agent.MetricsBucket + (*HistogramItem)(nil), // 3: agent.HistogramItem + (*MetricsBucket_Common)(nil), // 4: agent.MetricsBucket.Common + (*MetricsBucket_MySQL)(nil), // 5: agent.MetricsBucket.MySQL + (*MetricsBucket_MongoDB)(nil), // 6: agent.MetricsBucket.MongoDB + (*MetricsBucket_PostgreSQL)(nil), // 7: agent.MetricsBucket.PostgreSQL + nil, // 8: agent.MetricsBucket.Common.CommentsEntry + nil, // 9: agent.MetricsBucket.Common.ErrorsEntry + (inventorypb.AgentType)(0), // 10: inventory.AgentType +} var file_agentpb_collector_proto_depIdxs = []int32{ 4, // 0: agent.MetricsBucket.common:type_name -> agent.MetricsBucket.Common 5, // 1: agent.MetricsBucket.mysql:type_name -> agent.MetricsBucket.MySQL diff --git a/api/agentpb/collector.swagger.json b/api/agentpb/collector.swagger.json new file mode 100644 index 0000000000..10864eeb2e --- /dev/null +++ b/api/agentpb/collector.swagger.json @@ -0,0 +1,50 @@ +{ + "swagger": "2.0", + "info": { + "title": "agentpb/collector.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + } + } +} diff --git a/api/inventorypb/agent_status.pb.go b/api/inventorypb/agent_status.pb.go index 58238ccfd7..995d77db00 100644 --- a/api/inventorypb/agent_status.pb.go +++ b/api/inventorypb/agent_status.pb.go @@ -7,11 +7,10 @@ package inventorypb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -126,13 +125,10 @@ func file_inventorypb_agent_status_proto_rawDescGZIP() []byte { return file_inventorypb_agent_status_proto_rawDescData } -var ( - file_inventorypb_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventorypb_agent_status_proto_goTypes = []interface{}{ - (AgentStatus)(0), // 0: inventory.AgentStatus - } -) - +var file_inventorypb_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventorypb_agent_status_proto_goTypes = []interface{}{ + (AgentStatus)(0), // 0: inventory.AgentStatus +} var file_inventorypb_agent_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventorypb/agent_status.swagger.json b/api/inventorypb/agent_status.swagger.json new file mode 100644 index 0000000000..16fe27e7de --- /dev/null +++ b/api/inventorypb/agent_status.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventorypb/agent_status.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventorypb/agents.pb.go b/api/inventorypb/agents.pb.go index 50afddd4c8..087361214f 100644 --- a/api/inventorypb/agents.pb.go +++ b/api/inventorypb/agents.pb.go @@ -7,14 +7,13 @@ package inventorypb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -9623,123 +9622,120 @@ func file_inventorypb_agents_proto_rawDescGZIP() []byte { return file_inventorypb_agents_proto_rawDescData } -var ( - file_inventorypb_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventorypb_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 107) - file_inventorypb_agents_proto_goTypes = []interface{}{ - (AgentType)(0), // 0: inventory.AgentType - (*PMMAgent)(nil), // 1: inventory.PMMAgent - (*VMAgent)(nil), // 2: inventory.VMAgent - (*NodeExporter)(nil), // 3: inventory.NodeExporter - (*MySQLdExporter)(nil), // 4: inventory.MySQLdExporter - (*MongoDBExporter)(nil), // 5: inventory.MongoDBExporter - (*PostgresExporter)(nil), // 6: inventory.PostgresExporter - (*ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter - (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent - (*QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent - (*QANMongoDBProfilerAgent)(nil), // 10: inventory.QANMongoDBProfilerAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 13: inventory.RDSExporter - (*ExternalExporter)(nil), // 14: inventory.ExternalExporter - (*AzureDatabaseExporter)(nil), // 15: inventory.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 16: inventory.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 17: inventory.ListAgentsRequest - (*ListAgentsResponse)(nil), // 18: inventory.ListAgentsResponse - (*GetAgentRequest)(nil), // 19: inventory.GetAgentRequest - (*GetAgentResponse)(nil), // 20: inventory.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 21: inventory.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 22: inventory.GetAgentLogsResponse - (*AddPMMAgentRequest)(nil), // 23: inventory.AddPMMAgentRequest - (*AddPMMAgentResponse)(nil), // 24: inventory.AddPMMAgentResponse - (*AddNodeExporterRequest)(nil), // 25: inventory.AddNodeExporterRequest - (*AddNodeExporterResponse)(nil), // 26: inventory.AddNodeExporterResponse - (*ChangeNodeExporterRequest)(nil), // 27: inventory.ChangeNodeExporterRequest - (*ChangeNodeExporterResponse)(nil), // 28: inventory.ChangeNodeExporterResponse - (*AddMySQLdExporterRequest)(nil), // 29: inventory.AddMySQLdExporterRequest - (*AddMySQLdExporterResponse)(nil), // 30: inventory.AddMySQLdExporterResponse - (*ChangeMySQLdExporterRequest)(nil), // 31: inventory.ChangeMySQLdExporterRequest - (*ChangeMySQLdExporterResponse)(nil), // 32: inventory.ChangeMySQLdExporterResponse - (*AddMongoDBExporterRequest)(nil), // 33: inventory.AddMongoDBExporterRequest - (*AddMongoDBExporterResponse)(nil), // 34: inventory.AddMongoDBExporterResponse - (*ChangeMongoDBExporterRequest)(nil), // 35: inventory.ChangeMongoDBExporterRequest - (*ChangeMongoDBExporterResponse)(nil), // 36: inventory.ChangeMongoDBExporterResponse - (*AddPostgresExporterRequest)(nil), // 37: inventory.AddPostgresExporterRequest - (*AddPostgresExporterResponse)(nil), // 38: inventory.AddPostgresExporterResponse - (*ChangePostgresExporterRequest)(nil), // 39: inventory.ChangePostgresExporterRequest - (*ChangePostgresExporterResponse)(nil), // 40: inventory.ChangePostgresExporterResponse - (*AddProxySQLExporterRequest)(nil), // 41: inventory.AddProxySQLExporterRequest - (*AddProxySQLExporterResponse)(nil), // 42: inventory.AddProxySQLExporterResponse - (*ChangeProxySQLExporterRequest)(nil), // 43: inventory.ChangeProxySQLExporterRequest - (*ChangeProxySQLExporterResponse)(nil), // 44: inventory.ChangeProxySQLExporterResponse - (*AddQANMySQLPerfSchemaAgentRequest)(nil), // 45: inventory.AddQANMySQLPerfSchemaAgentRequest - (*AddQANMySQLPerfSchemaAgentResponse)(nil), // 46: inventory.AddQANMySQLPerfSchemaAgentResponse - (*ChangeQANMySQLPerfSchemaAgentRequest)(nil), // 47: inventory.ChangeQANMySQLPerfSchemaAgentRequest - (*ChangeQANMySQLPerfSchemaAgentResponse)(nil), // 48: inventory.ChangeQANMySQLPerfSchemaAgentResponse - (*AddQANMySQLSlowlogAgentRequest)(nil), // 49: inventory.AddQANMySQLSlowlogAgentRequest - (*AddQANMySQLSlowlogAgentResponse)(nil), // 50: inventory.AddQANMySQLSlowlogAgentResponse - (*ChangeQANMySQLSlowlogAgentRequest)(nil), // 51: inventory.ChangeQANMySQLSlowlogAgentRequest - (*ChangeQANMySQLSlowlogAgentResponse)(nil), // 52: inventory.ChangeQANMySQLSlowlogAgentResponse - (*AddQANMongoDBProfilerAgentRequest)(nil), // 53: inventory.AddQANMongoDBProfilerAgentRequest - (*AddQANMongoDBProfilerAgentResponse)(nil), // 54: inventory.AddQANMongoDBProfilerAgentResponse - (*ChangeQANMongoDBProfilerAgentRequest)(nil), // 55: inventory.ChangeQANMongoDBProfilerAgentRequest - (*ChangeQANMongoDBProfilerAgentResponse)(nil), // 56: inventory.ChangeQANMongoDBProfilerAgentResponse - (*AddQANPostgreSQLPgStatementsAgentRequest)(nil), // 57: inventory.AddQANPostgreSQLPgStatementsAgentRequest - (*AddQANPostgreSQLPgStatementsAgentResponse)(nil), // 58: inventory.AddQANPostgreSQLPgStatementsAgentResponse - (*ChangeQANPostgreSQLPgStatementsAgentRequest)(nil), // 59: inventory.ChangeQANPostgreSQLPgStatementsAgentRequest - (*ChangeQANPostgreSQLPgStatementsAgentResponse)(nil), // 60: inventory.ChangeQANPostgreSQLPgStatementsAgentResponse - (*AddQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 61: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest - (*AddQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 62: inventory.AddQANPostgreSQLPgStatMonitorAgentResponse - (*ChangeQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 63: inventory.ChangeQANPostgreSQLPgStatMonitorAgentRequest - (*ChangeQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 64: inventory.ChangeQANPostgreSQLPgStatMonitorAgentResponse - (*AddRDSExporterRequest)(nil), // 65: inventory.AddRDSExporterRequest - (*AddRDSExporterResponse)(nil), // 66: inventory.AddRDSExporterResponse - (*ChangeRDSExporterRequest)(nil), // 67: inventory.ChangeRDSExporterRequest - (*ChangeRDSExporterResponse)(nil), // 68: inventory.ChangeRDSExporterResponse - (*AddExternalExporterRequest)(nil), // 69: inventory.AddExternalExporterRequest - (*AddExternalExporterResponse)(nil), // 70: inventory.AddExternalExporterResponse - (*ChangeExternalExporterRequest)(nil), // 71: inventory.ChangeExternalExporterRequest - (*ChangeExternalExporterResponse)(nil), // 72: inventory.ChangeExternalExporterResponse - (*AddAzureDatabaseExporterRequest)(nil), // 73: inventory.AddAzureDatabaseExporterRequest - (*AddAzureDatabaseExporterResponse)(nil), // 74: inventory.AddAzureDatabaseExporterResponse - (*ChangeAzureDatabaseExporterRequest)(nil), // 75: inventory.ChangeAzureDatabaseExporterRequest - (*ChangeAzureDatabaseExporterResponse)(nil), // 76: inventory.ChangeAzureDatabaseExporterResponse - (*RemoveAgentRequest)(nil), // 77: inventory.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 78: inventory.RemoveAgentResponse - nil, // 79: inventory.PMMAgent.CustomLabelsEntry - nil, // 80: inventory.NodeExporter.CustomLabelsEntry - nil, // 81: inventory.MySQLdExporter.CustomLabelsEntry - nil, // 82: inventory.MongoDBExporter.CustomLabelsEntry - nil, // 83: inventory.PostgresExporter.CustomLabelsEntry - nil, // 84: inventory.ProxySQLExporter.CustomLabelsEntry - nil, // 85: inventory.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 86: inventory.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 87: inventory.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 88: inventory.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 89: inventory.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 90: inventory.RDSExporter.CustomLabelsEntry - nil, // 91: inventory.ExternalExporter.CustomLabelsEntry - nil, // 92: inventory.AzureDatabaseExporter.CustomLabelsEntry - nil, // 93: inventory.ChangeCommonAgentParams.CustomLabelsEntry - nil, // 94: inventory.AddPMMAgentRequest.CustomLabelsEntry - nil, // 95: inventory.AddNodeExporterRequest.CustomLabelsEntry - nil, // 96: inventory.AddMySQLdExporterRequest.CustomLabelsEntry - nil, // 97: inventory.AddMongoDBExporterRequest.CustomLabelsEntry - nil, // 98: inventory.AddPostgresExporterRequest.CustomLabelsEntry - nil, // 99: inventory.AddProxySQLExporterRequest.CustomLabelsEntry - nil, // 100: inventory.AddQANMySQLPerfSchemaAgentRequest.CustomLabelsEntry - nil, // 101: inventory.AddQANMySQLSlowlogAgentRequest.CustomLabelsEntry - nil, // 102: inventory.AddQANMongoDBProfilerAgentRequest.CustomLabelsEntry - nil, // 103: inventory.AddQANPostgreSQLPgStatementsAgentRequest.CustomLabelsEntry - nil, // 104: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest.CustomLabelsEntry - nil, // 105: inventory.AddRDSExporterRequest.CustomLabelsEntry - nil, // 106: inventory.AddExternalExporterRequest.CustomLabelsEntry - nil, // 107: inventory.AddAzureDatabaseExporterRequest.CustomLabelsEntry - (AgentStatus)(0), // 108: inventory.AgentStatus - (LogLevel)(0), // 109: inventory.LogLevel - } -) - +var file_inventorypb_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventorypb_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 107) +var file_inventorypb_agents_proto_goTypes = []interface{}{ + (AgentType)(0), // 0: inventory.AgentType + (*PMMAgent)(nil), // 1: inventory.PMMAgent + (*VMAgent)(nil), // 2: inventory.VMAgent + (*NodeExporter)(nil), // 3: inventory.NodeExporter + (*MySQLdExporter)(nil), // 4: inventory.MySQLdExporter + (*MongoDBExporter)(nil), // 5: inventory.MongoDBExporter + (*PostgresExporter)(nil), // 6: inventory.PostgresExporter + (*ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter + (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent + (*QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent + (*QANMongoDBProfilerAgent)(nil), // 10: inventory.QANMongoDBProfilerAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 13: inventory.RDSExporter + (*ExternalExporter)(nil), // 14: inventory.ExternalExporter + (*AzureDatabaseExporter)(nil), // 15: inventory.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 16: inventory.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 17: inventory.ListAgentsRequest + (*ListAgentsResponse)(nil), // 18: inventory.ListAgentsResponse + (*GetAgentRequest)(nil), // 19: inventory.GetAgentRequest + (*GetAgentResponse)(nil), // 20: inventory.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 21: inventory.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 22: inventory.GetAgentLogsResponse + (*AddPMMAgentRequest)(nil), // 23: inventory.AddPMMAgentRequest + (*AddPMMAgentResponse)(nil), // 24: inventory.AddPMMAgentResponse + (*AddNodeExporterRequest)(nil), // 25: inventory.AddNodeExporterRequest + (*AddNodeExporterResponse)(nil), // 26: inventory.AddNodeExporterResponse + (*ChangeNodeExporterRequest)(nil), // 27: inventory.ChangeNodeExporterRequest + (*ChangeNodeExporterResponse)(nil), // 28: inventory.ChangeNodeExporterResponse + (*AddMySQLdExporterRequest)(nil), // 29: inventory.AddMySQLdExporterRequest + (*AddMySQLdExporterResponse)(nil), // 30: inventory.AddMySQLdExporterResponse + (*ChangeMySQLdExporterRequest)(nil), // 31: inventory.ChangeMySQLdExporterRequest + (*ChangeMySQLdExporterResponse)(nil), // 32: inventory.ChangeMySQLdExporterResponse + (*AddMongoDBExporterRequest)(nil), // 33: inventory.AddMongoDBExporterRequest + (*AddMongoDBExporterResponse)(nil), // 34: inventory.AddMongoDBExporterResponse + (*ChangeMongoDBExporterRequest)(nil), // 35: inventory.ChangeMongoDBExporterRequest + (*ChangeMongoDBExporterResponse)(nil), // 36: inventory.ChangeMongoDBExporterResponse + (*AddPostgresExporterRequest)(nil), // 37: inventory.AddPostgresExporterRequest + (*AddPostgresExporterResponse)(nil), // 38: inventory.AddPostgresExporterResponse + (*ChangePostgresExporterRequest)(nil), // 39: inventory.ChangePostgresExporterRequest + (*ChangePostgresExporterResponse)(nil), // 40: inventory.ChangePostgresExporterResponse + (*AddProxySQLExporterRequest)(nil), // 41: inventory.AddProxySQLExporterRequest + (*AddProxySQLExporterResponse)(nil), // 42: inventory.AddProxySQLExporterResponse + (*ChangeProxySQLExporterRequest)(nil), // 43: inventory.ChangeProxySQLExporterRequest + (*ChangeProxySQLExporterResponse)(nil), // 44: inventory.ChangeProxySQLExporterResponse + (*AddQANMySQLPerfSchemaAgentRequest)(nil), // 45: inventory.AddQANMySQLPerfSchemaAgentRequest + (*AddQANMySQLPerfSchemaAgentResponse)(nil), // 46: inventory.AddQANMySQLPerfSchemaAgentResponse + (*ChangeQANMySQLPerfSchemaAgentRequest)(nil), // 47: inventory.ChangeQANMySQLPerfSchemaAgentRequest + (*ChangeQANMySQLPerfSchemaAgentResponse)(nil), // 48: inventory.ChangeQANMySQLPerfSchemaAgentResponse + (*AddQANMySQLSlowlogAgentRequest)(nil), // 49: inventory.AddQANMySQLSlowlogAgentRequest + (*AddQANMySQLSlowlogAgentResponse)(nil), // 50: inventory.AddQANMySQLSlowlogAgentResponse + (*ChangeQANMySQLSlowlogAgentRequest)(nil), // 51: inventory.ChangeQANMySQLSlowlogAgentRequest + (*ChangeQANMySQLSlowlogAgentResponse)(nil), // 52: inventory.ChangeQANMySQLSlowlogAgentResponse + (*AddQANMongoDBProfilerAgentRequest)(nil), // 53: inventory.AddQANMongoDBProfilerAgentRequest + (*AddQANMongoDBProfilerAgentResponse)(nil), // 54: inventory.AddQANMongoDBProfilerAgentResponse + (*ChangeQANMongoDBProfilerAgentRequest)(nil), // 55: inventory.ChangeQANMongoDBProfilerAgentRequest + (*ChangeQANMongoDBProfilerAgentResponse)(nil), // 56: inventory.ChangeQANMongoDBProfilerAgentResponse + (*AddQANPostgreSQLPgStatementsAgentRequest)(nil), // 57: inventory.AddQANPostgreSQLPgStatementsAgentRequest + (*AddQANPostgreSQLPgStatementsAgentResponse)(nil), // 58: inventory.AddQANPostgreSQLPgStatementsAgentResponse + (*ChangeQANPostgreSQLPgStatementsAgentRequest)(nil), // 59: inventory.ChangeQANPostgreSQLPgStatementsAgentRequest + (*ChangeQANPostgreSQLPgStatementsAgentResponse)(nil), // 60: inventory.ChangeQANPostgreSQLPgStatementsAgentResponse + (*AddQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 61: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest + (*AddQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 62: inventory.AddQANPostgreSQLPgStatMonitorAgentResponse + (*ChangeQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 63: inventory.ChangeQANPostgreSQLPgStatMonitorAgentRequest + (*ChangeQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 64: inventory.ChangeQANPostgreSQLPgStatMonitorAgentResponse + (*AddRDSExporterRequest)(nil), // 65: inventory.AddRDSExporterRequest + (*AddRDSExporterResponse)(nil), // 66: inventory.AddRDSExporterResponse + (*ChangeRDSExporterRequest)(nil), // 67: inventory.ChangeRDSExporterRequest + (*ChangeRDSExporterResponse)(nil), // 68: inventory.ChangeRDSExporterResponse + (*AddExternalExporterRequest)(nil), // 69: inventory.AddExternalExporterRequest + (*AddExternalExporterResponse)(nil), // 70: inventory.AddExternalExporterResponse + (*ChangeExternalExporterRequest)(nil), // 71: inventory.ChangeExternalExporterRequest + (*ChangeExternalExporterResponse)(nil), // 72: inventory.ChangeExternalExporterResponse + (*AddAzureDatabaseExporterRequest)(nil), // 73: inventory.AddAzureDatabaseExporterRequest + (*AddAzureDatabaseExporterResponse)(nil), // 74: inventory.AddAzureDatabaseExporterResponse + (*ChangeAzureDatabaseExporterRequest)(nil), // 75: inventory.ChangeAzureDatabaseExporterRequest + (*ChangeAzureDatabaseExporterResponse)(nil), // 76: inventory.ChangeAzureDatabaseExporterResponse + (*RemoveAgentRequest)(nil), // 77: inventory.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 78: inventory.RemoveAgentResponse + nil, // 79: inventory.PMMAgent.CustomLabelsEntry + nil, // 80: inventory.NodeExporter.CustomLabelsEntry + nil, // 81: inventory.MySQLdExporter.CustomLabelsEntry + nil, // 82: inventory.MongoDBExporter.CustomLabelsEntry + nil, // 83: inventory.PostgresExporter.CustomLabelsEntry + nil, // 84: inventory.ProxySQLExporter.CustomLabelsEntry + nil, // 85: inventory.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 86: inventory.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 87: inventory.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 88: inventory.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 89: inventory.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 90: inventory.RDSExporter.CustomLabelsEntry + nil, // 91: inventory.ExternalExporter.CustomLabelsEntry + nil, // 92: inventory.AzureDatabaseExporter.CustomLabelsEntry + nil, // 93: inventory.ChangeCommonAgentParams.CustomLabelsEntry + nil, // 94: inventory.AddPMMAgentRequest.CustomLabelsEntry + nil, // 95: inventory.AddNodeExporterRequest.CustomLabelsEntry + nil, // 96: inventory.AddMySQLdExporterRequest.CustomLabelsEntry + nil, // 97: inventory.AddMongoDBExporterRequest.CustomLabelsEntry + nil, // 98: inventory.AddPostgresExporterRequest.CustomLabelsEntry + nil, // 99: inventory.AddProxySQLExporterRequest.CustomLabelsEntry + nil, // 100: inventory.AddQANMySQLPerfSchemaAgentRequest.CustomLabelsEntry + nil, // 101: inventory.AddQANMySQLSlowlogAgentRequest.CustomLabelsEntry + nil, // 102: inventory.AddQANMongoDBProfilerAgentRequest.CustomLabelsEntry + nil, // 103: inventory.AddQANPostgreSQLPgStatementsAgentRequest.CustomLabelsEntry + nil, // 104: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest.CustomLabelsEntry + nil, // 105: inventory.AddRDSExporterRequest.CustomLabelsEntry + nil, // 106: inventory.AddExternalExporterRequest.CustomLabelsEntry + nil, // 107: inventory.AddAzureDatabaseExporterRequest.CustomLabelsEntry + (AgentStatus)(0), // 108: inventory.AgentStatus + (LogLevel)(0), // 109: inventory.LogLevel +} var file_inventorypb_agents_proto_depIdxs = []int32{ 79, // 0: inventory.PMMAgent.custom_labels:type_name -> inventory.PMMAgent.CustomLabelsEntry 108, // 1: inventory.VMAgent.status:type_name -> inventory.AgentStatus diff --git a/api/inventorypb/agents.pb.gw.go b/api/inventorypb/agents.pb.gw.go index 1c45bf9c26..93146a4e51 100644 --- a/api/inventorypb/agents.pb.gw.go +++ b/api/inventorypb/agents.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentsRequest @@ -47,6 +45,7 @@ func request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Ma msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err + } func request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.GetAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Mars msg, err := server.GetAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.GetAgentLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime. msg, err := server.GetAgentLogs(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.AddPMMAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.M msg, err := server.AddPMMAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddNodeExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runti msg, err := server.AddNodeExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler runtime. msg, err := client.ChangeNodeExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler ru msg, err := server.ChangeNodeExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler runtime.M msg, err := client.AddMySQLdExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler run msg, err := server.AddMySQLdExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler runtim msg, err := client.ChangeMySQLdExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler msg, err := server.ChangeMySQLdExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -303,6 +317,7 @@ func request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler runtime. msg, err := client.AddMongoDBExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -319,6 +334,7 @@ func local_request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler ru msg, err := server.AddMongoDBExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -335,6 +351,7 @@ func request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler runti msg, err := client.ChangeMongoDBExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -351,6 +368,7 @@ func local_request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler msg, err := server.ChangeMongoDBExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -367,6 +385,7 @@ func request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler runtime msg, err := client.AddPostgresExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -383,6 +402,7 @@ func local_request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler r msg, err := server.AddPostgresExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangePostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -399,6 +419,7 @@ func request_Agents_ChangePostgresExporter_0(ctx context.Context, marshaler runt msg, err := client.ChangePostgresExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangePostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -415,6 +436,7 @@ func local_request_Agents_ChangePostgresExporter_0(ctx context.Context, marshale msg, err := server.ChangePostgresExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -431,6 +453,7 @@ func request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler runtime msg, err := client.AddProxySQLExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -447,6 +470,7 @@ func local_request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler r msg, err := server.AddProxySQLExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -463,6 +487,7 @@ func request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshaler runt msg, err := client.ChangeProxySQLExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -479,6 +504,7 @@ func local_request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshale msg, err := server.ChangeProxySQLExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -495,6 +521,7 @@ func request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler msg, err := client.AddQANMySQLPerfSchemaAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -511,6 +538,7 @@ func local_request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, mars msg, err := server.AddQANMySQLPerfSchemaAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -527,6 +555,7 @@ func request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, marshal msg, err := client.ChangeQANMySQLPerfSchemaAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -543,6 +572,7 @@ func local_request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, m msg, err := server.ChangeQANMySQLPerfSchemaAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -559,6 +589,7 @@ func request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshaler run msg, err := client.AddQANMySQLSlowlogAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -575,6 +606,7 @@ func local_request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshal msg, err := server.AddQANMySQLSlowlogAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -591,6 +623,7 @@ func request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, marshaler msg, err := client.ChangeQANMySQLSlowlogAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -607,6 +640,7 @@ func local_request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, mars msg, err := server.ChangeQANMySQLSlowlogAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -623,6 +657,7 @@ func request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, marshaler msg, err := client.AddQANMongoDBProfilerAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -639,6 +674,7 @@ func local_request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, mars msg, err := server.AddQANMongoDBProfilerAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -655,6 +691,7 @@ func request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, marshal msg, err := client.ChangeQANMongoDBProfilerAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -671,6 +708,7 @@ func local_request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, m msg, err := server.ChangeQANMongoDBProfilerAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -687,6 +725,7 @@ func request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Context, mar msg, err := client.AddQANPostgreSQLPgStatementsAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -703,6 +742,7 @@ func local_request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Contex msg, err := server.AddQANPostgreSQLPgStatementsAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -719,6 +759,7 @@ func request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Context, msg, err := client.ChangeQANPostgreSQLPgStatementsAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -735,6 +776,7 @@ func local_request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Con msg, err := server.ChangeQANPostgreSQLPgStatementsAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -751,6 +793,7 @@ func request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, ma msg, err := client.AddQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -767,6 +810,7 @@ func local_request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Conte msg, err := server.AddQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -783,6 +827,7 @@ func request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, msg, err := client.ChangeQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -799,6 +844,7 @@ func local_request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Co msg, err := server.ChangeQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -815,6 +861,7 @@ func request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtime.Mars msg, err := client.AddRDSExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -831,6 +878,7 @@ func local_request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtim msg, err := server.AddRDSExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -847,6 +895,7 @@ func request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler runtime.M msg, err := client.ChangeRDSExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -863,6 +912,7 @@ func local_request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler run msg, err := server.ChangeRDSExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -879,6 +929,7 @@ func request_Agents_AddExternalExporter_0(ctx context.Context, marshaler runtime msg, err := client.AddExternalExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -895,6 +946,7 @@ func local_request_Agents_AddExternalExporter_0(ctx context.Context, marshaler r msg, err := server.AddExternalExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -911,6 +963,7 @@ func request_Agents_ChangeExternalExporter_0(ctx context.Context, marshaler runt msg, err := client.ChangeExternalExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -927,6 +980,7 @@ func local_request_Agents_ChangeExternalExporter_0(ctx context.Context, marshale msg, err := server.ChangeExternalExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -943,6 +997,7 @@ func request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marshaler ru msg, err := client.AddAzureDatabaseExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -959,6 +1014,7 @@ func local_request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marsha msg, err := server.AddAzureDatabaseExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -975,6 +1031,7 @@ func request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, marshaler msg, err := client.ChangeAzureDatabaseExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -991,6 +1048,7 @@ func local_request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, mar msg, err := server.ChangeAzureDatabaseExporter(ctx, &protoReq) return msg, metadata, err + } func request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1007,6 +1065,7 @@ func request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.RemoveAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1023,6 +1082,7 @@ func local_request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.M msg, err := server.RemoveAgent(ctx, &protoReq) return msg, metadata, err + } // RegisterAgentsHandlerServer registers the http handlers for service Agents to "mux". @@ -1030,6 +1090,7 @@ func local_request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.M // 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 RegisterAgentsHandlerFromEndpoint instead. func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentsServer) error { + mux.Handle("POST", pattern_Agents_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1052,6 +1113,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1076,6 +1138,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1100,6 +1163,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddPMMAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1124,6 +1188,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddPMMAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1148,6 +1213,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1172,6 +1238,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1196,6 +1263,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1220,6 +1288,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1244,6 +1313,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1268,6 +1338,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddPostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1292,6 +1363,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddPostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangePostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1316,6 +1388,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangePostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1340,6 +1413,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1364,6 +1438,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1388,6 +1463,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1412,6 +1488,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1436,6 +1513,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1460,6 +1538,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1484,6 +1563,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1508,6 +1588,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1532,6 +1613,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1556,6 +1638,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1580,6 +1663,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1604,6 +1688,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1628,6 +1713,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1652,6 +1738,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1676,6 +1763,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1700,6 +1788,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1724,6 +1813,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1748,6 +1838,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1772,6 +1863,7 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -1814,6 +1906,7 @@ func RegisterAgentsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentsClient" to call the correct interceptors. func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentsClient) error { + mux.Handle("POST", pattern_Agents_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1833,6 +1926,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1854,6 +1948,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1875,6 +1970,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddPMMAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1896,6 +1992,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddPMMAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1917,6 +2014,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1938,6 +2036,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1959,6 +2058,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1980,6 +2080,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2001,6 +2102,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2022,6 +2124,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddPostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2043,6 +2146,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddPostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangePostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2064,6 +2168,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangePostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2085,6 +2190,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2106,6 +2212,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2127,6 +2234,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2148,6 +2256,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2169,6 +2278,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2190,6 +2300,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2211,6 +2322,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2232,6 +2344,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2253,6 +2366,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2274,6 +2388,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2295,6 +2410,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2316,6 +2432,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2337,6 +2454,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2358,6 +2476,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2379,6 +2498,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2400,6 +2520,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_AddAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2421,6 +2542,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_ChangeAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2442,6 +2564,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Agents_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2463,6 +2586,7 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/inventorypb/agents.swagger.json b/api/inventorypb/agents.swagger.json new file mode 100644 index 0000000000..0a1bc84c74 --- /dev/null +++ b/api/inventorypb/agents.swagger.json @@ -0,0 +1,3567 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventorypb/agents.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Agents" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/inventory/Agents/AddAzureDatabaseExporter": { + "post": { + "summary": "Add Azure Database Exporter", + "description": "Adds azure_database_exporter Agent.", + "operationId": "AddAzureDatabaseExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddAzureDatabaseExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddAzureDatabaseExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddExternalExporter": { + "post": { + "summary": "Add External Exporter", + "description": "Adds external_exporter Agent.", + "operationId": "AddExternalExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddExternalExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddExternalExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddMongoDBExporter": { + "post": { + "summary": "Add MongoDB Exporter", + "description": "Adds mongodb_exporter Agent.", + "operationId": "AddMongoDBExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddMongoDBExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddMongoDBExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddMySQLdExporter": { + "post": { + "summary": "Add mysqld Exporter", + "description": "Adds mysqld_exporter Agent.", + "operationId": "AddMySQLdExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddMySQLdExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddMySQLdExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddNodeExporter": { + "post": { + "summary": "Add Node Exporter", + "description": "Adds node_exporter Agent.", + "operationId": "AddNodeExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddNodeExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddNodeExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddPMMAgent": { + "post": { + "summary": "Add PMM Agent", + "description": "Adds PMM Agent.", + "operationId": "AddPMMAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddPMMAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddPMMAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddPostgresExporter": { + "post": { + "summary": "Add Postgres Exporter", + "description": "Adds postgres_exporter Agent.", + "operationId": "AddPostgresExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddPostgresExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddPostgresExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddProxySQLExporter": { + "post": { + "summary": "Add ProxySQL Exporter", + "description": "Adds proxysql_exporter Agent.", + "operationId": "AddProxySQLExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddProxySQLExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddProxySQLExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddQANMongoDBProfilerAgent": { + "post": { + "summary": "Add 'QAN MongoDB Profiler' Agent", + "description": "Adds 'Query Analytics MongoDB Profiler' Agent.", + "operationId": "AddQANMongoDBProfilerAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddQANMongoDBProfilerAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddQANMongoDBProfilerAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddQANMySQLPerfSchemaAgent": { + "post": { + "summary": "Add 'QAN MySQL PerfSchema' Agent", + "description": "Adds 'Query Analytics MySQL PerfSchema' Agent.", + "operationId": "AddQANMySQLPerfSchemaAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddQANMySQLPerfSchemaAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddQANMySQLPerfSchemaAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddQANMySQLSlowlogAgent": { + "post": { + "summary": "Add 'QAN MySQL Slowlog' Agent", + "description": "Adds 'Query Analytics MySQL Slowlog' Agent.", + "operationId": "AddQANMySQLSlowlogAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddQANMySQLSlowlogAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddQANMySQLSlowlogAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddQANPostgreSQLPgStatMonitorAgent": { + "post": { + "summary": "Add 'QAN PostgreSQL pg_stat_monitor' Agent", + "description": "Adds 'Query Analytics PostgreSQL pg_stat_monitor' Agent.", + "operationId": "AddQANPostgreSQLPgStatMonitorAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatMonitorAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatMonitorAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddQANPostgreSQLPgStatementsAgent": { + "post": { + "summary": "Add 'QAN PostgreSQL pg_stat_statements' Agent", + "description": "Adds 'Query Analytics PostgreSQL pg_stat_statements' Agent.", + "operationId": "AddQANPostgreSQLPgStatementsAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatementsAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatementsAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/AddRDSExporter": { + "post": { + "summary": "Add RDS Exporter", + "description": "Adds rds_exporter Agent.", + "operationId": "AddRDSExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddRDSExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddRDSExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeAzureDatabaseExporter": { + "post": { + "summary": "Change Azure Database Exporter", + "description": "Changes azure_database_exporter Agent.", + "operationId": "ChangeAzureDatabaseExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeAzureDatabaseExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeAzureDatabaseExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeExternalExporter": { + "post": { + "summary": "Change External Exporter", + "description": "Changes external_exporter Agent.", + "operationId": "ChangeExternalExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeExternalExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeExternalExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeMongoDBExporter": { + "post": { + "summary": "Change MongoDB Exporter", + "description": "Changes mongodb_exporter Agent.", + "operationId": "ChangeMongoDBExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeMongoDBExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeMongoDBExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeMySQLdExporter": { + "post": { + "summary": "Change mysqld Exporter", + "description": "Changes mysqld_exporter Agent.", + "operationId": "ChangeMySQLdExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeMySQLdExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeMySQLdExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeNodeExporter": { + "post": { + "summary": "Change Node Exporter", + "description": "Changes node_exporter Agent.", + "operationId": "ChangeNodeExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeNodeExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeNodeExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangePostgresExporter": { + "post": { + "summary": "Change Postgres Exporter", + "description": "Changes postgres_exporter Agent.", + "operationId": "ChangePostgresExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangePostgresExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangePostgresExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeProxySQLExporter": { + "post": { + "summary": "Change ProxySQL Exporter", + "description": "Changes proxysql_exporter Agent.", + "operationId": "ChangeProxySQLExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeProxySQLExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeProxySQLExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeQANMongoDBProfilerAgent": { + "post": { + "summary": "Change 'QAN MongoDB Profiler' Agent", + "description": "Changes 'Query Analytics MongoDB Profiler' Agent.", + "operationId": "ChangeQANMongoDBProfilerAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeQANMongoDBProfilerAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeQANMongoDBProfilerAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeQANMySQLPerfSchemaAgent": { + "post": { + "summary": "Change 'QAN MySQL PerfSchema' Agent", + "description": "Changes 'Query Analytics MySQL PerfSchema' Agent.", + "operationId": "ChangeQANMySQLPerfSchemaAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeQANMySQLPerfSchemaAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeQANMySQLPerfSchemaAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeQANMySQLSlowlogAgent": { + "post": { + "summary": "Change 'QAN MySQL Slowlog' Agent", + "description": "Changes 'Query Analytics MySQL Slowlog' Agent.", + "operationId": "ChangeQANMySQLSlowlogAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeQANMySQLSlowlogAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeQANMySQLSlowlogAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeQANPostgreSQLPgStatMonitorAgent": { + "post": { + "summary": "Change 'QAN PostgreSQL pg_stat_monitor' Agent", + "description": "Changes 'Query Analytics PostgreSQL pg_stat_monitor' Agent.", + "operationId": "ChangeQANPostgreSQLPgStatMonitorAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatMonitorAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatMonitorAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeQANPostgreSQLPgStatementsAgent": { + "post": { + "summary": "Change 'QAN PostgreSQL pg_stat_statements' Agent", + "description": "Changes 'Query Analytics PostgreSQL pg_stat_statements' Agent.", + "operationId": "ChangeQANPostgreSQLPgStatementsAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatementsAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatementsAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/ChangeRDSExporter": { + "post": { + "summary": "Change RDS Exporter", + "description": "Changes rds_exporter Agent.", + "operationId": "ChangeRDSExporter", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryChangeRDSExporterResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryChangeRDSExporterRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/Get": { + "post": { + "summary": "Get Agent", + "description": "Returns a single Agent by ID.", + "operationId": "GetAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryGetAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryGetAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/GetLogs": { + "post": { + "summary": "Get Agent logs", + "description": "Returns Agent logs by ID.", + "operationId": "GetAgentLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryGetAgentLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryGetAgentLogsRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/List": { + "post": { + "summary": "List Agents", + "description": "Returns a list of all Agents.", + "operationId": "ListAgents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryListAgentsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryListAgentsRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + }, + "/v1/inventory/Agents/Remove": { + "post": { + "summary": "Remove Agent", + "description": "Removes Agent.", + "operationId": "RemoveAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryRemoveAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryRemoveAgentRequest" + } + } + ], + "tags": [ + "Agents" + ] + } + } + }, + "definitions": { + "inventoryAddAzureDatabaseExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "azure_client_id": { + "type": "string", + "title": "Azure client ID" + }, + "azure_client_secret": { + "type": "string", + "title": "Azure client secret" + }, + "azure_tenant_id": { + "type": "string", + "title": "Azure tanant ID" + }, + "azure_subscription_id": { + "type": "string", + "title": "Azure subscription ID" + }, + "azure_resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure resource type (mysql, maria, postgres)" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddAzureDatabaseExporterResponse": { + "type": "object", + "properties": { + "azure_database_exporter": { + "$ref": "#/definitions/inventoryAzureDatabaseExporter" + } + } + }, + "inventoryAddExternalExporterRequest": { + "type": "object", + "properties": { + "runs_on_node_id": { + "type": "string", + "description": "The node identifier where this instance is run." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "password": { + "type": "string", + "description": "HTTP basic auth password for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints(default: http)." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI(default: /metrics)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + } + } + }, + "inventoryAddExternalExporterResponse": { + "type": "object", + "properties": { + "external_exporter": { + "$ref": "#/definitions/inventoryExternalExporter" + } + } + }, + "inventoryAddMongoDBExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for scraping metrics." + }, + "password": { + "type": "string", + "description": "MongoDB password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of colletions to get stats from. Can use *" + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddMongoDBExporterResponse": { + "type": "object", + "properties": { + "mongodb_exporter": { + "$ref": "#/definitions/inventoryMongoDBExporter" + } + } + }, + "inventoryAddMySQLdExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "MySQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddMySQLdExporterResponse": { + "type": "object", + "properties": { + "mysqld_exporter": { + "$ref": "#/definitions/inventoryMySQLdExporter" + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Actual table count at the moment of adding." + } + } + }, + "inventoryAddNodeExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddNodeExporterResponse": { + "type": "object", + "properties": { + "node_exporter": { + "$ref": "#/definitions/inventoryNodeExporter" + } + } + }, + "inventoryAddPMMAgentRequest": { + "type": "object", + "properties": { + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddPMMAgentResponse": { + "type": "object", + "properties": { + "pmm_agent": { + "$ref": "#/definitions/inventoryPMMAgent" + } + } + }, + "inventoryAddPostgresExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddPostgresExporterResponse": { + "type": "object", + "properties": { + "postgres_exporter": { + "$ref": "#/definitions/inventoryPostgresExporter" + } + } + }, + "inventoryAddProxySQLExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "ProxySQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddProxySQLExporterResponse": { + "type": "object", + "properties": { + "proxysql_exporter": { + "$ref": "#/definitions/inventoryProxySQLExporter" + } + } + }, + "inventoryAddQANMongoDBProfilerAgentRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profile data." + }, + "password": { + "type": "string", + "description": "MongoDB password for getting profile data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddQANMongoDBProfilerAgentResponse": { + "type": "object", + "properties": { + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" + } + } + }, + "inventoryAddQANMySQLPerfSchemaAgentRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "password": { + "type": "string", + "description": "MySQL password for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)" + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddQANMySQLPerfSchemaAgentResponse": { + "type": "object", + "properties": { + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" + } + } + }, + "inventoryAddQANMySQLSlowlogAgentRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting slowlog data." + }, + "password": { + "type": "string", + "description": "MySQL password for getting slowlog data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddQANMySQLSlowlogAgentResponse": { + "type": "object", + "properties": { + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" + } + } + }, + "inventoryAddQANPostgreSQLPgStatMonitorAgentRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddQANPostgreSQLPgStatMonitorAgentResponse": { + "type": "object", + "properties": { + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" + } + } + }, + "inventoryAddQANPostgreSQLPgStatementsAgentRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for getting pg stat statements data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddQANPostgreSQLPgStatementsAgentResponse": { + "type": "object", + "properties": { + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" + } + } + }, + "inventoryAddRDSExporterRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "aws_secret_key": { + "type": "string", + "description": "AWS Secret Key." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_basic_metrics": { + "type": "boolean", + "description": "Disable basic metrics." + }, + "disable_enhanced_metrics": { + "type": "boolean", + "description": "Disable enhanced metrics." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + } + }, + "inventoryAddRDSExporterResponse": { + "type": "object", + "properties": { + "rds_exporter": { + "$ref": "#/definitions/inventoryRDSExporter" + } + } + }, + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryAgentType": { + "type": "string", + "enum": [ + "AGENT_TYPE_INVALID", + "PMM_AGENT", + "VM_AGENT", + "NODE_EXPORTER", + "MYSQLD_EXPORTER", + "MONGODB_EXPORTER", + "POSTGRES_EXPORTER", + "PROXYSQL_EXPORTER", + "QAN_MYSQL_PERFSCHEMA_AGENT", + "QAN_MYSQL_SLOWLOG_AGENT", + "QAN_MONGODB_PROFILER_AGENT", + "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "RDS_EXPORTER", + "EXTERNAL_EXPORTER", + "AZURE_DATABASE_EXPORTER" + ], + "default": "AGENT_TYPE_INVALID", + "description": "AgentType describes supported Agent types." + }, + "inventoryAzureDatabaseExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "azure_database_subscription_id": { + "type": "string", + "description": "Azure database subscription ID." + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure database resource type (mysql, maria, postgres)" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status (the same for several configurations)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics (the same for several configurations)." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if the exporter operates in push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics." + }, + "inventoryChangeAzureDatabaseExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeAzureDatabaseExporterResponse": { + "type": "object", + "properties": { + "azure_database_exporter": { + "$ref": "#/definitions/inventoryAzureDatabaseExporter" + } + } + }, + "inventoryChangeCommonAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "description": "Enable this Agent. Can't be used with disabled." + }, + "disable": { + "type": "boolean", + "description": "Disable this Agent. Can't be used with enabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Replace all custom user-assigned labels." + }, + "remove_custom_labels": { + "type": "boolean", + "description": "Remove all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "description": "Enables push metrics with vmagent, can't be used with disable_push_metrics.\nCan't be used with agent version lower then 2.12 and unsupported agents." + }, + "disable_push_metrics": { + "type": "boolean", + "description": "Disables push metrics, pmm-server starts to pull it, can't be used with enable_push_metrics." + } + }, + "description": "ChangeCommonAgentParams contains parameters that can be changed for all Agents." + }, + "inventoryChangeExternalExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeExternalExporterResponse": { + "type": "object", + "properties": { + "external_exporter": { + "$ref": "#/definitions/inventoryExternalExporter" + } + } + }, + "inventoryChangeMongoDBExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeMongoDBExporterResponse": { + "type": "object", + "properties": { + "mongodb_exporter": { + "$ref": "#/definitions/inventoryMongoDBExporter" + } + } + }, + "inventoryChangeMySQLdExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeMySQLdExporterResponse": { + "type": "object", + "properties": { + "mysqld_exporter": { + "$ref": "#/definitions/inventoryMySQLdExporter" + } + } + }, + "inventoryChangeNodeExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeNodeExporterResponse": { + "type": "object", + "properties": { + "node_exporter": { + "$ref": "#/definitions/inventoryNodeExporter" + } + } + }, + "inventoryChangePostgresExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangePostgresExporterResponse": { + "type": "object", + "properties": { + "postgres_exporter": { + "$ref": "#/definitions/inventoryPostgresExporter" + } + } + }, + "inventoryChangeProxySQLExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeProxySQLExporterResponse": { + "type": "object", + "properties": { + "proxysql_exporter": { + "$ref": "#/definitions/inventoryProxySQLExporter" + } + } + }, + "inventoryChangeQANMongoDBProfilerAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeQANMongoDBProfilerAgentResponse": { + "type": "object", + "properties": { + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" + } + } + }, + "inventoryChangeQANMySQLPerfSchemaAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeQANMySQLPerfSchemaAgentResponse": { + "type": "object", + "properties": { + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" + } + } + }, + "inventoryChangeQANMySQLSlowlogAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeQANMySQLSlowlogAgentResponse": { + "type": "object", + "properties": { + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" + } + } + }, + "inventoryChangeQANPostgreSQLPgStatMonitorAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeQANPostgreSQLPgStatMonitorAgentResponse": { + "type": "object", + "properties": { + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" + } + } + }, + "inventoryChangeQANPostgreSQLPgStatementsAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeQANPostgreSQLPgStatementsAgentResponse": { + "type": "object", + "properties": { + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" + } + } + }, + "inventoryChangeRDSExporterRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "common": { + "$ref": "#/definitions/inventoryChangeCommonAgentParams" + } + } + }, + "inventoryChangeRDSExporterResponse": { + "type": "object", + "properties": { + "rds_exporter": { + "$ref": "#/definitions/inventoryRDSExporter" + } + } + }, + "inventoryExternalExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "disabled": { + "type": "boolean", + "description": "If disabled, metrics from this exporter will not be collected." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "ExternalExporter runs on any Node type, including Remote Node." + }, + "inventoryGetAgentLogsRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "limit": { + "type": "integer", + "format": "int64", + "title": "is less than this value. 0: no limit" + } + } + }, + "inventoryGetAgentLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "string" + } + }, + "agent_config_log_lines_count": { + "type": "integer", + "format": "int64" + } + } + }, + "inventoryGetAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + } + } + }, + "inventoryGetAgentResponse": { + "type": "object", + "properties": { + "pmm_agent": { + "$ref": "#/definitions/inventoryPMMAgent" + }, + "vmagent": { + "$ref": "#/definitions/inventoryVMAgent" + }, + "node_exporter": { + "$ref": "#/definitions/inventoryNodeExporter" + }, + "mysqld_exporter": { + "$ref": "#/definitions/inventoryMySQLdExporter" + }, + "mongodb_exporter": { + "$ref": "#/definitions/inventoryMongoDBExporter" + }, + "postgres_exporter": { + "$ref": "#/definitions/inventoryPostgresExporter" + }, + "proxysql_exporter": { + "$ref": "#/definitions/inventoryProxySQLExporter" + }, + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" + }, + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" + }, + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" + }, + "rds_exporter": { + "$ref": "#/definitions/inventoryRDSExporter" + }, + "external_exporter": { + "$ref": "#/definitions/inventoryExternalExporter" + }, + "azure_database_exporter": { + "$ref": "#/definitions/inventoryAzureDatabaseExporter" + } + } + }, + "inventoryListAgentsRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id." + }, + "node_id": { + "type": "string", + "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id." + }, + "service_id": { + "type": "string", + "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id." + }, + "agent_type": { + "$ref": "#/definitions/inventoryAgentType", + "description": "Return only agents of a particular type." + } + } + }, + "inventoryListAgentsResponse": { + "type": "object", + "properties": { + "pmm_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryPMMAgent" + } + }, + "vm_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryVMAgent" + } + }, + "node_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryNodeExporter" + } + }, + "mysqld_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryMySQLdExporter" + } + }, + "mongodb_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryMongoDBExporter" + } + }, + "postgres_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryPostgresExporter" + } + }, + "proxysql_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryProxySQLExporter" + } + }, + "qan_mysql_perfschema_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" + } + }, + "qan_mysql_slowlog_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" + } + }, + "qan_mongodb_profiler_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" + } + }, + "qan_postgresql_pgstatements_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" + } + }, + "qan_postgresql_pgstatmonitor_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" + } + }, + "rds_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryRDSExporter" + } + }, + "external_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryExternalExporter" + } + }, + "azure_database_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryAzureDatabaseExporter" + } + } + } + }, + "inventoryLogLevel": { + "type": "string", + "enum": [ + "auto", + "fatal", + "error", + "warn", + "info", + "debug" + ], + "default": "auto", + "title": "Log level for exporters" + }, + "inventoryMongoDBExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of colletions to get stats from. Can use *" + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" + }, + "enable_all_collectors": { + "type": "boolean", + "description": "Enable All collectors." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics." + }, + "inventoryMySQLdExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "tablestats_group_disabled": { + "type": "boolean", + "description": "True if tablestats group collectors are currently disabled." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." + }, + "inventoryNodeExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "NodeExporter runs on Generic or Container Node and exposes its metrics." + }, + "inventoryPMMAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "PMMAgent runs on Generic or Container Node." + }, + "inventoryPostgresExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." + }, + "inventoryProxySQLExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics." + }, + "inventoryQANMongoDBProfilerAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit).\n\nTrue if query examples are disabled.\n bool query_examples_disabled = 8; TODO https://jira.percona.com/browse/PMM-4650" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." + }, + "inventoryQANMySQLPerfSchemaAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "inventoryQANMySQLSlowlogAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)" + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "Slowlog file is rotated at this size if \u003e 0." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy" + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "inventoryQANPostgreSQLPgStatMonitorAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "inventoryQANPostgreSQLPgStatementsAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "inventoryRDSExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status (the same for several configurations)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics (the same for several configurations).\n\nMetric collections flags below." + }, + "basic_metrics_disabled": { + "type": "boolean", + "description": "Basic metrics are disabled." + }, + "enhanced_metrics_disabled": { + "type": "boolean", + "description": "Enhanced metrics are disabled." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics." + }, + "inventoryRemoveAgentRequest": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "force": { + "type": "boolean", + "description": "Remove agent with all dependencies." + } + } + }, + "inventoryRemoveAgentResponse": { + "type": "object" + }, + "inventoryVMAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + } + }, + "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventorypb/agents_grpc.pb.go b/api/inventorypb/agents_grpc.pb.go index 09de340da9..3955bc6de5 100644 --- a/api/inventorypb/agents_grpc.pb.go +++ b/api/inventorypb/agents_grpc.pb.go @@ -8,7 +8,6 @@ package inventorypb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -478,128 +477,99 @@ type AgentsServer interface { } // UnimplementedAgentsServer must be embedded to have forward compatible implementations. -type UnimplementedAgentsServer struct{} +type UnimplementedAgentsServer struct { +} func (UnimplementedAgentsServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") } - func (UnimplementedAgentsServer) GetAgent(context.Context, *GetAgentRequest) (*GetAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgent not implemented") } - func (UnimplementedAgentsServer) GetAgentLogs(context.Context, *GetAgentLogsRequest) (*GetAgentLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgentLogs not implemented") } - func (UnimplementedAgentsServer) AddPMMAgent(context.Context, *AddPMMAgentRequest) (*AddPMMAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPMMAgent not implemented") } - func (UnimplementedAgentsServer) AddNodeExporter(context.Context, *AddNodeExporterRequest) (*AddNodeExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddNodeExporter not implemented") } - func (UnimplementedAgentsServer) ChangeNodeExporter(context.Context, *ChangeNodeExporterRequest) (*ChangeNodeExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeNodeExporter not implemented") } - func (UnimplementedAgentsServer) AddMySQLdExporter(context.Context, *AddMySQLdExporterRequest) (*AddMySQLdExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMySQLdExporter not implemented") } - func (UnimplementedAgentsServer) ChangeMySQLdExporter(context.Context, *ChangeMySQLdExporterRequest) (*ChangeMySQLdExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeMySQLdExporter not implemented") } - func (UnimplementedAgentsServer) AddMongoDBExporter(context.Context, *AddMongoDBExporterRequest) (*AddMongoDBExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMongoDBExporter not implemented") } - func (UnimplementedAgentsServer) ChangeMongoDBExporter(context.Context, *ChangeMongoDBExporterRequest) (*ChangeMongoDBExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeMongoDBExporter not implemented") } - func (UnimplementedAgentsServer) AddPostgresExporter(context.Context, *AddPostgresExporterRequest) (*AddPostgresExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPostgresExporter not implemented") } - func (UnimplementedAgentsServer) ChangePostgresExporter(context.Context, *ChangePostgresExporterRequest) (*ChangePostgresExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangePostgresExporter not implemented") } - func (UnimplementedAgentsServer) AddProxySQLExporter(context.Context, *AddProxySQLExporterRequest) (*AddProxySQLExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQLExporter not implemented") } - func (UnimplementedAgentsServer) ChangeProxySQLExporter(context.Context, *ChangeProxySQLExporterRequest) (*ChangeProxySQLExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeProxySQLExporter not implemented") } - func (UnimplementedAgentsServer) AddQANMySQLPerfSchemaAgent(context.Context, *AddQANMySQLPerfSchemaAgentRequest) (*AddQANMySQLPerfSchemaAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANMySQLPerfSchemaAgent not implemented") } - func (UnimplementedAgentsServer) ChangeQANMySQLPerfSchemaAgent(context.Context, *ChangeQANMySQLPerfSchemaAgentRequest) (*ChangeQANMySQLPerfSchemaAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANMySQLPerfSchemaAgent not implemented") } - func (UnimplementedAgentsServer) AddQANMySQLSlowlogAgent(context.Context, *AddQANMySQLSlowlogAgentRequest) (*AddQANMySQLSlowlogAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANMySQLSlowlogAgent not implemented") } - func (UnimplementedAgentsServer) ChangeQANMySQLSlowlogAgent(context.Context, *ChangeQANMySQLSlowlogAgentRequest) (*ChangeQANMySQLSlowlogAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANMySQLSlowlogAgent not implemented") } - func (UnimplementedAgentsServer) AddQANMongoDBProfilerAgent(context.Context, *AddQANMongoDBProfilerAgentRequest) (*AddQANMongoDBProfilerAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANMongoDBProfilerAgent not implemented") } - func (UnimplementedAgentsServer) ChangeQANMongoDBProfilerAgent(context.Context, *ChangeQANMongoDBProfilerAgentRequest) (*ChangeQANMongoDBProfilerAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANMongoDBProfilerAgent not implemented") } - func (UnimplementedAgentsServer) AddQANPostgreSQLPgStatementsAgent(context.Context, *AddQANPostgreSQLPgStatementsAgentRequest) (*AddQANPostgreSQLPgStatementsAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANPostgreSQLPgStatementsAgent not implemented") } - func (UnimplementedAgentsServer) ChangeQANPostgreSQLPgStatementsAgent(context.Context, *ChangeQANPostgreSQLPgStatementsAgentRequest) (*ChangeQANPostgreSQLPgStatementsAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANPostgreSQLPgStatementsAgent not implemented") } - func (UnimplementedAgentsServer) AddQANPostgreSQLPgStatMonitorAgent(context.Context, *AddQANPostgreSQLPgStatMonitorAgentRequest) (*AddQANPostgreSQLPgStatMonitorAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANPostgreSQLPgStatMonitorAgent not implemented") } - func (UnimplementedAgentsServer) ChangeQANPostgreSQLPgStatMonitorAgent(context.Context, *ChangeQANPostgreSQLPgStatMonitorAgentRequest) (*ChangeQANPostgreSQLPgStatMonitorAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANPostgreSQLPgStatMonitorAgent not implemented") } - func (UnimplementedAgentsServer) AddRDSExporter(context.Context, *AddRDSExporterRequest) (*AddRDSExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRDSExporter not implemented") } - func (UnimplementedAgentsServer) ChangeRDSExporter(context.Context, *ChangeRDSExporterRequest) (*ChangeRDSExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeRDSExporter not implemented") } - func (UnimplementedAgentsServer) AddExternalExporter(context.Context, *AddExternalExporterRequest) (*AddExternalExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternalExporter not implemented") } - func (UnimplementedAgentsServer) ChangeExternalExporter(context.Context, *ChangeExternalExporterRequest) (*ChangeExternalExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeExternalExporter not implemented") } - func (UnimplementedAgentsServer) AddAzureDatabaseExporter(context.Context, *AddAzureDatabaseExporterRequest) (*AddAzureDatabaseExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAzureDatabaseExporter not implemented") } - func (UnimplementedAgentsServer) ChangeAzureDatabaseExporter(context.Context, *ChangeAzureDatabaseExporterRequest) (*ChangeAzureDatabaseExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeAzureDatabaseExporter not implemented") } - func (UnimplementedAgentsServer) RemoveAgent(context.Context, *RemoveAgentRequest) (*RemoveAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveAgent not implemented") } diff --git a/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go b/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go index 3db16b94a2..d583c6a51a 100644 --- a/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go @@ -60,6 +60,7 @@ AddAzureDatabaseExporterParams contains all the parameters to send to the API en Typically these are written to a http.Request. */ type AddAzureDatabaseExporterParams struct { + // Body. Body AddAzureDatabaseExporterBody @@ -129,6 +130,7 @@ func (o *AddAzureDatabaseExporterParams) SetBody(body AddAzureDatabaseExporterBo // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go b/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go index a131a16a3c..c502f53e8c 100644 --- a/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go @@ -62,12 +62,12 @@ type AddAzureDatabaseExporterOK struct { func (o *AddAzureDatabaseExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddAzureDatabaseExporter][%d] addAzureDatabaseExporterOk %+v", 200, o.Payload) } - func (o *AddAzureDatabaseExporterOK) GetPayload() *AddAzureDatabaseExporterOKBody { return o.Payload } func (o *AddAzureDatabaseExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAzureDatabaseExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddAzureDatabaseExporterDefault) Code() int { func (o *AddAzureDatabaseExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddAzureDatabaseExporter][%d] AddAzureDatabaseExporter default %+v", o._statusCode, o.Payload) } - func (o *AddAzureDatabaseExporterDefault) GetPayload() *AddAzureDatabaseExporterDefaultBody { return o.Payload } func (o *AddAzureDatabaseExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAzureDatabaseExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddAzureDatabaseExporterBody add azure database exporter body swagger:model AddAzureDatabaseExporterBody */ type AddAzureDatabaseExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -259,6 +260,7 @@ AddAzureDatabaseExporterDefaultBody add azure database exporter default body swagger:model AddAzureDatabaseExporterDefaultBody */ type AddAzureDatabaseExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -324,7 +326,9 @@ func (o *AddAzureDatabaseExporterDefaultBody) ContextValidate(ctx context.Contex } func (o *AddAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -335,6 +339,7 @@ func (o *AddAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx context return err } } + } return nil @@ -363,6 +368,7 @@ AddAzureDatabaseExporterDefaultBodyDetailsItems0 add azure database exporter def swagger:model AddAzureDatabaseExporterDefaultBodyDetailsItems0 */ type AddAzureDatabaseExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -400,6 +406,7 @@ AddAzureDatabaseExporterOKBody add azure database exporter OK body swagger:model AddAzureDatabaseExporterOKBody */ type AddAzureDatabaseExporterOKBody struct { + // azure database exporter AzureDatabaseExporter *AddAzureDatabaseExporterOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` } @@ -452,6 +459,7 @@ func (o *AddAzureDatabaseExporterOKBody) ContextValidate(ctx context.Context, fo } func (o *AddAzureDatabaseExporterOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if err := o.AzureDatabaseExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -489,6 +497,7 @@ AddAzureDatabaseExporterOKBodyAzureDatabaseExporter AzureDatabaseExporter runs o swagger:model AddAzureDatabaseExporterOKBodyAzureDatabaseExporter */ type AddAzureDatabaseExporterOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_external_exporter_parameters.go b/api/inventorypb/json/client/agents/add_external_exporter_parameters.go index 5a5ae9a946..3672f81075 100644 --- a/api/inventorypb/json/client/agents/add_external_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_external_exporter_parameters.go @@ -60,6 +60,7 @@ AddExternalExporterParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type AddExternalExporterParams struct { + // Body. Body AddExternalExporterBody @@ -129,6 +130,7 @@ func (o *AddExternalExporterParams) SetBody(body AddExternalExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddExternalExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_external_exporter_responses.go b/api/inventorypb/json/client/agents/add_external_exporter_responses.go index 33a3d17e6e..e6c53a045c 100644 --- a/api/inventorypb/json/client/agents/add_external_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_external_exporter_responses.go @@ -60,12 +60,12 @@ type AddExternalExporterOK struct { func (o *AddExternalExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddExternalExporter][%d] addExternalExporterOk %+v", 200, o.Payload) } - func (o *AddExternalExporterOK) GetPayload() *AddExternalExporterOKBody { return o.Payload } func (o *AddExternalExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddExternalExporterOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddExternalExporterDefault) Code() int { func (o *AddExternalExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddExternalExporter][%d] AddExternalExporter default %+v", o._statusCode, o.Payload) } - func (o *AddExternalExporterDefault) GetPayload() *AddExternalExporterDefaultBody { return o.Payload } func (o *AddExternalExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddExternalExporterDefaultBody) // response payload @@ -123,6 +123,7 @@ AddExternalExporterBody add external exporter body swagger:model AddExternalExporterBody */ type AddExternalExporterBody struct { + // The node identifier where this instance is run. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -184,6 +185,7 @@ AddExternalExporterDefaultBody add external exporter default body swagger:model AddExternalExporterDefaultBody */ type AddExternalExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -249,7 +251,9 @@ func (o *AddExternalExporterDefaultBody) ContextValidate(ctx context.Context, fo } func (o *AddExternalExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -260,6 +264,7 @@ func (o *AddExternalExporterDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -288,6 +293,7 @@ AddExternalExporterDefaultBodyDetailsItems0 add external exporter default body d swagger:model AddExternalExporterDefaultBodyDetailsItems0 */ type AddExternalExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -325,6 +331,7 @@ AddExternalExporterOKBody add external exporter OK body swagger:model AddExternalExporterOKBody */ type AddExternalExporterOKBody struct { + // external exporter ExternalExporter *AddExternalExporterOKBodyExternalExporter `json:"external_exporter,omitempty"` } @@ -377,6 +384,7 @@ func (o *AddExternalExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddExternalExporterOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -414,6 +422,7 @@ AddExternalExporterOKBodyExternalExporter ExternalExporter runs on any Node type swagger:model AddExternalExporterOKBodyExternalExporter */ type AddExternalExporterOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go b/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go index d7083686bf..dbab1c8589 100644 --- a/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go @@ -60,6 +60,7 @@ AddMongoDBExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMongoDBExporterParams struct { + // Body. Body AddMongoDBExporterBody @@ -129,6 +130,7 @@ func (o *AddMongoDBExporterParams) SetBody(body AddMongoDBExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddMongoDBExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go b/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go index ba66e912c4..59fa4474b6 100644 --- a/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go @@ -62,12 +62,12 @@ type AddMongoDBExporterOK struct { func (o *AddMongoDBExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMongoDBExporter][%d] addMongoDbExporterOk %+v", 200, o.Payload) } - func (o *AddMongoDBExporterOK) GetPayload() *AddMongoDBExporterOKBody { return o.Payload } func (o *AddMongoDBExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMongoDBExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMongoDBExporterDefault) Code() int { func (o *AddMongoDBExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMongoDBExporter][%d] AddMongoDBExporter default %+v", o._statusCode, o.Payload) } - func (o *AddMongoDBExporterDefault) GetPayload() *AddMongoDBExporterDefaultBody { return o.Payload } func (o *AddMongoDBExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMongoDBExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddMongoDBExporterBody add mongo DB exporter body swagger:model AddMongoDBExporterBody */ type AddMongoDBExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -283,6 +284,7 @@ AddMongoDBExporterDefaultBody add mongo DB exporter default body swagger:model AddMongoDBExporterDefaultBody */ type AddMongoDBExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -348,7 +350,9 @@ func (o *AddMongoDBExporterDefaultBody) ContextValidate(ctx context.Context, for } func (o *AddMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -359,6 +363,7 @@ func (o *AddMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -387,6 +392,7 @@ AddMongoDBExporterDefaultBodyDetailsItems0 add mongo DB exporter default body de swagger:model AddMongoDBExporterDefaultBodyDetailsItems0 */ type AddMongoDBExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -424,6 +430,7 @@ AddMongoDBExporterOKBody add mongo DB exporter OK body swagger:model AddMongoDBExporterOKBody */ type AddMongoDBExporterOKBody struct { + // mongodb exporter MongodbExporter *AddMongoDBExporterOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` } @@ -476,6 +483,7 @@ func (o *AddMongoDBExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddMongoDBExporterOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -513,6 +521,7 @@ AddMongoDBExporterOKBodyMongodbExporter MongoDBExporter runs on Generic or Conta swagger:model AddMongoDBExporterOKBodyMongodbExporter */ type AddMongoDBExporterOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go index 155ca1d3ff..8640aea896 100644 --- a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go @@ -60,6 +60,7 @@ AddMySQLdExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMySQLdExporterParams struct { + // Body. Body AddMySQLdExporterBody @@ -129,6 +130,7 @@ func (o *AddMySQLdExporterParams) SetBody(body AddMySQLdExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddMySQLdExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go index e237740447..9e6aa38fb7 100644 --- a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go @@ -62,12 +62,12 @@ type AddMySQLdExporterOK struct { func (o *AddMySQLdExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMySQLdExporter][%d] addMySQLdExporterOk %+v", 200, o.Payload) } - func (o *AddMySQLdExporterOK) GetPayload() *AddMySQLdExporterOKBody { return o.Payload } func (o *AddMySQLdExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMySQLdExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMySQLdExporterDefault) Code() int { func (o *AddMySQLdExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMySQLdExporter][%d] AddMySQLdExporter default %+v", o._statusCode, o.Payload) } - func (o *AddMySQLdExporterDefault) GetPayload() *AddMySQLdExporterDefaultBody { return o.Payload } func (o *AddMySQLdExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMySQLdExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddMySQLdExporterBody add my s q ld exporter body swagger:model AddMySQLdExporterBody */ type AddMySQLdExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -273,6 +274,7 @@ AddMySQLdExporterDefaultBody add my s q ld exporter default body swagger:model AddMySQLdExporterDefaultBody */ type AddMySQLdExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -338,7 +340,9 @@ func (o *AddMySQLdExporterDefaultBody) ContextValidate(ctx context.Context, form } func (o *AddMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -349,6 +353,7 @@ func (o *AddMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -377,6 +382,7 @@ AddMySQLdExporterDefaultBodyDetailsItems0 add my s q ld exporter default body de swagger:model AddMySQLdExporterDefaultBodyDetailsItems0 */ type AddMySQLdExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -414,6 +420,7 @@ AddMySQLdExporterOKBody add my s q ld exporter OK body swagger:model AddMySQLdExporterOKBody */ type AddMySQLdExporterOKBody struct { + // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -469,6 +476,7 @@ func (o *AddMySQLdExporterOKBody) ContextValidate(ctx context.Context, formats s } func (o *AddMySQLdExporterOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -506,6 +514,7 @@ AddMySQLdExporterOKBodyMysqldExporter MySQLdExporter runs on Generic or Containe swagger:model AddMySQLdExporterOKBodyMysqldExporter */ type AddMySQLdExporterOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_node_exporter_parameters.go b/api/inventorypb/json/client/agents/add_node_exporter_parameters.go index 534c79bbf6..825eda1184 100644 --- a/api/inventorypb/json/client/agents/add_node_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_node_exporter_parameters.go @@ -60,6 +60,7 @@ AddNodeExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddNodeExporterParams struct { + // Body. Body AddNodeExporterBody @@ -129,6 +130,7 @@ func (o *AddNodeExporterParams) SetBody(body AddNodeExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddNodeExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_node_exporter_responses.go b/api/inventorypb/json/client/agents/add_node_exporter_responses.go index 0a785bc688..9fd0822e35 100644 --- a/api/inventorypb/json/client/agents/add_node_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_node_exporter_responses.go @@ -62,12 +62,12 @@ type AddNodeExporterOK struct { func (o *AddNodeExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddNodeExporter][%d] addNodeExporterOk %+v", 200, o.Payload) } - func (o *AddNodeExporterOK) GetPayload() *AddNodeExporterOKBody { return o.Payload } func (o *AddNodeExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddNodeExporterDefault) Code() int { func (o *AddNodeExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddNodeExporter][%d] AddNodeExporter default %+v", o._statusCode, o.Payload) } - func (o *AddNodeExporterDefault) GetPayload() *AddNodeExporterDefaultBody { return o.Payload } func (o *AddNodeExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddNodeExporterBody add node exporter body swagger:model AddNodeExporterBody */ type AddNodeExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -238,6 +239,7 @@ AddNodeExporterDefaultBody add node exporter default body swagger:model AddNodeExporterDefaultBody */ type AddNodeExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -303,7 +305,9 @@ func (o *AddNodeExporterDefaultBody) ContextValidate(ctx context.Context, format } func (o *AddNodeExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -314,6 +318,7 @@ func (o *AddNodeExporterDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -342,6 +347,7 @@ AddNodeExporterDefaultBodyDetailsItems0 add node exporter default body details i swagger:model AddNodeExporterDefaultBodyDetailsItems0 */ type AddNodeExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -379,6 +385,7 @@ AddNodeExporterOKBody add node exporter OK body swagger:model AddNodeExporterOKBody */ type AddNodeExporterOKBody struct { + // node exporter NodeExporter *AddNodeExporterOKBodyNodeExporter `json:"node_exporter,omitempty"` } @@ -431,6 +438,7 @@ func (o *AddNodeExporterOKBody) ContextValidate(ctx context.Context, formats str } func (o *AddNodeExporterOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if err := o.NodeExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -468,6 +476,7 @@ AddNodeExporterOKBodyNodeExporter NodeExporter runs on Generic or Container Node swagger:model AddNodeExporterOKBodyNodeExporter */ type AddNodeExporterOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go b/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go index b9defeaafd..2598082ee0 100644 --- a/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go @@ -60,6 +60,7 @@ AddPMMAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddPMMAgentParams struct { + // Body. Body AddPMMAgentBody @@ -129,6 +130,7 @@ func (o *AddPMMAgentParams) SetBody(body AddPMMAgentBody) { // WriteToRequest writes these params to a swagger request func (o *AddPMMAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_pmm_agent_responses.go b/api/inventorypb/json/client/agents/add_pmm_agent_responses.go index 6488e15501..4af1dbbd59 100644 --- a/api/inventorypb/json/client/agents/add_pmm_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_pmm_agent_responses.go @@ -60,12 +60,12 @@ type AddPMMAgentOK struct { func (o *AddPMMAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPMMAgent][%d] addPmmAgentOk %+v", 200, o.Payload) } - func (o *AddPMMAgentOK) GetPayload() *AddPMMAgentOKBody { return o.Payload } func (o *AddPMMAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPMMAgentOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddPMMAgentDefault) Code() int { func (o *AddPMMAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPMMAgent][%d] AddPMMAgent default %+v", o._statusCode, o.Payload) } - func (o *AddPMMAgentDefault) GetPayload() *AddPMMAgentDefaultBody { return o.Payload } func (o *AddPMMAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPMMAgentDefaultBody) // response payload @@ -123,6 +123,7 @@ AddPMMAgentBody add PMM agent body swagger:model AddPMMAgentBody */ type AddPMMAgentBody struct { + // Node identifier where this instance runs. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -163,6 +164,7 @@ AddPMMAgentDefaultBody add PMM agent default body swagger:model AddPMMAgentDefaultBody */ type AddPMMAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *AddPMMAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddPMMAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *AddPMMAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -267,6 +272,7 @@ AddPMMAgentDefaultBodyDetailsItems0 add PMM agent default body details items0 swagger:model AddPMMAgentDefaultBodyDetailsItems0 */ type AddPMMAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ AddPMMAgentOKBody add PMM agent OK body swagger:model AddPMMAgentOKBody */ type AddPMMAgentOKBody struct { + // pmm agent PMMAgent *AddPMMAgentOKBodyPMMAgent `json:"pmm_agent,omitempty"` } @@ -356,6 +363,7 @@ func (o *AddPMMAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddPMMAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if err := o.PMMAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -393,6 +401,7 @@ AddPMMAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model AddPMMAgentOKBodyPMMAgent */ type AddPMMAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go b/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go index 48999a85e6..7c99c11083 100644 --- a/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go @@ -60,6 +60,7 @@ AddPostgresExporterParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type AddPostgresExporterParams struct { + // Body. Body AddPostgresExporterBody @@ -129,6 +130,7 @@ func (o *AddPostgresExporterParams) SetBody(body AddPostgresExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddPostgresExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go b/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go index a443028e3f..7d1ce734b7 100644 --- a/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go @@ -62,12 +62,12 @@ type AddPostgresExporterOK struct { func (o *AddPostgresExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPostgresExporter][%d] addPostgresExporterOk %+v", 200, o.Payload) } - func (o *AddPostgresExporterOK) GetPayload() *AddPostgresExporterOKBody { return o.Payload } func (o *AddPostgresExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPostgresExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddPostgresExporterDefault) Code() int { func (o *AddPostgresExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPostgresExporter][%d] AddPostgresExporter default %+v", o._statusCode, o.Payload) } - func (o *AddPostgresExporterDefault) GetPayload() *AddPostgresExporterDefaultBody { return o.Payload } func (o *AddPostgresExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPostgresExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddPostgresExporterBody add postgres exporter body swagger:model AddPostgresExporterBody */ type AddPostgresExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -268,6 +269,7 @@ AddPostgresExporterDefaultBody add postgres exporter default body swagger:model AddPostgresExporterDefaultBody */ type AddPostgresExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -333,7 +335,9 @@ func (o *AddPostgresExporterDefaultBody) ContextValidate(ctx context.Context, fo } func (o *AddPostgresExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,6 +348,7 @@ func (o *AddPostgresExporterDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -372,6 +377,7 @@ AddPostgresExporterDefaultBodyDetailsItems0 add postgres exporter default body d swagger:model AddPostgresExporterDefaultBodyDetailsItems0 */ type AddPostgresExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -409,6 +415,7 @@ AddPostgresExporterOKBody add postgres exporter OK body swagger:model AddPostgresExporterOKBody */ type AddPostgresExporterOKBody struct { + // postgres exporter PostgresExporter *AddPostgresExporterOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` } @@ -461,6 +468,7 @@ func (o *AddPostgresExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddPostgresExporterOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -498,6 +506,7 @@ AddPostgresExporterOKBodyPostgresExporter PostgresExporter runs on Generic or Co swagger:model AddPostgresExporterOKBodyPostgresExporter */ type AddPostgresExporterOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go index 1d26aff287..a483205bb7 100644 --- a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go @@ -60,6 +60,7 @@ AddProxySQLExporterParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type AddProxySQLExporterParams struct { + // Body. Body AddProxySQLExporterBody @@ -129,6 +130,7 @@ func (o *AddProxySQLExporterParams) SetBody(body AddProxySQLExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddProxySQLExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go index 8b4efbe9ed..9ef36ae602 100644 --- a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go @@ -62,12 +62,12 @@ type AddProxySQLExporterOK struct { func (o *AddProxySQLExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddProxySQLExporter][%d] addProxySqlExporterOk %+v", 200, o.Payload) } - func (o *AddProxySQLExporterOK) GetPayload() *AddProxySQLExporterOKBody { return o.Payload } func (o *AddProxySQLExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddProxySQLExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddProxySQLExporterDefault) Code() int { func (o *AddProxySQLExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddProxySQLExporter][%d] AddProxySQLExporter default %+v", o._statusCode, o.Payload) } - func (o *AddProxySQLExporterDefault) GetPayload() *AddProxySQLExporterDefaultBody { return o.Payload } func (o *AddProxySQLExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddProxySQLExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddProxySQLExporterBody add proxy SQL exporter body swagger:model AddProxySQLExporterBody */ type AddProxySQLExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -259,6 +260,7 @@ AddProxySQLExporterDefaultBody add proxy SQL exporter default body swagger:model AddProxySQLExporterDefaultBody */ type AddProxySQLExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -324,7 +326,9 @@ func (o *AddProxySQLExporterDefaultBody) ContextValidate(ctx context.Context, fo } func (o *AddProxySQLExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -335,6 +339,7 @@ func (o *AddProxySQLExporterDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -363,6 +368,7 @@ AddProxySQLExporterDefaultBodyDetailsItems0 add proxy SQL exporter default body swagger:model AddProxySQLExporterDefaultBodyDetailsItems0 */ type AddProxySQLExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -400,6 +406,7 @@ AddProxySQLExporterOKBody add proxy SQL exporter OK body swagger:model AddProxySQLExporterOKBody */ type AddProxySQLExporterOKBody struct { + // proxysql exporter ProxysqlExporter *AddProxySQLExporterOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` } @@ -452,6 +459,7 @@ func (o *AddProxySQLExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddProxySQLExporterOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -489,6 +497,7 @@ AddProxySQLExporterOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Co swagger:model AddProxySQLExporterOKBodyProxysqlExporter */ type AddProxySQLExporterOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go index 4ba6b76646..240c207558 100644 --- a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go @@ -60,6 +60,7 @@ AddQANMongoDBProfilerAgentParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type AddQANMongoDBProfilerAgentParams struct { + // Body. Body AddQANMongoDBProfilerAgentBody @@ -129,6 +130,7 @@ func (o *AddQANMongoDBProfilerAgentParams) SetBody(body AddQANMongoDBProfilerAge // WriteToRequest writes these params to a swagger request func (o *AddQANMongoDBProfilerAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go index a5b6eaaf09..e4f7bc5686 100644 --- a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go @@ -62,12 +62,12 @@ type AddQANMongoDBProfilerAgentOK struct { func (o *AddQANMongoDBProfilerAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMongoDBProfilerAgent][%d] addQanMongoDbProfilerAgentOk %+v", 200, o.Payload) } - func (o *AddQANMongoDBProfilerAgentOK) GetPayload() *AddQANMongoDBProfilerAgentOKBody { return o.Payload } func (o *AddQANMongoDBProfilerAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANMongoDBProfilerAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANMongoDBProfilerAgentDefault) Code() int { func (o *AddQANMongoDBProfilerAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMongoDBProfilerAgent][%d] AddQANMongoDBProfilerAgent default %+v", o._statusCode, o.Payload) } - func (o *AddQANMongoDBProfilerAgentDefault) GetPayload() *AddQANMongoDBProfilerAgentDefaultBody { return o.Payload } func (o *AddQANMongoDBProfilerAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANMongoDBProfilerAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ AddQANMongoDBProfilerAgentBody add QAN mongo DB profiler agent body swagger:model AddQANMongoDBProfilerAgentBody */ type AddQANMongoDBProfilerAgentBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -270,6 +271,7 @@ AddQANMongoDBProfilerAgentDefaultBody add QAN mongo DB profiler agent default bo swagger:model AddQANMongoDBProfilerAgentDefaultBody */ type AddQANMongoDBProfilerAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -335,7 +337,9 @@ func (o *AddQANMongoDBProfilerAgentDefaultBody) ContextValidate(ctx context.Cont } func (o *AddQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -346,6 +350,7 @@ func (o *AddQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx conte return err } } + } return nil @@ -374,6 +379,7 @@ AddQANMongoDBProfilerAgentDefaultBodyDetailsItems0 add QAN mongo DB profiler age swagger:model AddQANMongoDBProfilerAgentDefaultBodyDetailsItems0 */ type AddQANMongoDBProfilerAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +417,7 @@ AddQANMongoDBProfilerAgentOKBody add QAN mongo DB profiler agent OK body swagger:model AddQANMongoDBProfilerAgentOKBody */ type AddQANMongoDBProfilerAgentOKBody struct { + // qan mongodb profiler agent QANMongodbProfilerAgent *AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` } @@ -463,6 +470,7 @@ func (o *AddQANMongoDBProfilerAgentOKBody) ContextValidate(ctx context.Context, } func (o *AddQANMongoDBProfilerAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if err := o.QANMongodbProfilerAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -500,6 +508,7 @@ AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent swagger:model AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent */ type AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go index c96dd4f37b..14f12e0d93 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go @@ -60,6 +60,7 @@ AddQANMySQLPerfSchemaAgentParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type AddQANMySQLPerfSchemaAgentParams struct { + // Body. Body AddQANMySQLPerfSchemaAgentBody @@ -129,6 +130,7 @@ func (o *AddQANMySQLPerfSchemaAgentParams) SetBody(body AddQANMySQLPerfSchemaAge // WriteToRequest writes these params to a swagger request func (o *AddQANMySQLPerfSchemaAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go index 616f0634cc..c020b712a9 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go @@ -62,12 +62,12 @@ type AddQANMySQLPerfSchemaAgentOK struct { func (o *AddQANMySQLPerfSchemaAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLPerfSchemaAgent][%d] addQanMySqlPerfSchemaAgentOk %+v", 200, o.Payload) } - func (o *AddQANMySQLPerfSchemaAgentOK) GetPayload() *AddQANMySQLPerfSchemaAgentOKBody { return o.Payload } func (o *AddQANMySQLPerfSchemaAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANMySQLPerfSchemaAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANMySQLPerfSchemaAgentDefault) Code() int { func (o *AddQANMySQLPerfSchemaAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLPerfSchemaAgent][%d] AddQANMySQLPerfSchemaAgent default %+v", o._statusCode, o.Payload) } - func (o *AddQANMySQLPerfSchemaAgentDefault) GetPayload() *AddQANMySQLPerfSchemaAgentDefaultBody { return o.Payload } func (o *AddQANMySQLPerfSchemaAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANMySQLPerfSchemaAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ AddQANMySQLPerfSchemaAgentBody add QAN my SQL perf schema agent body swagger:model AddQANMySQLPerfSchemaAgentBody */ type AddQANMySQLPerfSchemaAgentBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -268,6 +269,7 @@ AddQANMySQLPerfSchemaAgentDefaultBody add QAN my SQL perf schema agent default b swagger:model AddQANMySQLPerfSchemaAgentDefaultBody */ type AddQANMySQLPerfSchemaAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -333,7 +335,9 @@ func (o *AddQANMySQLPerfSchemaAgentDefaultBody) ContextValidate(ctx context.Cont } func (o *AddQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,6 +348,7 @@ func (o *AddQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx conte return err } } + } return nil @@ -372,6 +377,7 @@ AddQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 add QAN my SQL perf schema ag swagger:model AddQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 */ type AddQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -409,6 +415,7 @@ AddQANMySQLPerfSchemaAgentOKBody add QAN my SQL perf schema agent OK body swagger:model AddQANMySQLPerfSchemaAgentOKBody */ type AddQANMySQLPerfSchemaAgentOKBody struct { + // qan mysql perfschema agent QANMysqlPerfschemaAgent *AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent `json:"qan_mysql_perfschema_agent,omitempty"` } @@ -461,6 +468,7 @@ func (o *AddQANMySQLPerfSchemaAgentOKBody) ContextValidate(ctx context.Context, } func (o *AddQANMySQLPerfSchemaAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if err := o.QANMysqlPerfschemaAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -498,6 +506,7 @@ AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent swagger:model AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent */ type AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go index f1f42c5244..6f632e00e1 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go @@ -60,6 +60,7 @@ AddQANMySQLSlowlogAgentParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type AddQANMySQLSlowlogAgentParams struct { + // Body. Body AddQANMySQLSlowlogAgentBody @@ -129,6 +130,7 @@ func (o *AddQANMySQLSlowlogAgentParams) SetBody(body AddQANMySQLSlowlogAgentBody // WriteToRequest writes these params to a swagger request func (o *AddQANMySQLSlowlogAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go index fa9cbc2800..1e390d07a8 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go @@ -62,12 +62,12 @@ type AddQANMySQLSlowlogAgentOK struct { func (o *AddQANMySQLSlowlogAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLSlowlogAgent][%d] addQanMySqlSlowlogAgentOk %+v", 200, o.Payload) } - func (o *AddQANMySQLSlowlogAgentOK) GetPayload() *AddQANMySQLSlowlogAgentOKBody { return o.Payload } func (o *AddQANMySQLSlowlogAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANMySQLSlowlogAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANMySQLSlowlogAgentDefault) Code() int { func (o *AddQANMySQLSlowlogAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLSlowlogAgent][%d] AddQANMySQLSlowlogAgent default %+v", o._statusCode, o.Payload) } - func (o *AddQANMySQLSlowlogAgentDefault) GetPayload() *AddQANMySQLSlowlogAgentDefaultBody { return o.Payload } func (o *AddQANMySQLSlowlogAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANMySQLSlowlogAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ AddQANMySQLSlowlogAgentBody add QAN my SQL slowlog agent body swagger:model AddQANMySQLSlowlogAgentBody */ type AddQANMySQLSlowlogAgentBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -272,6 +273,7 @@ AddQANMySQLSlowlogAgentDefaultBody add QAN my SQL slowlog agent default body swagger:model AddQANMySQLSlowlogAgentDefaultBody */ type AddQANMySQLSlowlogAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -337,7 +339,9 @@ func (o *AddQANMySQLSlowlogAgentDefaultBody) ContextValidate(ctx context.Context } func (o *AddQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,6 +352,7 @@ func (o *AddQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx context. return err } } + } return nil @@ -376,6 +381,7 @@ AddQANMySQLSlowlogAgentDefaultBodyDetailsItems0 add QAN my SQL slowlog agent def swagger:model AddQANMySQLSlowlogAgentDefaultBodyDetailsItems0 */ type AddQANMySQLSlowlogAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -413,6 +419,7 @@ AddQANMySQLSlowlogAgentOKBody add QAN my SQL slowlog agent OK body swagger:model AddQANMySQLSlowlogAgentOKBody */ type AddQANMySQLSlowlogAgentOKBody struct { + // qan mysql slowlog agent QANMysqlSlowlogAgent *AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent `json:"qan_mysql_slowlog_agent,omitempty"` } @@ -465,6 +472,7 @@ func (o *AddQANMySQLSlowlogAgentOKBody) ContextValidate(ctx context.Context, for } func (o *AddQANMySQLSlowlogAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if err := o.QANMysqlSlowlogAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -502,6 +510,7 @@ AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs with swagger:model AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent */ type AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go index be2ca5ab96..7f12076bb4 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go @@ -60,6 +60,7 @@ AddQANPostgreSQLPgStatMonitorAgentParams contains all the parameters to send to Typically these are written to a http.Request. */ type AddQANPostgreSQLPgStatMonitorAgentParams struct { + // Body. Body AddQANPostgreSQLPgStatMonitorAgentBody @@ -129,6 +130,7 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentParams) SetBody(body AddQANPostgreSQL // WriteToRequest writes these params to a swagger request func (o *AddQANPostgreSQLPgStatMonitorAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go index 8ccbf4e307..be54da78f6 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go @@ -62,12 +62,12 @@ type AddQANPostgreSQLPgStatMonitorAgentOK struct { func (o *AddQANPostgreSQLPgStatMonitorAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatMonitorAgent][%d] addQanPostgreSqlPgStatMonitorAgentOk %+v", 200, o.Payload) } - func (o *AddQANPostgreSQLPgStatMonitorAgentOK) GetPayload() *AddQANPostgreSQLPgStatMonitorAgentOKBody { return o.Payload } func (o *AddQANPostgreSQLPgStatMonitorAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANPostgreSQLPgStatMonitorAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) Code() int { func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatMonitorAgent][%d] AddQANPostgreSQLPgStatMonitorAgent default %+v", o._statusCode, o.Payload) } - func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) GetPayload() *AddQANPostgreSQLPgStatMonitorAgentDefaultBody { return o.Payload } func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANPostgreSQLPgStatMonitorAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ AddQANPostgreSQLPgStatMonitorAgentBody add QAN postgre SQL pg stat monitor agent swagger:model AddQANPostgreSQLPgStatMonitorAgentBody */ type AddQANPostgreSQLPgStatMonitorAgentBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -268,6 +269,7 @@ AddQANPostgreSQLPgStatMonitorAgentDefaultBody add QAN postgre SQL pg stat monito swagger:model AddQANPostgreSQLPgStatMonitorAgentDefaultBody */ type AddQANPostgreSQLPgStatMonitorAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -333,7 +335,9 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentDefaultBody) ContextValidate(ctx cont } func (o *AddQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,6 +348,7 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetails(c return err } } + } return nil @@ -372,6 +377,7 @@ AddQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 add QAN postgre SQL p swagger:model AddQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 */ type AddQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -409,6 +415,7 @@ AddQANPostgreSQLPgStatMonitorAgentOKBody add QAN postgre SQL pg stat monitor age swagger:model AddQANPostgreSQLPgStatMonitorAgentOKBody */ type AddQANPostgreSQLPgStatMonitorAgentOKBody struct { + // qan postgresql pgstatmonitor agent QANPostgresqlPgstatmonitorAgent *AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` } @@ -461,6 +468,7 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentOKBody) ContextValidate(ctx context.C } func (o *AddQANPostgreSQLPgStatMonitorAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -498,6 +506,7 @@ AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostg swagger:model AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go index 6ed493954b..b9cecfa0a9 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go @@ -60,6 +60,7 @@ AddQANPostgreSQLPgStatementsAgentParams contains all the parameters to send to t Typically these are written to a http.Request. */ type AddQANPostgreSQLPgStatementsAgentParams struct { + // Body. Body AddQANPostgreSQLPgStatementsAgentBody @@ -129,6 +130,7 @@ func (o *AddQANPostgreSQLPgStatementsAgentParams) SetBody(body AddQANPostgreSQLP // WriteToRequest writes these params to a swagger request func (o *AddQANPostgreSQLPgStatementsAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go index 6de82d98fe..a9cde9e41c 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go @@ -62,12 +62,12 @@ type AddQANPostgreSQLPgStatementsAgentOK struct { func (o *AddQANPostgreSQLPgStatementsAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatementsAgent][%d] addQanPostgreSqlPgStatementsAgentOk %+v", 200, o.Payload) } - func (o *AddQANPostgreSQLPgStatementsAgentOK) GetPayload() *AddQANPostgreSQLPgStatementsAgentOKBody { return o.Payload } func (o *AddQANPostgreSQLPgStatementsAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANPostgreSQLPgStatementsAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANPostgreSQLPgStatementsAgentDefault) Code() int { func (o *AddQANPostgreSQLPgStatementsAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatementsAgent][%d] AddQANPostgreSQLPgStatementsAgent default %+v", o._statusCode, o.Payload) } - func (o *AddQANPostgreSQLPgStatementsAgentDefault) GetPayload() *AddQANPostgreSQLPgStatementsAgentDefaultBody { return o.Payload } func (o *AddQANPostgreSQLPgStatementsAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddQANPostgreSQLPgStatementsAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ AddQANPostgreSQLPgStatementsAgentBody add QAN postgre SQL pg statements agent bo swagger:model AddQANPostgreSQLPgStatementsAgentBody */ type AddQANPostgreSQLPgStatementsAgentBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -265,6 +266,7 @@ AddQANPostgreSQLPgStatementsAgentDefaultBody add QAN postgre SQL pg statements a swagger:model AddQANPostgreSQLPgStatementsAgentDefaultBody */ type AddQANPostgreSQLPgStatementsAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -330,7 +332,9 @@ func (o *AddQANPostgreSQLPgStatementsAgentDefaultBody) ContextValidate(ctx conte } func (o *AddQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -341,6 +345,7 @@ func (o *AddQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails(ct return err } } + } return nil @@ -369,6 +374,7 @@ AddQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 add QAN postgre SQL pg swagger:model AddQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 */ type AddQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -406,6 +412,7 @@ AddQANPostgreSQLPgStatementsAgentOKBody add QAN postgre SQL pg statements agent swagger:model AddQANPostgreSQLPgStatementsAgentOKBody */ type AddQANPostgreSQLPgStatementsAgentOKBody struct { + // qan postgresql pgstatements agent QANPostgresqlPgstatementsAgent *AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent `json:"qan_postgresql_pgstatements_agent,omitempty"` } @@ -458,6 +465,7 @@ func (o *AddQANPostgreSQLPgStatementsAgentOKBody) ContextValidate(ctx context.Co } func (o *AddQANPostgreSQLPgStatementsAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -495,6 +503,7 @@ AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgre swagger:model AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent */ type AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go b/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go index f8cc041126..9958797e27 100644 --- a/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go @@ -60,6 +60,7 @@ AddRDSExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRDSExporterParams struct { + // Body. Body AddRDSExporterBody @@ -129,6 +130,7 @@ func (o *AddRDSExporterParams) SetBody(body AddRDSExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddRDSExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_rds_exporter_responses.go b/api/inventorypb/json/client/agents/add_rds_exporter_responses.go index 634ed78bb8..4bb6e96c9c 100644 --- a/api/inventorypb/json/client/agents/add_rds_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_rds_exporter_responses.go @@ -62,12 +62,12 @@ type AddRDSExporterOK struct { func (o *AddRDSExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddRDSExporter][%d] addRdsExporterOk %+v", 200, o.Payload) } - func (o *AddRDSExporterOK) GetPayload() *AddRDSExporterOKBody { return o.Payload } func (o *AddRDSExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRDSExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddRDSExporterDefault) Code() int { func (o *AddRDSExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddRDSExporter][%d] AddRDSExporter default %+v", o._statusCode, o.Payload) } - func (o *AddRDSExporterDefault) GetPayload() *AddRDSExporterDefaultBody { return o.Payload } func (o *AddRDSExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRDSExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ AddRDSExporterBody add RDS exporter body swagger:model AddRDSExporterBody */ type AddRDSExporterBody struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -253,6 +254,7 @@ AddRDSExporterDefaultBody add RDS exporter default body swagger:model AddRDSExporterDefaultBody */ type AddRDSExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -318,7 +320,9 @@ func (o *AddRDSExporterDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddRDSExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -329,6 +333,7 @@ func (o *AddRDSExporterDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -357,6 +362,7 @@ AddRDSExporterDefaultBodyDetailsItems0 add RDS exporter default body details ite swagger:model AddRDSExporterDefaultBodyDetailsItems0 */ type AddRDSExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -394,6 +400,7 @@ AddRDSExporterOKBody add RDS exporter OK body swagger:model AddRDSExporterOKBody */ type AddRDSExporterOKBody struct { + // rds exporter RDSExporter *AddRDSExporterOKBodyRDSExporter `json:"rds_exporter,omitempty"` } @@ -446,6 +453,7 @@ func (o *AddRDSExporterOKBody) ContextValidate(ctx context.Context, formats strf } func (o *AddRDSExporterOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -483,6 +491,7 @@ AddRDSExporterOKBodyRDSExporter RDSExporter runs on Generic or Container Node an swagger:model AddRDSExporterOKBodyRDSExporter */ type AddRDSExporterOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go b/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go index 49727b75e6..b9707c910b 100644 --- a/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeAzureDatabaseExporterParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ChangeAzureDatabaseExporterParams struct { + // Body. Body ChangeAzureDatabaseExporterBody @@ -129,6 +130,7 @@ func (o *ChangeAzureDatabaseExporterParams) SetBody(body ChangeAzureDatabaseExpo // WriteToRequest writes these params to a swagger request func (o *ChangeAzureDatabaseExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go b/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go index 130d919287..9c16bca6d5 100644 --- a/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeAzureDatabaseExporterOK struct { func (o *ChangeAzureDatabaseExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeAzureDatabaseExporter][%d] changeAzureDatabaseExporterOk %+v", 200, o.Payload) } - func (o *ChangeAzureDatabaseExporterOK) GetPayload() *ChangeAzureDatabaseExporterOKBody { return o.Payload } func (o *ChangeAzureDatabaseExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAzureDatabaseExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeAzureDatabaseExporterDefault) Code() int { func (o *ChangeAzureDatabaseExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeAzureDatabaseExporter][%d] ChangeAzureDatabaseExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeAzureDatabaseExporterDefault) GetPayload() *ChangeAzureDatabaseExporterDefaultBody { return o.Payload } func (o *ChangeAzureDatabaseExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAzureDatabaseExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeAzureDatabaseExporterBody change azure database exporter body swagger:model ChangeAzureDatabaseExporterBody */ type ChangeAzureDatabaseExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeAzureDatabaseExporterBody) ContextValidate(ctx context.Context, f } func (o *ChangeAzureDatabaseExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeAzureDatabaseExporterDefaultBody change azure database exporter default bo swagger:model ChangeAzureDatabaseExporterDefaultBody */ type ChangeAzureDatabaseExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeAzureDatabaseExporterDefaultBody) ContextValidate(ctx context.Con } func (o *ChangeAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx cont return err } } + } return nil @@ -321,6 +327,7 @@ ChangeAzureDatabaseExporterDefaultBodyDetailsItems0 change azure database export swagger:model ChangeAzureDatabaseExporterDefaultBodyDetailsItems0 */ type ChangeAzureDatabaseExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeAzureDatabaseExporterOKBody change azure database exporter OK body swagger:model ChangeAzureDatabaseExporterOKBody */ type ChangeAzureDatabaseExporterOKBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeAzureDatabaseExporterOKBody) ContextValidate(ctx context.Context, } func (o *ChangeAzureDatabaseExporterOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if err := o.AzureDatabaseExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter AzureDatabaseExporter run swagger:model ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter */ type ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -652,6 +662,7 @@ ChangeAzureDatabaseExporterParamsBodyCommon ChangeCommonAgentParams contains par swagger:model ChangeAzureDatabaseExporterParamsBodyCommon */ type ChangeAzureDatabaseExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_external_exporter_parameters.go b/api/inventorypb/json/client/agents/change_external_exporter_parameters.go index 96ed75e52e..706c60c9fe 100644 --- a/api/inventorypb/json/client/agents/change_external_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_external_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeExternalExporterParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ChangeExternalExporterParams struct { + // Body. Body ChangeExternalExporterBody @@ -129,6 +130,7 @@ func (o *ChangeExternalExporterParams) SetBody(body ChangeExternalExporterBody) // WriteToRequest writes these params to a swagger request func (o *ChangeExternalExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_external_exporter_responses.go b/api/inventorypb/json/client/agents/change_external_exporter_responses.go index 15dc5e5a58..9066e45afa 100644 --- a/api/inventorypb/json/client/agents/change_external_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_external_exporter_responses.go @@ -60,12 +60,12 @@ type ChangeExternalExporterOK struct { func (o *ChangeExternalExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeExternalExporter][%d] changeExternalExporterOk %+v", 200, o.Payload) } - func (o *ChangeExternalExporterOK) GetPayload() *ChangeExternalExporterOKBody { return o.Payload } func (o *ChangeExternalExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeExternalExporterOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ChangeExternalExporterDefault) Code() int { func (o *ChangeExternalExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeExternalExporter][%d] ChangeExternalExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeExternalExporterDefault) GetPayload() *ChangeExternalExporterDefaultBody { return o.Payload } func (o *ChangeExternalExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeExternalExporterDefaultBody) // response payload @@ -123,6 +123,7 @@ ChangeExternalExporterBody change external exporter body swagger:model ChangeExternalExporterBody */ type ChangeExternalExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -178,6 +179,7 @@ func (o *ChangeExternalExporterBody) ContextValidate(ctx context.Context, format } func (o *ChangeExternalExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -215,6 +217,7 @@ ChangeExternalExporterDefaultBody change external exporter default body swagger:model ChangeExternalExporterDefaultBody */ type ChangeExternalExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -280,7 +283,9 @@ func (o *ChangeExternalExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeExternalExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -291,6 +296,7 @@ func (o *ChangeExternalExporterDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -319,6 +325,7 @@ ChangeExternalExporterDefaultBodyDetailsItems0 change external exporter default swagger:model ChangeExternalExporterDefaultBodyDetailsItems0 */ type ChangeExternalExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -356,6 +363,7 @@ ChangeExternalExporterOKBody change external exporter OK body swagger:model ChangeExternalExporterOKBody */ type ChangeExternalExporterOKBody struct { + // external exporter ExternalExporter *ChangeExternalExporterOKBodyExternalExporter `json:"external_exporter,omitempty"` } @@ -408,6 +416,7 @@ func (o *ChangeExternalExporterOKBody) ContextValidate(ctx context.Context, form } func (o *ChangeExternalExporterOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -445,6 +454,7 @@ ChangeExternalExporterOKBodyExternalExporter ExternalExporter runs on any Node t swagger:model ChangeExternalExporterOKBodyExternalExporter */ type ChangeExternalExporterOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -512,6 +522,7 @@ ChangeExternalExporterParamsBodyCommon ChangeCommonAgentParams contains paramete swagger:model ChangeExternalExporterParamsBodyCommon */ type ChangeExternalExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go b/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go index dfa26df26f..c590bfc347 100644 --- a/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeMongoDBExporterParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeMongoDBExporterParams struct { + // Body. Body ChangeMongoDBExporterBody @@ -129,6 +130,7 @@ func (o *ChangeMongoDBExporterParams) SetBody(body ChangeMongoDBExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeMongoDBExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go b/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go index 5f037ba801..44e95fe261 100644 --- a/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeMongoDBExporterOK struct { func (o *ChangeMongoDBExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMongoDBExporter][%d] changeMongoDbExporterOk %+v", 200, o.Payload) } - func (o *ChangeMongoDBExporterOK) GetPayload() *ChangeMongoDBExporterOKBody { return o.Payload } func (o *ChangeMongoDBExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeMongoDBExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeMongoDBExporterDefault) Code() int { func (o *ChangeMongoDBExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMongoDBExporter][%d] ChangeMongoDBExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeMongoDBExporterDefault) GetPayload() *ChangeMongoDBExporterDefaultBody { return o.Payload } func (o *ChangeMongoDBExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeMongoDBExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeMongoDBExporterBody change mongo DB exporter body swagger:model ChangeMongoDBExporterBody */ type ChangeMongoDBExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeMongoDBExporterBody) ContextValidate(ctx context.Context, formats } func (o *ChangeMongoDBExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeMongoDBExporterDefaultBody change mongo DB exporter default body swagger:model ChangeMongoDBExporterDefaultBody */ type ChangeMongoDBExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeMongoDBExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -321,6 +327,7 @@ ChangeMongoDBExporterDefaultBodyDetailsItems0 change mongo DB exporter default b swagger:model ChangeMongoDBExporterDefaultBodyDetailsItems0 */ type ChangeMongoDBExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeMongoDBExporterOKBody change mongo DB exporter OK body swagger:model ChangeMongoDBExporterOKBody */ type ChangeMongoDBExporterOKBody struct { + // mongodb exporter MongodbExporter *ChangeMongoDBExporterOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeMongoDBExporterOKBody) ContextValidate(ctx context.Context, forma } func (o *ChangeMongoDBExporterOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeMongoDBExporterOKBodyMongodbExporter MongoDBExporter runs on Generic or Co swagger:model ChangeMongoDBExporterOKBodyMongodbExporter */ type ChangeMongoDBExporterOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -668,6 +678,7 @@ ChangeMongoDBExporterParamsBodyCommon ChangeCommonAgentParams contains parameter swagger:model ChangeMongoDBExporterParamsBodyCommon */ type ChangeMongoDBExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go index c1662cbe59..72bc19103d 100644 --- a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeMySQLdExporterParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type ChangeMySQLdExporterParams struct { + // Body. Body ChangeMySQLdExporterBody @@ -129,6 +130,7 @@ func (o *ChangeMySQLdExporterParams) SetBody(body ChangeMySQLdExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeMySQLdExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go index 5d6bf93ba3..ed6b5a2cc0 100644 --- a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeMySQLdExporterOK struct { func (o *ChangeMySQLdExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMySQLdExporter][%d] changeMySQLdExporterOk %+v", 200, o.Payload) } - func (o *ChangeMySQLdExporterOK) GetPayload() *ChangeMySQLdExporterOKBody { return o.Payload } func (o *ChangeMySQLdExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeMySQLdExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeMySQLdExporterDefault) Code() int { func (o *ChangeMySQLdExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMySQLdExporter][%d] ChangeMySQLdExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeMySQLdExporterDefault) GetPayload() *ChangeMySQLdExporterDefaultBody { return o.Payload } func (o *ChangeMySQLdExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeMySQLdExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeMySQLdExporterBody change my s q ld exporter body swagger:model ChangeMySQLdExporterBody */ type ChangeMySQLdExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeMySQLdExporterBody) ContextValidate(ctx context.Context, formats } func (o *ChangeMySQLdExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeMySQLdExporterDefaultBody change my s q ld exporter default body swagger:model ChangeMySQLdExporterDefaultBody */ type ChangeMySQLdExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeMySQLdExporterDefaultBody) ContextValidate(ctx context.Context, f } func (o *ChangeMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -321,6 +327,7 @@ ChangeMySQLdExporterDefaultBodyDetailsItems0 change my s q ld exporter default b swagger:model ChangeMySQLdExporterDefaultBodyDetailsItems0 */ type ChangeMySQLdExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeMySQLdExporterOKBody change my s q ld exporter OK body swagger:model ChangeMySQLdExporterOKBody */ type ChangeMySQLdExporterOKBody struct { + // mysqld exporter MysqldExporter *ChangeMySQLdExporterOKBodyMysqldExporter `json:"mysqld_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeMySQLdExporterOKBody) ContextValidate(ctx context.Context, format } func (o *ChangeMySQLdExporterOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeMySQLdExporterOKBodyMysqldExporter MySQLdExporter runs on Generic or Conta swagger:model ChangeMySQLdExporterOKBodyMysqldExporter */ type ChangeMySQLdExporterOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -675,6 +685,7 @@ ChangeMySQLdExporterParamsBodyCommon ChangeCommonAgentParams contains parameters swagger:model ChangeMySQLdExporterParamsBodyCommon */ type ChangeMySQLdExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_node_exporter_parameters.go b/api/inventorypb/json/client/agents/change_node_exporter_parameters.go index 0006c8d16f..d252cfc072 100644 --- a/api/inventorypb/json/client/agents/change_node_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_node_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeNodeExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeNodeExporterParams struct { + // Body. Body ChangeNodeExporterBody @@ -129,6 +130,7 @@ func (o *ChangeNodeExporterParams) SetBody(body ChangeNodeExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeNodeExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_node_exporter_responses.go b/api/inventorypb/json/client/agents/change_node_exporter_responses.go index 9f98c7279a..4dd0da23a4 100644 --- a/api/inventorypb/json/client/agents/change_node_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_node_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeNodeExporterOK struct { func (o *ChangeNodeExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeNodeExporter][%d] changeNodeExporterOk %+v", 200, o.Payload) } - func (o *ChangeNodeExporterOK) GetPayload() *ChangeNodeExporterOKBody { return o.Payload } func (o *ChangeNodeExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeNodeExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeNodeExporterDefault) Code() int { func (o *ChangeNodeExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeNodeExporter][%d] ChangeNodeExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeNodeExporterDefault) GetPayload() *ChangeNodeExporterDefaultBody { return o.Payload } func (o *ChangeNodeExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeNodeExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeNodeExporterBody change node exporter body swagger:model ChangeNodeExporterBody */ type ChangeNodeExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeNodeExporterBody) ContextValidate(ctx context.Context, formats st } func (o *ChangeNodeExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeNodeExporterDefaultBody change node exporter default body swagger:model ChangeNodeExporterDefaultBody */ type ChangeNodeExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeNodeExporterDefaultBody) ContextValidate(ctx context.Context, for } func (o *ChangeNodeExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeNodeExporterDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -321,6 +327,7 @@ ChangeNodeExporterDefaultBodyDetailsItems0 change node exporter default body det swagger:model ChangeNodeExporterDefaultBodyDetailsItems0 */ type ChangeNodeExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeNodeExporterOKBody change node exporter OK body swagger:model ChangeNodeExporterOKBody */ type ChangeNodeExporterOKBody struct { + // node exporter NodeExporter *ChangeNodeExporterOKBodyNodeExporter `json:"node_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeNodeExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *ChangeNodeExporterOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if err := o.NodeExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeNodeExporterOKBodyNodeExporter NodeExporter runs on Generic or Container N swagger:model ChangeNodeExporterOKBodyNodeExporter */ type ChangeNodeExporterOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -646,6 +656,7 @@ ChangeNodeExporterParamsBodyCommon ChangeCommonAgentParams contains parameters t swagger:model ChangeNodeExporterParamsBodyCommon */ type ChangeNodeExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go b/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go index b6a0e657ec..6ea9423b53 100644 --- a/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go @@ -60,6 +60,7 @@ ChangePostgresExporterParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ChangePostgresExporterParams struct { + // Body. Body ChangePostgresExporterBody @@ -129,6 +130,7 @@ func (o *ChangePostgresExporterParams) SetBody(body ChangePostgresExporterBody) // WriteToRequest writes these params to a swagger request func (o *ChangePostgresExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go b/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go index f0bcb24ab9..259d9b369b 100644 --- a/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go @@ -62,12 +62,12 @@ type ChangePostgresExporterOK struct { func (o *ChangePostgresExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangePostgresExporter][%d] changePostgresExporterOk %+v", 200, o.Payload) } - func (o *ChangePostgresExporterOK) GetPayload() *ChangePostgresExporterOKBody { return o.Payload } func (o *ChangePostgresExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangePostgresExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangePostgresExporterDefault) Code() int { func (o *ChangePostgresExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangePostgresExporter][%d] ChangePostgresExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangePostgresExporterDefault) GetPayload() *ChangePostgresExporterDefaultBody { return o.Payload } func (o *ChangePostgresExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangePostgresExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangePostgresExporterBody change postgres exporter body swagger:model ChangePostgresExporterBody */ type ChangePostgresExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangePostgresExporterBody) ContextValidate(ctx context.Context, format } func (o *ChangePostgresExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangePostgresExporterDefaultBody change postgres exporter default body swagger:model ChangePostgresExporterDefaultBody */ type ChangePostgresExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangePostgresExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangePostgresExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangePostgresExporterDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -321,6 +327,7 @@ ChangePostgresExporterDefaultBodyDetailsItems0 change postgres exporter default swagger:model ChangePostgresExporterDefaultBodyDetailsItems0 */ type ChangePostgresExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangePostgresExporterOKBody change postgres exporter OK body swagger:model ChangePostgresExporterOKBody */ type ChangePostgresExporterOKBody struct { + // postgres exporter PostgresExporter *ChangePostgresExporterOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangePostgresExporterOKBody) ContextValidate(ctx context.Context, form } func (o *ChangePostgresExporterOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangePostgresExporterOKBodyPostgresExporter PostgresExporter runs on Generic or swagger:model ChangePostgresExporterOKBodyPostgresExporter */ type ChangePostgresExporterOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -656,6 +666,7 @@ ChangePostgresExporterParamsBodyCommon ChangeCommonAgentParams contains paramete swagger:model ChangePostgresExporterParamsBodyCommon */ type ChangePostgresExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go index 672412700e..1e9ecc1470 100644 --- a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeProxySQLExporterParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ChangeProxySQLExporterParams struct { + // Body. Body ChangeProxySQLExporterBody @@ -129,6 +130,7 @@ func (o *ChangeProxySQLExporterParams) SetBody(body ChangeProxySQLExporterBody) // WriteToRequest writes these params to a swagger request func (o *ChangeProxySQLExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go index 85f951ae49..39cd3d8715 100644 --- a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeProxySQLExporterOK struct { func (o *ChangeProxySQLExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeProxySQLExporter][%d] changeProxySqlExporterOk %+v", 200, o.Payload) } - func (o *ChangeProxySQLExporterOK) GetPayload() *ChangeProxySQLExporterOKBody { return o.Payload } func (o *ChangeProxySQLExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeProxySQLExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeProxySQLExporterDefault) Code() int { func (o *ChangeProxySQLExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeProxySQLExporter][%d] ChangeProxySQLExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeProxySQLExporterDefault) GetPayload() *ChangeProxySQLExporterDefaultBody { return o.Payload } func (o *ChangeProxySQLExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeProxySQLExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeProxySQLExporterBody change proxy SQL exporter body swagger:model ChangeProxySQLExporterBody */ type ChangeProxySQLExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeProxySQLExporterBody) ContextValidate(ctx context.Context, format } func (o *ChangeProxySQLExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeProxySQLExporterDefaultBody change proxy SQL exporter default body swagger:model ChangeProxySQLExporterDefaultBody */ type ChangeProxySQLExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeProxySQLExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeProxySQLExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeProxySQLExporterDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -321,6 +327,7 @@ ChangeProxySQLExporterDefaultBodyDetailsItems0 change proxy SQL exporter default swagger:model ChangeProxySQLExporterDefaultBodyDetailsItems0 */ type ChangeProxySQLExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeProxySQLExporterOKBody change proxy SQL exporter OK body swagger:model ChangeProxySQLExporterOKBody */ type ChangeProxySQLExporterOKBody struct { + // proxysql exporter ProxysqlExporter *ChangeProxySQLExporterOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeProxySQLExporterOKBody) ContextValidate(ctx context.Context, form } func (o *ChangeProxySQLExporterOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeProxySQLExporterOKBodyProxysqlExporter ProxySQLExporter runs on Generic or swagger:model ChangeProxySQLExporterOKBodyProxysqlExporter */ type ChangeProxySQLExporterOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -658,6 +668,7 @@ ChangeProxySQLExporterParamsBodyCommon ChangeCommonAgentParams contains paramete swagger:model ChangeProxySQLExporterParamsBodyCommon */ type ChangeProxySQLExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go index 474f009ca3..c318d3dd2b 100644 --- a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go @@ -60,6 +60,7 @@ ChangeQANMongoDBProfilerAgentParams contains all the parameters to send to the A Typically these are written to a http.Request. */ type ChangeQANMongoDBProfilerAgentParams struct { + // Body. Body ChangeQANMongoDBProfilerAgentBody @@ -129,6 +130,7 @@ func (o *ChangeQANMongoDBProfilerAgentParams) SetBody(body ChangeQANMongoDBProfi // WriteToRequest writes these params to a swagger request func (o *ChangeQANMongoDBProfilerAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go index e047e5873b..e4f0f0c7d6 100644 --- a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANMongoDBProfilerAgentOK struct { func (o *ChangeQANMongoDBProfilerAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMongoDBProfilerAgent][%d] changeQanMongoDbProfilerAgentOk %+v", 200, o.Payload) } - func (o *ChangeQANMongoDBProfilerAgentOK) GetPayload() *ChangeQANMongoDBProfilerAgentOKBody { return o.Payload } func (o *ChangeQANMongoDBProfilerAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANMongoDBProfilerAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANMongoDBProfilerAgentDefault) Code() int { func (o *ChangeQANMongoDBProfilerAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMongoDBProfilerAgent][%d] ChangeQANMongoDBProfilerAgent default %+v", o._statusCode, o.Payload) } - func (o *ChangeQANMongoDBProfilerAgentDefault) GetPayload() *ChangeQANMongoDBProfilerAgentDefaultBody { return o.Payload } func (o *ChangeQANMongoDBProfilerAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANMongoDBProfilerAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeQANMongoDBProfilerAgentBody change QAN mongo DB profiler agent body swagger:model ChangeQANMongoDBProfilerAgentBody */ type ChangeQANMongoDBProfilerAgentBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeQANMongoDBProfilerAgentBody) ContextValidate(ctx context.Context, } func (o *ChangeQANMongoDBProfilerAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeQANMongoDBProfilerAgentDefaultBody change QAN mongo DB profiler agent defa swagger:model ChangeQANMongoDBProfilerAgentDefaultBody */ type ChangeQANMongoDBProfilerAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeQANMongoDBProfilerAgentDefaultBody) ContextValidate(ctx context.C } func (o *ChangeQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx co return err } } + } return nil @@ -321,6 +327,7 @@ ChangeQANMongoDBProfilerAgentDefaultBodyDetailsItems0 change QAN mongo DB profil swagger:model ChangeQANMongoDBProfilerAgentDefaultBodyDetailsItems0 */ type ChangeQANMongoDBProfilerAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeQANMongoDBProfilerAgentOKBody change QAN mongo DB profiler agent OK body swagger:model ChangeQANMongoDBProfilerAgentOKBody */ type ChangeQANMongoDBProfilerAgentOKBody struct { + // qan mongodb profiler agent QANMongodbProfilerAgent *ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeQANMongoDBProfilerAgentOKBody) ContextValidate(ctx context.Contex } func (o *ChangeQANMongoDBProfilerAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if err := o.QANMongodbProfilerAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAge swagger:model ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent */ type ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -655,6 +665,7 @@ ChangeQANMongoDBProfilerAgentParamsBodyCommon ChangeCommonAgentParams contains p swagger:model ChangeQANMongoDBProfilerAgentParamsBodyCommon */ type ChangeQANMongoDBProfilerAgentParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go index c5c7f64dc9..d00ede7b82 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go @@ -60,6 +60,7 @@ ChangeQANMySQLPerfSchemaAgentParams contains all the parameters to send to the A Typically these are written to a http.Request. */ type ChangeQANMySQLPerfSchemaAgentParams struct { + // Body. Body ChangeQANMySQLPerfSchemaAgentBody @@ -129,6 +130,7 @@ func (o *ChangeQANMySQLPerfSchemaAgentParams) SetBody(body ChangeQANMySQLPerfSch // WriteToRequest writes these params to a swagger request func (o *ChangeQANMySQLPerfSchemaAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go index f4d4b364d0..560c55487a 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANMySQLPerfSchemaAgentOK struct { func (o *ChangeQANMySQLPerfSchemaAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLPerfSchemaAgent][%d] changeQanMySqlPerfSchemaAgentOk %+v", 200, o.Payload) } - func (o *ChangeQANMySQLPerfSchemaAgentOK) GetPayload() *ChangeQANMySQLPerfSchemaAgentOKBody { return o.Payload } func (o *ChangeQANMySQLPerfSchemaAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANMySQLPerfSchemaAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANMySQLPerfSchemaAgentDefault) Code() int { func (o *ChangeQANMySQLPerfSchemaAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLPerfSchemaAgent][%d] ChangeQANMySQLPerfSchemaAgent default %+v", o._statusCode, o.Payload) } - func (o *ChangeQANMySQLPerfSchemaAgentDefault) GetPayload() *ChangeQANMySQLPerfSchemaAgentDefaultBody { return o.Payload } func (o *ChangeQANMySQLPerfSchemaAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANMySQLPerfSchemaAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeQANMySQLPerfSchemaAgentBody change QAN my SQL perf schema agent body swagger:model ChangeQANMySQLPerfSchemaAgentBody */ type ChangeQANMySQLPerfSchemaAgentBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeQANMySQLPerfSchemaAgentBody) ContextValidate(ctx context.Context, } func (o *ChangeQANMySQLPerfSchemaAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeQANMySQLPerfSchemaAgentDefaultBody change QAN my SQL perf schema agent def swagger:model ChangeQANMySQLPerfSchemaAgentDefaultBody */ type ChangeQANMySQLPerfSchemaAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeQANMySQLPerfSchemaAgentDefaultBody) ContextValidate(ctx context.C } func (o *ChangeQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx co return err } } + } return nil @@ -321,6 +327,7 @@ ChangeQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 change QAN my SQL perf sch swagger:model ChangeQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 */ type ChangeQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeQANMySQLPerfSchemaAgentOKBody change QAN my SQL perf schema agent OK body swagger:model ChangeQANMySQLPerfSchemaAgentOKBody */ type ChangeQANMySQLPerfSchemaAgentOKBody struct { + // qan mysql perfschema agent QANMysqlPerfschemaAgent *ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent `json:"qan_mysql_perfschema_agent,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeQANMySQLPerfSchemaAgentOKBody) ContextValidate(ctx context.Contex } func (o *ChangeQANMySQLPerfSchemaAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if err := o.QANMysqlPerfschemaAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAge swagger:model ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent */ type ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -667,6 +677,7 @@ ChangeQANMySQLPerfSchemaAgentParamsBodyCommon ChangeCommonAgentParams contains p swagger:model ChangeQANMySQLPerfSchemaAgentParamsBodyCommon */ type ChangeQANMySQLPerfSchemaAgentParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go index dbbe017f33..2fde2c4d15 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go @@ -60,6 +60,7 @@ ChangeQANMySQLSlowlogAgentParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ChangeQANMySQLSlowlogAgentParams struct { + // Body. Body ChangeQANMySQLSlowlogAgentBody @@ -129,6 +130,7 @@ func (o *ChangeQANMySQLSlowlogAgentParams) SetBody(body ChangeQANMySQLSlowlogAge // WriteToRequest writes these params to a swagger request func (o *ChangeQANMySQLSlowlogAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go index 8f33720634..cdf034e3d1 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANMySQLSlowlogAgentOK struct { func (o *ChangeQANMySQLSlowlogAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLSlowlogAgent][%d] changeQanMySqlSlowlogAgentOk %+v", 200, o.Payload) } - func (o *ChangeQANMySQLSlowlogAgentOK) GetPayload() *ChangeQANMySQLSlowlogAgentOKBody { return o.Payload } func (o *ChangeQANMySQLSlowlogAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANMySQLSlowlogAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANMySQLSlowlogAgentDefault) Code() int { func (o *ChangeQANMySQLSlowlogAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLSlowlogAgent][%d] ChangeQANMySQLSlowlogAgent default %+v", o._statusCode, o.Payload) } - func (o *ChangeQANMySQLSlowlogAgentDefault) GetPayload() *ChangeQANMySQLSlowlogAgentDefaultBody { return o.Payload } func (o *ChangeQANMySQLSlowlogAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANMySQLSlowlogAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeQANMySQLSlowlogAgentBody change QAN my SQL slowlog agent body swagger:model ChangeQANMySQLSlowlogAgentBody */ type ChangeQANMySQLSlowlogAgentBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeQANMySQLSlowlogAgentBody) ContextValidate(ctx context.Context, fo } func (o *ChangeQANMySQLSlowlogAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeQANMySQLSlowlogAgentDefaultBody change QAN my SQL slowlog agent default bo swagger:model ChangeQANMySQLSlowlogAgentDefaultBody */ type ChangeQANMySQLSlowlogAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeQANMySQLSlowlogAgentDefaultBody) ContextValidate(ctx context.Cont } func (o *ChangeQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx conte return err } } + } return nil @@ -321,6 +327,7 @@ ChangeQANMySQLSlowlogAgentDefaultBodyDetailsItems0 change QAN my SQL slowlog age swagger:model ChangeQANMySQLSlowlogAgentDefaultBodyDetailsItems0 */ type ChangeQANMySQLSlowlogAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeQANMySQLSlowlogAgentOKBody change QAN my SQL slowlog agent OK body swagger:model ChangeQANMySQLSlowlogAgentOKBody */ type ChangeQANMySQLSlowlogAgentOKBody struct { + // qan mysql slowlog agent QANMysqlSlowlogAgent *ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent `json:"qan_mysql_slowlog_agent,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeQANMySQLSlowlogAgentOKBody) ContextValidate(ctx context.Context, } func (o *ChangeQANMySQLSlowlogAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if err := o.QANMysqlSlowlogAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs w swagger:model ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent */ type ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -670,6 +680,7 @@ ChangeQANMySQLSlowlogAgentParamsBodyCommon ChangeCommonAgentParams contains para swagger:model ChangeQANMySQLSlowlogAgentParamsBodyCommon */ type ChangeQANMySQLSlowlogAgentParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go index b68464b06e..ec06fe6545 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go @@ -60,6 +60,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentParams contains all the parameters to send Typically these are written to a http.Request. */ type ChangeQANPostgreSQLPgStatMonitorAgentParams struct { + // Body. Body ChangeQANPostgreSQLPgStatMonitorAgentBody @@ -129,6 +130,7 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentParams) SetBody(body ChangeQANPost // WriteToRequest writes these params to a swagger request func (o *ChangeQANPostgreSQLPgStatMonitorAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go index 5c9f510ed7..0a2d58a033 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANPostgreSQLPgStatMonitorAgentOK struct { func (o *ChangeQANPostgreSQLPgStatMonitorAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatMonitorAgent][%d] changeQanPostgreSqlPgStatMonitorAgentOk %+v", 200, o.Payload) } - func (o *ChangeQANPostgreSQLPgStatMonitorAgentOK) GetPayload() *ChangeQANPostgreSQLPgStatMonitorAgentOKBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatMonitorAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANPostgreSQLPgStatMonitorAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) Code() int { func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatMonitorAgent][%d] ChangeQANPostgreSQLPgStatMonitorAgent default %+v", o._statusCode, o.Payload) } - func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) GetPayload() *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentBody change QAN postgre SQL pg stat monitor swagger:model ChangeQANPostgreSQLPgStatMonitorAgentBody */ type ChangeQANPostgreSQLPgStatMonitorAgentBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentBody) ContextValidate(ctx context. } func (o *ChangeQANPostgreSQLPgStatMonitorAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody change QAN postgre SQL pg stat swagger:model ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody */ type ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) ContextValidate(ctx c } func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetail return err } } + } return nil @@ -321,6 +327,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 change QAN postgre swagger:model ChangeQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 */ type ChangeQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentOKBody change QAN postgre SQL pg stat monit swagger:model ChangeQANPostgreSQLPgStatMonitorAgentOKBody */ type ChangeQANPostgreSQLPgStatMonitorAgentOKBody struct { + // qan postgresql pgstatmonitor agent QANPostgresqlPgstatmonitorAgent *ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentOKBody) ContextValidate(ctx contex } func (o *ChangeQANPostgreSQLPgStatMonitorAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPo swagger:model ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -658,6 +668,7 @@ ChangeQANPostgreSQLPgStatMonitorAgentParamsBodyCommon ChangeCommonAgentParams co swagger:model ChangeQANPostgreSQLPgStatMonitorAgentParamsBodyCommon */ type ChangeQANPostgreSQLPgStatMonitorAgentParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go index e298289e91..aadc876620 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go @@ -60,6 +60,7 @@ ChangeQANPostgreSQLPgStatementsAgentParams contains all the parameters to send t Typically these are written to a http.Request. */ type ChangeQANPostgreSQLPgStatementsAgentParams struct { + // Body. Body ChangeQANPostgreSQLPgStatementsAgentBody @@ -129,6 +130,7 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentParams) SetBody(body ChangeQANPostg // WriteToRequest writes these params to a swagger request func (o *ChangeQANPostgreSQLPgStatementsAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go index 23398c5633..5d2b8ab229 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANPostgreSQLPgStatementsAgentOK struct { func (o *ChangeQANPostgreSQLPgStatementsAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatementsAgent][%d] changeQanPostgreSqlPgStatementsAgentOk %+v", 200, o.Payload) } - func (o *ChangeQANPostgreSQLPgStatementsAgentOK) GetPayload() *ChangeQANPostgreSQLPgStatementsAgentOKBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatementsAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANPostgreSQLPgStatementsAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) Code() int { func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatementsAgent][%d] ChangeQANPostgreSQLPgStatementsAgent default %+v", o._statusCode, o.Payload) } - func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) GetPayload() *ChangeQANPostgreSQLPgStatementsAgentDefaultBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeQANPostgreSQLPgStatementsAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeQANPostgreSQLPgStatementsAgentBody change QAN postgre SQL pg statements ag swagger:model ChangeQANPostgreSQLPgStatementsAgentBody */ type ChangeQANPostgreSQLPgStatementsAgentBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentBody) ContextValidate(ctx context.C } func (o *ChangeQANPostgreSQLPgStatementsAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeQANPostgreSQLPgStatementsAgentDefaultBody change QAN postgre SQL pg statem swagger:model ChangeQANPostgreSQLPgStatementsAgentDefaultBody */ type ChangeQANPostgreSQLPgStatementsAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentDefaultBody) ContextValidate(ctx co } func (o *ChangeQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails return err } } + } return nil @@ -321,6 +327,7 @@ ChangeQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 change QAN postgre swagger:model ChangeQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 */ type ChangeQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeQANPostgreSQLPgStatementsAgentOKBody change QAN postgre SQL pg statements swagger:model ChangeQANPostgreSQLPgStatementsAgentOKBody */ type ChangeQANPostgreSQLPgStatementsAgentOKBody struct { + // qan postgresql pgstatements agent QANPostgresqlPgstatementsAgent *ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent `json:"qan_postgresql_pgstatements_agent,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentOKBody) ContextValidate(ctx context } func (o *ChangeQANPostgreSQLPgStatementsAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent QANPost swagger:model ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent */ type ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -655,6 +665,7 @@ ChangeQANPostgreSQLPgStatementsAgentParamsBodyCommon ChangeCommonAgentParams con swagger:model ChangeQANPostgreSQLPgStatementsAgentParamsBodyCommon */ type ChangeQANPostgreSQLPgStatementsAgentParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go b/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go index a4c20a2fae..f071fa78f7 100644 --- a/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go @@ -60,6 +60,7 @@ ChangeRDSExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeRDSExporterParams struct { + // Body. Body ChangeRDSExporterBody @@ -129,6 +130,7 @@ func (o *ChangeRDSExporterParams) SetBody(body ChangeRDSExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeRDSExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_rds_exporter_responses.go b/api/inventorypb/json/client/agents/change_rds_exporter_responses.go index 0c9a692092..abeb878853 100644 --- a/api/inventorypb/json/client/agents/change_rds_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_rds_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeRDSExporterOK struct { func (o *ChangeRDSExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeRDSExporter][%d] changeRdsExporterOk %+v", 200, o.Payload) } - func (o *ChangeRDSExporterOK) GetPayload() *ChangeRDSExporterOKBody { return o.Payload } func (o *ChangeRDSExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeRDSExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeRDSExporterDefault) Code() int { func (o *ChangeRDSExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeRDSExporter][%d] ChangeRDSExporter default %+v", o._statusCode, o.Payload) } - func (o *ChangeRDSExporterDefault) GetPayload() *ChangeRDSExporterDefaultBody { return o.Payload } func (o *ChangeRDSExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeRDSExporterDefaultBody) // response payload @@ -125,6 +125,7 @@ ChangeRDSExporterBody change RDS exporter body swagger:model ChangeRDSExporterBody */ type ChangeRDSExporterBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -180,6 +181,7 @@ func (o *ChangeRDSExporterBody) ContextValidate(ctx context.Context, formats str } func (o *ChangeRDSExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { + if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ChangeRDSExporterDefaultBody change RDS exporter default body swagger:model ChangeRDSExporterDefaultBody */ type ChangeRDSExporterDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ChangeRDSExporterDefaultBody) ContextValidate(ctx context.Context, form } func (o *ChangeRDSExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ChangeRDSExporterDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -321,6 +327,7 @@ ChangeRDSExporterDefaultBodyDetailsItems0 change RDS exporter default body detai swagger:model ChangeRDSExporterDefaultBodyDetailsItems0 */ type ChangeRDSExporterDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ChangeRDSExporterOKBody change RDS exporter OK body swagger:model ChangeRDSExporterOKBody */ type ChangeRDSExporterOKBody struct { + // rds exporter RDSExporter *ChangeRDSExporterOKBodyRDSExporter `json:"rds_exporter,omitempty"` } @@ -410,6 +418,7 @@ func (o *ChangeRDSExporterOKBody) ContextValidate(ctx context.Context, formats s } func (o *ChangeRDSExporterOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -447,6 +456,7 @@ ChangeRDSExporterOKBodyRDSExporter RDSExporter runs on Generic or Container Node swagger:model ChangeRDSExporterOKBodyRDSExporter */ type ChangeRDSExporterOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -657,6 +667,7 @@ ChangeRDSExporterParamsBodyCommon ChangeCommonAgentParams contains parameters th swagger:model ChangeRDSExporterParamsBodyCommon */ type ChangeRDSExporterParamsBodyCommon struct { + // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/get_agent_logs_parameters.go b/api/inventorypb/json/client/agents/get_agent_logs_parameters.go index 78082ad59f..fba72db550 100644 --- a/api/inventorypb/json/client/agents/get_agent_logs_parameters.go +++ b/api/inventorypb/json/client/agents/get_agent_logs_parameters.go @@ -60,6 +60,7 @@ GetAgentLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentLogsParams struct { + // Body. Body GetAgentLogsBody @@ -129,6 +130,7 @@ func (o *GetAgentLogsParams) SetBody(body GetAgentLogsBody) { // WriteToRequest writes these params to a swagger request func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/get_agent_logs_responses.go b/api/inventorypb/json/client/agents/get_agent_logs_responses.go index 71c2f38be2..06de9b93f9 100644 --- a/api/inventorypb/json/client/agents/get_agent_logs_responses.go +++ b/api/inventorypb/json/client/agents/get_agent_logs_responses.go @@ -60,12 +60,12 @@ type GetAgentLogsOK struct { func (o *GetAgentLogsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/GetLogs][%d] getAgentLogsOk %+v", 200, o.Payload) } - func (o *GetAgentLogsOK) GetPayload() *GetAgentLogsOKBody { return o.Payload } func (o *GetAgentLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetAgentLogsDefault) Code() int { func (o *GetAgentLogsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/GetLogs][%d] GetAgentLogs default %+v", o._statusCode, o.Payload) } - func (o *GetAgentLogsDefault) GetPayload() *GetAgentLogsDefaultBody { return o.Payload } func (o *GetAgentLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsDefaultBody) // response payload @@ -123,6 +123,7 @@ GetAgentLogsBody get agent logs body swagger:model GetAgentLogsBody */ type GetAgentLogsBody struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -163,6 +164,7 @@ GetAgentLogsDefaultBody get agent logs default body swagger:model GetAgentLogsDefaultBody */ type GetAgentLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *GetAgentLogsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -267,6 +272,7 @@ GetAgentLogsDefaultBodyDetailsItems0 get agent logs default body details items0 swagger:model GetAgentLogsDefaultBodyDetailsItems0 */ type GetAgentLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ GetAgentLogsOKBody get agent logs OK body swagger:model GetAgentLogsOKBody */ type GetAgentLogsOKBody struct { + // logs Logs []string `json:"logs"` diff --git a/api/inventorypb/json/client/agents/get_agent_parameters.go b/api/inventorypb/json/client/agents/get_agent_parameters.go index f546eed4ef..96d93864cd 100644 --- a/api/inventorypb/json/client/agents/get_agent_parameters.go +++ b/api/inventorypb/json/client/agents/get_agent_parameters.go @@ -60,6 +60,7 @@ GetAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentParams struct { + // Body. Body GetAgentBody @@ -129,6 +130,7 @@ func (o *GetAgentParams) SetBody(body GetAgentBody) { // WriteToRequest writes these params to a swagger request func (o *GetAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/get_agent_responses.go b/api/inventorypb/json/client/agents/get_agent_responses.go index 95d06c09e3..36ffb6c112 100644 --- a/api/inventorypb/json/client/agents/get_agent_responses.go +++ b/api/inventorypb/json/client/agents/get_agent_responses.go @@ -62,12 +62,12 @@ type GetAgentOK struct { func (o *GetAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Get][%d] getAgentOk %+v", 200, o.Payload) } - func (o *GetAgentOK) GetPayload() *GetAgentOKBody { return o.Payload } func (o *GetAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetAgentDefault) Code() int { func (o *GetAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Get][%d] GetAgent default %+v", o._statusCode, o.Payload) } - func (o *GetAgentDefault) GetPayload() *GetAgentDefaultBody { return o.Payload } func (o *GetAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentDefaultBody) // response payload @@ -125,6 +125,7 @@ GetAgentBody get agent body swagger:model GetAgentBody */ type GetAgentBody struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` } @@ -162,6 +163,7 @@ GetAgentDefaultBody get agent default body swagger:model GetAgentDefaultBody */ type GetAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -227,7 +229,9 @@ func (o *GetAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,6 +242,7 @@ func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -266,6 +271,7 @@ GetAgentDefaultBodyDetailsItems0 get agent default body details items0 swagger:model GetAgentDefaultBodyDetailsItems0 */ type GetAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -303,6 +309,7 @@ GetAgentOKBody get agent OK body swagger:model GetAgentOKBody */ type GetAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *GetAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -775,6 +782,7 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if err := o.AzureDatabaseExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -790,6 +798,7 @@ func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -805,6 +814,7 @@ func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -820,6 +830,7 @@ func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -835,6 +846,7 @@ func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if err := o.NodeExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -850,6 +862,7 @@ func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if err := o.PMMAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -865,6 +878,7 @@ func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -880,6 +894,7 @@ func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -895,6 +910,7 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if err := o.QANMongodbProfilerAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -910,6 +926,7 @@ func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if err := o.QANMysqlPerfschemaAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -925,6 +942,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if err := o.QANMysqlSlowlogAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -940,6 +958,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -955,6 +974,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -970,6 +990,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -985,6 +1006,7 @@ func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidateVmagent(ctx context.Context, formats strfmt.Registry) error { + if o.Vmagent != nil { if err := o.Vmagent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1022,6 +1044,7 @@ GetAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model GetAgentOKBodyAzureDatabaseExporter */ type GetAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1227,6 +1250,7 @@ GetAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model GetAgentOKBodyExternalExporter */ type GetAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1294,6 +1318,7 @@ GetAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model GetAgentOKBodyMongodbExporter */ type GetAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1515,6 +1540,7 @@ GetAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyMysqldExporter */ type GetAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1743,6 +1769,7 @@ GetAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model GetAgentOKBodyNodeExporter */ type GetAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1942,6 +1969,7 @@ GetAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model GetAgentOKBodyPMMAgent */ type GetAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1993,6 +2021,7 @@ GetAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyPostgresExporter */ type GetAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2202,6 +2231,7 @@ GetAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyProxysqlExporter */ type GetAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2413,6 +2443,7 @@ GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbProfilerAgent */ type GetAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2621,6 +2652,7 @@ GetAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMysqlPerfschemaAgent */ type GetAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2841,6 +2873,7 @@ GetAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model GetAgentOKBodyQANMysqlSlowlogAgent */ type GetAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3064,6 +3097,7 @@ GetAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model GetAgentOKBodyQANPostgresqlPgstatementsAgent */ type GetAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3272,6 +3306,7 @@ GetAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model GetAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type GetAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3483,6 +3518,7 @@ GetAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model GetAgentOKBodyRDSExporter */ type GetAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3695,6 +3731,7 @@ GetAgentOKBodyVmagent VMAgent runs on Generic or Container Node alongside pmm-ag swagger:model GetAgentOKBodyVmagent */ type GetAgentOKBodyVmagent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/list_agents_parameters.go b/api/inventorypb/json/client/agents/list_agents_parameters.go index 45319cd49a..9abf6624ab 100644 --- a/api/inventorypb/json/client/agents/list_agents_parameters.go +++ b/api/inventorypb/json/client/agents/list_agents_parameters.go @@ -60,6 +60,7 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { + // Body. Body ListAgentsBody @@ -129,6 +130,7 @@ func (o *ListAgentsParams) SetBody(body ListAgentsBody) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/list_agents_responses.go b/api/inventorypb/json/client/agents/list_agents_responses.go index 763fecc753..c67541bc39 100644 --- a/api/inventorypb/json/client/agents/list_agents_responses.go +++ b/api/inventorypb/json/client/agents/list_agents_responses.go @@ -62,12 +62,12 @@ type ListAgentsOK struct { func (o *ListAgentsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/List][%d] listAgentsOk %+v", 200, o.Payload) } - func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { return o.Payload } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAgentsDefault) Code() int { func (o *ListAgentsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/List][%d] ListAgents default %+v", o._statusCode, o.Payload) } - func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { return o.Payload } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -125,6 +125,7 @@ ListAgentsBody list agents body swagger:model ListAgentsBody */ type ListAgentsBody struct { + // Return only Agents started by this pmm-agent. // Exactly one of these parameters should be present: pmm_agent_id, node_id, service_id. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -268,6 +269,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -333,7 +335,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,6 +348,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -372,6 +377,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -409,6 +415,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // pmm agent PMMAgent []*ListAgentsOKBodyPMMAgentItems0 `json:"pmm_agent"` @@ -986,7 +993,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PMMAgent); i++ { + if o.PMMAgent[i] != nil { if err := o.PMMAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -997,13 +1006,16 @@ func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.VMAgent); i++ { + if o.VMAgent[i] != nil { if err := o.VMAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1014,13 +1026,16 @@ func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats s return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.NodeExporter); i++ { + if o.NodeExporter[i] != nil { if err := o.NodeExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1031,13 +1046,16 @@ func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, form return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MysqldExporter); i++ { + if o.MysqldExporter[i] != nil { if err := o.MysqldExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1048,13 +1066,16 @@ func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, fo return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MongodbExporter); i++ { + if o.MongodbExporter[i] != nil { if err := o.MongodbExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1065,13 +1086,16 @@ func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, f return err } } + } return nil } func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PostgresExporter); i++ { + if o.PostgresExporter[i] != nil { if err := o.PostgresExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1082,13 +1106,16 @@ func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ProxysqlExporter); i++ { + if o.ProxysqlExporter[i] != nil { if err := o.ProxysqlExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1099,13 +1126,16 @@ func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlPerfschemaAgent); i++ { + if o.QANMysqlPerfschemaAgent[i] != nil { if err := o.QANMysqlPerfschemaAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1116,13 +1146,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlSlowlogAgent); i++ { + if o.QANMysqlSlowlogAgent[i] != nil { if err := o.QANMysqlSlowlogAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1133,13 +1166,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Conte return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMongodbProfilerAgent); i++ { + if o.QANMongodbProfilerAgent[i] != nil { if err := o.QANMongodbProfilerAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1150,13 +1186,16 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatementsAgent); i++ { + if o.QANPostgresqlPgstatementsAgent[i] != nil { if err := o.QANPostgresqlPgstatementsAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1167,13 +1206,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx con return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatmonitorAgent); i++ { + if o.QANPostgresqlPgstatmonitorAgent[i] != nil { if err := o.QANPostgresqlPgstatmonitorAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1184,13 +1226,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSExporter); i++ { + if o.RDSExporter[i] != nil { if err := o.RDSExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1201,13 +1246,16 @@ func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, forma return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ExternalExporter); i++ { + if o.ExternalExporter[i] != nil { if err := o.ExternalExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1218,13 +1266,16 @@ func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseExporter); i++ { + if o.AzureDatabaseExporter[i] != nil { if err := o.AzureDatabaseExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1235,6 +1286,7 @@ func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Cont return err } } + } return nil @@ -1263,6 +1315,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0 AzureDatabaseExporter runs on Generi swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0 */ type ListAgentsOKBodyAzureDatabaseExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1468,6 +1521,7 @@ ListAgentsOKBodyExternalExporterItems0 ExternalExporter runs on any Node type, i swagger:model ListAgentsOKBodyExternalExporterItems0 */ type ListAgentsOKBodyExternalExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1535,6 +1589,7 @@ ListAgentsOKBodyMongodbExporterItems0 MongoDBExporter runs on Generic or Contain swagger:model ListAgentsOKBodyMongodbExporterItems0 */ type ListAgentsOKBodyMongodbExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1756,6 +1811,7 @@ ListAgentsOKBodyMysqldExporterItems0 MySQLdExporter runs on Generic or Container swagger:model ListAgentsOKBodyMysqldExporterItems0 */ type ListAgentsOKBodyMysqldExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1984,6 +2040,7 @@ ListAgentsOKBodyNodeExporterItems0 NodeExporter runs on Generic or Container Nod swagger:model ListAgentsOKBodyNodeExporterItems0 */ type ListAgentsOKBodyNodeExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2183,6 +2240,7 @@ ListAgentsOKBodyPMMAgentItems0 PMMAgent runs on Generic or Container Node. swagger:model ListAgentsOKBodyPMMAgentItems0 */ type ListAgentsOKBodyPMMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2234,6 +2292,7 @@ ListAgentsOKBodyPostgresExporterItems0 PostgresExporter runs on Generic or Conta swagger:model ListAgentsOKBodyPostgresExporterItems0 */ type ListAgentsOKBodyPostgresExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2443,6 +2502,7 @@ ListAgentsOKBodyProxysqlExporterItems0 ProxySQLExporter runs on Generic or Conta swagger:model ListAgentsOKBodyProxysqlExporterItems0 */ type ListAgentsOKBodyProxysqlExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2654,6 +2714,7 @@ ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs withi swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 */ type ListAgentsOKBodyQANMongodbProfilerAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2862,6 +2923,7 @@ ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 QANMySQLPerfSchemaAgent runs withi swagger:model ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 */ type ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3082,6 +3144,7 @@ ListAgentsOKBodyQANMysqlSlowlogAgentItems0 QANMySQLSlowlogAgent runs within pmm- swagger:model ListAgentsOKBodyQANMysqlSlowlogAgentItems0 */ type ListAgentsOKBodyQANMysqlSlowlogAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3305,6 +3368,7 @@ ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 QANPostgreSQLPgStatementsAg swagger:model ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3513,6 +3577,7 @@ ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 QANPostgreSQLPgStatMonitor swagger:model ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3724,6 +3789,7 @@ ListAgentsOKBodyRDSExporterItems0 RDSExporter runs on Generic or Container Node swagger:model ListAgentsOKBodyRDSExporterItems0 */ type ListAgentsOKBodyRDSExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3936,6 +4002,7 @@ ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongsid swagger:model ListAgentsOKBodyVMAgentItems0 */ type ListAgentsOKBodyVMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/remove_agent_parameters.go b/api/inventorypb/json/client/agents/remove_agent_parameters.go index de9f9fb549..b7e75d496d 100644 --- a/api/inventorypb/json/client/agents/remove_agent_parameters.go +++ b/api/inventorypb/json/client/agents/remove_agent_parameters.go @@ -60,6 +60,7 @@ RemoveAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveAgentParams struct { + // Body. Body RemoveAgentBody @@ -129,6 +130,7 @@ func (o *RemoveAgentParams) SetBody(body RemoveAgentBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/remove_agent_responses.go b/api/inventorypb/json/client/agents/remove_agent_responses.go index 00cb211405..fea21242f6 100644 --- a/api/inventorypb/json/client/agents/remove_agent_responses.go +++ b/api/inventorypb/json/client/agents/remove_agent_responses.go @@ -60,12 +60,12 @@ type RemoveAgentOK struct { func (o *RemoveAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Remove][%d] removeAgentOk %+v", 200, o.Payload) } - func (o *RemoveAgentOK) GetPayload() interface{} { return o.Payload } func (o *RemoveAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveAgentDefault) Code() int { func (o *RemoveAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Remove][%d] RemoveAgent default %+v", o._statusCode, o.Payload) } - func (o *RemoveAgentDefault) GetPayload() *RemoveAgentDefaultBody { return o.Payload } func (o *RemoveAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveAgentDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveAgentBody remove agent body swagger:model RemoveAgentBody */ type RemoveAgentBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -161,6 +162,7 @@ RemoveAgentDefaultBody remove agent default body swagger:model RemoveAgentDefaultBody */ type RemoveAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *RemoveAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -265,6 +270,7 @@ RemoveAgentDefaultBodyDetailsItems0 remove agent default body details items0 swagger:model RemoveAgentDefaultBodyDetailsItems0 */ type RemoveAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/nodes/add_container_node_parameters.go b/api/inventorypb/json/client/nodes/add_container_node_parameters.go index 733d4a807b..42c5dfc5da 100644 --- a/api/inventorypb/json/client/nodes/add_container_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_container_node_parameters.go @@ -60,6 +60,7 @@ AddContainerNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddContainerNodeParams struct { + // Body. Body AddContainerNodeBody @@ -129,6 +130,7 @@ func (o *AddContainerNodeParams) SetBody(body AddContainerNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddContainerNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_container_node_responses.go b/api/inventorypb/json/client/nodes/add_container_node_responses.go index 1243859a12..9213beea4f 100644 --- a/api/inventorypb/json/client/nodes/add_container_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_container_node_responses.go @@ -60,12 +60,12 @@ type AddContainerNodeOK struct { func (o *AddContainerNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddContainer][%d] addContainerNodeOk %+v", 200, o.Payload) } - func (o *AddContainerNodeOK) GetPayload() *AddContainerNodeOKBody { return o.Payload } func (o *AddContainerNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddContainerNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddContainerNodeDefault) Code() int { func (o *AddContainerNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddContainer][%d] AddContainerNode default %+v", o._statusCode, o.Payload) } - func (o *AddContainerNodeDefault) GetPayload() *AddContainerNodeDefaultBody { return o.Payload } func (o *AddContainerNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddContainerNodeDefaultBody) // response payload @@ -123,6 +123,7 @@ AddContainerNodeBody add container node body swagger:model AddContainerNodeBody */ type AddContainerNodeBody struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -184,6 +185,7 @@ AddContainerNodeDefaultBody add container node default body swagger:model AddContainerNodeDefaultBody */ type AddContainerNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -249,7 +251,9 @@ func (o *AddContainerNodeDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddContainerNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -260,6 +264,7 @@ func (o *AddContainerNodeDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -288,6 +293,7 @@ AddContainerNodeDefaultBodyDetailsItems0 add container node default body details swagger:model AddContainerNodeDefaultBodyDetailsItems0 */ type AddContainerNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -325,6 +331,7 @@ AddContainerNodeOKBody add container node OK body swagger:model AddContainerNodeOKBody */ type AddContainerNodeOKBody struct { + // container Container *AddContainerNodeOKBodyContainer `json:"container,omitempty"` } @@ -377,6 +384,7 @@ func (o *AddContainerNodeOKBody) ContextValidate(ctx context.Context, formats st } func (o *AddContainerNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if err := o.Container.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -414,6 +422,7 @@ AddContainerNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model AddContainerNodeOKBodyContainer */ type AddContainerNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_generic_node_parameters.go b/api/inventorypb/json/client/nodes/add_generic_node_parameters.go index b8a549c522..b3f4ee12ae 100644 --- a/api/inventorypb/json/client/nodes/add_generic_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_generic_node_parameters.go @@ -60,6 +60,7 @@ AddGenericNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddGenericNodeParams struct { + // Body. Body AddGenericNodeBody @@ -129,6 +130,7 @@ func (o *AddGenericNodeParams) SetBody(body AddGenericNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddGenericNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_generic_node_responses.go b/api/inventorypb/json/client/nodes/add_generic_node_responses.go index 97378c70ad..3d526d312c 100644 --- a/api/inventorypb/json/client/nodes/add_generic_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_generic_node_responses.go @@ -60,12 +60,12 @@ type AddGenericNodeOK struct { func (o *AddGenericNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddGeneric][%d] addGenericNodeOk %+v", 200, o.Payload) } - func (o *AddGenericNodeOK) GetPayload() *AddGenericNodeOKBody { return o.Payload } func (o *AddGenericNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddGenericNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddGenericNodeDefault) Code() int { func (o *AddGenericNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddGeneric][%d] AddGenericNode default %+v", o._statusCode, o.Payload) } - func (o *AddGenericNodeDefault) GetPayload() *AddGenericNodeDefaultBody { return o.Payload } func (o *AddGenericNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddGenericNodeDefaultBody) // response payload @@ -123,6 +123,7 @@ AddGenericNodeBody add generic node body swagger:model AddGenericNodeBody */ type AddGenericNodeBody struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -181,6 +182,7 @@ AddGenericNodeDefaultBody add generic node default body swagger:model AddGenericNodeDefaultBody */ type AddGenericNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -246,7 +248,9 @@ func (o *AddGenericNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddGenericNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -257,6 +261,7 @@ func (o *AddGenericNodeDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -285,6 +290,7 @@ AddGenericNodeDefaultBodyDetailsItems0 add generic node default body details ite swagger:model AddGenericNodeDefaultBodyDetailsItems0 */ type AddGenericNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -322,6 +328,7 @@ AddGenericNodeOKBody add generic node OK body swagger:model AddGenericNodeOKBody */ type AddGenericNodeOKBody struct { + // generic Generic *AddGenericNodeOKBodyGeneric `json:"generic,omitempty"` } @@ -374,6 +381,7 @@ func (o *AddGenericNodeOKBody) ContextValidate(ctx context.Context, formats strf } func (o *AddGenericNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if err := o.Generic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -411,6 +419,7 @@ AddGenericNodeOKBodyGeneric GenericNode represents a bare metal server or virtua swagger:model AddGenericNodeOKBodyGeneric */ type AddGenericNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go index a26c9249f8..0cd94f5bf4 100644 --- a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go @@ -60,6 +60,7 @@ AddRemoteAzureDatabaseNodeParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type AddRemoteAzureDatabaseNodeParams struct { + // Body. Body AddRemoteAzureDatabaseNodeBody @@ -129,6 +130,7 @@ func (o *AddRemoteAzureDatabaseNodeParams) SetBody(body AddRemoteAzureDatabaseNo // WriteToRequest writes these params to a swagger request func (o *AddRemoteAzureDatabaseNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go index 17c871dc64..3579eb5c3d 100644 --- a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go @@ -60,12 +60,12 @@ type AddRemoteAzureDatabaseNodeOK struct { func (o *AddRemoteAzureDatabaseNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteAzureDatabase][%d] addRemoteAzureDatabaseNodeOk %+v", 200, o.Payload) } - func (o *AddRemoteAzureDatabaseNodeOK) GetPayload() *AddRemoteAzureDatabaseNodeOKBody { return o.Payload } func (o *AddRemoteAzureDatabaseNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRemoteAzureDatabaseNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddRemoteAzureDatabaseNodeDefault) Code() int { func (o *AddRemoteAzureDatabaseNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteAzureDatabase][%d] AddRemoteAzureDatabaseNode default %+v", o._statusCode, o.Payload) } - func (o *AddRemoteAzureDatabaseNodeDefault) GetPayload() *AddRemoteAzureDatabaseNodeDefaultBody { return o.Payload } func (o *AddRemoteAzureDatabaseNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRemoteAzureDatabaseNodeDefaultBody) // response payload @@ -123,6 +123,7 @@ AddRemoteAzureDatabaseNodeBody add remote azure database node body swagger:model AddRemoteAzureDatabaseNodeBody */ type AddRemoteAzureDatabaseNodeBody struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -175,6 +176,7 @@ AddRemoteAzureDatabaseNodeDefaultBody add remote azure database node default bod swagger:model AddRemoteAzureDatabaseNodeDefaultBody */ type AddRemoteAzureDatabaseNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -240,7 +242,9 @@ func (o *AddRemoteAzureDatabaseNodeDefaultBody) ContextValidate(ctx context.Cont } func (o *AddRemoteAzureDatabaseNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -251,6 +255,7 @@ func (o *AddRemoteAzureDatabaseNodeDefaultBody) contextValidateDetails(ctx conte return err } } + } return nil @@ -279,6 +284,7 @@ AddRemoteAzureDatabaseNodeDefaultBodyDetailsItems0 add remote azure database nod swagger:model AddRemoteAzureDatabaseNodeDefaultBodyDetailsItems0 */ type AddRemoteAzureDatabaseNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -316,6 +322,7 @@ AddRemoteAzureDatabaseNodeOKBody add remote azure database node OK body swagger:model AddRemoteAzureDatabaseNodeOKBody */ type AddRemoteAzureDatabaseNodeOKBody struct { + // remote azure database RemoteAzureDatabase *AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase `json:"remote_azure_database,omitempty"` } @@ -368,6 +375,7 @@ func (o *AddRemoteAzureDatabaseNodeOKBody) ContextValidate(ctx context.Context, } func (o *AddRemoteAzureDatabaseNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if err := o.RemoteAzureDatabase.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -405,6 +413,7 @@ AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode repr swagger:model AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase */ type AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_remote_node_parameters.go b/api/inventorypb/json/client/nodes/add_remote_node_parameters.go index 1cda2acb2a..4fc9c7f4dc 100644 --- a/api/inventorypb/json/client/nodes/add_remote_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_remote_node_parameters.go @@ -60,6 +60,7 @@ AddRemoteNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRemoteNodeParams struct { + // Body. Body AddRemoteNodeBody @@ -129,6 +130,7 @@ func (o *AddRemoteNodeParams) SetBody(body AddRemoteNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddRemoteNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_remote_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_node_responses.go index 59afde419e..cfe69cdbb4 100644 --- a/api/inventorypb/json/client/nodes/add_remote_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_remote_node_responses.go @@ -60,12 +60,12 @@ type AddRemoteNodeOK struct { func (o *AddRemoteNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemote][%d] addRemoteNodeOk %+v", 200, o.Payload) } - func (o *AddRemoteNodeOK) GetPayload() *AddRemoteNodeOKBody { return o.Payload } func (o *AddRemoteNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRemoteNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddRemoteNodeDefault) Code() int { func (o *AddRemoteNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemote][%d] AddRemoteNode default %+v", o._statusCode, o.Payload) } - func (o *AddRemoteNodeDefault) GetPayload() *AddRemoteNodeDefaultBody { return o.Payload } func (o *AddRemoteNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRemoteNodeDefaultBody) // response payload @@ -123,6 +123,7 @@ AddRemoteNodeBody add remote node body swagger:model AddRemoteNodeBody */ type AddRemoteNodeBody struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -175,6 +176,7 @@ AddRemoteNodeDefaultBody add remote node default body swagger:model AddRemoteNodeDefaultBody */ type AddRemoteNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -240,7 +242,9 @@ func (o *AddRemoteNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddRemoteNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -251,6 +255,7 @@ func (o *AddRemoteNodeDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -279,6 +284,7 @@ AddRemoteNodeDefaultBodyDetailsItems0 add remote node default body details items swagger:model AddRemoteNodeDefaultBodyDetailsItems0 */ type AddRemoteNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -316,6 +322,7 @@ AddRemoteNodeOKBody add remote node OK body swagger:model AddRemoteNodeOKBody */ type AddRemoteNodeOKBody struct { + // remote Remote *AddRemoteNodeOKBodyRemote `json:"remote,omitempty"` } @@ -368,6 +375,7 @@ func (o *AddRemoteNodeOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddRemoteNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if err := o.Remote.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -405,6 +413,7 @@ AddRemoteNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node swagger:model AddRemoteNodeOKBodyRemote */ type AddRemoteNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go b/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go index 24a2a4aee5..c47491c1e2 100644 --- a/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go @@ -60,6 +60,7 @@ AddRemoteRDSNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRemoteRDSNodeParams struct { + // Body. Body AddRemoteRDSNodeBody @@ -129,6 +130,7 @@ func (o *AddRemoteRDSNodeParams) SetBody(body AddRemoteRDSNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddRemoteRDSNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go index cbdcadf303..255ec4366b 100644 --- a/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go @@ -60,12 +60,12 @@ type AddRemoteRDSNodeOK struct { func (o *AddRemoteRDSNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteRDS][%d] addRemoteRdsNodeOk %+v", 200, o.Payload) } - func (o *AddRemoteRDSNodeOK) GetPayload() *AddRemoteRDSNodeOKBody { return o.Payload } func (o *AddRemoteRDSNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRemoteRDSNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddRemoteRDSNodeDefault) Code() int { func (o *AddRemoteRDSNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteRDS][%d] AddRemoteRDSNode default %+v", o._statusCode, o.Payload) } - func (o *AddRemoteRDSNodeDefault) GetPayload() *AddRemoteRDSNodeDefaultBody { return o.Payload } func (o *AddRemoteRDSNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRemoteRDSNodeDefaultBody) // response payload @@ -123,6 +123,7 @@ AddRemoteRDSNodeBody add remote RDS node body swagger:model AddRemoteRDSNodeBody */ type AddRemoteRDSNodeBody struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -175,6 +176,7 @@ AddRemoteRDSNodeDefaultBody add remote RDS node default body swagger:model AddRemoteRDSNodeDefaultBody */ type AddRemoteRDSNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -240,7 +242,9 @@ func (o *AddRemoteRDSNodeDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddRemoteRDSNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -251,6 +255,7 @@ func (o *AddRemoteRDSNodeDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -279,6 +284,7 @@ AddRemoteRDSNodeDefaultBodyDetailsItems0 add remote RDS node default body detail swagger:model AddRemoteRDSNodeDefaultBodyDetailsItems0 */ type AddRemoteRDSNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -316,6 +322,7 @@ AddRemoteRDSNodeOKBody add remote RDS node OK body swagger:model AddRemoteRDSNodeOKBody */ type AddRemoteRDSNodeOKBody struct { + // remote rds RemoteRDS *AddRemoteRDSNodeOKBodyRemoteRDS `json:"remote_rds,omitempty"` } @@ -368,6 +375,7 @@ func (o *AddRemoteRDSNodeOKBody) ContextValidate(ctx context.Context, formats st } func (o *AddRemoteRDSNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if err := o.RemoteRDS.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -405,6 +413,7 @@ AddRemoteRDSNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents swagger:model AddRemoteRDSNodeOKBodyRemoteRDS */ type AddRemoteRDSNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/get_node_parameters.go b/api/inventorypb/json/client/nodes/get_node_parameters.go index f6ad37b23f..b6366fb7f4 100644 --- a/api/inventorypb/json/client/nodes/get_node_parameters.go +++ b/api/inventorypb/json/client/nodes/get_node_parameters.go @@ -60,6 +60,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + // Body. Body GetNodeBody @@ -129,6 +130,7 @@ func (o *GetNodeParams) SetBody(body GetNodeBody) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/get_node_responses.go b/api/inventorypb/json/client/nodes/get_node_responses.go index 3f22cfb738..484959404f 100644 --- a/api/inventorypb/json/client/nodes/get_node_responses.go +++ b/api/inventorypb/json/client/nodes/get_node_responses.go @@ -60,12 +60,12 @@ type GetNodeOK struct { func (o *GetNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Get][%d] getNodeOk %+v", 200, o.Payload) } - func (o *GetNodeOK) GetPayload() *GetNodeOKBody { return o.Payload } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetNodeDefault) Code() int { func (o *GetNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Get][%d] GetNode default %+v", o._statusCode, o.Payload) } - func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { return o.Payload } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -123,6 +123,7 @@ GetNodeBody get node body swagger:model GetNodeBody */ type GetNodeBody struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` } @@ -160,6 +161,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -225,7 +227,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -236,6 +240,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -264,6 +269,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -301,6 +307,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // container Container *GetNodeOKBodyContainer `json:"container,omitempty"` @@ -473,6 +480,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if err := o.Container.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -488,6 +496,7 @@ func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if err := o.Generic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -503,6 +512,7 @@ func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if err := o.Remote.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -518,6 +528,7 @@ func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if err := o.RemoteAzureDatabase.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -533,6 +544,7 @@ func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *GetNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if err := o.RemoteRDS.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -570,6 +582,7 @@ GetNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model GetNodeOKBodyContainer */ type GetNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -634,6 +647,7 @@ GetNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model GetNodeOKBodyGeneric */ type GetNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -695,6 +709,7 @@ GetNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model GetNodeOKBodyRemote */ type GetNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -750,6 +765,7 @@ GetNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model GetNodeOKBodyRemoteAzureDatabase */ type GetNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -805,6 +821,7 @@ GetNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model GetNodeOKBodyRemoteRDS */ type GetNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/list_nodes_parameters.go b/api/inventorypb/json/client/nodes/list_nodes_parameters.go index ed94a2202b..75d49cd9e7 100644 --- a/api/inventorypb/json/client/nodes/list_nodes_parameters.go +++ b/api/inventorypb/json/client/nodes/list_nodes_parameters.go @@ -60,6 +60,7 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { + // Body. Body ListNodesBody @@ -129,6 +130,7 @@ func (o *ListNodesParams) SetBody(body ListNodesBody) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/list_nodes_responses.go b/api/inventorypb/json/client/nodes/list_nodes_responses.go index ca9b8b4dae..4e5e0276df 100644 --- a/api/inventorypb/json/client/nodes/list_nodes_responses.go +++ b/api/inventorypb/json/client/nodes/list_nodes_responses.go @@ -62,12 +62,12 @@ type ListNodesOK struct { func (o *ListNodesOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/List][%d] listNodesOk %+v", 200, o.Payload) } - func (o *ListNodesOK) GetPayload() *ListNodesOKBody { return o.Payload } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListNodesDefault) Code() int { func (o *ListNodesDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/List][%d] ListNodes default %+v", o._statusCode, o.Payload) } - func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { return o.Payload } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListNodesBody list nodes body swagger:model ListNodesBody */ type ListNodesBody struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` @@ -226,6 +227,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +293,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -302,6 +306,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -330,6 +335,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -367,6 +373,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // generic Generic []*ListNodesOKBodyGenericItems0 `json:"generic"` @@ -574,7 +581,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Generic); i++ { + if o.Generic[i] != nil { if err := o.Generic[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -585,13 +594,16 @@ func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats st return err } } + } return nil } func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Container); i++ { + if o.Container[i] != nil { if err := o.Container[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -602,13 +614,16 @@ func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Remote); i++ { + if o.Remote[i] != nil { if err := o.Remote[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -619,13 +634,16 @@ func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats str return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteRDS); i++ { + if o.RemoteRDS[i] != nil { if err := o.RemoteRDS[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -636,13 +654,16 @@ func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteAzureDatabase); i++ { + if o.RemoteAzureDatabase[i] != nil { if err := o.RemoteAzureDatabase[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -653,6 +674,7 @@ func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context return err } } + } return nil @@ -681,6 +703,7 @@ ListNodesOKBodyContainerItems0 ContainerNode represents a Docker container. swagger:model ListNodesOKBodyContainerItems0 */ type ListNodesOKBodyContainerItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -745,6 +768,7 @@ ListNodesOKBodyGenericItems0 GenericNode represents a bare metal server or virtu swagger:model ListNodesOKBodyGenericItems0 */ type ListNodesOKBodyGenericItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -806,6 +830,7 @@ ListNodesOKBodyRemoteAzureDatabaseItems0 RemoteAzureDatabaseNode represents remo swagger:model ListNodesOKBodyRemoteAzureDatabaseItems0 */ type ListNodesOKBodyRemoteAzureDatabaseItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -861,6 +886,7 @@ ListNodesOKBodyRemoteItems0 RemoteNode represents generic remote Node. It's a no swagger:model ListNodesOKBodyRemoteItems0 */ type ListNodesOKBodyRemoteItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -916,6 +942,7 @@ ListNodesOKBodyRemoteRDSItems0 RemoteRDSNode represents remote RDS Node. Agents swagger:model ListNodesOKBodyRemoteRDSItems0 */ type ListNodesOKBodyRemoteRDSItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/remove_node_parameters.go b/api/inventorypb/json/client/nodes/remove_node_parameters.go index 5948139b98..eaf31ae4bf 100644 --- a/api/inventorypb/json/client/nodes/remove_node_parameters.go +++ b/api/inventorypb/json/client/nodes/remove_node_parameters.go @@ -60,6 +60,7 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { + // Body. Body RemoveNodeBody @@ -129,6 +130,7 @@ func (o *RemoveNodeParams) SetBody(body RemoveNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/remove_node_responses.go b/api/inventorypb/json/client/nodes/remove_node_responses.go index 7de78f1ea0..cfdc304f44 100644 --- a/api/inventorypb/json/client/nodes/remove_node_responses.go +++ b/api/inventorypb/json/client/nodes/remove_node_responses.go @@ -60,12 +60,12 @@ type RemoveNodeOK struct { func (o *RemoveNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Remove][%d] removeNodeOk %+v", 200, o.Payload) } - func (o *RemoveNodeOK) GetPayload() interface{} { return o.Payload } func (o *RemoveNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveNodeDefault) Code() int { func (o *RemoveNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Remove][%d] RemoveNode default %+v", o._statusCode, o.Payload) } - func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { return o.Payload } func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveNodeDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveNodeBody remove node body swagger:model RemoveNodeBody */ type RemoveNodeBody struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -161,6 +162,7 @@ RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody */ type RemoveNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *RemoveNodeDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -265,6 +270,7 @@ RemoveNodeDefaultBodyDetailsItems0 remove node default body details items0 swagger:model RemoveNodeDefaultBodyDetailsItems0 */ type RemoveNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/services/add_custom_labels_parameters.go b/api/inventorypb/json/client/services/add_custom_labels_parameters.go index e508c1e565..360ece1edc 100644 --- a/api/inventorypb/json/client/services/add_custom_labels_parameters.go +++ b/api/inventorypb/json/client/services/add_custom_labels_parameters.go @@ -60,6 +60,7 @@ AddCustomLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddCustomLabelsParams struct { + // Body. Body AddCustomLabelsBody @@ -129,6 +130,7 @@ func (o *AddCustomLabelsParams) SetBody(body AddCustomLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *AddCustomLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_custom_labels_responses.go b/api/inventorypb/json/client/services/add_custom_labels_responses.go index 112a8edc0f..d18b205e37 100644 --- a/api/inventorypb/json/client/services/add_custom_labels_responses.go +++ b/api/inventorypb/json/client/services/add_custom_labels_responses.go @@ -60,12 +60,12 @@ type AddCustomLabelsOK struct { func (o *AddCustomLabelsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Add][%d] addCustomLabelsOk %+v", 200, o.Payload) } - func (o *AddCustomLabelsOK) GetPayload() interface{} { return o.Payload } func (o *AddCustomLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AddCustomLabelsDefault) Code() int { func (o *AddCustomLabelsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Add][%d] AddCustomLabels default %+v", o._statusCode, o.Payload) } - func (o *AddCustomLabelsDefault) GetPayload() *AddCustomLabelsDefaultBody { return o.Payload } func (o *AddCustomLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddCustomLabelsDefaultBody) // response payload @@ -121,6 +121,7 @@ AddCustomLabelsBody add custom labels body swagger:model AddCustomLabelsBody */ type AddCustomLabelsBody struct { + // Unique Service ID. ServiceID string `json:"service_id,omitempty"` @@ -161,6 +162,7 @@ AddCustomLabelsDefaultBody add custom labels default body swagger:model AddCustomLabelsDefaultBody */ type AddCustomLabelsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *AddCustomLabelsDefaultBody) ContextValidate(ctx context.Context, format } func (o *AddCustomLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *AddCustomLabelsDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -265,6 +270,7 @@ AddCustomLabelsDefaultBodyDetailsItems0 add custom labels default body details i swagger:model AddCustomLabelsDefaultBodyDetailsItems0 */ type AddCustomLabelsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/services/add_external_service_parameters.go b/api/inventorypb/json/client/services/add_external_service_parameters.go index 53b34253d6..6ae016be94 100644 --- a/api/inventorypb/json/client/services/add_external_service_parameters.go +++ b/api/inventorypb/json/client/services/add_external_service_parameters.go @@ -60,6 +60,7 @@ AddExternalServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddExternalServiceParams struct { + // Body. Body AddExternalServiceBody @@ -129,6 +130,7 @@ func (o *AddExternalServiceParams) SetBody(body AddExternalServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddExternalServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_external_service_responses.go b/api/inventorypb/json/client/services/add_external_service_responses.go index 7f2cf9fbf2..7a972d4637 100644 --- a/api/inventorypb/json/client/services/add_external_service_responses.go +++ b/api/inventorypb/json/client/services/add_external_service_responses.go @@ -60,12 +60,12 @@ type AddExternalServiceOK struct { func (o *AddExternalServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddExternalService][%d] addExternalServiceOk %+v", 200, o.Payload) } - func (o *AddExternalServiceOK) GetPayload() *AddExternalServiceOKBody { return o.Payload } func (o *AddExternalServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddExternalServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddExternalServiceDefault) Code() int { func (o *AddExternalServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddExternalService][%d] AddExternalService default %+v", o._statusCode, o.Payload) } - func (o *AddExternalServiceDefault) GetPayload() *AddExternalServiceDefaultBody { return o.Payload } func (o *AddExternalServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddExternalServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ AddExternalServiceBody add external service body swagger:model AddExternalServiceBody */ type AddExternalServiceBody struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -178,6 +179,7 @@ AddExternalServiceDefaultBody add external service default body swagger:model AddExternalServiceDefaultBody */ type AddExternalServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -243,7 +245,9 @@ func (o *AddExternalServiceDefaultBody) ContextValidate(ctx context.Context, for } func (o *AddExternalServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -254,6 +258,7 @@ func (o *AddExternalServiceDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -282,6 +287,7 @@ AddExternalServiceDefaultBodyDetailsItems0 add external service default body det swagger:model AddExternalServiceDefaultBodyDetailsItems0 */ type AddExternalServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -319,6 +325,7 @@ AddExternalServiceOKBody add external service OK body swagger:model AddExternalServiceOKBody */ type AddExternalServiceOKBody struct { + // external External *AddExternalServiceOKBodyExternal `json:"external,omitempty"` } @@ -371,6 +378,7 @@ func (o *AddExternalServiceOKBody) ContextValidate(ctx context.Context, formats } func (o *AddExternalServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if err := o.External.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -408,6 +416,7 @@ AddExternalServiceOKBodyExternal ExternalService represents a generic External s swagger:model AddExternalServiceOKBodyExternal */ type AddExternalServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go b/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go index b90ea92106..aabfe33f42 100644 --- a/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go +++ b/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go @@ -60,6 +60,7 @@ AddHAProxyServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddHAProxyServiceParams struct { + // Body. Body AddHAProxyServiceBody @@ -129,6 +130,7 @@ func (o *AddHAProxyServiceParams) SetBody(body AddHAProxyServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddHAProxyServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go b/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go index 812d6866cb..f8ccb95aa6 100644 --- a/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go +++ b/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go @@ -60,12 +60,12 @@ type AddHAProxyServiceOK struct { func (o *AddHAProxyServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddHAProxyService][%d] addHaProxyServiceOk %+v", 200, o.Payload) } - func (o *AddHAProxyServiceOK) GetPayload() *AddHAProxyServiceOKBody { return o.Payload } func (o *AddHAProxyServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddHAProxyServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddHAProxyServiceDefault) Code() int { func (o *AddHAProxyServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddHAProxyService][%d] AddHAProxyService default %+v", o._statusCode, o.Payload) } - func (o *AddHAProxyServiceDefault) GetPayload() *AddHAProxyServiceDefaultBody { return o.Payload } func (o *AddHAProxyServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddHAProxyServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ AddHAProxyServiceBody add HA proxy service body swagger:model AddHAProxyServiceBody */ type AddHAProxyServiceBody struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -175,6 +176,7 @@ AddHAProxyServiceDefaultBody add HA proxy service default body swagger:model AddHAProxyServiceDefaultBody */ type AddHAProxyServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -240,7 +242,9 @@ func (o *AddHAProxyServiceDefaultBody) ContextValidate(ctx context.Context, form } func (o *AddHAProxyServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -251,6 +255,7 @@ func (o *AddHAProxyServiceDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -279,6 +284,7 @@ AddHAProxyServiceDefaultBodyDetailsItems0 add HA proxy service default body deta swagger:model AddHAProxyServiceDefaultBodyDetailsItems0 */ type AddHAProxyServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -316,6 +322,7 @@ AddHAProxyServiceOKBody add HA proxy service OK body swagger:model AddHAProxyServiceOKBody */ type AddHAProxyServiceOKBody struct { + // haproxy Haproxy *AddHAProxyServiceOKBodyHaproxy `json:"haproxy,omitempty"` } @@ -368,6 +375,7 @@ func (o *AddHAProxyServiceOKBody) ContextValidate(ctx context.Context, formats s } func (o *AddHAProxyServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -405,6 +413,7 @@ AddHAProxyServiceOKBodyHaproxy HAProxyService represents a generic HAProxy servi swagger:model AddHAProxyServiceOKBodyHaproxy */ type AddHAProxyServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go b/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go index c5b0806ad0..f2fd5ab729 100644 --- a/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go +++ b/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go @@ -60,6 +60,7 @@ AddMongoDBServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMongoDBServiceParams struct { + // Body. Body AddMongoDBServiceBody @@ -129,6 +130,7 @@ func (o *AddMongoDBServiceParams) SetBody(body AddMongoDBServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddMongoDBServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_mongo_db_service_responses.go b/api/inventorypb/json/client/services/add_mongo_db_service_responses.go index 2f0a715d74..069c8377e2 100644 --- a/api/inventorypb/json/client/services/add_mongo_db_service_responses.go +++ b/api/inventorypb/json/client/services/add_mongo_db_service_responses.go @@ -60,12 +60,12 @@ type AddMongoDBServiceOK struct { func (o *AddMongoDBServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMongoDB][%d] addMongoDbServiceOk %+v", 200, o.Payload) } - func (o *AddMongoDBServiceOK) GetPayload() *AddMongoDBServiceOKBody { return o.Payload } func (o *AddMongoDBServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMongoDBServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddMongoDBServiceDefault) Code() int { func (o *AddMongoDBServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMongoDB][%d] AddMongoDBService default %+v", o._statusCode, o.Payload) } - func (o *AddMongoDBServiceDefault) GetPayload() *AddMongoDBServiceDefaultBody { return o.Payload } func (o *AddMongoDBServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMongoDBServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ AddMongoDBServiceBody add mongo DB service body swagger:model AddMongoDBServiceBody */ type AddMongoDBServiceBody struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -187,6 +188,7 @@ AddMongoDBServiceDefaultBody add mongo DB service default body swagger:model AddMongoDBServiceDefaultBody */ type AddMongoDBServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -252,7 +254,9 @@ func (o *AddMongoDBServiceDefaultBody) ContextValidate(ctx context.Context, form } func (o *AddMongoDBServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -263,6 +267,7 @@ func (o *AddMongoDBServiceDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -291,6 +296,7 @@ AddMongoDBServiceDefaultBodyDetailsItems0 add mongo DB service default body deta swagger:model AddMongoDBServiceDefaultBodyDetailsItems0 */ type AddMongoDBServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -328,6 +334,7 @@ AddMongoDBServiceOKBody add mongo DB service OK body swagger:model AddMongoDBServiceOKBody */ type AddMongoDBServiceOKBody struct { + // mongodb Mongodb *AddMongoDBServiceOKBodyMongodb `json:"mongodb,omitempty"` } @@ -380,6 +387,7 @@ func (o *AddMongoDBServiceOKBody) ContextValidate(ctx context.Context, formats s } func (o *AddMongoDBServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if err := o.Mongodb.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -417,6 +425,7 @@ AddMongoDBServiceOKBodyMongodb MongoDBService represents a generic MongoDB insta swagger:model AddMongoDBServiceOKBodyMongodb */ type AddMongoDBServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_my_sql_service_parameters.go b/api/inventorypb/json/client/services/add_my_sql_service_parameters.go index 9b3cd35b43..2b8548fe57 100644 --- a/api/inventorypb/json/client/services/add_my_sql_service_parameters.go +++ b/api/inventorypb/json/client/services/add_my_sql_service_parameters.go @@ -60,6 +60,7 @@ AddMySQLServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMySQLServiceParams struct { + // Body. Body AddMySQLServiceBody @@ -129,6 +130,7 @@ func (o *AddMySQLServiceParams) SetBody(body AddMySQLServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddMySQLServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_my_sql_service_responses.go b/api/inventorypb/json/client/services/add_my_sql_service_responses.go index d3e8511769..65308c3e90 100644 --- a/api/inventorypb/json/client/services/add_my_sql_service_responses.go +++ b/api/inventorypb/json/client/services/add_my_sql_service_responses.go @@ -60,12 +60,12 @@ type AddMySQLServiceOK struct { func (o *AddMySQLServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMySQL][%d] addMySqlServiceOk %+v", 200, o.Payload) } - func (o *AddMySQLServiceOK) GetPayload() *AddMySQLServiceOKBody { return o.Payload } func (o *AddMySQLServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMySQLServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddMySQLServiceDefault) Code() int { func (o *AddMySQLServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMySQL][%d] AddMySQLService default %+v", o._statusCode, o.Payload) } - func (o *AddMySQLServiceDefault) GetPayload() *AddMySQLServiceDefaultBody { return o.Payload } func (o *AddMySQLServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMySQLServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ AddMySQLServiceBody add my SQL service body swagger:model AddMySQLServiceBody */ type AddMySQLServiceBody struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -187,6 +188,7 @@ AddMySQLServiceDefaultBody add my SQL service default body swagger:model AddMySQLServiceDefaultBody */ type AddMySQLServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -252,7 +254,9 @@ func (o *AddMySQLServiceDefaultBody) ContextValidate(ctx context.Context, format } func (o *AddMySQLServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -263,6 +267,7 @@ func (o *AddMySQLServiceDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -291,6 +296,7 @@ AddMySQLServiceDefaultBodyDetailsItems0 add my SQL service default body details swagger:model AddMySQLServiceDefaultBodyDetailsItems0 */ type AddMySQLServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -328,6 +334,7 @@ AddMySQLServiceOKBody add my SQL service OK body swagger:model AddMySQLServiceOKBody */ type AddMySQLServiceOKBody struct { + // mysql Mysql *AddMySQLServiceOKBodyMysql `json:"mysql,omitempty"` } @@ -380,6 +387,7 @@ func (o *AddMySQLServiceOKBody) ContextValidate(ctx context.Context, formats str } func (o *AddMySQLServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if err := o.Mysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -417,6 +425,7 @@ AddMySQLServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddMySQLServiceOKBodyMysql */ type AddMySQLServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go b/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go index 7f77afbcb7..8bd61385f7 100644 --- a/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go +++ b/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go @@ -60,6 +60,7 @@ AddPostgreSQLServiceParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type AddPostgreSQLServiceParams struct { + // Body. Body AddPostgreSQLServiceBody @@ -129,6 +130,7 @@ func (o *AddPostgreSQLServiceParams) SetBody(body AddPostgreSQLServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddPostgreSQLServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go b/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go index c704610153..b7846e8570 100644 --- a/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go +++ b/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go @@ -60,12 +60,12 @@ type AddPostgreSQLServiceOK struct { func (o *AddPostgreSQLServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddPostgreSQL][%d] addPostgreSqlServiceOk %+v", 200, o.Payload) } - func (o *AddPostgreSQLServiceOK) GetPayload() *AddPostgreSQLServiceOKBody { return o.Payload } func (o *AddPostgreSQLServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPostgreSQLServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddPostgreSQLServiceDefault) Code() int { func (o *AddPostgreSQLServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddPostgreSQL][%d] AddPostgreSQLService default %+v", o._statusCode, o.Payload) } - func (o *AddPostgreSQLServiceDefault) GetPayload() *AddPostgreSQLServiceDefaultBody { return o.Payload } func (o *AddPostgreSQLServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPostgreSQLServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ AddPostgreSQLServiceBody add postgre SQL service body swagger:model AddPostgreSQLServiceBody */ type AddPostgreSQLServiceBody struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -187,6 +188,7 @@ AddPostgreSQLServiceDefaultBody add postgre SQL service default body swagger:model AddPostgreSQLServiceDefaultBody */ type AddPostgreSQLServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -252,7 +254,9 @@ func (o *AddPostgreSQLServiceDefaultBody) ContextValidate(ctx context.Context, f } func (o *AddPostgreSQLServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -263,6 +267,7 @@ func (o *AddPostgreSQLServiceDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -291,6 +296,7 @@ AddPostgreSQLServiceDefaultBodyDetailsItems0 add postgre SQL service default bod swagger:model AddPostgreSQLServiceDefaultBodyDetailsItems0 */ type AddPostgreSQLServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -328,6 +334,7 @@ AddPostgreSQLServiceOKBody add postgre SQL service OK body swagger:model AddPostgreSQLServiceOKBody */ type AddPostgreSQLServiceOKBody struct { + // postgresql Postgresql *AddPostgreSQLServiceOKBodyPostgresql `json:"postgresql,omitempty"` } @@ -380,6 +387,7 @@ func (o *AddPostgreSQLServiceOKBody) ContextValidate(ctx context.Context, format } func (o *AddPostgreSQLServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -417,6 +425,7 @@ AddPostgreSQLServiceOKBodyPostgresql PostgreSQLService represents a generic Post swagger:model AddPostgreSQLServiceOKBodyPostgresql */ type AddPostgreSQLServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go b/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go index f41482ed2c..ebbac7a9fd 100644 --- a/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go +++ b/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go @@ -60,6 +60,7 @@ AddProxySQLServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddProxySQLServiceParams struct { + // Body. Body AddProxySQLServiceBody @@ -129,6 +130,7 @@ func (o *AddProxySQLServiceParams) SetBody(body AddProxySQLServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddProxySQLServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go b/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go index 4bd65d4a30..eeebe808db 100644 --- a/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go +++ b/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go @@ -60,12 +60,12 @@ type AddProxySQLServiceOK struct { func (o *AddProxySQLServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddProxySQL][%d] addProxySqlServiceOk %+v", 200, o.Payload) } - func (o *AddProxySQLServiceOK) GetPayload() *AddProxySQLServiceOKBody { return o.Payload } func (o *AddProxySQLServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddProxySQLServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddProxySQLServiceDefault) Code() int { func (o *AddProxySQLServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddProxySQL][%d] AddProxySQLService default %+v", o._statusCode, o.Payload) } - func (o *AddProxySQLServiceDefault) GetPayload() *AddProxySQLServiceDefaultBody { return o.Payload } func (o *AddProxySQLServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddProxySQLServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ AddProxySQLServiceBody add proxy SQL service body swagger:model AddProxySQLServiceBody */ type AddProxySQLServiceBody struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -187,6 +188,7 @@ AddProxySQLServiceDefaultBody add proxy SQL service default body swagger:model AddProxySQLServiceDefaultBody */ type AddProxySQLServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -252,7 +254,9 @@ func (o *AddProxySQLServiceDefaultBody) ContextValidate(ctx context.Context, for } func (o *AddProxySQLServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -263,6 +267,7 @@ func (o *AddProxySQLServiceDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -291,6 +296,7 @@ AddProxySQLServiceDefaultBodyDetailsItems0 add proxy SQL service default body de swagger:model AddProxySQLServiceDefaultBodyDetailsItems0 */ type AddProxySQLServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -328,6 +334,7 @@ AddProxySQLServiceOKBody add proxy SQL service OK body swagger:model AddProxySQLServiceOKBody */ type AddProxySQLServiceOKBody struct { + // proxysql Proxysql *AddProxySQLServiceOKBodyProxysql `json:"proxysql,omitempty"` } @@ -380,6 +387,7 @@ func (o *AddProxySQLServiceOKBody) ContextValidate(ctx context.Context, formats } func (o *AddProxySQLServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -417,6 +425,7 @@ AddProxySQLServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL i swagger:model AddProxySQLServiceOKBodyProxysql */ type AddProxySQLServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/get_service_parameters.go b/api/inventorypb/json/client/services/get_service_parameters.go index 45db6f950a..02011f9506 100644 --- a/api/inventorypb/json/client/services/get_service_parameters.go +++ b/api/inventorypb/json/client/services/get_service_parameters.go @@ -60,6 +60,7 @@ GetServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetServiceParams struct { + // Body. Body GetServiceBody @@ -129,6 +130,7 @@ func (o *GetServiceParams) SetBody(body GetServiceBody) { // WriteToRequest writes these params to a swagger request func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/get_service_responses.go b/api/inventorypb/json/client/services/get_service_responses.go index 5249f7e578..be355fa3fe 100644 --- a/api/inventorypb/json/client/services/get_service_responses.go +++ b/api/inventorypb/json/client/services/get_service_responses.go @@ -60,12 +60,12 @@ type GetServiceOK struct { func (o *GetServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Get][%d] getServiceOk %+v", 200, o.Payload) } - func (o *GetServiceOK) GetPayload() *GetServiceOKBody { return o.Payload } func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetServiceDefault) Code() int { func (o *GetServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Get][%d] GetService default %+v", o._statusCode, o.Payload) } - func (o *GetServiceDefault) GetPayload() *GetServiceDefaultBody { return o.Payload } func (o *GetServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ GetServiceBody get service body swagger:model GetServiceBody */ type GetServiceBody struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` } @@ -160,6 +161,7 @@ GetServiceDefaultBody get service default body swagger:model GetServiceDefaultBody */ type GetServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -225,7 +227,9 @@ func (o *GetServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -236,6 +240,7 @@ func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -264,6 +269,7 @@ GetServiceDefaultBodyDetailsItems0 get service default body details items0 swagger:model GetServiceDefaultBodyDetailsItems0 */ type GetServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -301,6 +307,7 @@ GetServiceOKBody get service OK body swagger:model GetServiceOKBody */ type GetServiceOKBody struct { + // external External *GetServiceOKBodyExternal `json:"external,omitempty"` @@ -503,6 +510,7 @@ func (o *GetServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if err := o.External.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -518,6 +526,7 @@ func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -533,6 +542,7 @@ func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if err := o.Mongodb.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -548,6 +558,7 @@ func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if err := o.Mysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -563,6 +574,7 @@ func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -578,6 +590,7 @@ func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -615,6 +628,7 @@ GetServiceOKBodyExternal ExternalService represents a generic External service i swagger:model GetServiceOKBodyExternal */ type GetServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -673,6 +687,7 @@ GetServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model GetServiceOKBodyHaproxy */ type GetServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -728,6 +743,7 @@ GetServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model GetServiceOKBodyMongodb */ type GetServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -795,6 +811,7 @@ GetServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model GetServiceOKBodyMysql */ type GetServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -862,6 +879,7 @@ GetServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model GetServiceOKBodyPostgresql */ type GetServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -932,6 +950,7 @@ GetServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model GetServiceOKBodyProxysql */ type GetServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/list_active_service_types_parameters.go b/api/inventorypb/json/client/services/list_active_service_types_parameters.go index 05465dbb3d..7fff356f2b 100644 --- a/api/inventorypb/json/client/services/list_active_service_types_parameters.go +++ b/api/inventorypb/json/client/services/list_active_service_types_parameters.go @@ -60,6 +60,7 @@ ListActiveServiceTypesParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ListActiveServiceTypesParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListActiveServiceTypesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListActiveServiceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/list_active_service_types_responses.go b/api/inventorypb/json/client/services/list_active_service_types_responses.go index 2a2f2e416b..9dcbd3b44c 100644 --- a/api/inventorypb/json/client/services/list_active_service_types_responses.go +++ b/api/inventorypb/json/client/services/list_active_service_types_responses.go @@ -62,12 +62,12 @@ type ListActiveServiceTypesOK struct { func (o *ListActiveServiceTypesOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/ListTypes][%d] listActiveServiceTypesOk %+v", 200, o.Payload) } - func (o *ListActiveServiceTypesOK) GetPayload() *ListActiveServiceTypesOKBody { return o.Payload } func (o *ListActiveServiceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListActiveServiceTypesDefault) Code() int { func (o *ListActiveServiceTypesDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/ListTypes][%d] ListActiveServiceTypes default %+v", o._statusCode, o.Payload) } - func (o *ListActiveServiceTypesDefault) GetPayload() *ListActiveServiceTypesDefaultBody { return o.Payload } func (o *ListActiveServiceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListActiveServiceTypesDefaultBody list active service types default body swagger:model ListActiveServiceTypesDefaultBody */ type ListActiveServiceTypesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *ListActiveServiceTypesDefaultBody) ContextValidate(ctx context.Context, } func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -229,6 +233,7 @@ ListActiveServiceTypesDefaultBodyDetailsItems0 list active service types default swagger:model ListActiveServiceTypesDefaultBodyDetailsItems0 */ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ ListActiveServiceTypesOKBody list active service types OK body swagger:model ListActiveServiceTypesOKBody */ type ListActiveServiceTypesOKBody struct { + // service types ServiceTypes []*string `json:"service_types"` } diff --git a/api/inventorypb/json/client/services/list_services_parameters.go b/api/inventorypb/json/client/services/list_services_parameters.go index 152f648dca..7553a0559e 100644 --- a/api/inventorypb/json/client/services/list_services_parameters.go +++ b/api/inventorypb/json/client/services/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + // Body. Body ListServicesBody @@ -129,6 +130,7 @@ func (o *ListServicesParams) SetBody(body ListServicesBody) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/list_services_responses.go b/api/inventorypb/json/client/services/list_services_responses.go index d7d093f09d..d68e3b161a 100644 --- a/api/inventorypb/json/client/services/list_services_responses.go +++ b/api/inventorypb/json/client/services/list_services_responses.go @@ -62,12 +62,12 @@ type ListServicesOK struct { func (o *ListServicesOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/List][%d] listServicesOk %+v", 200, o.Payload) } - func (o *ListServicesOK) GetPayload() *ListServicesOKBody { return o.Payload } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListServicesDefault) Code() int { func (o *ListServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/List][%d] ListServices default %+v", o._statusCode, o.Payload) } - func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { return o.Payload } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListServicesBody list services body swagger:model ListServicesBody */ type ListServicesBody struct { + // Return only Services running on that Node. NodeID string `json:"node_id,omitempty"` @@ -235,6 +236,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -300,7 +302,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -311,6 +315,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -339,6 +344,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -376,6 +382,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // mysql Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` @@ -620,7 +627,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if err := o.Mysql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -631,13 +640,16 @@ func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats s return err } } + } return nil } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if err := o.Mongodb[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -648,13 +660,16 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Postgresql); i++ { + if o.Postgresql[i] != nil { if err := o.Postgresql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -665,13 +680,16 @@ func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, form return err } } + } return nil } func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Proxysql); i++ { + if o.Proxysql[i] != nil { if err := o.Proxysql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -682,13 +700,16 @@ func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, format return err } } + } return nil } func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Haproxy); i++ { + if o.Haproxy[i] != nil { if err := o.Haproxy[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -699,13 +720,16 @@ func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.External); i++ { + if o.External[i] != nil { if err := o.External[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -716,6 +740,7 @@ func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, format return err } } + } return nil @@ -744,6 +769,7 @@ ListServicesOKBodyExternalItems0 ExternalService represents a generic External s swagger:model ListServicesOKBodyExternalItems0 */ type ListServicesOKBodyExternalItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -802,6 +828,7 @@ ListServicesOKBodyHaproxyItems0 HAProxyService represents a generic HAProxy serv swagger:model ListServicesOKBodyHaproxyItems0 */ type ListServicesOKBodyHaproxyItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -857,6 +884,7 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -924,6 +952,7 @@ ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. swagger:model ListServicesOKBodyMysqlItems0 */ type ListServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -991,6 +1020,7 @@ ListServicesOKBodyPostgresqlItems0 PostgreSQLService represents a generic Postgr swagger:model ListServicesOKBodyPostgresqlItems0 */ type ListServicesOKBodyPostgresqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1061,6 +1091,7 @@ ListServicesOKBodyProxysqlItems0 ProxySQLService represents a generic ProxySQL i swagger:model ListServicesOKBodyProxysqlItems0 */ type ListServicesOKBodyProxysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/remove_custom_labels_parameters.go b/api/inventorypb/json/client/services/remove_custom_labels_parameters.go index bf5236f353..cb7c255bde 100644 --- a/api/inventorypb/json/client/services/remove_custom_labels_parameters.go +++ b/api/inventorypb/json/client/services/remove_custom_labels_parameters.go @@ -60,6 +60,7 @@ RemoveCustomLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveCustomLabelsParams struct { + // Body. Body RemoveCustomLabelsBody @@ -129,6 +130,7 @@ func (o *RemoveCustomLabelsParams) SetBody(body RemoveCustomLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveCustomLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/remove_custom_labels_responses.go b/api/inventorypb/json/client/services/remove_custom_labels_responses.go index 0701571929..f57b224370 100644 --- a/api/inventorypb/json/client/services/remove_custom_labels_responses.go +++ b/api/inventorypb/json/client/services/remove_custom_labels_responses.go @@ -60,12 +60,12 @@ type RemoveCustomLabelsOK struct { func (o *RemoveCustomLabelsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Remove][%d] removeCustomLabelsOk %+v", 200, o.Payload) } - func (o *RemoveCustomLabelsOK) GetPayload() interface{} { return o.Payload } func (o *RemoveCustomLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveCustomLabelsDefault) Code() int { func (o *RemoveCustomLabelsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Remove][%d] RemoveCustomLabels default %+v", o._statusCode, o.Payload) } - func (o *RemoveCustomLabelsDefault) GetPayload() *RemoveCustomLabelsDefaultBody { return o.Payload } func (o *RemoveCustomLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveCustomLabelsDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveCustomLabelsBody remove custom labels body swagger:model RemoveCustomLabelsBody */ type RemoveCustomLabelsBody struct { + // Unique Service ID. ServiceID string `json:"service_id,omitempty"` @@ -161,6 +162,7 @@ RemoveCustomLabelsDefaultBody remove custom labels default body swagger:model RemoveCustomLabelsDefaultBody */ type RemoveCustomLabelsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *RemoveCustomLabelsDefaultBody) ContextValidate(ctx context.Context, for } func (o *RemoveCustomLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *RemoveCustomLabelsDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -265,6 +270,7 @@ RemoveCustomLabelsDefaultBodyDetailsItems0 remove custom labels default body det swagger:model RemoveCustomLabelsDefaultBodyDetailsItems0 */ type RemoveCustomLabelsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/services/remove_service_parameters.go b/api/inventorypb/json/client/services/remove_service_parameters.go index 4246b7a5ce..ed9f9dd5d8 100644 --- a/api/inventorypb/json/client/services/remove_service_parameters.go +++ b/api/inventorypb/json/client/services/remove_service_parameters.go @@ -60,6 +60,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + // Body. Body RemoveServiceBody @@ -129,6 +130,7 @@ func (o *RemoveServiceParams) SetBody(body RemoveServiceBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/remove_service_responses.go b/api/inventorypb/json/client/services/remove_service_responses.go index c7bbbf1ce0..387b8aa924 100644 --- a/api/inventorypb/json/client/services/remove_service_responses.go +++ b/api/inventorypb/json/client/services/remove_service_responses.go @@ -60,12 +60,12 @@ type RemoveServiceOK struct { func (o *RemoveServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Remove][%d] removeServiceOk %+v", 200, o.Payload) } - func (o *RemoveServiceOK) GetPayload() interface{} { return o.Payload } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveServiceDefault) Code() int { func (o *RemoveServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Remove][%d] RemoveService default %+v", o._statusCode, o.Payload) } - func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { return o.Payload } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveServiceBody remove service body swagger:model RemoveServiceBody */ type RemoveServiceBody struct { + // Unique randomly generated instance identifier. Required. ServiceID string `json:"service_id,omitempty"` @@ -161,6 +162,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -265,6 +270,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/log_level.pb.go b/api/inventorypb/log_level.pb.go index 50a79d8c90..0556fb2722 100644 --- a/api/inventorypb/log_level.pb.go +++ b/api/inventorypb/log_level.pb.go @@ -7,11 +7,10 @@ package inventorypb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -114,13 +113,10 @@ func file_inventorypb_log_level_proto_rawDescGZIP() []byte { return file_inventorypb_log_level_proto_rawDescData } -var ( - file_inventorypb_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventorypb_log_level_proto_goTypes = []interface{}{ - (LogLevel)(0), // 0: inventory.LogLevel - } -) - +var file_inventorypb_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventorypb_log_level_proto_goTypes = []interface{}{ + (LogLevel)(0), // 0: inventory.LogLevel +} var file_inventorypb_log_level_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventorypb/log_level.swagger.json b/api/inventorypb/log_level.swagger.json new file mode 100644 index 0000000000..eb72e3908d --- /dev/null +++ b/api/inventorypb/log_level.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventorypb/log_level.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventorypb/nodes.pb.go b/api/inventorypb/nodes.pb.go index afabb19136..b803de4d8b 100644 --- a/api/inventorypb/nodes.pb.go +++ b/api/inventorypb/nodes.pb.go @@ -7,14 +7,13 @@ package inventorypb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -2219,45 +2218,42 @@ func file_inventorypb_nodes_proto_rawDescGZIP() []byte { return file_inventorypb_nodes_proto_rawDescData } -var ( - file_inventorypb_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventorypb_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 31) - file_inventorypb_nodes_proto_goTypes = []interface{}{ - (NodeType)(0), // 0: inventory.NodeType - (*GenericNode)(nil), // 1: inventory.GenericNode - (*ContainerNode)(nil), // 2: inventory.ContainerNode - (*RemoteNode)(nil), // 3: inventory.RemoteNode - (*RemoteRDSNode)(nil), // 4: inventory.RemoteRDSNode - (*RemoteAzureDatabaseNode)(nil), // 5: inventory.RemoteAzureDatabaseNode - (*ListNodesRequest)(nil), // 6: inventory.ListNodesRequest - (*ListNodesResponse)(nil), // 7: inventory.ListNodesResponse - (*GetNodeRequest)(nil), // 8: inventory.GetNodeRequest - (*GetNodeResponse)(nil), // 9: inventory.GetNodeResponse - (*AddGenericNodeRequest)(nil), // 10: inventory.AddGenericNodeRequest - (*AddGenericNodeResponse)(nil), // 11: inventory.AddGenericNodeResponse - (*AddContainerNodeRequest)(nil), // 12: inventory.AddContainerNodeRequest - (*AddContainerNodeResponse)(nil), // 13: inventory.AddContainerNodeResponse - (*AddRemoteNodeRequest)(nil), // 14: inventory.AddRemoteNodeRequest - (*AddRemoteNodeResponse)(nil), // 15: inventory.AddRemoteNodeResponse - (*AddRemoteRDSNodeRequest)(nil), // 16: inventory.AddRemoteRDSNodeRequest - (*AddRemoteRDSNodeResponse)(nil), // 17: inventory.AddRemoteRDSNodeResponse - (*AddRemoteAzureDatabaseNodeRequest)(nil), // 18: inventory.AddRemoteAzureDatabaseNodeRequest - (*AddRemoteAzureDatabaseNodeResponse)(nil), // 19: inventory.AddRemoteAzureDatabaseNodeResponse - (*RemoveNodeRequest)(nil), // 20: inventory.RemoveNodeRequest - (*RemoveNodeResponse)(nil), // 21: inventory.RemoveNodeResponse - nil, // 22: inventory.GenericNode.CustomLabelsEntry - nil, // 23: inventory.ContainerNode.CustomLabelsEntry - nil, // 24: inventory.RemoteNode.CustomLabelsEntry - nil, // 25: inventory.RemoteRDSNode.CustomLabelsEntry - nil, // 26: inventory.RemoteAzureDatabaseNode.CustomLabelsEntry - nil, // 27: inventory.AddGenericNodeRequest.CustomLabelsEntry - nil, // 28: inventory.AddContainerNodeRequest.CustomLabelsEntry - nil, // 29: inventory.AddRemoteNodeRequest.CustomLabelsEntry - nil, // 30: inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry - nil, // 31: inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry - } -) - +var file_inventorypb_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventorypb_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_inventorypb_nodes_proto_goTypes = []interface{}{ + (NodeType)(0), // 0: inventory.NodeType + (*GenericNode)(nil), // 1: inventory.GenericNode + (*ContainerNode)(nil), // 2: inventory.ContainerNode + (*RemoteNode)(nil), // 3: inventory.RemoteNode + (*RemoteRDSNode)(nil), // 4: inventory.RemoteRDSNode + (*RemoteAzureDatabaseNode)(nil), // 5: inventory.RemoteAzureDatabaseNode + (*ListNodesRequest)(nil), // 6: inventory.ListNodesRequest + (*ListNodesResponse)(nil), // 7: inventory.ListNodesResponse + (*GetNodeRequest)(nil), // 8: inventory.GetNodeRequest + (*GetNodeResponse)(nil), // 9: inventory.GetNodeResponse + (*AddGenericNodeRequest)(nil), // 10: inventory.AddGenericNodeRequest + (*AddGenericNodeResponse)(nil), // 11: inventory.AddGenericNodeResponse + (*AddContainerNodeRequest)(nil), // 12: inventory.AddContainerNodeRequest + (*AddContainerNodeResponse)(nil), // 13: inventory.AddContainerNodeResponse + (*AddRemoteNodeRequest)(nil), // 14: inventory.AddRemoteNodeRequest + (*AddRemoteNodeResponse)(nil), // 15: inventory.AddRemoteNodeResponse + (*AddRemoteRDSNodeRequest)(nil), // 16: inventory.AddRemoteRDSNodeRequest + (*AddRemoteRDSNodeResponse)(nil), // 17: inventory.AddRemoteRDSNodeResponse + (*AddRemoteAzureDatabaseNodeRequest)(nil), // 18: inventory.AddRemoteAzureDatabaseNodeRequest + (*AddRemoteAzureDatabaseNodeResponse)(nil), // 19: inventory.AddRemoteAzureDatabaseNodeResponse + (*RemoveNodeRequest)(nil), // 20: inventory.RemoveNodeRequest + (*RemoveNodeResponse)(nil), // 21: inventory.RemoveNodeResponse + nil, // 22: inventory.GenericNode.CustomLabelsEntry + nil, // 23: inventory.ContainerNode.CustomLabelsEntry + nil, // 24: inventory.RemoteNode.CustomLabelsEntry + nil, // 25: inventory.RemoteRDSNode.CustomLabelsEntry + nil, // 26: inventory.RemoteAzureDatabaseNode.CustomLabelsEntry + nil, // 27: inventory.AddGenericNodeRequest.CustomLabelsEntry + nil, // 28: inventory.AddContainerNodeRequest.CustomLabelsEntry + nil, // 29: inventory.AddRemoteNodeRequest.CustomLabelsEntry + nil, // 30: inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry + nil, // 31: inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry +} var file_inventorypb_nodes_proto_depIdxs = []int32{ 22, // 0: inventory.GenericNode.custom_labels:type_name -> inventory.GenericNode.CustomLabelsEntry 23, // 1: inventory.ContainerNode.custom_labels:type_name -> inventory.ContainerNode.CustomLabelsEntry diff --git a/api/inventorypb/nodes.pb.gw.go b/api/inventorypb/nodes.pb.gw.go index 91d1c6a5a5..6d280e4a92 100644 --- a/api/inventorypb/nodes.pb.gw.go +++ b/api/inventorypb/nodes.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest @@ -47,6 +45,7 @@ func request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Mars msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, c msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marsha msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddGenericNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime msg, err := server.AddGenericNode(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddContainerNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runti msg, err := server.AddContainerNode(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.AddRemoteNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime. msg, err := server.AddRemoteNode(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddRemoteRDSNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runti msg, err := server.AddRemoteRDSNode(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marshaler r msg, err := client.AddRemoteAzureDatabaseNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marsh msg, err := server.AddRemoteAzureDatabaseNode(ctx, &protoReq) return msg, metadata, err + } func request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.RemoveNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Mar msg, err := server.RemoveNode(ctx, &protoReq) return msg, metadata, err + } // RegisterNodesHandlerServer registers the http handlers for service Nodes to "mux". @@ -294,6 +308,7 @@ func local_request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Mar // 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 RegisterNodesHandlerFromEndpoint instead. func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodesServer) error { + mux.Handle("POST", pattern_Nodes_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -316,6 +331,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -340,6 +356,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddGenericNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -364,6 +381,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddGenericNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddContainerNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -388,6 +406,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddContainerNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddRemoteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -412,6 +431,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddRemoteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddRemoteRDSNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,6 +456,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddRemoteRDSNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddRemoteAzureDatabaseNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -460,6 +481,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddRemoteAzureDatabaseNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -484,6 +506,7 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -526,6 +549,7 @@ func RegisterNodesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodesClient" to call the correct interceptors. func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodesClient) error { + mux.Handle("POST", pattern_Nodes_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -545,6 +569,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -566,6 +591,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddGenericNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -587,6 +613,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddGenericNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddContainerNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -608,6 +635,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddContainerNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddRemoteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -629,6 +657,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddRemoteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddRemoteRDSNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -650,6 +679,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddRemoteRDSNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_AddRemoteAzureDatabaseNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -671,6 +701,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddRemoteAzureDatabaseNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Nodes_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -692,6 +723,7 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/inventorypb/nodes.swagger.json b/api/inventorypb/nodes.swagger.json new file mode 100644 index 0000000000..bae050ba33 --- /dev/null +++ b/api/inventorypb/nodes.swagger.json @@ -0,0 +1,854 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventorypb/nodes.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Nodes" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/inventory/Nodes/AddContainer": { + "post": { + "summary": "Add Container Node", + "description": "Adds container Node.", + "operationId": "AddContainerNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddContainerNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddContainerNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/AddGeneric": { + "post": { + "summary": "Add Generic Node", + "description": "Adds generic Node.", + "operationId": "AddGenericNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddGenericNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddGenericNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/AddRemote": { + "post": { + "summary": "Add Remote Node", + "description": "Adds remote Node.", + "operationId": "AddRemoteNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddRemoteNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddRemoteNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/AddRemoteAzureDatabase": { + "post": { + "summary": "Add Remote Azure Database Node", + "description": "Adds remote Azure database Node.", + "operationId": "AddRemoteAzureDatabaseNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddRemoteAzureDatabaseNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddRemoteAzureDatabaseNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/AddRemoteRDS": { + "post": { + "summary": "Add Remote RDS Node", + "description": "Adds remote RDS Node.", + "operationId": "AddRemoteRDSNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddRemoteRDSNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddRemoteRDSNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/Get": { + "post": { + "summary": "Get Node", + "description": "Returns a single Node by ID.", + "operationId": "GetNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryGetNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryGetNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/List": { + "post": { + "summary": "List Nodes", + "description": "Returns a list of all Nodes.", + "operationId": "ListNodes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryListNodesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryListNodesRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + }, + "/v1/inventory/Nodes/Remove": { + "post": { + "summary": "Remove Node", + "description": "Removes Node.", + "operationId": "RemoveNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryRemoveNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryRemoveNodeRequest" + } + } + ], + "tags": [ + "Nodes" + ] + } + } + }, + "definitions": { + "inventoryAddContainerNodeRequest": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id of the Generic Node where this Container Node runs." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddContainerNodeResponse": { + "type": "object", + "properties": { + "container": { + "$ref": "#/definitions/inventoryContainerNode" + } + } + }, + "inventoryAddGenericNodeRequest": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddGenericNodeResponse": { + "type": "object", + "properties": { + "generic": { + "$ref": "#/definitions/inventoryGenericNode" + } + } + }, + "inventoryAddRemoteAzureDatabaseNodeRequest": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddRemoteAzureDatabaseNodeResponse": { + "type": "object", + "properties": { + "remote_azure_database": { + "$ref": "#/definitions/inventoryRemoteAzureDatabaseNode" + } + } + }, + "inventoryAddRemoteNodeRequest": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddRemoteNodeResponse": { + "type": "object", + "properties": { + "remote": { + "$ref": "#/definitions/inventoryRemoteNode" + } + } + }, + "inventoryAddRemoteRDSNodeRequest": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddRemoteRDSNodeResponse": { + "type": "object", + "properties": { + "remote_rds": { + "$ref": "#/definitions/inventoryRemoteRDSNode" + } + } + }, + "inventoryContainerNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id of the Generic Node where this Container Node runs." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "ContainerNode represents a Docker container." + }, + "inventoryGenericNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "GenericNode represents a bare metal server or virtual machine." + }, + "inventoryGetNodeRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + } + } + }, + "inventoryGetNodeResponse": { + "type": "object", + "properties": { + "generic": { + "$ref": "#/definitions/inventoryGenericNode" + }, + "container": { + "$ref": "#/definitions/inventoryContainerNode" + }, + "remote": { + "$ref": "#/definitions/inventoryRemoteNode" + }, + "remote_rds": { + "$ref": "#/definitions/inventoryRemoteRDSNode" + }, + "remote_azure_database": { + "$ref": "#/definitions/inventoryRemoteAzureDatabaseNode" + } + } + }, + "inventoryListNodesRequest": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Return only Nodes with matching Node type." + } + } + }, + "inventoryListNodesResponse": { + "type": "object", + "properties": { + "generic": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryGenericNode" + } + }, + "container": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryContainerNode" + } + }, + "remote": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryRemoteNode" + } + }, + "remote_rds": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryRemoteRDSNode" + } + }, + "remote_azure_database": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryRemoteAzureDatabaseNode" + } + } + } + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "inventoryRemoteAzureDatabaseNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes." + }, + "inventoryRemoteNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes." + }, + "inventoryRemoteRDSNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;" + } + }, + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes." + }, + "inventoryRemoveNodeRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "force": { + "type": "boolean", + "description": "Remove node with all dependencies." + } + } + }, + "inventoryRemoveNodeResponse": { + "type": "object" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventorypb/nodes_grpc.pb.go b/api/inventorypb/nodes_grpc.pb.go index 372069998c..e45671a41f 100644 --- a/api/inventorypb/nodes_grpc.pb.go +++ b/api/inventorypb/nodes_grpc.pb.go @@ -8,7 +8,6 @@ package inventorypb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -156,36 +155,30 @@ type NodesServer interface { } // UnimplementedNodesServer must be embedded to have forward compatible implementations. -type UnimplementedNodesServer struct{} +type UnimplementedNodesServer struct { +} func (UnimplementedNodesServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } - func (UnimplementedNodesServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } - func (UnimplementedNodesServer) AddGenericNode(context.Context, *AddGenericNodeRequest) (*AddGenericNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddGenericNode not implemented") } - func (UnimplementedNodesServer) AddContainerNode(context.Context, *AddContainerNodeRequest) (*AddContainerNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddContainerNode not implemented") } - func (UnimplementedNodesServer) AddRemoteNode(context.Context, *AddRemoteNodeRequest) (*AddRemoteNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRemoteNode not implemented") } - func (UnimplementedNodesServer) AddRemoteRDSNode(context.Context, *AddRemoteRDSNodeRequest) (*AddRemoteRDSNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRemoteRDSNode not implemented") } - func (UnimplementedNodesServer) AddRemoteAzureDatabaseNode(context.Context, *AddRemoteAzureDatabaseNodeRequest) (*AddRemoteAzureDatabaseNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRemoteAzureDatabaseNode not implemented") } - func (UnimplementedNodesServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented") } diff --git a/api/inventorypb/services.pb.go b/api/inventorypb/services.pb.go index f187ecaec2..69323bd0e1 100644 --- a/api/inventorypb/services.pb.go +++ b/api/inventorypb/services.pb.go @@ -7,14 +7,13 @@ package inventorypb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -3156,57 +3155,54 @@ func file_inventorypb_services_proto_rawDescGZIP() []byte { return file_inventorypb_services_proto_rawDescData } -var ( - file_inventorypb_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventorypb_services_proto_msgTypes = make([]protoimpl.MessageInfo, 43) - file_inventorypb_services_proto_goTypes = []interface{}{ - (ServiceType)(0), // 0: inventory.ServiceType - (*MySQLService)(nil), // 1: inventory.MySQLService - (*MongoDBService)(nil), // 2: inventory.MongoDBService - (*PostgreSQLService)(nil), // 3: inventory.PostgreSQLService - (*ProxySQLService)(nil), // 4: inventory.ProxySQLService - (*HAProxyService)(nil), // 5: inventory.HAProxyService - (*ExternalService)(nil), // 6: inventory.ExternalService - (*ListServicesRequest)(nil), // 7: inventory.ListServicesRequest - (*ListServicesResponse)(nil), // 8: inventory.ListServicesResponse - (*ListActiveServiceTypesRequest)(nil), // 9: inventory.ListActiveServiceTypesRequest - (*ListActiveServiceTypesResponse)(nil), // 10: inventory.ListActiveServiceTypesResponse - (*GetServiceRequest)(nil), // 11: inventory.GetServiceRequest - (*GetServiceResponse)(nil), // 12: inventory.GetServiceResponse - (*AddMySQLServiceRequest)(nil), // 13: inventory.AddMySQLServiceRequest - (*AddMySQLServiceResponse)(nil), // 14: inventory.AddMySQLServiceResponse - (*AddMongoDBServiceRequest)(nil), // 15: inventory.AddMongoDBServiceRequest - (*AddMongoDBServiceResponse)(nil), // 16: inventory.AddMongoDBServiceResponse - (*AddPostgreSQLServiceRequest)(nil), // 17: inventory.AddPostgreSQLServiceRequest - (*AddPostgreSQLServiceResponse)(nil), // 18: inventory.AddPostgreSQLServiceResponse - (*AddProxySQLServiceRequest)(nil), // 19: inventory.AddProxySQLServiceRequest - (*AddProxySQLServiceResponse)(nil), // 20: inventory.AddProxySQLServiceResponse - (*AddHAProxyServiceRequest)(nil), // 21: inventory.AddHAProxyServiceRequest - (*AddHAProxyServiceResponse)(nil), // 22: inventory.AddHAProxyServiceResponse - (*AddExternalServiceRequest)(nil), // 23: inventory.AddExternalServiceRequest - (*AddExternalServiceResponse)(nil), // 24: inventory.AddExternalServiceResponse - (*RemoveServiceRequest)(nil), // 25: inventory.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 26: inventory.RemoveServiceResponse - (*AddCustomLabelsRequest)(nil), // 27: inventory.AddCustomLabelsRequest - (*AddCustomLabelsResponse)(nil), // 28: inventory.AddCustomLabelsResponse - (*RemoveCustomLabelsRequest)(nil), // 29: inventory.RemoveCustomLabelsRequest - (*RemoveCustomLabelsResponse)(nil), // 30: inventory.RemoveCustomLabelsResponse - nil, // 31: inventory.MySQLService.CustomLabelsEntry - nil, // 32: inventory.MongoDBService.CustomLabelsEntry - nil, // 33: inventory.PostgreSQLService.CustomLabelsEntry - nil, // 34: inventory.ProxySQLService.CustomLabelsEntry - nil, // 35: inventory.HAProxyService.CustomLabelsEntry - nil, // 36: inventory.ExternalService.CustomLabelsEntry - nil, // 37: inventory.AddMySQLServiceRequest.CustomLabelsEntry - nil, // 38: inventory.AddMongoDBServiceRequest.CustomLabelsEntry - nil, // 39: inventory.AddPostgreSQLServiceRequest.CustomLabelsEntry - nil, // 40: inventory.AddProxySQLServiceRequest.CustomLabelsEntry - nil, // 41: inventory.AddHAProxyServiceRequest.CustomLabelsEntry - nil, // 42: inventory.AddExternalServiceRequest.CustomLabelsEntry - nil, // 43: inventory.AddCustomLabelsRequest.CustomLabelsEntry - } -) - +var file_inventorypb_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventorypb_services_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_inventorypb_services_proto_goTypes = []interface{}{ + (ServiceType)(0), // 0: inventory.ServiceType + (*MySQLService)(nil), // 1: inventory.MySQLService + (*MongoDBService)(nil), // 2: inventory.MongoDBService + (*PostgreSQLService)(nil), // 3: inventory.PostgreSQLService + (*ProxySQLService)(nil), // 4: inventory.ProxySQLService + (*HAProxyService)(nil), // 5: inventory.HAProxyService + (*ExternalService)(nil), // 6: inventory.ExternalService + (*ListServicesRequest)(nil), // 7: inventory.ListServicesRequest + (*ListServicesResponse)(nil), // 8: inventory.ListServicesResponse + (*ListActiveServiceTypesRequest)(nil), // 9: inventory.ListActiveServiceTypesRequest + (*ListActiveServiceTypesResponse)(nil), // 10: inventory.ListActiveServiceTypesResponse + (*GetServiceRequest)(nil), // 11: inventory.GetServiceRequest + (*GetServiceResponse)(nil), // 12: inventory.GetServiceResponse + (*AddMySQLServiceRequest)(nil), // 13: inventory.AddMySQLServiceRequest + (*AddMySQLServiceResponse)(nil), // 14: inventory.AddMySQLServiceResponse + (*AddMongoDBServiceRequest)(nil), // 15: inventory.AddMongoDBServiceRequest + (*AddMongoDBServiceResponse)(nil), // 16: inventory.AddMongoDBServiceResponse + (*AddPostgreSQLServiceRequest)(nil), // 17: inventory.AddPostgreSQLServiceRequest + (*AddPostgreSQLServiceResponse)(nil), // 18: inventory.AddPostgreSQLServiceResponse + (*AddProxySQLServiceRequest)(nil), // 19: inventory.AddProxySQLServiceRequest + (*AddProxySQLServiceResponse)(nil), // 20: inventory.AddProxySQLServiceResponse + (*AddHAProxyServiceRequest)(nil), // 21: inventory.AddHAProxyServiceRequest + (*AddHAProxyServiceResponse)(nil), // 22: inventory.AddHAProxyServiceResponse + (*AddExternalServiceRequest)(nil), // 23: inventory.AddExternalServiceRequest + (*AddExternalServiceResponse)(nil), // 24: inventory.AddExternalServiceResponse + (*RemoveServiceRequest)(nil), // 25: inventory.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 26: inventory.RemoveServiceResponse + (*AddCustomLabelsRequest)(nil), // 27: inventory.AddCustomLabelsRequest + (*AddCustomLabelsResponse)(nil), // 28: inventory.AddCustomLabelsResponse + (*RemoveCustomLabelsRequest)(nil), // 29: inventory.RemoveCustomLabelsRequest + (*RemoveCustomLabelsResponse)(nil), // 30: inventory.RemoveCustomLabelsResponse + nil, // 31: inventory.MySQLService.CustomLabelsEntry + nil, // 32: inventory.MongoDBService.CustomLabelsEntry + nil, // 33: inventory.PostgreSQLService.CustomLabelsEntry + nil, // 34: inventory.ProxySQLService.CustomLabelsEntry + nil, // 35: inventory.HAProxyService.CustomLabelsEntry + nil, // 36: inventory.ExternalService.CustomLabelsEntry + nil, // 37: inventory.AddMySQLServiceRequest.CustomLabelsEntry + nil, // 38: inventory.AddMongoDBServiceRequest.CustomLabelsEntry + nil, // 39: inventory.AddPostgreSQLServiceRequest.CustomLabelsEntry + nil, // 40: inventory.AddProxySQLServiceRequest.CustomLabelsEntry + nil, // 41: inventory.AddHAProxyServiceRequest.CustomLabelsEntry + nil, // 42: inventory.AddExternalServiceRequest.CustomLabelsEntry + nil, // 43: inventory.AddCustomLabelsRequest.CustomLabelsEntry +} var file_inventorypb_services_proto_depIdxs = []int32{ 31, // 0: inventory.MySQLService.custom_labels:type_name -> inventory.MySQLService.CustomLabelsEntry 32, // 1: inventory.MongoDBService.custom_labels:type_name -> inventory.MongoDBService.CustomLabelsEntry diff --git a/api/inventorypb/services.pb.gw.go b/api/inventorypb/services.pb.gw.go index 41149720ca..611d4002ab 100644 --- a/api/inventorypb/services.pb.gw.go +++ b/api/inventorypb/services.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Services_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServicesRequest @@ -47,6 +45,7 @@ func request_Services_ListServices_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Services_ListServices_0(ctx context.Context, marshaler runtim msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err + } func request_Services_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Services_ListActiveServiceTypes_0(ctx context.Context, marshaler ru msg, err := client.ListActiveServiceTypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Services_ListActiveServiceTypes_0(ctx context.Context, marsha msg, err := server.ListActiveServiceTypes(ctx, &protoReq) return msg, metadata, err + } func request_Services_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Services_GetService_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Services_GetService_0(ctx context.Context, marshaler runtime. msg, err := server.GetService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddMySQLService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Services_AddMySQLService_0(ctx context.Context, marshaler runtime.M msg, err := client.AddMySQLService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddMySQLService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Services_AddMySQLService_0(ctx context.Context, marshaler run msg, err := server.AddMySQLService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddMongoDBService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Services_AddMongoDBService_0(ctx context.Context, marshaler runtime msg, err := client.AddMongoDBService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddMongoDBService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Services_AddMongoDBService_0(ctx context.Context, marshaler r msg, err := server.AddMongoDBService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddPostgreSQLService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Services_AddPostgreSQLService_0(ctx context.Context, marshaler runt msg, err := client.AddPostgreSQLService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddPostgreSQLService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Services_AddPostgreSQLService_0(ctx context.Context, marshale msg, err := server.AddPostgreSQLService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddProxySQLService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Services_AddProxySQLService_0(ctx context.Context, marshaler runtim msg, err := client.AddProxySQLService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddProxySQLService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Services_AddProxySQLService_0(ctx context.Context, marshaler msg, err := server.AddProxySQLService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddHAProxyService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_Services_AddHAProxyService_0(ctx context.Context, marshaler runtime msg, err := client.AddHAProxyService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddHAProxyService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_Services_AddHAProxyService_0(ctx context.Context, marshaler r msg, err := server.AddHAProxyService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddExternalService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -303,6 +317,7 @@ func request_Services_AddExternalService_0(ctx context.Context, marshaler runtim msg, err := client.AddExternalService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddExternalService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -319,6 +334,7 @@ func local_request_Services_AddExternalService_0(ctx context.Context, marshaler msg, err := server.AddExternalService(ctx, &protoReq) return msg, metadata, err + } func request_Services_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -335,6 +351,7 @@ func request_Services_RemoveService_0(ctx context.Context, marshaler runtime.Mar msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -351,6 +368,7 @@ func local_request_Services_RemoveService_0(ctx context.Context, marshaler runti msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err + } func request_Services_AddCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -367,6 +385,7 @@ func request_Services_AddCustomLabels_0(ctx context.Context, marshaler runtime.M msg, err := client.AddCustomLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_AddCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -383,6 +402,7 @@ func local_request_Services_AddCustomLabels_0(ctx context.Context, marshaler run msg, err := server.AddCustomLabels(ctx, &protoReq) return msg, metadata, err + } func request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -399,6 +419,7 @@ func request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler runtim msg, err := client.RemoveCustomLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -415,6 +436,7 @@ func local_request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler msg, err := server.RemoveCustomLabels(ctx, &protoReq) return msg, metadata, err + } // RegisterServicesHandlerServer registers the http handlers for service Services to "mux". @@ -422,6 +444,7 @@ func local_request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler // 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 RegisterServicesHandlerFromEndpoint instead. func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServicesServer) error { + mux.Handle("POST", pattern_Services_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -444,6 +467,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -468,6 +492,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -492,6 +517,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddMySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -516,6 +542,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddMySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddMongoDBService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -540,6 +567,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddMongoDBService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddPostgreSQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -564,6 +592,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddPostgreSQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddProxySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -588,6 +617,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddProxySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddHAProxyService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -612,6 +642,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddHAProxyService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddExternalService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -636,6 +667,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddExternalService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -660,6 +692,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -684,6 +717,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_RemoveCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -708,6 +742,7 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_RemoveCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -750,6 +785,7 @@ func RegisterServicesHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServicesClient" to call the correct interceptors. func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServicesClient) error { + mux.Handle("POST", pattern_Services_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -769,6 +805,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -790,6 +827,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -811,6 +849,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddMySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -832,6 +871,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddMySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddMongoDBService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -853,6 +893,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddMongoDBService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddPostgreSQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -874,6 +915,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddPostgreSQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddProxySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -895,6 +937,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddProxySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddHAProxyService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -916,6 +959,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddHAProxyService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddExternalService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -937,6 +981,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddExternalService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -958,6 +1003,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_AddCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -979,6 +1025,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Services_RemoveCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1000,6 +1047,7 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_RemoveCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/inventorypb/services.swagger.json b/api/inventorypb/services.swagger.json new file mode 100644 index 0000000000..b41244a52a --- /dev/null +++ b/api/inventorypb/services.swagger.json @@ -0,0 +1,1214 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventorypb/services.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Services" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/inventory/Services/AddExternalService": { + "post": { + "summary": "Add External Service", + "description": "Adds External Service.", + "operationId": "AddExternalService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddExternalServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddExternalServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/AddHAProxyService": { + "post": { + "summary": "Add HAProxy Service", + "description": "Adds HAProxy Service.", + "operationId": "AddHAProxyService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddHAProxyServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddHAProxyServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/AddMongoDB": { + "post": { + "summary": "Add MongoDB Service", + "description": "Adds MongoDB Service.", + "operationId": "AddMongoDBService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddMongoDBServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddMongoDBServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/AddMySQL": { + "post": { + "summary": "Add MySQL Service", + "description": "Adds MySQL Service.", + "operationId": "AddMySQLService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddMySQLServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddMySQLServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/AddPostgreSQL": { + "post": { + "summary": "Add PostgreSQL Service", + "description": "Adds PostgreSQL Service.", + "operationId": "AddPostgreSQLService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddPostgreSQLServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddPostgreSQLServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/AddProxySQL": { + "post": { + "summary": "Add ProxySQL Service", + "description": "Adds ProxySQL Service.", + "operationId": "AddProxySQLService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddProxySQLServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddProxySQLServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/CustomLabels/Add": { + "post": { + "summary": "Add/replace custom labels", + "description": "Adds or replaces (if the key exists) custom labels for a Service.", + "operationId": "AddCustomLabels", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryAddCustomLabelsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryAddCustomLabelsRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/CustomLabels/Remove": { + "post": { + "summary": "Remove custom labels", + "description": "Removes custom labels from a Service by key.", + "operationId": "RemoveCustomLabels", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryRemoveCustomLabelsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryRemoveCustomLabelsRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/Get": { + "post": { + "summary": "Get Service", + "description": "Returns a single Service by ID.", + "operationId": "GetService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryGetServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryGetServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/List": { + "post": { + "summary": "List Services", + "description": "Returns a list of Services filtered by type.", + "operationId": "ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryListServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryListServicesRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/ListTypes": { + "post": { + "summary": "List Active Service Types", + "description": "Returns a list of active Service types.", + "operationId": "ListActiveServiceTypes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryListActiveServiceTypesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryListActiveServiceTypesRequest" + } + } + ], + "tags": [ + "Services" + ] + } + }, + "/v1/inventory/Services/Remove": { + "post": { + "summary": "Remove Service", + "description": "Removes Service.", + "operationId": "RemoveService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/inventoryRemoveServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/inventoryRemoveServiceRequest" + } + } + ], + "tags": [ + "Services" + ] + } + } + }, + "definitions": { + "inventoryAddCustomLabelsRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique Service ID." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels to be added." + } + } + }, + "inventoryAddCustomLabelsResponse": { + "type": "object" + }, + "inventoryAddExternalServiceRequest": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "group": { + "type": "string", + "description": "Group name of external service." + } + } + }, + "inventoryAddExternalServiceResponse": { + "type": "object", + "properties": { + "external": { + "$ref": "#/definitions/inventoryExternalService" + } + } + }, + "inventoryAddHAProxyServiceRequest": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddHAProxyServiceResponse": { + "type": "object", + "properties": { + "haproxy": { + "$ref": "#/definitions/inventoryHAProxyService" + } + } + }, + "inventoryAddMongoDBServiceRequest": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddMongoDBServiceResponse": { + "type": "object", + "properties": { + "mongodb": { + "$ref": "#/definitions/inventoryMongoDBService" + } + } + }, + "inventoryAddMySQLServiceRequest": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddMySQLServiceResponse": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/inventoryMySQLService" + } + } + }, + "inventoryAddPostgreSQLServiceRequest": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddPostgreSQLServiceResponse": { + "type": "object", + "properties": { + "postgresql": { + "$ref": "#/definitions/inventoryPostgreSQLService" + } + } + }, + "inventoryAddProxySQLServiceRequest": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "inventoryAddProxySQLServiceResponse": { + "type": "object", + "properties": { + "proxysql": { + "$ref": "#/definitions/inventoryProxySQLService" + } + } + }, + "inventoryExternalService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "group": { + "type": "string", + "description": "Group name of external service." + } + }, + "description": "ExternalService represents a generic External service instance." + }, + "inventoryGetServiceRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + } + } + }, + "inventoryGetServiceResponse": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/inventoryMySQLService" + }, + "mongodb": { + "$ref": "#/definitions/inventoryMongoDBService" + }, + "postgresql": { + "$ref": "#/definitions/inventoryPostgreSQLService" + }, + "proxysql": { + "$ref": "#/definitions/inventoryProxySQLService" + }, + "haproxy": { + "$ref": "#/definitions/inventoryHAProxyService" + }, + "external": { + "$ref": "#/definitions/inventoryExternalService" + } + } + }, + "inventoryHAProxyService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "HAProxyService represents a generic HAProxy service instance." + }, + "inventoryListActiveServiceTypesRequest": { + "type": "object" + }, + "inventoryListActiveServiceTypesResponse": { + "type": "object", + "properties": { + "service_types": { + "type": "array", + "items": { + "$ref": "#/definitions/inventoryServiceType" + } + } + } + }, + "inventoryListServicesRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Return only Services running on that Node." + }, + "service_type": { + "$ref": "#/definitions/inventoryServiceType", + "description": "Return only services filtered by service type." + }, + "external_group": { + "type": "string", + "description": "Return only services in this external group." + } + } + }, + "inventoryListServicesResponse": { + "type": "object", + "properties": { + "mysql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryMySQLService" + } + }, + "mongodb": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryMongoDBService" + } + }, + "postgresql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryPostgreSQLService" + } + }, + "proxysql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryProxySQLService" + } + }, + "haproxy": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryHAProxyService" + } + }, + "external": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryExternalService" + } + } + } + }, + "inventoryMongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "inventoryMySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "inventoryPostgreSQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "PostgreSQLService represents a generic PostgreSQL instance." + }, + "inventoryProxySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "ProxySQLService represents a generic ProxySQL instance." + }, + "inventoryRemoveCustomLabelsRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique Service ID." + }, + "custom_label_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom user-assigned label keys to be removed." + } + } + }, + "inventoryRemoveCustomLabelsResponse": { + "type": "object" + }, + "inventoryRemoveServiceRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier. Required." + }, + "force": { + "type": "boolean", + "description": "Remove service with all dependencies." + } + } + }, + "inventoryRemoveServiceResponse": { + "type": "object" + }, + "inventoryServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_INVALID", + "MYSQL_SERVICE", + "MONGODB_SERVICE", + "POSTGRESQL_SERVICE", + "PROXYSQL_SERVICE", + "HAPROXY_SERVICE", + "EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_INVALID", + "description": "ServiceType describes supported Service types." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventorypb/services_grpc.pb.go b/api/inventorypb/services_grpc.pb.go index c1e42669ca..c140e5d001 100644 --- a/api/inventorypb/services_grpc.pb.go +++ b/api/inventorypb/services_grpc.pb.go @@ -8,7 +8,6 @@ package inventorypb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -212,52 +211,42 @@ type ServicesServer interface { } // UnimplementedServicesServer must be embedded to have forward compatible implementations. -type UnimplementedServicesServer struct{} +type UnimplementedServicesServer struct { +} func (UnimplementedServicesServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } - func (UnimplementedServicesServer) ListActiveServiceTypes(context.Context, *ListActiveServiceTypesRequest) (*ListActiveServiceTypesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListActiveServiceTypes not implemented") } - func (UnimplementedServicesServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") } - func (UnimplementedServicesServer) AddMySQLService(context.Context, *AddMySQLServiceRequest) (*AddMySQLServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMySQLService not implemented") } - func (UnimplementedServicesServer) AddMongoDBService(context.Context, *AddMongoDBServiceRequest) (*AddMongoDBServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMongoDBService not implemented") } - func (UnimplementedServicesServer) AddPostgreSQLService(context.Context, *AddPostgreSQLServiceRequest) (*AddPostgreSQLServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPostgreSQLService not implemented") } - func (UnimplementedServicesServer) AddProxySQLService(context.Context, *AddProxySQLServiceRequest) (*AddProxySQLServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQLService not implemented") } - func (UnimplementedServicesServer) AddHAProxyService(context.Context, *AddHAProxyServiceRequest) (*AddHAProxyServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddHAProxyService not implemented") } - func (UnimplementedServicesServer) AddExternalService(context.Context, *AddExternalServiceRequest) (*AddExternalServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternalService not implemented") } - func (UnimplementedServicesServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } - func (UnimplementedServicesServer) AddCustomLabels(context.Context, *AddCustomLabelsRequest) (*AddCustomLabelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddCustomLabels not implemented") } - func (UnimplementedServicesServer) RemoveCustomLabels(context.Context, *RemoveCustomLabelsRequest) (*RemoveCustomLabelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveCustomLabels not implemented") } diff --git a/api/managementpb/actions.pb.go b/api/managementpb/actions.pb.go index bbfaffae1a..be49601765 100644 --- a/api/managementpb/actions.pb.go +++ b/api/managementpb/actions.pb.go @@ -7,14 +7,13 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -2552,44 +2551,41 @@ func file_managementpb_actions_proto_rawDescGZIP() []byte { return file_managementpb_actions_proto_rawDescData } -var ( - file_managementpb_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 30) - file_managementpb_actions_proto_goTypes = []interface{}{ - (ActionType)(0), // 0: management.ActionType - (*GetActionRequest)(nil), // 1: management.GetActionRequest - (*GetActionResponse)(nil), // 2: management.GetActionResponse - (*StartMySQLExplainActionRequest)(nil), // 3: management.StartMySQLExplainActionRequest - (*StartMySQLExplainActionResponse)(nil), // 4: management.StartMySQLExplainActionResponse - (*StartMySQLExplainJSONActionRequest)(nil), // 5: management.StartMySQLExplainJSONActionRequest - (*StartMySQLExplainJSONActionResponse)(nil), // 6: management.StartMySQLExplainJSONActionResponse - (*StartMySQLExplainTraditionalJSONActionRequest)(nil), // 7: management.StartMySQLExplainTraditionalJSONActionRequest - (*StartMySQLExplainTraditionalJSONActionResponse)(nil), // 8: management.StartMySQLExplainTraditionalJSONActionResponse - (*StartMySQLShowCreateTableActionRequest)(nil), // 9: management.StartMySQLShowCreateTableActionRequest - (*StartMySQLShowCreateTableActionResponse)(nil), // 10: management.StartMySQLShowCreateTableActionResponse - (*StartMySQLShowTableStatusActionRequest)(nil), // 11: management.StartMySQLShowTableStatusActionRequest - (*StartMySQLShowTableStatusActionResponse)(nil), // 12: management.StartMySQLShowTableStatusActionResponse - (*StartMySQLShowIndexActionRequest)(nil), // 13: management.StartMySQLShowIndexActionRequest - (*StartMySQLShowIndexActionResponse)(nil), // 14: management.StartMySQLShowIndexActionResponse - (*StartPostgreSQLShowCreateTableActionRequest)(nil), // 15: management.StartPostgreSQLShowCreateTableActionRequest - (*StartPostgreSQLShowCreateTableActionResponse)(nil), // 16: management.StartPostgreSQLShowCreateTableActionResponse - (*StartPostgreSQLShowIndexActionRequest)(nil), // 17: management.StartPostgreSQLShowIndexActionRequest - (*StartPostgreSQLShowIndexActionResponse)(nil), // 18: management.StartPostgreSQLShowIndexActionResponse - (*StartMongoDBExplainActionRequest)(nil), // 19: management.StartMongoDBExplainActionRequest - (*StartMongoDBExplainActionResponse)(nil), // 20: management.StartMongoDBExplainActionResponse - (*StartPTSummaryActionRequest)(nil), // 21: management.StartPTSummaryActionRequest - (*StartPTSummaryActionResponse)(nil), // 22: management.StartPTSummaryActionResponse - (*StartPTPgSummaryActionRequest)(nil), // 23: management.StartPTPgSummaryActionRequest - (*StartPTPgSummaryActionResponse)(nil), // 24: management.StartPTPgSummaryActionResponse - (*StartPTMongoDBSummaryActionRequest)(nil), // 25: management.StartPTMongoDBSummaryActionRequest - (*StartPTMongoDBSummaryActionResponse)(nil), // 26: management.StartPTMongoDBSummaryActionResponse - (*StartPTMySQLSummaryActionRequest)(nil), // 27: management.StartPTMySQLSummaryActionRequest - (*StartPTMySQLSummaryActionResponse)(nil), // 28: management.StartPTMySQLSummaryActionResponse - (*CancelActionRequest)(nil), // 29: management.CancelActionRequest - (*CancelActionResponse)(nil), // 30: management.CancelActionResponse - } -) - +var file_managementpb_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_managementpb_actions_proto_goTypes = []interface{}{ + (ActionType)(0), // 0: management.ActionType + (*GetActionRequest)(nil), // 1: management.GetActionRequest + (*GetActionResponse)(nil), // 2: management.GetActionResponse + (*StartMySQLExplainActionRequest)(nil), // 3: management.StartMySQLExplainActionRequest + (*StartMySQLExplainActionResponse)(nil), // 4: management.StartMySQLExplainActionResponse + (*StartMySQLExplainJSONActionRequest)(nil), // 5: management.StartMySQLExplainJSONActionRequest + (*StartMySQLExplainJSONActionResponse)(nil), // 6: management.StartMySQLExplainJSONActionResponse + (*StartMySQLExplainTraditionalJSONActionRequest)(nil), // 7: management.StartMySQLExplainTraditionalJSONActionRequest + (*StartMySQLExplainTraditionalJSONActionResponse)(nil), // 8: management.StartMySQLExplainTraditionalJSONActionResponse + (*StartMySQLShowCreateTableActionRequest)(nil), // 9: management.StartMySQLShowCreateTableActionRequest + (*StartMySQLShowCreateTableActionResponse)(nil), // 10: management.StartMySQLShowCreateTableActionResponse + (*StartMySQLShowTableStatusActionRequest)(nil), // 11: management.StartMySQLShowTableStatusActionRequest + (*StartMySQLShowTableStatusActionResponse)(nil), // 12: management.StartMySQLShowTableStatusActionResponse + (*StartMySQLShowIndexActionRequest)(nil), // 13: management.StartMySQLShowIndexActionRequest + (*StartMySQLShowIndexActionResponse)(nil), // 14: management.StartMySQLShowIndexActionResponse + (*StartPostgreSQLShowCreateTableActionRequest)(nil), // 15: management.StartPostgreSQLShowCreateTableActionRequest + (*StartPostgreSQLShowCreateTableActionResponse)(nil), // 16: management.StartPostgreSQLShowCreateTableActionResponse + (*StartPostgreSQLShowIndexActionRequest)(nil), // 17: management.StartPostgreSQLShowIndexActionRequest + (*StartPostgreSQLShowIndexActionResponse)(nil), // 18: management.StartPostgreSQLShowIndexActionResponse + (*StartMongoDBExplainActionRequest)(nil), // 19: management.StartMongoDBExplainActionRequest + (*StartMongoDBExplainActionResponse)(nil), // 20: management.StartMongoDBExplainActionResponse + (*StartPTSummaryActionRequest)(nil), // 21: management.StartPTSummaryActionRequest + (*StartPTSummaryActionResponse)(nil), // 22: management.StartPTSummaryActionResponse + (*StartPTPgSummaryActionRequest)(nil), // 23: management.StartPTPgSummaryActionRequest + (*StartPTPgSummaryActionResponse)(nil), // 24: management.StartPTPgSummaryActionResponse + (*StartPTMongoDBSummaryActionRequest)(nil), // 25: management.StartPTMongoDBSummaryActionRequest + (*StartPTMongoDBSummaryActionResponse)(nil), // 26: management.StartPTMongoDBSummaryActionResponse + (*StartPTMySQLSummaryActionRequest)(nil), // 27: management.StartPTMySQLSummaryActionRequest + (*StartPTMySQLSummaryActionResponse)(nil), // 28: management.StartPTMySQLSummaryActionResponse + (*CancelActionRequest)(nil), // 29: management.CancelActionRequest + (*CancelActionResponse)(nil), // 30: management.CancelActionResponse +} var file_managementpb_actions_proto_depIdxs = []int32{ 1, // 0: management.Actions.GetAction:input_type -> management.GetActionRequest 3, // 1: management.Actions.StartMySQLExplainAction:input_type -> management.StartMySQLExplainActionRequest diff --git a/api/managementpb/actions.pb.gw.go b/api/managementpb/actions.pb.gw.go index afb3efb2f4..4df6a934e0 100644 --- a/api/managementpb/actions.pb.gw.go +++ b/api/managementpb/actions.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetActionRequest @@ -47,6 +45,7 @@ func request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.GetAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Ma msg, err := server.GetAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMySQLExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Actions_StartMySQLExplainAction_0(ctx context.Context, marshaler ru msg, err := client.StartMySQLExplainAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMySQLExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Actions_StartMySQLExplainAction_0(ctx context.Context, marsha msg, err := server.StartMySQLExplainAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, marshale msg, err := client.StartMySQLExplainJSONAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, ma msg, err := server.StartMySQLExplainJSONAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context.Contex msg, err := client.StartMySQLExplainTraditionalJSONAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context. msg, err := server.StartMySQLExplainTraditionalJSONAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context, mars msg, err := client.StartMySQLShowCreateTableAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context msg, err := server.StartMySQLShowCreateTableAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context, mars msg, err := client.StartMySQLShowTableStatusAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context msg, err := server.StartMySQLShowTableStatusAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, marshaler msg, err := client.StartMySQLShowIndexAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, mars msg, err := server.StartMySQLShowIndexAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Context, msg, err := client.StartPostgreSQLShowCreateTableAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Co msg, err := server.StartPostgreSQLShowCreateTableAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -303,6 +317,7 @@ func request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, marsh msg, err := client.StartPostgreSQLShowIndexAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -319,6 +334,7 @@ func local_request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, msg, err := server.StartPostgreSQLShowIndexAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartMongoDBExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -335,6 +351,7 @@ func request_Actions_StartMongoDBExplainAction_0(ctx context.Context, marshaler msg, err := client.StartMongoDBExplainAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartMongoDBExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -351,6 +368,7 @@ func local_request_Actions_StartMongoDBExplainAction_0(ctx context.Context, mars msg, err := server.StartMongoDBExplainAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -367,6 +385,7 @@ func request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler runti msg, err := client.StartPTSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -383,6 +402,7 @@ func local_request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler msg, err := server.StartPTSummaryAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -399,6 +419,7 @@ func request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshaler run msg, err := client.StartPTPgSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -415,6 +436,7 @@ func local_request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshal msg, err := server.StartPTPgSummaryAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -431,6 +453,7 @@ func request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, marshale msg, err := client.StartPTMongoDBSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -447,6 +470,7 @@ func local_request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, ma msg, err := server.StartPTMongoDBSummaryAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -463,6 +487,7 @@ func request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, marshaler msg, err := client.StartPTMySQLSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -479,6 +504,7 @@ func local_request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, mars msg, err := server.StartPTMySQLSummaryAction(ctx, &protoReq) return msg, metadata, err + } func request_Actions_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -495,6 +521,7 @@ func request_Actions_CancelAction_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.CancelAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Actions_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -511,6 +538,7 @@ func local_request_Actions_CancelAction_0(ctx context.Context, marshaler runtime msg, err := server.CancelAction(ctx, &protoReq) return msg, metadata, err + } // RegisterActionsHandlerServer registers the http handlers for service Actions to "mux". @@ -518,6 +546,7 @@ func local_request_Actions_CancelAction_0(ctx context.Context, marshaler runtime // 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 RegisterActionsHandlerFromEndpoint instead. func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ActionsServer) error { + mux.Handle("POST", pattern_Actions_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -540,6 +569,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -564,6 +594,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLExplainJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -588,6 +619,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLExplainJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLExplainTraditionalJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -612,6 +644,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLExplainTraditionalJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -636,6 +669,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLShowTableStatusAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -660,6 +694,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLShowTableStatusAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -684,6 +719,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -708,6 +744,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPostgreSQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -732,6 +769,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPostgreSQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMongoDBExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -756,6 +794,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMongoDBExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -780,6 +819,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTPgSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -804,6 +844,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTPgSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTMongoDBSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -828,6 +869,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTMongoDBSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTMySQLSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -852,6 +894,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTMySQLSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -876,6 +919,7 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -918,6 +962,7 @@ func RegisterActionsHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ActionsClient" to call the correct interceptors. func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ActionsClient) error { + mux.Handle("POST", pattern_Actions_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -937,6 +982,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -958,6 +1004,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLExplainJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -979,6 +1026,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLExplainJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLExplainTraditionalJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1000,6 +1048,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLExplainTraditionalJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1021,6 +1070,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLShowTableStatusAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1042,6 +1092,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLShowTableStatusAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMySQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1063,6 +1114,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1084,6 +1136,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPostgreSQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1105,6 +1158,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPostgreSQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartMongoDBExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1126,6 +1180,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMongoDBExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1147,6 +1202,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTPgSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1168,6 +1224,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTPgSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTMongoDBSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1189,6 +1246,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTMongoDBSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_StartPTMySQLSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1210,6 +1268,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTMySQLSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Actions_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1231,6 +1290,7 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/actions.swagger.json b/api/managementpb/actions.swagger.json new file mode 100644 index 0000000000..2b20e8358f --- /dev/null +++ b/api/managementpb/actions.swagger.json @@ -0,0 +1,1051 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/actions.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Actions" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Actions/Cancel": { + "post": { + "summary": "Cancel Action", + "description": "Stops an Action.", + "operationId": "CancelAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementCancelActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementCancelActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/Get": { + "post": { + "summary": "Get Action", + "description": "Gets the result of a given Action.", + "operationId": "GetAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementGetActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementGetActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMongoDBExplain": { + "post": { + "summary": "Start 'MongoDB EXPLAIN' Action", + "description": "Starts 'MongoDB EXPLAIN' Action.", + "operationId": "StartMongoDBExplainAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMongoDBExplainActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMongoDBExplainActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMySQLExplain": { + "post": { + "summary": "Start 'MySQL EXPLAIN' Action", + "description": "Starts 'MySQL EXPLAIN' Action with traditional output.", + "operationId": "StartMySQLExplainAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMySQLExplainActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMySQLExplainActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMySQLExplainJSON": { + "post": { + "summary": "Start 'MySQL EXPLAIN JSON' Action", + "description": "Starts 'MySQL EXPLAIN' Action with JSON output.", + "operationId": "StartMySQLExplainJSONAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMySQLExplainJSONActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMySQLExplainJSONActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMySQLExplainTraditionalJSON": { + "post": { + "summary": "Start 'MySQL EXPLAIN Traditional JSON' Action", + "description": "Starts 'MySQL EXPLAIN' Action with traditional JSON output.", + "operationId": "StartMySQLExplainTraditionalJSONAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMySQLExplainTraditionalJSONActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMySQLExplainTraditionalJSONActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMySQLShowCreateTable": { + "post": { + "summary": "Start 'MySQL SHOW CREATE TABLE' Action", + "description": "Starts 'MySQL SHOW CREATE TABLE' Action.", + "operationId": "StartMySQLShowCreateTableAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMySQLShowCreateTableActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMySQLShowCreateTableActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMySQLShowIndex": { + "post": { + "summary": "Start 'MySQL SHOW INDEX' Action", + "description": "Starts 'MySQL SHOW INDEX' Action.", + "operationId": "StartMySQLShowIndexAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMySQLShowIndexActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMySQLShowIndexActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartMySQLShowTableStatus": { + "post": { + "summary": "Start 'MySQL SHOW TABLE STATUS' Action", + "description": "Starts 'MySQL SHOW TABLE STATUS' Action.", + "operationId": "StartMySQLShowTableStatusAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartMySQLShowTableStatusActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartMySQLShowTableStatusActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartPTMongoDBSummary": { + "post": { + "summary": "Start 'PT MongoDB Summary' Action", + "description": "Starts 'Percona Toolkit MongoDB Summary' Action.", + "operationId": "StartPTMongoDBSummaryAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartPTMongoDBSummaryActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartPTMongoDBSummaryActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartPTMySQLSummary": { + "post": { + "summary": "Start 'PT MySQL Summary' Action", + "description": "Starts 'Percona Toolkit MySQL Summary' Action.", + "operationId": "StartPTMySQLSummaryAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartPTMySQLSummaryActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartPTMySQLSummaryActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartPTPgSummary": { + "post": { + "summary": "Start 'PT PostgreSQL Summary' Action", + "description": "Starts 'Percona Toolkit PostgreSQL Summary' Action.", + "operationId": "StartPTPgSummaryAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartPTPgSummaryActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartPTPgSummaryActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartPTSummary": { + "post": { + "summary": "Start 'PT Summary' Action", + "description": "Starts 'Percona Toolkit Summary' Action.", + "operationId": "StartPTSummaryAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartPTSummaryActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartPTSummaryActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartPostgreSQLShowCreateTable": { + "post": { + "summary": "Start 'PostgreSQL SHOW CREATE TABLE' Action", + "description": "Starts 'PostgreSQL SHOW CREATE TABLE' Action.", + "operationId": "StartPostgreSQLShowCreateTableAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartPostgreSQLShowCreateTableActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartPostgreSQLShowCreateTableActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + }, + "/v1/management/Actions/StartPostgreSQLShowIndex": { + "post": { + "summary": "Start 'PostgreSQL SHOW INDEX' Action", + "description": "Starts 'PostgreSQL SHOW INDEX' Action.", + "operationId": "StartPostgreSQLShowIndexAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartPostgreSQLShowIndexActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartPostgreSQLShowIndexActionRequest" + } + } + ], + "tags": [ + "Actions" + ] + } + } + }, + "definitions": { + "managementCancelActionRequest": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID. Required." + } + } + }, + "managementCancelActionResponse": { + "type": "object" + }, + "managementGetActionRequest": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + } + } + }, + "managementGetActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where this Action is running / was run." + }, + "output": { + "type": "string", + "description": "Current Action output; may be partial if Action is still running." + }, + "done": { + "type": "boolean", + "description": "True if Action is finished." + }, + "error": { + "type": "string", + "description": "Error message if Action failed." + } + } + }, + "managementStartMongoDBExplainActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query": { + "type": "string", + "description": "Query. Required." + } + } + }, + "managementStartMongoDBExplainActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartMySQLExplainActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query": { + "type": "string", + "description": "Deprecated: should not be used.\nWill be removed in 2.42." + }, + "query_id": { + "type": "string", + "description": "Query ID of query." + }, + "placeholders": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Array of placeholder values" + }, + "database": { + "type": "string", + "description": "Database name. Required if it can't be deduced from the query ID." + } + } + }, + "managementStartMySQLExplainActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartMySQLExplainJSONActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query": { + "type": "string", + "description": "Deprecated: should not be used.\nWill be removed in 2.42." + }, + "query_id": { + "type": "string", + "description": "Query ID of query." + }, + "placeholders": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Array of placeholder values" + }, + "database": { + "type": "string", + "description": "Database name. Required if it can't be deduced from the query ID." + } + } + }, + "managementStartMySQLExplainJSONActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartMySQLExplainTraditionalJSONActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query": { + "type": "string", + "description": "Deprecated: should not be used.\nWill be removed in 2.42." + }, + "query_id": { + "type": "string", + "description": "Query ID of query." + }, + "placeholders": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Array of placeholder values" + }, + "database": { + "type": "string", + "description": "Database name. Required if it can't be deduced from the query ID." + } + } + }, + "managementStartMySQLExplainTraditionalJSONActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartMySQLShowCreateTableActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "managementStartMySQLShowCreateTableActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartMySQLShowIndexActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "managementStartMySQLShowIndexActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartMySQLShowTableStatusActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "managementStartMySQLShowTableStatusActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartPTMongoDBSummaryActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action." + } + }, + "title": "Message to prepare pt-mongodb-summary data" + }, + "managementStartPTMongoDBSummaryActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + }, + "title": "Message to retrieve the prepared pt-mongodb-summary data" + }, + "managementStartPTMySQLSummaryActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action." + } + }, + "title": "Message to prepare pt-mysql-summary data" + }, + "managementStartPTMySQLSummaryActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + }, + "title": "Message to retrieve the prepared pt-mysql-summary data" + }, + "managementStartPTPgSummaryActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action." + } + }, + "title": "Message to prepare pt-pg-summary data" + }, + "managementStartPTPgSummaryActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + }, + "title": "Message to retrieve the prepared pt-pg-summary data" + }, + "managementStartPTSummaryActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "node_id": { + "type": "string", + "description": "Node ID for this Action." + } + } + }, + "managementStartPTSummaryActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartPostgreSQLShowCreateTableActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "managementStartPostgreSQLShowCreateTableActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "managementStartPostgreSQLShowIndexActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "managementStartPostgreSQLShowIndexActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/actions_grpc.pb.go b/api/managementpb/actions_grpc.pb.go index b06625ee9a..bd2f259f4e 100644 --- a/api/managementpb/actions_grpc.pb.go +++ b/api/managementpb/actions_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -254,64 +253,51 @@ type ActionsServer interface { } // UnimplementedActionsServer must be embedded to have forward compatible implementations. -type UnimplementedActionsServer struct{} +type UnimplementedActionsServer struct { +} func (UnimplementedActionsServer) GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAction not implemented") } - func (UnimplementedActionsServer) StartMySQLExplainAction(context.Context, *StartMySQLExplainActionRequest) (*StartMySQLExplainActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLExplainAction not implemented") } - func (UnimplementedActionsServer) StartMySQLExplainJSONAction(context.Context, *StartMySQLExplainJSONActionRequest) (*StartMySQLExplainJSONActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLExplainJSONAction not implemented") } - func (UnimplementedActionsServer) StartMySQLExplainTraditionalJSONAction(context.Context, *StartMySQLExplainTraditionalJSONActionRequest) (*StartMySQLExplainTraditionalJSONActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLExplainTraditionalJSONAction not implemented") } - func (UnimplementedActionsServer) StartMySQLShowCreateTableAction(context.Context, *StartMySQLShowCreateTableActionRequest) (*StartMySQLShowCreateTableActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLShowCreateTableAction not implemented") } - func (UnimplementedActionsServer) StartMySQLShowTableStatusAction(context.Context, *StartMySQLShowTableStatusActionRequest) (*StartMySQLShowTableStatusActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLShowTableStatusAction not implemented") } - func (UnimplementedActionsServer) StartMySQLShowIndexAction(context.Context, *StartMySQLShowIndexActionRequest) (*StartMySQLShowIndexActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLShowIndexAction not implemented") } - func (UnimplementedActionsServer) StartPostgreSQLShowCreateTableAction(context.Context, *StartPostgreSQLShowCreateTableActionRequest) (*StartPostgreSQLShowCreateTableActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPostgreSQLShowCreateTableAction not implemented") } - func (UnimplementedActionsServer) StartPostgreSQLShowIndexAction(context.Context, *StartPostgreSQLShowIndexActionRequest) (*StartPostgreSQLShowIndexActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPostgreSQLShowIndexAction not implemented") } - func (UnimplementedActionsServer) StartMongoDBExplainAction(context.Context, *StartMongoDBExplainActionRequest) (*StartMongoDBExplainActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMongoDBExplainAction not implemented") } - func (UnimplementedActionsServer) StartPTSummaryAction(context.Context, *StartPTSummaryActionRequest) (*StartPTSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTSummaryAction not implemented") } - func (UnimplementedActionsServer) StartPTPgSummaryAction(context.Context, *StartPTPgSummaryActionRequest) (*StartPTPgSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTPgSummaryAction not implemented") } - func (UnimplementedActionsServer) StartPTMongoDBSummaryAction(context.Context, *StartPTMongoDBSummaryActionRequest) (*StartPTMongoDBSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTMongoDBSummaryAction not implemented") } - func (UnimplementedActionsServer) StartPTMySQLSummaryAction(context.Context, *StartPTMySQLSummaryActionRequest) (*StartPTMySQLSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTMySQLSummaryAction not implemented") } - func (UnimplementedActionsServer) CancelAction(context.Context, *CancelActionRequest) (*CancelActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelAction not implemented") } diff --git a/api/managementpb/agent/agent.pb.go b/api/managementpb/agent/agent.pb.go index 319577f8b5..b25c55bd77 100644 --- a/api/managementpb/agent/agent.pb.go +++ b/api/managementpb/agent/agent.pb.go @@ -7,15 +7,14 @@ package agentv1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -1083,21 +1082,18 @@ func file_managementpb_agent_agent_proto_rawDescGZIP() []byte { return file_managementpb_agent_agent_proto_rawDescData } -var ( - file_managementpb_agent_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_managementpb_agent_agent_proto_goTypes = []interface{}{ - (*UniversalAgent)(nil), // 0: agent.v1beta1.UniversalAgent - (*ListAgentRequest)(nil), // 1: agent.v1beta1.ListAgentRequest - (*ListAgentResponse)(nil), // 2: agent.v1beta1.ListAgentResponse - (*UniversalAgent_MySQLOptions)(nil), // 3: agent.v1beta1.UniversalAgent.MySQLOptions - (*UniversalAgent_AzureOptions)(nil), // 4: agent.v1beta1.UniversalAgent.AzureOptions - (*UniversalAgent_MongoDBOptions)(nil), // 5: agent.v1beta1.UniversalAgent.MongoDBOptions - (*UniversalAgent_PostgreSQLOptions)(nil), // 6: agent.v1beta1.UniversalAgent.PostgreSQLOptions - nil, // 7: agent.v1beta1.UniversalAgent.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp - } -) - +var file_managementpb_agent_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_managementpb_agent_agent_proto_goTypes = []interface{}{ + (*UniversalAgent)(nil), // 0: agent.v1beta1.UniversalAgent + (*ListAgentRequest)(nil), // 1: agent.v1beta1.ListAgentRequest + (*ListAgentResponse)(nil), // 2: agent.v1beta1.ListAgentResponse + (*UniversalAgent_MySQLOptions)(nil), // 3: agent.v1beta1.UniversalAgent.MySQLOptions + (*UniversalAgent_AzureOptions)(nil), // 4: agent.v1beta1.UniversalAgent.AzureOptions + (*UniversalAgent_MongoDBOptions)(nil), // 5: agent.v1beta1.UniversalAgent.MongoDBOptions + (*UniversalAgent_PostgreSQLOptions)(nil), // 6: agent.v1beta1.UniversalAgent.PostgreSQLOptions + nil, // 7: agent.v1beta1.UniversalAgent.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp +} var file_managementpb_agent_agent_proto_depIdxs = []int32{ 4, // 0: agent.v1beta1.UniversalAgent.azure_options:type_name -> agent.v1beta1.UniversalAgent.AzureOptions 8, // 1: agent.v1beta1.UniversalAgent.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/agent/agent.pb.gw.go b/api/managementpb/agent/agent.pb.gw.go index 9329b46d39..f17cb9d1fc 100644 --- a/api/managementpb/agent/agent.pb.gw.go +++ b/api/managementpb/agent/agent.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentRequest @@ -47,6 +45,7 @@ func request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server AgentServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Mar msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err + } // RegisterAgentHandlerServer registers the http handlers for service Agent to "mux". @@ -70,6 +70,7 @@ func local_request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Mar // 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 RegisterAgentHandlerFromEndpoint instead. func RegisterAgentHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentServer) error { + mux.Handle("POST", pattern_Agent_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterAgentHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Agent_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterAgentHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentClient" to call the correct interceptors. func RegisterAgentHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentClient) error { + mux.Handle("POST", pattern_Agent_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterAgentHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Agent_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_Agent_ListAgents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Agent", "List"}, "")) +var ( + pattern_Agent_ListAgents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Agent", "List"}, "")) +) -var forward_Agent_ListAgents_0 = runtime.ForwardResponseMessage +var ( + forward_Agent_ListAgents_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/agent/agent.swagger.json b/api/managementpb/agent/agent.swagger.json new file mode 100644 index 0000000000..8f6404ed53 --- /dev/null +++ b/api/managementpb/agent/agent.swagger.json @@ -0,0 +1,386 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/agent/agent.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Agent" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Agent/List": { + "post": { + "summary": "List Agents", + "description": "Returns a filtered list of Agents.", + "operationId": "ListAgents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "Only one of the parameters below must be set.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListAgentRequest" + } + } + ], + "tags": [ + "Agent" + ] + } + } + }, + "definitions": { + "UniversalAgentAzureOptions": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "Azure client ID." + }, + "is_client_secret_set": { + "type": "boolean", + "description": "True if Azure client secret is set." + }, + "resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "subscription_id": { + "type": "string", + "description": "Azure subscription ID." + }, + "tenant_id": { + "type": "string", + "description": "Azure tenant ID." + } + } + }, + "UniversalAgentMongoDBOptions": { + "type": "object", + "properties": { + "is_tls_certificate_key_set": { + "type": "boolean", + "description": "True if TLS certificate is set." + }, + "is_tls_certificate_key_file_password_set": { + "type": "boolean", + "description": "True if TLS certificate file password is set." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "authentication_mechanism": { + "type": "string", + "description": "MongoDB auth mechanism." + }, + "authentication_database": { + "type": "string", + "description": "MongoDB auth database." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "description": "MongoDB stats collections." + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "description": "MongoDB collections limit." + }, + "enable_all_collectors": { + "type": "boolean", + "description": "True if all collectors are enabled." + } + } + }, + "UniversalAgentMySQLOptions": { + "type": "object", + "properties": { + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS certificate." + }, + "is_tls_key_set": { + "type": "boolean", + "description": "True if TLS key is set." + } + } + }, + "UniversalAgentPostgreSQLOptions": { + "type": "object", + "properties": { + "ssl_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "ssl_cert": { + "type": "string", + "description": "TLS certificate." + }, + "is_ssl_key_set": { + "type": "boolean", + "description": "True if TLS key is set." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1ListAgentRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Return only Agents that relate to a specific ServiceID." + }, + "node_id": { + "type": "string", + "description": "Return only Agents that relate to a specific NodeID." + } + }, + "description": "Only one of the parameters below must be set." + }, + "v1beta1ListAgentResponse": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1UniversalAgent" + }, + "description": "List of Agents." + } + } + }, + "v1beta1UniversalAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique agent identifier." + }, + "is_agent_password_set": { + "type": "boolean", + "description": "True if the agent password is set." + }, + "agent_type": { + "type": "string", + "description": "Agent type." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "is_aws_secret_key_set": { + "type": "boolean", + "description": "True if AWS Secret Key is set." + }, + "azure_options": { + "$ref": "#/definitions/UniversalAgentAzureOptions", + "description": "Options used for connecting to Azure." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "log_level": { + "type": "string", + "description": "Log level for exporter." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN." + }, + "max_query_log_size": { + "type": "string", + "format": "int64", + "description": "Limit query log size in QAN." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "metrics_scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "mongo_db_options": { + "$ref": "#/definitions/UniversalAgentMongoDBOptions", + "description": "TLS and other options for connecting to MongoDB." + }, + "mysql_options": { + "$ref": "#/definitions/UniversalAgentMySQLOptions", + "description": "TLS options for connecting to MySQL." + }, + "node_id": { + "type": "string", + "description": "A unique node identifier." + }, + "is_password_set": { + "type": "boolean", + "description": "True if password for connecting the agent to the database is set." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier." + }, + "postgresql_options": { + "$ref": "#/definitions/UniversalAgentPostgreSQLOptions", + "description": "TLS options for connecting to PostgreSQL." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "push_metrics": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "comments_parsing_disabled": { + "type": "boolean", + "description": "True if query comments parsing is disabled." + }, + "rds_basic_metrics_disabled": { + "type": "boolean", + "description": "True if RDS basic metrics are disdabled." + }, + "rds_enhanced_metrics_disabled": { + "type": "boolean", + "description": "True if RDS enhanced metrics are disdabled." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "status": { + "type": "string", + "description": "Actual Agent status." + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Last known table count." + }, + "table_count_tablestats_group_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "version": { + "type": "string", + "description": "Agent version." + }, + "is_connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + } + } + } + } +} diff --git a/api/managementpb/agent/agent_grpc.pb.go b/api/managementpb/agent/agent_grpc.pb.go index 3cecb4e31d..464719fa0d 100644 --- a/api/managementpb/agent/agent_grpc.pb.go +++ b/api/managementpb/agent/agent_grpc.pb.go @@ -8,7 +8,6 @@ package agentv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type AgentServer interface { } // UnimplementedAgentServer must be embedded to have forward compatible implementations. -type UnimplementedAgentServer struct{} +type UnimplementedAgentServer struct { +} func (UnimplementedAgentServer) ListAgents(context.Context, *ListAgentRequest) (*ListAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") diff --git a/api/managementpb/agent/json/client/agent/list_agents_parameters.go b/api/managementpb/agent/json/client/agent/list_agents_parameters.go index 5116dca42d..f74504e77b 100644 --- a/api/managementpb/agent/json/client/agent/list_agents_parameters.go +++ b/api/managementpb/agent/json/client/agent/list_agents_parameters.go @@ -60,6 +60,7 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { + /* Body. Only one of the parameters below must be set. @@ -132,6 +133,7 @@ func (o *ListAgentsParams) SetBody(body ListAgentsBody) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/agent/json/client/agent/list_agents_responses.go b/api/managementpb/agent/json/client/agent/list_agents_responses.go index 6143803fa9..9b049a10e6 100644 --- a/api/managementpb/agent/json/client/agent/list_agents_responses.go +++ b/api/managementpb/agent/json/client/agent/list_agents_responses.go @@ -61,12 +61,12 @@ type ListAgentsOK struct { func (o *ListAgentsOK) Error() string { return fmt.Sprintf("[POST /v1/management/Agent/List][%d] listAgentsOk %+v", 200, o.Payload) } - func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { return o.Payload } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *ListAgentsDefault) Code() int { func (o *ListAgentsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Agent/List][%d] ListAgents default %+v", o._statusCode, o.Payload) } - func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { return o.Payload } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -124,6 +124,7 @@ ListAgentsBody Only one of the parameters below must be set. swagger:model ListAgentsBody */ type ListAgentsBody struct { + // Return only Agents that relate to a specific ServiceID. ServiceID string `json:"service_id,omitempty"` @@ -164,6 +165,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -229,7 +231,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,6 +244,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -268,6 +273,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -305,6 +311,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // List of Agents. Agents []*ListAgentsOKBodyAgentsItems0 `json:"agents"` } @@ -364,7 +371,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -375,6 +384,7 @@ func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats st return err } } + } return nil @@ -403,6 +413,7 @@ ListAgentsOKBodyAgentsItems0 list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0 */ type ListAgentsOKBodyAgentsItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -686,6 +697,7 @@ func (o *ListAgentsOKBodyAgentsItems0) ContextValidate(ctx context.Context, form } func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { + if o.AzureOptions != nil { if err := o.AzureOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -701,6 +713,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBOptions != nil { if err := o.MongoDBOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -716,6 +729,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlOptions != nil { if err := o.MysqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -731,6 +745,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlOptions != nil { if err := o.PostgresqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -768,6 +783,7 @@ ListAgentsOKBodyAgentsItems0AzureOptions list agents OK body agents items0 azure swagger:model ListAgentsOKBodyAgentsItems0AzureOptions */ type ListAgentsOKBodyAgentsItems0AzureOptions struct { + // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -817,6 +833,7 @@ ListAgentsOKBodyAgentsItems0MongoDBOptions list agents OK body agents items0 mon swagger:model ListAgentsOKBodyAgentsItems0MongoDBOptions */ type ListAgentsOKBodyAgentsItems0MongoDBOptions struct { + // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -875,6 +892,7 @@ ListAgentsOKBodyAgentsItems0MysqlOptions list agents OK body agents items0 mysql swagger:model ListAgentsOKBodyAgentsItems0MysqlOptions */ type ListAgentsOKBodyAgentsItems0MysqlOptions struct { + // TLS CA certificate. TLSCa string `json:"tls_ca,omitempty"` @@ -918,6 +936,7 @@ ListAgentsOKBodyAgentsItems0PostgresqlOptions list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0PostgresqlOptions */ type ListAgentsOKBodyAgentsItems0PostgresqlOptions struct { + // TLS CA certificate. SslCa string `json:"ssl_ca,omitempty"` diff --git a/api/managementpb/alerting/alerting.pb.go b/api/managementpb/alerting/alerting.pb.go index 13ec12832d..2534a50d16 100644 --- a/api/managementpb/alerting/alerting.pb.go +++ b/api/managementpb/alerting/alerting.pb.go @@ -7,17 +7,15 @@ package alertingv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + managementpb "github.com/percona/pmm/api/managementpb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - managementpb "github.com/percona/pmm/api/managementpb" + reflect "reflect" + sync "sync" ) const ( @@ -1596,43 +1594,40 @@ func file_managementpb_alerting_alerting_proto_rawDescGZIP() []byte { return file_managementpb_alerting_alerting_proto_rawDescData } -var ( - file_managementpb_alerting_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_managementpb_alerting_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) - file_managementpb_alerting_alerting_proto_goTypes = []interface{}{ - (TemplateSource)(0), // 0: alerting.v1.TemplateSource - (FilterType)(0), // 1: alerting.v1.FilterType - (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition - (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition - (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition - (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition - (*Template)(nil), // 6: alerting.v1.Template - (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest - (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse - (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest - (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse - (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest - (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse - (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest - (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse - (*Filter)(nil), // 15: alerting.v1.Filter - (*ParamValue)(nil), // 16: alerting.v1.ParamValue - (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest - (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse - nil, // 19: alerting.v1.Template.LabelsEntry - nil, // 20: alerting.v1.Template.AnnotationsEntry - nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry - (managementpb.BooleanFlag)(0), // 22: managementpb.BooleanFlag - (ParamUnit)(0), // 23: alerting.v1.ParamUnit - (ParamType)(0), // 24: alerting.v1.ParamType - (*durationpb.Duration)(nil), // 25: google.protobuf.Duration - (managementpb.Severity)(0), // 26: management.Severity - (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp - (*managementpb.PageParams)(nil), // 28: management.PageParams - (*managementpb.PageTotals)(nil), // 29: management.PageTotals - } -) - +var file_managementpb_alerting_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_managementpb_alerting_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_managementpb_alerting_alerting_proto_goTypes = []interface{}{ + (TemplateSource)(0), // 0: alerting.v1.TemplateSource + (FilterType)(0), // 1: alerting.v1.FilterType + (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition + (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition + (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition + (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition + (*Template)(nil), // 6: alerting.v1.Template + (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest + (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse + (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest + (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse + (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest + (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse + (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest + (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse + (*Filter)(nil), // 15: alerting.v1.Filter + (*ParamValue)(nil), // 16: alerting.v1.ParamValue + (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest + (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse + nil, // 19: alerting.v1.Template.LabelsEntry + nil, // 20: alerting.v1.Template.AnnotationsEntry + nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry + (managementpb.BooleanFlag)(0), // 22: managementpb.BooleanFlag + (ParamUnit)(0), // 23: alerting.v1.ParamUnit + (ParamType)(0), // 24: alerting.v1.ParamType + (*durationpb.Duration)(nil), // 25: google.protobuf.Duration + (managementpb.Severity)(0), // 26: management.Severity + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp + (*managementpb.PageParams)(nil), // 28: management.PageParams + (*managementpb.PageTotals)(nil), // 29: management.PageTotals +} var file_managementpb_alerting_alerting_proto_depIdxs = []int32{ 22, // 0: alerting.v1.BoolParamDefinition.default:type_name -> managementpb.BooleanFlag 23, // 1: alerting.v1.ParamDefinition.unit:type_name -> alerting.v1.ParamUnit diff --git a/api/managementpb/alerting/alerting.pb.gw.go b/api/managementpb/alerting/alerting.pb.gw.go index 419b71ea2f..f79bc4ca0d 100644 --- a/api/managementpb/alerting/alerting.pb.gw.go +++ b/api/managementpb/alerting/alerting.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Alerting_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListTemplatesRequest @@ -47,6 +45,7 @@ func request_Alerting_ListTemplates_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ListTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerting_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Alerting_ListTemplates_0(ctx context.Context, marshaler runti msg, err := server.ListTemplates(ctx, &protoReq) return msg, metadata, err + } func request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runtime.Ma msg, err := client.CreateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runt msg, err := server.CreateTemplate(ctx, &protoReq) return msg, metadata, err + } func request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runtime.Ma msg, err := client.UpdateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runt msg, err := server.UpdateTemplate(ctx, &protoReq) return msg, metadata, err + } func request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runtime.Ma msg, err := client.DeleteTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runt msg, err := server.DeleteTemplate(ctx, &protoReq) return msg, metadata, err + } func request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.CreateRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime. msg, err := server.CreateRule(ctx, &protoReq) return msg, metadata, err + } // RegisterAlertingHandlerServer registers the http handlers for service Alerting to "mux". @@ -198,6 +206,7 @@ func local_request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime. // 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 RegisterAlertingHandlerFromEndpoint instead. func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertingServer) error { + mux.Handle("POST", pattern_Alerting_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -220,6 +229,7 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -244,6 +254,7 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -268,6 +279,7 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -292,6 +304,7 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -316,6 +329,7 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -358,6 +372,7 @@ func RegisterAlertingHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AlertingClient" to call the correct interceptors. func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertingClient) error { + mux.Handle("POST", pattern_Alerting_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -377,6 +392,7 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -398,6 +414,7 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -419,6 +436,7 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -440,6 +458,7 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerting_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -461,6 +480,7 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/alerting/alerting.swagger.json b/api/managementpb/alerting/alerting.swagger.json new file mode 100644 index 0000000000..3511f94c50 --- /dev/null +++ b/api/managementpb/alerting/alerting.swagger.json @@ -0,0 +1,632 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/alerting/alerting.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Alerting" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/alerting/Rules/Create": { + "post": { + "summary": "CreateRule creates alerting rule from the given template.", + "operationId": "CreateRule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateRuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateRuleRequest" + } + } + ], + "tags": [ + "Alerting" + ] + } + }, + "/v1/management/alerting/Templates/Create": { + "post": { + "summary": "CreateTemplate creates a new template.", + "operationId": "CreateTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateTemplateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateTemplateRequest" + } + } + ], + "tags": [ + "Alerting" + ] + } + }, + "/v1/management/alerting/Templates/Delete": { + "post": { + "summary": "DeleteTemplate deletes existing, previously created via API.", + "operationId": "DeleteTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteTemplateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DeleteTemplateRequest" + } + } + ], + "tags": [ + "Alerting" + ] + } + }, + "/v1/management/alerting/Templates/List": { + "post": { + "summary": "ListTemplates returns a list of all collected alert rule templates.", + "operationId": "ListTemplates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListTemplatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListTemplatesRequest" + } + } + ], + "tags": [ + "Alerting" + ] + } + }, + "/v1/management/alerting/Templates/Update": { + "post": { + "summary": "UpdateTemplate updates existing template, previously created via API.", + "operationId": "UpdateTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateTemplateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateTemplateRequest" + } + } + ], + "tags": [ + "Alerting" + ] + } + } + }, + "definitions": { + "managementPageParams": { + "type": "object", + "properties": { + "page_size": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results per page." + }, + "index": { + "type": "integer", + "format": "int32", + "description": "Index of the requested page, starts from 0." + } + }, + "description": "PageParams represents page request parameters for pagination." + }, + "managementPageTotals": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + } + }, + "description": "PageTotals represents total values for pagination." + }, + "managementSeverity": { + "type": "string", + "enum": [ + "SEVERITY_INVALID", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "default": "SEVERITY_INVALID", + "description": "Severity represents severity level of the check result or alert." + }, + "managementpbBooleanFlag": { + "type": "string", + "enum": [ + "DO_NOT_CHANGE", + "TRUE", + "FALSE" + ], + "default": "DO_NOT_CHANGE", + "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1BoolParamDefinition": { + "type": "object", + "properties": { + "default": { + "$ref": "#/definitions/managementpbBooleanFlag" + } + }, + "description": "BoolParamDefinition represents boolean parameter's default value." + }, + "v1CreateRuleRequest": { + "type": "object", + "properties": { + "template_name": { + "type": "string", + "description": "Template name." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "group": { + "type": "string", + "description": "Rule group name." + }, + "folder_uid": { + "type": "string", + "description": "Folder UID." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ParamValue" + }, + "description": "Rule parameters. All template parameters should be set." + }, + "for": { + "type": "string", + "description": "Rule duration. Should be set." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Rule severity. Should be set." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All custom labels to add or remove (with empty values) to default labels from template." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Filter" + }, + "description": "Filters." + } + } + }, + "v1CreateRuleResponse": { + "type": "object" + }, + "v1CreateTemplateRequest": { + "type": "object", + "properties": { + "yaml": { + "type": "string", + "description": "YAML template file content." + } + } + }, + "v1CreateTemplateResponse": { + "type": "object" + }, + "v1DeleteTemplateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1DeleteTemplateResponse": { + "type": "object" + }, + "v1Filter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/v1FilterType" + }, + "label": { + "type": "string" + }, + "regexp": { + "type": "string" + } + }, + "description": "Filter represents a single filter condition." + }, + "v1FilterType": { + "type": "string", + "enum": [ + "FILTER_TYPE_INVALID", + "MATCH", + "MISMATCH" + ], + "default": "FILTER_TYPE_INVALID", + "description": "FilterType represents filter matching type." + }, + "v1FloatParamDefinition": { + "type": "object", + "properties": { + "has_default": { + "type": "boolean", + "description": "True if default value is set." + }, + "default": { + "type": "number", + "format": "double", + "description": "Default value if has_default is true." + }, + "has_min": { + "type": "boolean", + "description": "True if minimal valid value is set." + }, + "min": { + "type": "number", + "format": "double", + "description": "Minimal valid value (inclusive) if has_min is true." + }, + "has_max": { + "type": "boolean", + "description": "True if maximal valid value is set." + }, + "max": { + "type": "number", + "format": "double", + "description": "Maximal valid value (inclusive) if has_max is true." + } + }, + "description": "FloatParamDefinition represents float parameter's default value and valid range." + }, + "v1ListTemplatesRequest": { + "type": "object", + "properties": { + "reload": { + "type": "boolean", + "description": "If true, template files will be re-read from disk." + }, + "page_params": { + "$ref": "#/definitions/managementPageParams", + "description": "Page request." + } + } + }, + "v1ListTemplatesResponse": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Template" + } + }, + "totals": { + "$ref": "#/definitions/managementPageTotals", + "description": "Total items and pages." + } + } + }, + "v1ParamDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "summary": { + "type": "string", + "description": "Short human-readable parameter summary." + }, + "unit": { + "$ref": "#/definitions/v1ParamUnit", + "description": "Parameter unit." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "$ref": "#/definitions/v1BoolParamDefinition", + "description": "Bool value." + }, + "float": { + "$ref": "#/definitions/v1FloatParamDefinition", + "description": "Float value." + }, + "string": { + "$ref": "#/definitions/v1StringParamDefinition", + "description": "String value." + } + }, + "description": "ParamDefinition represents a single query parameter." + }, + "v1ParamType": { + "type": "string", + "enum": [ + "PARAM_TYPE_INVALID", + "BOOL", + "FLOAT", + "STRING" + ], + "default": "PARAM_TYPE_INVALID", + "description": "ParamType represents template parameter type." + }, + "v1ParamUnit": { + "type": "string", + "enum": [ + "PARAM_UNIT_INVALID", + "PERCENTAGE", + "SECONDS" + ], + "default": "PARAM_UNIT_INVALID", + "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s" + }, + "v1ParamValue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "type": "boolean", + "description": "Bool value." + }, + "float": { + "type": "number", + "format": "double", + "description": "Float value." + }, + "string": { + "type": "string", + "description": "String value." + } + }, + "description": "ParamValue represents a single rule parameter value." + }, + "v1StringParamDefinition": { + "type": "object", + "properties": { + "has_default": { + "type": "boolean", + "description": "True if default value is set." + }, + "default": { + "type": "string", + "description": "Default value if has_default is true." + } + }, + "description": "StringParamDefinition represents string parameter's default value." + }, + "v1Template": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID)." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "expr": { + "type": "string", + "description": "PromQL query expression with templating parameters." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ParamDefinition" + }, + "description": "Query parameters definitions." + }, + "for": { + "type": "string", + "description": "Default duration value." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Severity." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels." + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations." + }, + "source": { + "$ref": "#/definitions/v1TemplateSource", + "description": "Template source. Only templates created via API can be updated or deleted via API." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Template creation time. Empty for built-in and SaaS templates." + }, + "yaml": { + "type": "string", + "description": "YAML template file content. Empty for built-in and SaaS templates." + } + }, + "description": "Template represents Alert Template that is used to create Alert Rule." + }, + "v1TemplateSource": { + "type": "string", + "enum": [ + "TEMPLATE_SOURCE_INVALID", + "BUILT_IN", + "SAAS", + "USER_FILE", + "USER_API" + ], + "default": "TEMPLATE_SOURCE_INVALID", + "description": "TemplateSource defines template source.\n\n - BUILT_IN: Template that is shipped with PMM Server releases.\n - SAAS: Template that is downloaded from check.percona.com.\n - USER_FILE: Templated loaded from user-suplied file.\n - USER_API: Templated created via API." + }, + "v1UpdateTemplateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID)." + }, + "yaml": { + "type": "string", + "description": "YAML template file content." + } + } + }, + "v1UpdateTemplateResponse": { + "type": "object" + } + } +} diff --git a/api/managementpb/alerting/alerting_grpc.pb.go b/api/managementpb/alerting/alerting_grpc.pb.go index cfde9b6503..d48af6785b 100644 --- a/api/managementpb/alerting/alerting_grpc.pb.go +++ b/api/managementpb/alerting/alerting_grpc.pb.go @@ -8,7 +8,6 @@ package alertingv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -114,24 +113,21 @@ type AlertingServer interface { } // UnimplementedAlertingServer must be embedded to have forward compatible implementations. -type UnimplementedAlertingServer struct{} +type UnimplementedAlertingServer struct { +} func (UnimplementedAlertingServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTemplates not implemented") } - func (UnimplementedAlertingServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*CreateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTemplate not implemented") } - func (UnimplementedAlertingServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*UpdateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTemplate not implemented") } - func (UnimplementedAlertingServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*DeleteTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTemplate not implemented") } - func (UnimplementedAlertingServer) CreateRule(context.Context, *CreateRuleRequest) (*CreateRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRule not implemented") } diff --git a/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go b/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go index 2ed45ff356..0a8a84af09 100644 --- a/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go @@ -60,6 +60,7 @@ CreateRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRuleParams struct { + // Body. Body CreateRuleBody @@ -129,6 +130,7 @@ func (o *CreateRuleParams) SetBody(body CreateRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/create_rule_responses.go b/api/managementpb/alerting/json/client/alerting/create_rule_responses.go index 645d3f8b71..635bb12234 100644 --- a/api/managementpb/alerting/json/client/alerting/create_rule_responses.go +++ b/api/managementpb/alerting/json/client/alerting/create_rule_responses.go @@ -62,12 +62,12 @@ type CreateRuleOK struct { func (o *CreateRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Rules/Create][%d] createRuleOk %+v", 200, o.Payload) } - func (o *CreateRuleOK) GetPayload() interface{} { return o.Payload } func (o *CreateRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *CreateRuleDefault) Code() int { func (o *CreateRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Rules/Create][%d] CreateRule default %+v", o._statusCode, o.Payload) } - func (o *CreateRuleDefault) GetPayload() *CreateRuleDefaultBody { return o.Payload } func (o *CreateRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRuleDefaultBody) // response payload @@ -123,6 +123,7 @@ CreateRuleBody create rule body swagger:model CreateRuleBody */ type CreateRuleBody struct { + // Template name. TemplateName string `json:"template_name,omitempty"` @@ -308,7 +309,9 @@ func (o *CreateRuleBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -319,13 +322,16 @@ func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strf return err } } + } return nil } func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +342,7 @@ func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats str return err } } + } return nil @@ -364,6 +371,7 @@ CreateRuleDefaultBody create rule default body swagger:model CreateRuleDefaultBody */ type CreateRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -429,7 +437,9 @@ func (o *CreateRuleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -440,6 +450,7 @@ func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -468,6 +479,7 @@ CreateRuleDefaultBodyDetailsItems0 create rule default body details items0 swagger:model CreateRuleDefaultBodyDetailsItems0 */ type CreateRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -505,6 +517,7 @@ CreateRuleParamsBodyFiltersItems0 Filter represents a single filter condition. swagger:model CreateRuleParamsBodyFiltersItems0 */ type CreateRuleParamsBodyFiltersItems0 struct { + // FilterType represents filter matching type. // Enum: [FILTER_TYPE_INVALID MATCH MISMATCH] Type *string `json:"type,omitempty"` @@ -603,6 +616,7 @@ CreateRuleParamsBodyParamsItems0 ParamValue represents a single rule parameter v swagger:model CreateRuleParamsBodyParamsItems0 */ type CreateRuleParamsBodyParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/alerting/json/client/alerting/create_template_parameters.go b/api/managementpb/alerting/json/client/alerting/create_template_parameters.go index 02a03694ee..b0f1301962 100644 --- a/api/managementpb/alerting/json/client/alerting/create_template_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/create_template_parameters.go @@ -60,6 +60,7 @@ CreateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateTemplateParams struct { + // Body. Body CreateTemplateBody @@ -129,6 +130,7 @@ func (o *CreateTemplateParams) SetBody(body CreateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *CreateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/create_template_responses.go b/api/managementpb/alerting/json/client/alerting/create_template_responses.go index ab5c000932..d567d92db9 100644 --- a/api/managementpb/alerting/json/client/alerting/create_template_responses.go +++ b/api/managementpb/alerting/json/client/alerting/create_template_responses.go @@ -60,12 +60,12 @@ type CreateTemplateOK struct { func (o *CreateTemplateOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Create][%d] createTemplateOk %+v", 200, o.Payload) } - func (o *CreateTemplateOK) GetPayload() interface{} { return o.Payload } func (o *CreateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *CreateTemplateDefault) Code() int { func (o *CreateTemplateDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Create][%d] CreateTemplate default %+v", o._statusCode, o.Payload) } - func (o *CreateTemplateDefault) GetPayload() *CreateTemplateDefaultBody { return o.Payload } func (o *CreateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateTemplateDefaultBody) // response payload @@ -121,6 +121,7 @@ CreateTemplateBody create template body swagger:model CreateTemplateBody */ type CreateTemplateBody struct { + // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -158,6 +159,7 @@ CreateTemplateDefaultBody create template default body swagger:model CreateTemplateDefaultBody */ type CreateTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *CreateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -262,6 +267,7 @@ CreateTemplateDefaultBodyDetailsItems0 create template default body details item swagger:model CreateTemplateDefaultBodyDetailsItems0 */ type CreateTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go b/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go index ba1bfb54cd..9a5fb37a1f 100644 --- a/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go @@ -60,6 +60,7 @@ DeleteTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteTemplateParams struct { + // Body. Body DeleteTemplateBody @@ -129,6 +130,7 @@ func (o *DeleteTemplateParams) SetBody(body DeleteTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/delete_template_responses.go b/api/managementpb/alerting/json/client/alerting/delete_template_responses.go index 07d858421d..83a429dc72 100644 --- a/api/managementpb/alerting/json/client/alerting/delete_template_responses.go +++ b/api/managementpb/alerting/json/client/alerting/delete_template_responses.go @@ -60,12 +60,12 @@ type DeleteTemplateOK struct { func (o *DeleteTemplateOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Delete][%d] deleteTemplateOk %+v", 200, o.Payload) } - func (o *DeleteTemplateOK) GetPayload() interface{} { return o.Payload } func (o *DeleteTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteTemplateDefault) Code() int { func (o *DeleteTemplateDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Delete][%d] DeleteTemplate default %+v", o._statusCode, o.Payload) } - func (o *DeleteTemplateDefault) GetPayload() *DeleteTemplateDefaultBody { return o.Payload } func (o *DeleteTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteTemplateDefaultBody) // response payload @@ -121,6 +121,7 @@ DeleteTemplateBody delete template body swagger:model DeleteTemplateBody */ type DeleteTemplateBody struct { + // name Name string `json:"name,omitempty"` } @@ -158,6 +159,7 @@ DeleteTemplateDefaultBody delete template default body swagger:model DeleteTemplateDefaultBody */ type DeleteTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *DeleteTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -262,6 +267,7 @@ DeleteTemplateDefaultBodyDetailsItems0 delete template default body details item swagger:model DeleteTemplateDefaultBodyDetailsItems0 */ type DeleteTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go b/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go index c8054173a2..5d959c0791 100644 --- a/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go @@ -60,6 +60,7 @@ ListTemplatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListTemplatesParams struct { + // Body. Body ListTemplatesBody @@ -129,6 +130,7 @@ func (o *ListTemplatesParams) SetBody(body ListTemplatesBody) { // WriteToRequest writes these params to a swagger request func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/list_templates_responses.go b/api/managementpb/alerting/json/client/alerting/list_templates_responses.go index a4f455229a..28dadd7741 100644 --- a/api/managementpb/alerting/json/client/alerting/list_templates_responses.go +++ b/api/managementpb/alerting/json/client/alerting/list_templates_responses.go @@ -62,12 +62,12 @@ type ListTemplatesOK struct { func (o *ListTemplatesOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/List][%d] listTemplatesOk %+v", 200, o.Payload) } - func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody { return o.Payload } func (o *ListTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListTemplatesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListTemplatesDefault) Code() int { func (o *ListTemplatesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/List][%d] ListTemplates default %+v", o._statusCode, o.Payload) } - func (o *ListTemplatesDefault) GetPayload() *ListTemplatesDefaultBody { return o.Payload } func (o *ListTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListTemplatesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListTemplatesBody list templates body swagger:model ListTemplatesBody */ type ListTemplatesBody struct { + // If true, template files will be re-read from disk. Reload bool `json:"reload,omitempty"` @@ -180,6 +181,7 @@ func (o *ListTemplatesBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ListTemplatesBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { + if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ ListTemplatesDefaultBody list templates default body swagger:model ListTemplatesDefaultBody */ type ListTemplatesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *ListTemplatesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -321,6 +327,7 @@ ListTemplatesDefaultBodyDetailsItems0 list templates default body details items0 swagger:model ListTemplatesDefaultBodyDetailsItems0 */ type ListTemplatesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ ListTemplatesOKBody list templates OK body swagger:model ListTemplatesOKBody */ type ListTemplatesOKBody struct { + // templates Templates []*ListTemplatesOKBodyTemplatesItems0 `json:"templates"` @@ -447,7 +455,9 @@ func (o *ListTemplatesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Templates); i++ { + if o.Templates[i] != nil { if err := o.Templates[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -458,12 +468,14 @@ func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, form return err } } + } return nil } func (o *ListTemplatesOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -501,6 +513,7 @@ ListTemplatesOKBodyTemplatesItems0 Template represents Alert Template that is us swagger:model ListTemplatesOKBodyTemplatesItems0 */ type ListTemplatesOKBodyTemplatesItems0 struct { + // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -736,7 +749,9 @@ func (o *ListTemplatesOKBodyTemplatesItems0) ContextValidate(ctx context.Context } func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -747,6 +762,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.C return err } } + } return nil @@ -775,6 +791,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0 ParamDefinition represents a sing swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0 */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -1006,6 +1023,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) ContextValidate(ctx con } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { + if o.Bool != nil { if err := o.Bool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1021,6 +1039,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { + if o.Float != nil { if err := o.Float.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1036,6 +1055,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ct } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { + if o.String != nil { if err := o.String.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1073,6 +1093,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool BoolParamDefinition represent swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool struct { + // BooleanFlag represent a command to set some boolean property to true, // to false, or avoid changing that property. // @@ -1170,6 +1191,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Float FloatParamDefinition represe swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Float */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Float struct { + // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -1222,6 +1244,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0String StringParamDefinition repre swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0String */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0String struct { + // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -1262,6 +1285,7 @@ ListTemplatesOKBodyTotals PageTotals represents total values for pagination. swagger:model ListTemplatesOKBodyTotals */ type ListTemplatesOKBodyTotals struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -1302,6 +1326,7 @@ ListTemplatesParamsBodyPageParams PageParams represents page request parameters swagger:model ListTemplatesParamsBodyPageParams */ type ListTemplatesParamsBodyPageParams struct { + // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/alerting/json/client/alerting/update_template_parameters.go b/api/managementpb/alerting/json/client/alerting/update_template_parameters.go index 9fa2d67282..2b82bcdeed 100644 --- a/api/managementpb/alerting/json/client/alerting/update_template_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/update_template_parameters.go @@ -60,6 +60,7 @@ UpdateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateTemplateParams struct { + // Body. Body UpdateTemplateBody @@ -129,6 +130,7 @@ func (o *UpdateTemplateParams) SetBody(body UpdateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/update_template_responses.go b/api/managementpb/alerting/json/client/alerting/update_template_responses.go index 242e579151..7095421648 100644 --- a/api/managementpb/alerting/json/client/alerting/update_template_responses.go +++ b/api/managementpb/alerting/json/client/alerting/update_template_responses.go @@ -60,12 +60,12 @@ type UpdateTemplateOK struct { func (o *UpdateTemplateOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Update][%d] updateTemplateOk %+v", 200, o.Payload) } - func (o *UpdateTemplateOK) GetPayload() interface{} { return o.Payload } func (o *UpdateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *UpdateTemplateDefault) Code() int { func (o *UpdateTemplateDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Update][%d] UpdateTemplate default %+v", o._statusCode, o.Payload) } - func (o *UpdateTemplateDefault) GetPayload() *UpdateTemplateDefaultBody { return o.Payload } func (o *UpdateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateTemplateDefaultBody) // response payload @@ -121,6 +121,7 @@ UpdateTemplateBody update template body swagger:model UpdateTemplateBody */ type UpdateTemplateBody struct { + // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -161,6 +162,7 @@ UpdateTemplateDefaultBody update template default body swagger:model UpdateTemplateDefaultBody */ type UpdateTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *UpdateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -265,6 +270,7 @@ UpdateTemplateDefaultBodyDetailsItems0 update template default body details item swagger:model UpdateTemplateDefaultBodyDetailsItems0 */ type UpdateTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/alerting/params.pb.go b/api/managementpb/alerting/params.pb.go index 3d4682a0da..7859856f54 100644 --- a/api/managementpb/alerting/params.pb.go +++ b/api/managementpb/alerting/params.pb.go @@ -7,11 +7,10 @@ package alertingv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -167,14 +166,11 @@ func file_managementpb_alerting_params_proto_rawDescGZIP() []byte { return file_managementpb_alerting_params_proto_rawDescData } -var ( - file_managementpb_alerting_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_managementpb_alerting_params_proto_goTypes = []interface{}{ - (ParamUnit)(0), // 0: alerting.v1.ParamUnit - (ParamType)(0), // 1: alerting.v1.ParamType - } -) - +var file_managementpb_alerting_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_managementpb_alerting_params_proto_goTypes = []interface{}{ + (ParamUnit)(0), // 0: alerting.v1.ParamUnit + (ParamType)(0), // 1: alerting.v1.ParamType +} var file_managementpb_alerting_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/alerting/params.swagger.json b/api/managementpb/alerting/params.swagger.json new file mode 100644 index 0000000000..20cda5af4f --- /dev/null +++ b/api/managementpb/alerting/params.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/alerting/params.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/annotation.pb.go b/api/managementpb/annotation.pb.go index fa05f9da7c..52c6900b0b 100644 --- a/api/managementpb/annotation.pb.go +++ b/api/managementpb/annotation.pb.go @@ -7,14 +7,13 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -196,14 +195,11 @@ func file_managementpb_annotation_proto_rawDescGZIP() []byte { return file_managementpb_annotation_proto_rawDescData } -var ( - file_managementpb_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_managementpb_annotation_proto_goTypes = []interface{}{ - (*AddAnnotationRequest)(nil), // 0: management.AddAnnotationRequest - (*AddAnnotationResponse)(nil), // 1: management.AddAnnotationResponse - } -) - +var file_managementpb_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_managementpb_annotation_proto_goTypes = []interface{}{ + (*AddAnnotationRequest)(nil), // 0: management.AddAnnotationRequest + (*AddAnnotationResponse)(nil), // 1: management.AddAnnotationResponse +} var file_managementpb_annotation_proto_depIdxs = []int32{ 0, // 0: management.Annotation.AddAnnotation:input_type -> management.AddAnnotationRequest 1, // 1: management.Annotation.AddAnnotation:output_type -> management.AddAnnotationResponse diff --git a/api/managementpb/annotation.pb.gw.go b/api/managementpb/annotation.pb.gw.go index ebcf79c3f5..8231c499d8 100644 --- a/api/managementpb/annotation.pb.gw.go +++ b/api/managementpb/annotation.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Annotation_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, client AnnotationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddAnnotationRequest @@ -47,6 +45,7 @@ func request_Annotation_AddAnnotation_0(ctx context.Context, marshaler runtime.M msg, err := client.AddAnnotation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Annotation_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, server AnnotationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Annotation_AddAnnotation_0(ctx context.Context, marshaler run msg, err := server.AddAnnotation(ctx, &protoReq) return msg, metadata, err + } // RegisterAnnotationHandlerServer registers the http handlers for service Annotation to "mux". @@ -70,6 +70,7 @@ func local_request_Annotation_AddAnnotation_0(ctx context.Context, marshaler run // 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 RegisterAnnotationHandlerFromEndpoint instead. func RegisterAnnotationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AnnotationServer) error { + mux.Handle("POST", pattern_Annotation_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterAnnotationHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Annotation_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterAnnotationHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AnnotationClient" to call the correct interceptors. func RegisterAnnotationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AnnotationClient) error { + mux.Handle("POST", pattern_Annotation_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterAnnotationHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Annotation_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_Annotation_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) +var ( + pattern_Annotation_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) +) -var forward_Annotation_AddAnnotation_0 = runtime.ForwardResponseMessage +var ( + forward_Annotation_AddAnnotation_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/annotation.swagger.json b/api/managementpb/annotation.swagger.json new file mode 100644 index 0000000000..406d94b17a --- /dev/null +++ b/api/managementpb/annotation.swagger.json @@ -0,0 +1,116 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/annotation.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Annotation" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Annotations/Add": { + "post": { + "summary": "Add Annotation", + "description": "Adds annotation.", + "operationId": "AddAnnotation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddAnnotationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "AddAnnotationRequest is a params to add new annotation.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddAnnotationRequest" + } + } + ], + "tags": [ + "Annotation" + ] + } + } + }, + "definitions": { + "managementAddAnnotationRequest": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "An annotation description. Required." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags are used to filter annotations." + }, + "node_name": { + "type": "string", + "description": "Used for annotate node." + }, + "service_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Used for annotate services." + } + }, + "description": "AddAnnotationRequest is a params to add new annotation." + }, + "managementAddAnnotationResponse": { + "type": "object" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/annotation_grpc.pb.go b/api/managementpb/annotation_grpc.pb.go index f89e1b16eb..1b72842841 100644 --- a/api/managementpb/annotation_grpc.pb.go +++ b/api/managementpb/annotation_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type AnnotationServer interface { } // UnimplementedAnnotationServer must be embedded to have forward compatible implementations. -type UnimplementedAnnotationServer struct{} +type UnimplementedAnnotationServer struct { +} func (UnimplementedAnnotationServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAnnotation not implemented") diff --git a/api/managementpb/azure/azure.pb.go b/api/managementpb/azure/azure.pb.go index 6bbdd4e895..849dd321da 100644 --- a/api/managementpb/azure/azure.pb.go +++ b/api/managementpb/azure/azure.pb.go @@ -7,13 +7,12 @@ package azurev1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -825,20 +824,17 @@ func file_managementpb_azure_azure_proto_rawDescGZIP() []byte { return file_managementpb_azure_azure_proto_rawDescData } -var ( - file_managementpb_azure_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_azure_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_managementpb_azure_azure_proto_goTypes = []interface{}{ - (DiscoverAzureDatabaseType)(0), // 0: azure.v1beta1.DiscoverAzureDatabaseType - (*DiscoverAzureDatabaseRequest)(nil), // 1: azure.v1beta1.DiscoverAzureDatabaseRequest - (*DiscoverAzureDatabaseInstance)(nil), // 2: azure.v1beta1.DiscoverAzureDatabaseInstance - (*DiscoverAzureDatabaseResponse)(nil), // 3: azure.v1beta1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseRequest)(nil), // 4: azure.v1beta1.AddAzureDatabaseRequest - (*AddAzureDatabaseResponse)(nil), // 5: azure.v1beta1.AddAzureDatabaseResponse - nil, // 6: azure.v1beta1.AddAzureDatabaseRequest.CustomLabelsEntry - } -) - +var file_managementpb_azure_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_azure_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_managementpb_azure_azure_proto_goTypes = []interface{}{ + (DiscoverAzureDatabaseType)(0), // 0: azure.v1beta1.DiscoverAzureDatabaseType + (*DiscoverAzureDatabaseRequest)(nil), // 1: azure.v1beta1.DiscoverAzureDatabaseRequest + (*DiscoverAzureDatabaseInstance)(nil), // 2: azure.v1beta1.DiscoverAzureDatabaseInstance + (*DiscoverAzureDatabaseResponse)(nil), // 3: azure.v1beta1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseRequest)(nil), // 4: azure.v1beta1.AddAzureDatabaseRequest + (*AddAzureDatabaseResponse)(nil), // 5: azure.v1beta1.AddAzureDatabaseResponse + nil, // 6: azure.v1beta1.AddAzureDatabaseRequest.CustomLabelsEntry +} var file_managementpb_azure_azure_proto_depIdxs = []int32{ 0, // 0: azure.v1beta1.DiscoverAzureDatabaseInstance.type:type_name -> azure.v1beta1.DiscoverAzureDatabaseType 2, // 1: azure.v1beta1.DiscoverAzureDatabaseResponse.azure_database_instance:type_name -> azure.v1beta1.DiscoverAzureDatabaseInstance diff --git a/api/managementpb/azure/azure.pb.gw.go b/api/managementpb/azure/azure.pb.gw.go index 07de32ff10..143120c58a 100644 --- a/api/managementpb/azure/azure.pb.gw.go +++ b/api/managementpb/azure/azure.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client AzureDatabaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DiscoverAzureDatabaseRequest @@ -47,6 +45,7 @@ func request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, marshale msg, err := client.DiscoverAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server AzureDatabaseServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, ma msg, err := server.DiscoverAzureDatabase(ctx, &protoReq) return msg, metadata, err + } func request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client AzureDatabaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshaler run msg, err := client.AddAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server AzureDatabaseServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshal msg, err := server.AddAzureDatabase(ctx, &protoReq) return msg, metadata, err + } // RegisterAzureDatabaseHandlerServer registers the http handlers for service AzureDatabase to "mux". @@ -102,6 +104,7 @@ func local_request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshal // 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 RegisterAzureDatabaseHandlerFromEndpoint instead. func RegisterAzureDatabaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AzureDatabaseServer) error { + mux.Handle("POST", pattern_AzureDatabase_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -124,6 +127,7 @@ func RegisterAzureDatabaseHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AzureDatabase_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -148,6 +152,7 @@ func RegisterAzureDatabaseHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -190,6 +195,7 @@ func RegisterAzureDatabaseHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AzureDatabaseClient" to call the correct interceptors. func RegisterAzureDatabaseHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AzureDatabaseClient) error { + mux.Handle("POST", pattern_AzureDatabase_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -209,6 +215,7 @@ func RegisterAzureDatabaseHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AzureDatabase_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -230,6 +237,7 @@ func RegisterAzureDatabaseHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/azure/azure.swagger.json b/api/managementpb/azure/azure.swagger.json new file mode 100644 index 0000000000..ef81b88b38 --- /dev/null +++ b/api/managementpb/azure/azure.swagger.json @@ -0,0 +1,321 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/azure/azure.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AzureDatabase" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/azure/AzureDatabase/Add": { + "post": { + "summary": "AddAzureDatabase adds Azure Database instance.", + "operationId": "AddAzureDatabase", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1AddAzureDatabaseResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1AddAzureDatabaseRequest" + } + } + ], + "tags": [ + "AzureDatabase" + ] + } + }, + "/v1/management/azure/AzureDatabase/Discover": { + "post": { + "summary": "DiscoverAzureDatabase discovers Azure Database for MySQL, MariaDB and PostgreSQL Server instances.", + "operationId": "DiscoverAzureDatabase", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "DiscoverAzureDatabaseRequest discover azure databases request.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseRequest" + } + } + ], + "tags": [ + "AzureDatabase" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1AddAzureDatabaseRequest": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "Azure database location." + }, + "az": { + "type": "string", + "description": "Azure database availability zone." + }, + "instance_id": { + "type": "string", + "description": "Azure database instance ID." + }, + "node_model": { + "type": "string", + "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name. Defaults to Azure Database instance ID." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Defaults to Azure Database instance ID." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "username": { + "type": "string", + "description": "Username for scraping metrics." + }, + "password": { + "type": "string", + "description": "Password for scraping metrics." + }, + "azure_client_id": { + "type": "string", + "description": "Azure client ID." + }, + "azure_client_secret": { + "type": "string", + "description": "Azure client secret." + }, + "azure_tenant_id": { + "type": "string", + "description": "Azure tanant ID." + }, + "azure_subscription_id": { + "type": "string", + "description": "Azure subscription ID." + }, + "azure_resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "azure_database_exporter": { + "type": "boolean", + "description": "If true, adds azure_database_exporter." + }, + "qan": { + "type": "boolean", + "description": "If true, adds qan-mysql-perfschema-agent or qan-postgresql-pgstatements-agent." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node and Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them." + }, + "type": { + "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseType", + "title": "Azure database resource type (mysql, maria, postgres)" + } + } + }, + "v1beta1AddAzureDatabaseResponse": { + "type": "object" + }, + "v1beta1DiscoverAzureDatabaseInstance": { + "type": "object", + "properties": { + "instance_id": { + "type": "string", + "description": "Azure database instance ID." + }, + "region": { + "type": "string", + "description": "Azure database location." + }, + "service_name": { + "type": "string", + "description": "Azure database server name." + }, + "username": { + "type": "string", + "description": "Database username." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "azure_resource_group": { + "type": "string", + "description": "Azure Resource group." + }, + "environment": { + "type": "string", + "description": "Environment tag." + }, + "type": { + "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseType", + "description": "Database type." + }, + "az": { + "type": "string", + "description": "Azure database availability zone." + }, + "node_model": { + "type": "string", + "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku." + } + }, + "description": "DiscoverAzureDatabaseInstance models an unique Azure Database instance for the list of instances returned by Discovery." + }, + "v1beta1DiscoverAzureDatabaseRequest": { + "type": "object", + "properties": { + "azure_client_id": { + "type": "string", + "description": "Azure client ID." + }, + "azure_client_secret": { + "type": "string", + "description": "Azure client secret." + }, + "azure_tenant_id": { + "type": "string", + "description": "Azure tanant ID." + }, + "azure_subscription_id": { + "type": "string", + "description": "Azure subscription ID." + } + }, + "description": "DiscoverAzureDatabaseRequest discover azure databases request." + }, + "v1beta1DiscoverAzureDatabaseResponse": { + "type": "object", + "properties": { + "azure_database_instance": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseInstance" + } + } + }, + "description": "DiscoverAzureDatabaseResponse discover azure databases response." + }, + "v1beta1DiscoverAzureDatabaseType": { + "type": "string", + "enum": [ + "DISCOVER_AZURE_DATABASE_TYPE_INVALID", + "DISCOVER_AZURE_DATABASE_TYPE_MYSQL", + "DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL" + ], + "default": "DISCOVER_AZURE_DATABASE_TYPE_INVALID", + "description": "DiscoverAzureDatabaseType describes supported Azure Database instance engines.\n\n - DISCOVER_AZURE_DATABASE_TYPE_MYSQL: MySQL type: microsoft.dbformysql or MariaDB type: microsoft.dbformariadb\n - DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL: PostgreSQL type: microsoft.dbformysql" + } + } +} diff --git a/api/managementpb/azure/azure_grpc.pb.go b/api/managementpb/azure/azure_grpc.pb.go index 0174809115..0771345fb9 100644 --- a/api/managementpb/azure/azure_grpc.pb.go +++ b/api/managementpb/azure/azure_grpc.pb.go @@ -8,7 +8,6 @@ package azurev1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -72,12 +71,12 @@ type AzureDatabaseServer interface { } // UnimplementedAzureDatabaseServer must be embedded to have forward compatible implementations. -type UnimplementedAzureDatabaseServer struct{} +type UnimplementedAzureDatabaseServer struct { +} func (UnimplementedAzureDatabaseServer) DiscoverAzureDatabase(context.Context, *DiscoverAzureDatabaseRequest) (*DiscoverAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverAzureDatabase not implemented") } - func (UnimplementedAzureDatabaseServer) AddAzureDatabase(context.Context, *AddAzureDatabaseRequest) (*AddAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAzureDatabase not implemented") } diff --git a/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go b/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go index 0eb4da68c3..416354a45e 100644 --- a/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go +++ b/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go @@ -60,6 +60,7 @@ AddAzureDatabaseParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAzureDatabaseParams struct { + // Body. Body AddAzureDatabaseBody @@ -129,6 +130,7 @@ func (o *AddAzureDatabaseParams) SetBody(body AddAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go b/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go index 84dff23137..e07c79a6d6 100644 --- a/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go +++ b/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go @@ -62,12 +62,12 @@ type AddAzureDatabaseOK struct { func (o *AddAzureDatabaseOK) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Add][%d] addAzureDatabaseOk %+v", 200, o.Payload) } - func (o *AddAzureDatabaseOK) GetPayload() interface{} { return o.Payload } func (o *AddAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *AddAzureDatabaseDefault) Code() int { func (o *AddAzureDatabaseDefault) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Add][%d] AddAzureDatabase default %+v", o._statusCode, o.Payload) } - func (o *AddAzureDatabaseDefault) GetPayload() *AddAzureDatabaseDefaultBody { return o.Payload } func (o *AddAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAzureDatabaseDefaultBody) // response payload @@ -123,6 +123,7 @@ AddAzureDatabaseBody add azure database body swagger:model AddAzureDatabaseBody */ type AddAzureDatabaseBody struct { + // Azure database location. Region string `json:"region,omitempty"` @@ -293,6 +294,7 @@ AddAzureDatabaseDefaultBody add azure database default body swagger:model AddAzureDatabaseDefaultBody */ type AddAzureDatabaseDefaultBody struct { + // error Error string `json:"error,omitempty"` @@ -361,7 +363,9 @@ func (o *AddAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -372,6 +376,7 @@ func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -400,6 +405,7 @@ AddAzureDatabaseDefaultBodyDetailsItems0 add azure database default body details swagger:model AddAzureDatabaseDefaultBodyDetailsItems0 */ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { + // type url TypeURL string `json:"type_url,omitempty"` diff --git a/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go b/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go index a3d93a92e1..e3e4400c01 100644 --- a/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go +++ b/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go @@ -60,6 +60,7 @@ DiscoverAzureDatabaseParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type DiscoverAzureDatabaseParams struct { + // Body. Body DiscoverAzureDatabaseBody @@ -129,6 +130,7 @@ func (o *DiscoverAzureDatabaseParams) SetBody(body DiscoverAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go b/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go index 8198487041..3e32f8f17b 100644 --- a/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go +++ b/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go @@ -62,12 +62,12 @@ type DiscoverAzureDatabaseOK struct { func (o *DiscoverAzureDatabaseOK) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Discover][%d] discoverAzureDatabaseOk %+v", 200, o.Payload) } - func (o *DiscoverAzureDatabaseOK) GetPayload() *DiscoverAzureDatabaseOKBody { return o.Payload } func (o *DiscoverAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverAzureDatabaseOKBody) // response payload @@ -104,12 +104,12 @@ func (o *DiscoverAzureDatabaseDefault) Code() int { func (o *DiscoverAzureDatabaseDefault) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Discover][%d] DiscoverAzureDatabase default %+v", o._statusCode, o.Payload) } - func (o *DiscoverAzureDatabaseDefault) GetPayload() *DiscoverAzureDatabaseDefaultBody { return o.Payload } func (o *DiscoverAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverAzureDatabaseDefaultBody) // response payload @@ -125,6 +125,7 @@ DiscoverAzureDatabaseBody DiscoverAzureDatabaseRequest discover azure databases swagger:model DiscoverAzureDatabaseBody */ type DiscoverAzureDatabaseBody struct { + // Azure client ID. AzureClientID string `json:"azure_client_id,omitempty"` @@ -171,6 +172,7 @@ DiscoverAzureDatabaseDefaultBody discover azure database default body swagger:model DiscoverAzureDatabaseDefaultBody */ type DiscoverAzureDatabaseDefaultBody struct { + // error Error string `json:"error,omitempty"` @@ -239,7 +241,9 @@ func (o *DiscoverAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, } func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -250,6 +254,7 @@ func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -278,6 +283,7 @@ DiscoverAzureDatabaseDefaultBodyDetailsItems0 discover azure database default bo swagger:model DiscoverAzureDatabaseDefaultBodyDetailsItems0 */ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { + // type url TypeURL string `json:"type_url,omitempty"` @@ -319,6 +325,7 @@ DiscoverAzureDatabaseOKBody DiscoverAzureDatabaseResponse discover azure databas swagger:model DiscoverAzureDatabaseOKBody */ type DiscoverAzureDatabaseOKBody struct { + // azure database instance AzureDatabaseInstance []*DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 `json:"azure_database_instance"` } @@ -378,7 +385,9 @@ func (o *DiscoverAzureDatabaseOKBody) ContextValidate(ctx context.Context, forma } func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseInstance); i++ { + if o.AzureDatabaseInstance[i] != nil { if err := o.AzureDatabaseInstance[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -389,6 +398,7 @@ func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx c return err } } + } return nil @@ -417,6 +427,7 @@ DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 DiscoverAzureDatabaseInst swagger:model DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 */ type DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 struct { + // Azure database instance ID. InstanceID string `json:"instance_id,omitempty"` diff --git a/api/managementpb/backup/artifacts.pb.go b/api/managementpb/backup/artifacts.pb.go index e45b927427..e783887fb3 100644 --- a/api/managementpb/backup/artifacts.pb.go +++ b/api/managementpb/backup/artifacts.pb.go @@ -7,13 +7,12 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -739,26 +738,23 @@ func file_managementpb_backup_artifacts_proto_rawDescGZIP() []byte { return file_managementpb_backup_artifacts_proto_rawDescData } -var ( - file_managementpb_backup_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_backup_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_managementpb_backup_artifacts_proto_goTypes = []interface{}{ - (BackupStatus)(0), // 0: backup.v1.BackupStatus - (*Artifact)(nil), // 1: backup.v1.Artifact - (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest - (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse - (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest - (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse - (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange - (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest - (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse - (DataModel)(0), // 9: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (BackupMode)(0), // 11: backup.v1.BackupMode - (*Metadata)(nil), // 12: backup.v1.Metadata - } -) - +var file_managementpb_backup_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_backup_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_managementpb_backup_artifacts_proto_goTypes = []interface{}{ + (BackupStatus)(0), // 0: backup.v1.BackupStatus + (*Artifact)(nil), // 1: backup.v1.Artifact + (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse + (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest + (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse + (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange + (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest + (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse + (DataModel)(0), // 9: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (BackupMode)(0), // 11: backup.v1.BackupMode + (*Metadata)(nil), // 12: backup.v1.Metadata +} var file_managementpb_backup_artifacts_proto_depIdxs = []int32{ 9, // 0: backup.v1.Artifact.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.Artifact.status:type_name -> backup.v1.BackupStatus diff --git a/api/managementpb/backup/artifacts.pb.gw.go b/api/managementpb/backup/artifacts.pb.gw.go index f80aa72372..a1cd910a56 100644 --- a/api/managementpb/backup/artifacts.pb.gw.go +++ b/api/managementpb/backup/artifacts.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, client ArtifactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListArtifactsRequest @@ -47,6 +45,7 @@ func request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runtime.Ma msg, err := client.ListArtifacts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, server ArtifactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runt msg, err := server.ListArtifacts(ctx, &protoReq) return msg, metadata, err + } func request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client ArtifactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler runtime.M msg, err := client.DeleteArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server ArtifactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler run msg, err := server.DeleteArtifact(ctx, &protoReq) return msg, metadata, err + } func request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, client ArtifactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler runti msg, err := client.ListPitrTimeranges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, server ArtifactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler msg, err := server.ListPitrTimeranges(ctx, &protoReq) return msg, metadata, err + } // RegisterArtifactsHandlerServer registers the http handlers for service Artifacts to "mux". @@ -134,6 +138,7 @@ func local_request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler // 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 RegisterArtifactsHandlerFromEndpoint instead. func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArtifactsServer) error { + mux.Handle("POST", pattern_Artifacts_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,6 +161,7 @@ func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Artifacts_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -180,6 +186,7 @@ func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Artifacts_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -204,6 +211,7 @@ func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -246,6 +254,7 @@ func RegisterArtifactsHandler(ctx context.Context, mux *runtime.ServeMux, conn * // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ArtifactsClient" to call the correct interceptors. func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArtifactsClient) error { + mux.Handle("POST", pattern_Artifacts_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -265,6 +274,7 @@ func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Artifacts_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -286,6 +296,7 @@ func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Artifacts_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -307,6 +318,7 @@ func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/backup/artifacts.swagger.json b/api/managementpb/backup/artifacts.swagger.json new file mode 100644 index 0000000000..dbd57d49fc --- /dev/null +++ b/api/managementpb/backup/artifacts.swagger.json @@ -0,0 +1,364 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/backup/artifacts.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Artifacts" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/backup/Artifacts/Delete": { + "post": { + "summary": "DeleteArtifact deletes specified artifact.", + "operationId": "DeleteArtifact", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteArtifactResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DeleteArtifactRequest" + } + } + ], + "tags": [ + "Artifacts" + ] + } + }, + "/v1/management/backup/Artifacts/List": { + "post": { + "summary": "ListArtifacts returns a list of all backup artifacts.", + "operationId": "ListArtifacts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListArtifactsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListArtifactsRequest" + } + } + ], + "tags": [ + "Artifacts" + ] + } + }, + "/v1/management/backup/Artifacts/ListPITRTimeranges": { + "post": { + "summary": "ListPitrTimeranges list the available MongoDB PITR timeranges in a given backup location", + "operationId": "ListPitrTimeranges", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListPitrTimerangesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListPitrTimerangesRequest" + } + } + ], + "tags": [ + "Artifacts" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1Artifact": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Machine-readable artifact ID." + }, + "name": { + "type": "string", + "title": "Artifact name" + }, + "vendor": { + "type": "string", + "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "location_name": { + "type": "string", + "description": "Location name." + }, + "service_id": { + "type": "string", + "description": "Machine-readable service ID." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model." + }, + "status": { + "$ref": "#/definitions/v1BackupStatus", + "description": "Backup status." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Artifact creation time." + }, + "mode": { + "$ref": "#/definitions/v1BackupMode", + "description": "Backup mode." + }, + "is_sharded_cluster": { + "type": "boolean", + "description": "Source database setup type." + }, + "folder": { + "type": "string", + "description": "Folder to store artifact on a storage." + }, + "metadata_list": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Metadata" + }, + "description": "List of artifact metadata." + } + }, + "description": "Artifact represents single backup artifact." + }, + "v1BackupMode": { + "type": "string", + "enum": [ + "BACKUP_MODE_INVALID", + "SNAPSHOT", + "INCREMENTAL", + "PITR" + ], + "default": "BACKUP_MODE_INVALID", + "description": "BackupMode specifies backup mode." + }, + "v1BackupStatus": { + "type": "string", + "enum": [ + "BACKUP_STATUS_INVALID", + "BACKUP_STATUS_PENDING", + "BACKUP_STATUS_IN_PROGRESS", + "BACKUP_STATUS_PAUSED", + "BACKUP_STATUS_SUCCESS", + "BACKUP_STATUS_ERROR", + "BACKUP_STATUS_DELETING", + "BACKUP_STATUS_FAILED_TO_DELETE", + "BACKUP_STATUS_CLEANUP_IN_PROGRESS" + ], + "default": "BACKUP_STATUS_INVALID", + "description": "BackupStatus shows the current status of execution of backup." + }, + "v1DataModel": { + "type": "string", + "enum": [ + "DATA_MODEL_INVALID", + "PHYSICAL", + "LOGICAL" + ], + "default": "DATA_MODEL_INVALID", + "description": "DataModel is a model used for performing a backup." + }, + "v1DeleteArtifactRequest": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Machine-readable artifact ID." + }, + "remove_files": { + "type": "boolean", + "description": "Removes all the backup files associated with artifact if flag is set." + } + } + }, + "v1DeleteArtifactResponse": { + "type": "object" + }, + "v1File": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "is_directory": { + "type": "boolean" + } + }, + "description": "File represents file or folder on a storage." + }, + "v1ListArtifactsRequest": { + "type": "object" + }, + "v1ListArtifactsResponse": { + "type": "object", + "properties": { + "artifacts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Artifact" + } + } + } + }, + "v1ListPitrTimerangesRequest": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact ID represents artifact whose location has PITR timeranges to be retrieved." + } + } + }, + "v1ListPitrTimerangesResponse": { + "type": "object", + "properties": { + "timeranges": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PitrTimerange" + } + } + } + }, + "v1Metadata": { + "type": "object", + "properties": { + "file_list": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1File" + }, + "description": "List of files backup consists of." + }, + "restore_to": { + "type": "string", + "format": "date-time", + "description": "Exact time DB can be restored to." + }, + "pbm_metadata": { + "$ref": "#/definitions/v1PbmMetadata" + } + }, + "description": "Metadata contains extra artifact data like files it consists of, tool specific data, etc." + }, + "v1PbmMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of backup in backup tool representation." + } + }, + "description": "PbmMetadata contains additional data for pbm cli tools." + }, + "v1PitrTimerange": { + "type": "object", + "properties": { + "start_timestamp": { + "type": "string", + "format": "date-time", + "description": "start_timestamp is the time of the first event in the PITR chunk." + }, + "end_timestamp": { + "type": "string", + "format": "date-time", + "description": "end_timestamp is the time of the last event in the PITR chunk." + } + } + } + } +} diff --git a/api/managementpb/backup/artifacts_grpc.pb.go b/api/managementpb/backup/artifacts_grpc.pb.go index 7556103074..f0729da692 100644 --- a/api/managementpb/backup/artifacts_grpc.pb.go +++ b/api/managementpb/backup/artifacts_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -86,16 +85,15 @@ type ArtifactsServer interface { } // UnimplementedArtifactsServer must be embedded to have forward compatible implementations. -type UnimplementedArtifactsServer struct{} +type UnimplementedArtifactsServer struct { +} func (UnimplementedArtifactsServer) ListArtifacts(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifacts not implemented") } - func (UnimplementedArtifactsServer) DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteArtifact not implemented") } - func (UnimplementedArtifactsServer) ListPitrTimeranges(context.Context, *ListPitrTimerangesRequest) (*ListPitrTimerangesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPitrTimeranges not implemented") } diff --git a/api/managementpb/backup/backups.pb.go b/api/managementpb/backup/backups.pb.go index edeb0ee602..a45c158a26 100644 --- a/api/managementpb/backup/backups.pb.go +++ b/api/managementpb/backup/backups.pb.go @@ -7,19 +7,17 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -1714,39 +1712,36 @@ func file_managementpb_backup_backups_proto_rawDescGZIP() []byte { return file_managementpb_backup_backups_proto_rawDescData } -var ( - file_managementpb_backup_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 18) - file_managementpb_backup_backups_proto_goTypes = []interface{}{ - (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest - (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse - (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest - (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse - (*RestoreBackupRequest)(nil), // 4: backup.v1.RestoreBackupRequest - (*RestoreBackupResponse)(nil), // 5: backup.v1.RestoreBackupResponse - (*ScheduledBackup)(nil), // 6: backup.v1.ScheduledBackup - (*ScheduleBackupRequest)(nil), // 7: backup.v1.ScheduleBackupRequest - (*ScheduleBackupResponse)(nil), // 8: backup.v1.ScheduleBackupResponse - (*ListScheduledBackupsRequest)(nil), // 9: backup.v1.ListScheduledBackupsRequest - (*ListScheduledBackupsResponse)(nil), // 10: backup.v1.ListScheduledBackupsResponse - (*ChangeScheduledBackupRequest)(nil), // 11: backup.v1.ChangeScheduledBackupRequest - (*ChangeScheduledBackupResponse)(nil), // 12: backup.v1.ChangeScheduledBackupResponse - (*RemoveScheduledBackupRequest)(nil), // 13: backup.v1.RemoveScheduledBackupRequest - (*RemoveScheduledBackupResponse)(nil), // 14: backup.v1.RemoveScheduledBackupResponse - (*GetLogsRequest)(nil), // 15: backup.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 16: backup.v1.GetLogsResponse - (*LogChunk)(nil), // 17: backup.v1.LogChunk - (*durationpb.Duration)(nil), // 18: google.protobuf.Duration - (DataModel)(0), // 19: backup.v1.DataModel - (*inventorypb.MySQLService)(nil), // 20: inventory.MySQLService - (*inventorypb.MongoDBService)(nil), // 21: inventory.MongoDBService - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (BackupMode)(0), // 23: backup.v1.BackupMode - (*wrapperspb.BoolValue)(nil), // 24: google.protobuf.BoolValue - (*wrapperspb.StringValue)(nil), // 25: google.protobuf.StringValue - (*wrapperspb.UInt32Value)(nil), // 26: google.protobuf.UInt32Value - } -) - +var file_managementpb_backup_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_managementpb_backup_backups_proto_goTypes = []interface{}{ + (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest + (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse + (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest + (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse + (*RestoreBackupRequest)(nil), // 4: backup.v1.RestoreBackupRequest + (*RestoreBackupResponse)(nil), // 5: backup.v1.RestoreBackupResponse + (*ScheduledBackup)(nil), // 6: backup.v1.ScheduledBackup + (*ScheduleBackupRequest)(nil), // 7: backup.v1.ScheduleBackupRequest + (*ScheduleBackupResponse)(nil), // 8: backup.v1.ScheduleBackupResponse + (*ListScheduledBackupsRequest)(nil), // 9: backup.v1.ListScheduledBackupsRequest + (*ListScheduledBackupsResponse)(nil), // 10: backup.v1.ListScheduledBackupsResponse + (*ChangeScheduledBackupRequest)(nil), // 11: backup.v1.ChangeScheduledBackupRequest + (*ChangeScheduledBackupResponse)(nil), // 12: backup.v1.ChangeScheduledBackupResponse + (*RemoveScheduledBackupRequest)(nil), // 13: backup.v1.RemoveScheduledBackupRequest + (*RemoveScheduledBackupResponse)(nil), // 14: backup.v1.RemoveScheduledBackupResponse + (*GetLogsRequest)(nil), // 15: backup.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 16: backup.v1.GetLogsResponse + (*LogChunk)(nil), // 17: backup.v1.LogChunk + (*durationpb.Duration)(nil), // 18: google.protobuf.Duration + (DataModel)(0), // 19: backup.v1.DataModel + (*inventorypb.MySQLService)(nil), // 20: inventory.MySQLService + (*inventorypb.MongoDBService)(nil), // 21: inventory.MongoDBService + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (BackupMode)(0), // 23: backup.v1.BackupMode + (*wrapperspb.BoolValue)(nil), // 24: google.protobuf.BoolValue + (*wrapperspb.StringValue)(nil), // 25: google.protobuf.StringValue + (*wrapperspb.UInt32Value)(nil), // 26: google.protobuf.UInt32Value +} var file_managementpb_backup_backups_proto_depIdxs = []int32{ 18, // 0: backup.v1.StartBackupRequest.retry_interval:type_name -> google.protobuf.Duration 19, // 1: backup.v1.StartBackupRequest.data_model:type_name -> backup.v1.DataModel diff --git a/api/managementpb/backup/backups.pb.gw.go b/api/managementpb/backup/backups.pb.gw.go index ad56562fe5..e5ea98d6f8 100644 --- a/api/managementpb/backup/backups.pb.gw.go +++ b/api/managementpb/backup/backups.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Backups_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartBackupRequest @@ -47,6 +45,7 @@ func request_Backups_StartBackup_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.StartBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Backups_StartBackup_0(ctx context.Context, marshaler runtime. msg, err := server.StartBackup(ctx, &protoReq) return msg, metadata, err + } func request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, marsh msg, err := client.ListArtifactCompatibleServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, msg, err := server.ListArtifactCompatibleServices(ctx, &protoReq) return msg, metadata, err + } func request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtime.Mars msg, err := client.RestoreBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtim msg, err := server.RestoreBackup(ctx, &protoReq) return msg, metadata, err + } func request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ScheduleBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runti msg, err := server.ScheduleBackup(ctx, &protoReq) return msg, metadata, err + } func request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler runti msg, err := client.ListScheduledBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler msg, err := server.ListScheduledBackups(ctx, &protoReq) return msg, metadata, err + } func request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshaler runt msg, err := client.ChangeScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshale msg, err := server.ChangeScheduledBackup(ctx, &protoReq) return msg, metadata, err + } func request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshaler runt msg, err := client.RemoveScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshale msg, err := server.RemoveScheduledBackup(ctx, &protoReq) return msg, metadata, err + } func request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Mars msg, err := server.GetLogs(ctx, &protoReq) return msg, metadata, err + } // RegisterBackupsHandlerServer registers the http handlers for service Backups to "mux". @@ -294,6 +308,7 @@ func local_request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Mars // 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 RegisterBackupsHandlerFromEndpoint instead. func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BackupsServer) error { + mux.Handle("POST", pattern_Backups_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -316,6 +331,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -340,6 +356,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -364,6 +381,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -388,6 +406,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -412,6 +431,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,6 +456,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -460,6 +481,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -484,6 +506,7 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -526,6 +549,7 @@ func RegisterBackupsHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "BackupsClient" to call the correct interceptors. func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BackupsClient) error { + mux.Handle("POST", pattern_Backups_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -545,6 +569,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -566,6 +591,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -587,6 +613,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -608,6 +635,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -629,6 +657,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -650,6 +679,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -671,6 +701,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Backups_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -692,6 +723,7 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/backup/backups.swagger.json b/api/managementpb/backup/backups.swagger.json new file mode 100644 index 0000000000..fa07a12653 --- /dev/null +++ b/api/managementpb/backup/backups.swagger.json @@ -0,0 +1,812 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/backup/backups.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Backups" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/backup/Backups/ChangeScheduled": { + "post": { + "summary": "ChangeScheduledBackup changes existing scheduled backup.", + "operationId": "ChangeScheduledBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeScheduledBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ChangeScheduledBackupRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/GetLogs": { + "post": { + "summary": "GetLogs returns logs from the underlying tools for a backup/restore job.", + "operationId": "GetLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetLogsRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/ListArtifactCompatibleServices": { + "post": { + "summary": "ListArtifactCompatibleServices lists compatible services for restoring a backup.", + "operationId": "ListArtifactCompatibleServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListArtifactCompatibleServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListArtifactCompatibleServicesRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/ListScheduled": { + "post": { + "summary": "ListScheduledBackups returns all scheduled backups.", + "operationId": "ListScheduledBackups", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListScheduledBackupsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListScheduledBackupsRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/RemoveScheduled": { + "post": { + "summary": "RemoveScheduledBackup removes existing scheduled backup.", + "operationId": "RemoveScheduledBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveScheduledBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RemoveScheduledBackupRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/Restore": { + "post": { + "summary": "RestoreBackup requests the backup restore.", + "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup\nERROR_CODE_INCOMPATIBLE_TARGET_MYSQL - target MySQL version is not compatible with the artifact for performing a restore of the backup", + "operationId": "RestoreBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RestoreBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RestoreBackupRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/Schedule": { + "post": { + "summary": "ScheduleBackup schedules repeated backup.", + "operationId": "ScheduleBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ScheduleBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ScheduleBackupRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + }, + "/v1/management/backup/Backups/Start": { + "post": { + "summary": "StartBackup request backup specified service to location.", + "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup", + "operationId": "StartBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartBackupRequest" + } + } + ], + "tags": [ + "Backups" + ] + } + } + }, + "definitions": { + "inventoryMongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "inventoryMySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1BackupMode": { + "type": "string", + "enum": [ + "BACKUP_MODE_INVALID", + "SNAPSHOT", + "INCREMENTAL", + "PITR" + ], + "default": "BACKUP_MODE_INVALID", + "description": "BackupMode specifies backup mode." + }, + "v1ChangeScheduledBackupRequest": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "cron_expression": { + "type": "string", + "description": "How often backup should be run in cron format." + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "First backup wouldn't happen before this time." + }, + "name": { + "type": "string", + "description": "Name of backup." + }, + "description": { + "type": "string", + "description": "Human-readable description." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "retention": { + "type": "integer", + "format": "int64", + "description": "How many artifacts keep. 0 - unlimited." + } + } + }, + "v1ChangeScheduledBackupResponse": { + "type": "object" + }, + "v1DataModel": { + "type": "string", + "enum": [ + "DATA_MODEL_INVALID", + "PHYSICAL", + "LOGICAL" + ], + "default": "DATA_MODEL_INVALID", + "description": "DataModel is a model used for performing a backup." + }, + "v1GetLogsRequest": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "restore_id": { + "type": "string" + } + } + }, + "v1GetLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1LogChunk" + } + }, + "end": { + "type": "boolean" + } + } + }, + "v1ListArtifactCompatibleServicesRequest": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Artifact id used to determine restore compatibility." + } + } + }, + "v1ListArtifactCompatibleServicesResponse": { + "type": "object", + "properties": { + "mysql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryMySQLService" + } + }, + "mongodb": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/inventoryMongoDBService" + } + } + } + }, + "v1ListScheduledBackupsRequest": { + "type": "object" + }, + "v1ListScheduledBackupsResponse": { + "type": "object", + "properties": { + "scheduled_backups": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ScheduledBackup" + } + } + } + }, + "v1LogChunk": { + "type": "object", + "properties": { + "chunk_id": { + "type": "integer", + "format": "int64" + }, + "data": { + "type": "string" + } + }, + "description": "LogChunk represent one chunk of logs." + }, + "v1RemoveScheduledBackupRequest": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string" + } + } + }, + "v1RemoveScheduledBackupResponse": { + "type": "object" + }, + "v1RestoreBackupRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier where backup should be restored." + }, + "artifact_id": { + "type": "string", + "description": "Artifact id to restore." + }, + "pitr_timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp of PITR to restore to" + } + } + }, + "v1RestoreBackupResponse": { + "type": "object", + "properties": { + "restore_id": { + "type": "string", + "description": "Unique restore identifier." + } + } + }, + "v1ScheduleBackupRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier where backup should be performed." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "cron_expression": { + "type": "string", + "description": "How often backup should be run in cron format." + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "First backup wouldn't happen before this time." + }, + "name": { + "type": "string", + "description": "Name of backup." + }, + "description": { + "type": "string", + "description": "Human-readable description." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "enabled": { + "type": "boolean", + "description": "If scheduling is enabled." + }, + "retention": { + "type": "integer", + "format": "int64", + "description": "How many artifacts keep. 0 - unlimited." + }, + "mode": { + "$ref": "#/definitions/v1BackupMode", + "description": "Backup mode." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model (physical or logical)." + }, + "folder": { + "type": "string", + "description": "Folder on storage for artifact." + } + } + }, + "v1ScheduleBackupResponse": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string" + } + } + }, + "v1ScheduledBackup": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "service_id": { + "type": "string", + "description": "Machine-readable service ID." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "location_name": { + "type": "string", + "description": "Location name." + }, + "cron_expression": { + "type": "string", + "description": "How often backup will be run in cron format." + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "First backup wouldn't happen before this time." + }, + "name": { + "type": "string", + "description": "Artifact name." + }, + "description": { + "type": "string", + "description": "Description." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "enabled": { + "type": "boolean", + "description": "If scheduling is enabled." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model (physical or logical)." + }, + "vendor": { + "type": "string", + "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." + }, + "last_run": { + "type": "string", + "format": "date-time", + "description": "Last run." + }, + "next_run": { + "type": "string", + "format": "date-time", + "description": "Next run." + }, + "retention": { + "type": "integer", + "format": "int64", + "description": "How many artifacts keep. 0 - unlimited." + }, + "mode": { + "$ref": "#/definitions/v1BackupMode", + "description": "Backup mode." + }, + "folder": { + "type": "string", + "description": "Folder on storage for artifact." + } + }, + "description": "ScheduledBackup represents scheduled task for backup." + }, + "v1StartBackupRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "name": { + "type": "string", + "description": "If empty then name is auto-generated." + }, + "description": { + "type": "string", + "description": "Human-readable description." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "DataModel represents the data model used for the backup." + }, + "folder": { + "type": "string", + "description": "Folder on storage for artifact." + } + } + }, + "v1StartBackupResponse": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Unique identifier." + } + } + } + } +} diff --git a/api/managementpb/backup/backups_grpc.pb.go b/api/managementpb/backup/backups_grpc.pb.go index 707dc31afe..6a8ee0bbb3 100644 --- a/api/managementpb/backup/backups_grpc.pb.go +++ b/api/managementpb/backup/backups_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -156,36 +155,30 @@ type BackupsServer interface { } // UnimplementedBackupsServer must be embedded to have forward compatible implementations. -type UnimplementedBackupsServer struct{} +type UnimplementedBackupsServer struct { +} func (UnimplementedBackupsServer) StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartBackup not implemented") } - func (UnimplementedBackupsServer) ListArtifactCompatibleServices(context.Context, *ListArtifactCompatibleServicesRequest) (*ListArtifactCompatibleServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifactCompatibleServices not implemented") } - func (UnimplementedBackupsServer) RestoreBackup(context.Context, *RestoreBackupRequest) (*RestoreBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RestoreBackup not implemented") } - func (UnimplementedBackupsServer) ScheduleBackup(context.Context, *ScheduleBackupRequest) (*ScheduleBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ScheduleBackup not implemented") } - func (UnimplementedBackupsServer) ListScheduledBackups(context.Context, *ListScheduledBackupsRequest) (*ListScheduledBackupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListScheduledBackups not implemented") } - func (UnimplementedBackupsServer) ChangeScheduledBackup(context.Context, *ChangeScheduledBackupRequest) (*ChangeScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeScheduledBackup not implemented") } - func (UnimplementedBackupsServer) RemoveScheduledBackup(context.Context, *RemoveScheduledBackupRequest) (*RemoveScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveScheduledBackup not implemented") } - func (UnimplementedBackupsServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") } diff --git a/api/managementpb/backup/common.pb.go b/api/managementpb/backup/common.pb.go index ef4b58828d..354353576b 100644 --- a/api/managementpb/backup/common.pb.go +++ b/api/managementpb/backup/common.pb.go @@ -7,13 +7,12 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -382,19 +381,16 @@ func file_managementpb_backup_common_proto_rawDescGZIP() []byte { return file_managementpb_backup_common_proto_rawDescData } -var ( - file_managementpb_backup_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_managementpb_backup_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_backup_common_proto_goTypes = []interface{}{ - (DataModel)(0), // 0: backup.v1.DataModel - (BackupMode)(0), // 1: backup.v1.BackupMode - (*File)(nil), // 2: backup.v1.File - (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata - (*Metadata)(nil), // 4: backup.v1.Metadata - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - } -) - +var file_managementpb_backup_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_managementpb_backup_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_backup_common_proto_goTypes = []interface{}{ + (DataModel)(0), // 0: backup.v1.DataModel + (BackupMode)(0), // 1: backup.v1.BackupMode + (*File)(nil), // 2: backup.v1.File + (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata + (*Metadata)(nil), // 4: backup.v1.Metadata + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} var file_managementpb_backup_common_proto_depIdxs = []int32{ 2, // 0: backup.v1.Metadata.file_list:type_name -> backup.v1.File 5, // 1: backup.v1.Metadata.restore_to:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/backup/common.swagger.json b/api/managementpb/backup/common.swagger.json new file mode 100644 index 0000000000..716e7a45ef --- /dev/null +++ b/api/managementpb/backup/common.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/backup/common.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/backup/errors.pb.go b/api/managementpb/backup/errors.pb.go index 63b0b266bb..71bf5a1b91 100644 --- a/api/managementpb/backup/errors.pb.go +++ b/api/managementpb/backup/errors.pb.go @@ -7,11 +7,10 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -183,15 +182,12 @@ func file_managementpb_backup_errors_proto_rawDescGZIP() []byte { return file_managementpb_backup_errors_proto_rawDescData } -var ( - file_managementpb_backup_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_backup_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_managementpb_backup_errors_proto_goTypes = []interface{}{ - (ErrorCode)(0), // 0: backup.v1.ErrorCode - (*Error)(nil), // 1: backup.v1.Error - } -) - +var file_managementpb_backup_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_backup_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_managementpb_backup_errors_proto_goTypes = []interface{}{ + (ErrorCode)(0), // 0: backup.v1.ErrorCode + (*Error)(nil), // 1: backup.v1.Error +} var file_managementpb_backup_errors_proto_depIdxs = []int32{ 0, // 0: backup.v1.Error.code:type_name -> backup.v1.ErrorCode 1, // [1:1] is the sub-list for method output_type diff --git a/api/managementpb/backup/errors.swagger.json b/api/managementpb/backup/errors.swagger.json new file mode 100644 index 0000000000..7fedd765ce --- /dev/null +++ b/api/managementpb/backup/errors.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/backup/errors.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go b/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go index cdf5c2d89b..ab13b0db89 100644 --- a/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go +++ b/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go @@ -60,6 +60,7 @@ DeleteArtifactParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteArtifactParams struct { + // Body. Body DeleteArtifactBody @@ -129,6 +130,7 @@ func (o *DeleteArtifactParams) SetBody(body DeleteArtifactBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go b/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go index 03cd4b4f68..cfb1223155 100644 --- a/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go +++ b/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go @@ -60,12 +60,12 @@ type DeleteArtifactOK struct { func (o *DeleteArtifactOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/Delete][%d] deleteArtifactOk %+v", 200, o.Payload) } - func (o *DeleteArtifactOK) GetPayload() interface{} { return o.Payload } func (o *DeleteArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteArtifactDefault) Code() int { func (o *DeleteArtifactDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/Delete][%d] DeleteArtifact default %+v", o._statusCode, o.Payload) } - func (o *DeleteArtifactDefault) GetPayload() *DeleteArtifactDefaultBody { return o.Payload } func (o *DeleteArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteArtifactDefaultBody) // response payload @@ -121,6 +121,7 @@ DeleteArtifactBody delete artifact body swagger:model DeleteArtifactBody */ type DeleteArtifactBody struct { + // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -161,6 +162,7 @@ DeleteArtifactDefaultBody delete artifact default body swagger:model DeleteArtifactDefaultBody */ type DeleteArtifactDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *DeleteArtifactDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -265,6 +270,7 @@ DeleteArtifactDefaultBodyDetailsItems0 delete artifact default body details item swagger:model DeleteArtifactDefaultBodyDetailsItems0 */ type DeleteArtifactDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go b/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go index 5932e115ec..df511fdabf 100644 --- a/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go +++ b/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go @@ -60,6 +60,7 @@ ListArtifactsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListArtifactsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListArtifactsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListArtifactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go b/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go index c9d51fc1fc..2d62900b15 100644 --- a/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go +++ b/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go @@ -62,12 +62,12 @@ type ListArtifactsOK struct { func (o *ListArtifactsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/List][%d] listArtifactsOk %+v", 200, o.Payload) } - func (o *ListArtifactsOK) GetPayload() *ListArtifactsOKBody { return o.Payload } func (o *ListArtifactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListArtifactsDefault) Code() int { func (o *ListArtifactsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/List][%d] ListArtifacts default %+v", o._statusCode, o.Payload) } - func (o *ListArtifactsDefault) GetPayload() *ListArtifactsDefaultBody { return o.Payload } func (o *ListArtifactsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactsDefaultBody) // response payload @@ -125,6 +125,7 @@ ListArtifactsDefaultBody list artifacts default body swagger:model ListArtifactsDefaultBody */ type ListArtifactsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *ListArtifactsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -229,6 +233,7 @@ ListArtifactsDefaultBodyDetailsItems0 list artifacts default body details items0 swagger:model ListArtifactsDefaultBodyDetailsItems0 */ type ListArtifactsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ ListArtifactsOKBody list artifacts OK body swagger:model ListArtifactsOKBody */ type ListArtifactsOKBody struct { + // artifacts Artifacts []*ListArtifactsOKBodyArtifactsItems0 `json:"artifacts"` } @@ -325,7 +331,9 @@ func (o *ListArtifactsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Artifacts); i++ { + if o.Artifacts[i] != nil { if err := o.Artifacts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +344,7 @@ func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, form return err } } + } return nil @@ -364,6 +373,7 @@ ListArtifactsOKBodyArtifactsItems0 Artifact represents single backup artifact. swagger:model ListArtifactsOKBodyArtifactsItems0 */ type ListArtifactsOKBodyArtifactsItems0 struct { + // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -650,7 +660,9 @@ func (o *ListArtifactsOKBodyArtifactsItems0) ContextValidate(ctx context.Context } func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MetadataList); i++ { + if o.MetadataList[i] != nil { if err := o.MetadataList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -661,6 +673,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx con return err } } + } return nil @@ -689,6 +702,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0 Metadata contains extra art swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0 struct { + // List of files backup consists of. FileList []*ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 `json:"file_list"` @@ -798,7 +812,9 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) ContextValidate(c } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFileList(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.FileList); i++ { + if o.FileList[i] != nil { if err := o.FileList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -809,12 +825,14 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFi return err } } + } return nil } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidatePbmMetadata(ctx context.Context, formats strfmt.Registry) error { + if o.PbmMetadata != nil { if err := o.PbmMetadata.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -852,6 +870,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 File represen swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 struct { + // name Name string `json:"name,omitempty"` @@ -892,6 +911,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata PbmMetadata cont swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata struct { + // Name of backup in backup tool representation. Name string `json:"name,omitempty"` } diff --git a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go index 66e1f4cf57..b91cb5e190 100644 --- a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go +++ b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go @@ -60,6 +60,7 @@ ListPitrTimerangesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListPitrTimerangesParams struct { + // Body. Body ListPitrTimerangesBody @@ -129,6 +130,7 @@ func (o *ListPitrTimerangesParams) SetBody(body ListPitrTimerangesBody) { // WriteToRequest writes these params to a swagger request func (o *ListPitrTimerangesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go index 1cd2d69336..1b0624029b 100644 --- a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go +++ b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go @@ -61,12 +61,12 @@ type ListPitrTimerangesOK struct { func (o *ListPitrTimerangesOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/ListPITRTimeranges][%d] listPitrTimerangesOk %+v", 200, o.Payload) } - func (o *ListPitrTimerangesOK) GetPayload() *ListPitrTimerangesOKBody { return o.Payload } func (o *ListPitrTimerangesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListPitrTimerangesOKBody) // response payload @@ -103,12 +103,12 @@ func (o *ListPitrTimerangesDefault) Code() int { func (o *ListPitrTimerangesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/ListPITRTimeranges][%d] ListPitrTimeranges default %+v", o._statusCode, o.Payload) } - func (o *ListPitrTimerangesDefault) GetPayload() *ListPitrTimerangesDefaultBody { return o.Payload } func (o *ListPitrTimerangesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListPitrTimerangesDefaultBody) // response payload @@ -124,6 +124,7 @@ ListPitrTimerangesBody list pitr timeranges body swagger:model ListPitrTimerangesBody */ type ListPitrTimerangesBody struct { + // Artifact ID represents artifact whose location has PITR timeranges to be retrieved. ArtifactID string `json:"artifact_id,omitempty"` } @@ -161,6 +162,7 @@ ListPitrTimerangesDefaultBody list pitr timeranges default body swagger:model ListPitrTimerangesDefaultBody */ type ListPitrTimerangesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *ListPitrTimerangesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -265,6 +270,7 @@ ListPitrTimerangesDefaultBodyDetailsItems0 list pitr timeranges default body det swagger:model ListPitrTimerangesDefaultBodyDetailsItems0 */ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -302,6 +308,7 @@ ListPitrTimerangesOKBody list pitr timeranges OK body swagger:model ListPitrTimerangesOKBody */ type ListPitrTimerangesOKBody struct { + // timeranges Timeranges []*ListPitrTimerangesOKBodyTimerangesItems0 `json:"timeranges"` } @@ -361,7 +368,9 @@ func (o *ListPitrTimerangesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Timeranges); i++ { + if o.Timeranges[i] != nil { if err := o.Timeranges[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -372,6 +381,7 @@ func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context return err } } + } return nil @@ -400,6 +410,7 @@ ListPitrTimerangesOKBodyTimerangesItems0 list pitr timeranges OK body timeranges swagger:model ListPitrTimerangesOKBodyTimerangesItems0 */ type ListPitrTimerangesOKBodyTimerangesItems0 struct { + // start_timestamp is the time of the first event in the PITR chunk. // Format: date-time StartTimestamp strfmt.DateTime `json:"start_timestamp,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go b/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go index e372d89f19..8cb9679de3 100644 --- a/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go @@ -60,6 +60,7 @@ ChangeScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeScheduledBackupParams struct { + // Body. Body ChangeScheduledBackupBody @@ -129,6 +130,7 @@ func (o *ChangeScheduledBackupParams) SetBody(body ChangeScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go b/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go index eaefe8fc84..d6ef4dc441 100644 --- a/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go @@ -61,12 +61,12 @@ type ChangeScheduledBackupOK struct { func (o *ChangeScheduledBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ChangeScheduled][%d] changeScheduledBackupOk %+v", 200, o.Payload) } - func (o *ChangeScheduledBackupOK) GetPayload() interface{} { return o.Payload } func (o *ChangeScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -101,12 +101,12 @@ func (o *ChangeScheduledBackupDefault) Code() int { func (o *ChangeScheduledBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ChangeScheduled][%d] ChangeScheduledBackup default %+v", o._statusCode, o.Payload) } - func (o *ChangeScheduledBackupDefault) GetPayload() *ChangeScheduledBackupDefaultBody { return o.Payload } func (o *ChangeScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeScheduledBackupDefaultBody) // response payload @@ -122,6 +122,7 @@ ChangeScheduledBackupBody change scheduled backup body swagger:model ChangeScheduledBackupBody */ type ChangeScheduledBackupBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` @@ -205,6 +206,7 @@ ChangeScheduledBackupDefaultBody change scheduled backup default body swagger:model ChangeScheduledBackupDefaultBody */ type ChangeScheduledBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -270,7 +272,9 @@ func (o *ChangeScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -281,6 +285,7 @@ func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -309,6 +314,7 @@ ChangeScheduledBackupDefaultBodyDetailsItems0 change scheduled backup default bo swagger:model ChangeScheduledBackupDefaultBodyDetailsItems0 */ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/get_logs_parameters.go b/api/managementpb/backup/json/client/backups/get_logs_parameters.go index d6540699d4..5b43e385bf 100644 --- a/api/managementpb/backup/json/client/backups/get_logs_parameters.go +++ b/api/managementpb/backup/json/client/backups/get_logs_parameters.go @@ -60,6 +60,7 @@ GetLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsParams struct { + // Body. Body GetLogsBody @@ -129,6 +130,7 @@ func (o *GetLogsParams) SetBody(body GetLogsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/get_logs_responses.go b/api/managementpb/backup/json/client/backups/get_logs_responses.go index a378c0ff8b..0829b3d0aa 100644 --- a/api/managementpb/backup/json/client/backups/get_logs_responses.go +++ b/api/managementpb/backup/json/client/backups/get_logs_responses.go @@ -60,12 +60,12 @@ type GetLogsOK struct { func (o *GetLogsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/GetLogs][%d] getLogsOk %+v", 200, o.Payload) } - func (o *GetLogsOK) GetPayload() *GetLogsOKBody { return o.Payload } func (o *GetLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetLogsDefault) Code() int { func (o *GetLogsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/GetLogs][%d] GetLogs default %+v", o._statusCode, o.Payload) } - func (o *GetLogsDefault) GetPayload() *GetLogsDefaultBody { return o.Payload } func (o *GetLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsDefaultBody) // response payload @@ -123,6 +123,7 @@ GetLogsBody get logs body swagger:model GetLogsBody */ type GetLogsBody struct { + // artifact id ArtifactID string `json:"artifact_id,omitempty"` @@ -169,6 +170,7 @@ GetLogsDefaultBody get logs default body swagger:model GetLogsDefaultBody */ type GetLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -234,7 +236,9 @@ func (o *GetLogsDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +249,7 @@ func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -273,6 +278,7 @@ GetLogsDefaultBodyDetailsItems0 get logs default body details items0 swagger:model GetLogsDefaultBodyDetailsItems0 */ type GetLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -310,6 +316,7 @@ GetLogsOKBody get logs OK body swagger:model GetLogsOKBody */ type GetLogsOKBody struct { + // logs Logs []*GetLogsOKBodyLogsItems0 `json:"logs"` @@ -372,7 +379,9 @@ func (o *GetLogsOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if err := o.Logs[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -383,6 +392,7 @@ func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt. return err } } + } return nil @@ -411,6 +421,7 @@ GetLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsOKBodyLogsItems0 */ type GetLogsOKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go index a5ecbdeece..ae5fb30e84 100644 --- a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go +++ b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go @@ -60,6 +60,7 @@ ListArtifactCompatibleServicesParams contains all the parameters to send to the Typically these are written to a http.Request. */ type ListArtifactCompatibleServicesParams struct { + // Body. Body ListArtifactCompatibleServicesBody @@ -129,6 +130,7 @@ func (o *ListArtifactCompatibleServicesParams) SetBody(body ListArtifactCompatib // WriteToRequest writes these params to a swagger request func (o *ListArtifactCompatibleServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go index cde43dc58d..2f1764be77 100644 --- a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go +++ b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go @@ -60,12 +60,12 @@ type ListArtifactCompatibleServicesOK struct { func (o *ListArtifactCompatibleServicesOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListArtifactCompatibleServices][%d] listArtifactCompatibleServicesOk %+v", 200, o.Payload) } - func (o *ListArtifactCompatibleServicesOK) GetPayload() *ListArtifactCompatibleServicesOKBody { return o.Payload } func (o *ListArtifactCompatibleServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactCompatibleServicesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListArtifactCompatibleServicesDefault) Code() int { func (o *ListArtifactCompatibleServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListArtifactCompatibleServices][%d] ListArtifactCompatibleServices default %+v", o._statusCode, o.Payload) } - func (o *ListArtifactCompatibleServicesDefault) GetPayload() *ListArtifactCompatibleServicesDefaultBody { return o.Payload } func (o *ListArtifactCompatibleServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactCompatibleServicesDefaultBody) // response payload @@ -123,6 +123,7 @@ ListArtifactCompatibleServicesBody list artifact compatible services body swagger:model ListArtifactCompatibleServicesBody */ type ListArtifactCompatibleServicesBody struct { + // Artifact id used to determine restore compatibility. ArtifactID string `json:"artifact_id,omitempty"` } @@ -160,6 +161,7 @@ ListArtifactCompatibleServicesDefaultBody list artifact compatible services defa swagger:model ListArtifactCompatibleServicesDefaultBody */ type ListArtifactCompatibleServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -225,7 +227,9 @@ func (o *ListArtifactCompatibleServicesDefaultBody) ContextValidate(ctx context. } func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -236,6 +240,7 @@ func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx c return err } } + } return nil @@ -264,6 +269,7 @@ ListArtifactCompatibleServicesDefaultBodyDetailsItems0 list artifact compatible swagger:model ListArtifactCompatibleServicesDefaultBodyDetailsItems0 */ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -301,6 +307,7 @@ ListArtifactCompatibleServicesOKBody list artifact compatible services OK body swagger:model ListArtifactCompatibleServicesOKBody */ type ListArtifactCompatibleServicesOKBody struct { + // mysql Mysql []*ListArtifactCompatibleServicesOKBodyMysqlItems0 `json:"mysql"` @@ -397,7 +404,9 @@ func (o *ListArtifactCompatibleServicesOKBody) ContextValidate(ctx context.Conte } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if err := o.Mysql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -408,13 +417,16 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context. return err } } + } return nil } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if err := o.Mongodb[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,6 +437,7 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx contex return err } } + } return nil @@ -453,6 +466,7 @@ ListArtifactCompatibleServicesOKBodyMongodbItems0 MongoDBService represents a ge swagger:model ListArtifactCompatibleServicesOKBodyMongodbItems0 */ type ListArtifactCompatibleServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -520,6 +534,7 @@ ListArtifactCompatibleServicesOKBodyMysqlItems0 MySQLService represents a generi swagger:model ListArtifactCompatibleServicesOKBodyMysqlItems0 */ type ListArtifactCompatibleServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go b/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go index e906ca98b7..d0c6e616ea 100644 --- a/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go +++ b/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go @@ -60,6 +60,7 @@ ListScheduledBackupsParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type ListScheduledBackupsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListScheduledBackupsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListScheduledBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go b/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go index dc4448f868..ef2f3a86f8 100644 --- a/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go +++ b/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go @@ -62,12 +62,12 @@ type ListScheduledBackupsOK struct { func (o *ListScheduledBackupsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListScheduled][%d] listScheduledBackupsOk %+v", 200, o.Payload) } - func (o *ListScheduledBackupsOK) GetPayload() *ListScheduledBackupsOKBody { return o.Payload } func (o *ListScheduledBackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListScheduledBackupsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListScheduledBackupsDefault) Code() int { func (o *ListScheduledBackupsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListScheduled][%d] ListScheduledBackups default %+v", o._statusCode, o.Payload) } - func (o *ListScheduledBackupsDefault) GetPayload() *ListScheduledBackupsDefaultBody { return o.Payload } func (o *ListScheduledBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListScheduledBackupsDefaultBody) // response payload @@ -125,6 +125,7 @@ ListScheduledBackupsDefaultBody list scheduled backups default body swagger:model ListScheduledBackupsDefaultBody */ type ListScheduledBackupsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *ListScheduledBackupsDefaultBody) ContextValidate(ctx context.Context, f } func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -229,6 +233,7 @@ ListScheduledBackupsDefaultBodyDetailsItems0 list scheduled backups default body swagger:model ListScheduledBackupsDefaultBodyDetailsItems0 */ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ ListScheduledBackupsOKBody list scheduled backups OK body swagger:model ListScheduledBackupsOKBody */ type ListScheduledBackupsOKBody struct { + // scheduled backups ScheduledBackups []*ListScheduledBackupsOKBodyScheduledBackupsItems0 `json:"scheduled_backups"` } @@ -325,7 +331,9 @@ func (o *ListScheduledBackupsOKBody) ContextValidate(ctx context.Context, format } func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ScheduledBackups); i++ { + if o.ScheduledBackups[i] != nil { if err := o.ScheduledBackups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +344,7 @@ func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context return err } } + } return nil @@ -364,6 +373,7 @@ ListScheduledBackupsOKBodyScheduledBackupsItems0 ScheduledBackup represents sche swagger:model ListScheduledBackupsOKBodyScheduledBackupsItems0 */ type ListScheduledBackupsOKBodyScheduledBackupsItems0 struct { + // Machine-readable ID. ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go index a488611ff2..6bfb93d977 100644 --- a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go @@ -60,6 +60,7 @@ RemoveScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type RemoveScheduledBackupParams struct { + // Body. Body RemoveScheduledBackupBody @@ -129,6 +130,7 @@ func (o *RemoveScheduledBackupParams) SetBody(body RemoveScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go index 053d701ed4..431c7af8b5 100644 --- a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go @@ -60,12 +60,12 @@ type RemoveScheduledBackupOK struct { func (o *RemoveScheduledBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/RemoveScheduled][%d] removeScheduledBackupOk %+v", 200, o.Payload) } - func (o *RemoveScheduledBackupOK) GetPayload() interface{} { return o.Payload } func (o *RemoveScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveScheduledBackupDefault) Code() int { func (o *RemoveScheduledBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/RemoveScheduled][%d] RemoveScheduledBackup default %+v", o._statusCode, o.Payload) } - func (o *RemoveScheduledBackupDefault) GetPayload() *RemoveScheduledBackupDefaultBody { return o.Payload } func (o *RemoveScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveScheduledBackupDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveScheduledBackupBody remove scheduled backup body swagger:model RemoveScheduledBackupBody */ type RemoveScheduledBackupBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } @@ -158,6 +159,7 @@ RemoveScheduledBackupDefaultBody remove scheduled backup default body swagger:model RemoveScheduledBackupDefaultBody */ type RemoveScheduledBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *RemoveScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -262,6 +267,7 @@ RemoveScheduledBackupDefaultBodyDetailsItems0 remove scheduled backup default bo swagger:model RemoveScheduledBackupDefaultBodyDetailsItems0 */ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/restore_backup_parameters.go b/api/managementpb/backup/json/client/backups/restore_backup_parameters.go index 99b307bab3..9fa0d9bf9f 100644 --- a/api/managementpb/backup/json/client/backups/restore_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/restore_backup_parameters.go @@ -60,6 +60,7 @@ RestoreBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RestoreBackupParams struct { + // Body. Body RestoreBackupBody @@ -129,6 +130,7 @@ func (o *RestoreBackupParams) SetBody(body RestoreBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RestoreBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/restore_backup_responses.go b/api/managementpb/backup/json/client/backups/restore_backup_responses.go index 39085e7f15..86a5ef0ee9 100644 --- a/api/managementpb/backup/json/client/backups/restore_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/restore_backup_responses.go @@ -61,12 +61,12 @@ type RestoreBackupOK struct { func (o *RestoreBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Restore][%d] restoreBackupOk %+v", 200, o.Payload) } - func (o *RestoreBackupOK) GetPayload() *RestoreBackupOKBody { return o.Payload } func (o *RestoreBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RestoreBackupOKBody) // response payload @@ -103,12 +103,12 @@ func (o *RestoreBackupDefault) Code() int { func (o *RestoreBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Restore][%d] RestoreBackup default %+v", o._statusCode, o.Payload) } - func (o *RestoreBackupDefault) GetPayload() *RestoreBackupDefaultBody { return o.Payload } func (o *RestoreBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RestoreBackupDefaultBody) // response payload @@ -124,6 +124,7 @@ RestoreBackupBody restore backup body swagger:model RestoreBackupBody */ type RestoreBackupBody struct { + // Service identifier where backup should be restored. ServiceID string `json:"service_id,omitempty"` @@ -189,6 +190,7 @@ RestoreBackupDefaultBody restore backup default body swagger:model RestoreBackupDefaultBody */ type RestoreBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +256,9 @@ func (o *RestoreBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -265,6 +269,7 @@ func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -293,6 +298,7 @@ RestoreBackupDefaultBodyDetailsItems0 restore backup default body details items0 swagger:model RestoreBackupDefaultBodyDetailsItems0 */ type RestoreBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -330,6 +336,7 @@ RestoreBackupOKBody restore backup OK body swagger:model RestoreBackupOKBody */ type RestoreBackupOKBody struct { + // Unique restore identifier. RestoreID string `json:"restore_id,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go b/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go index 3aec66ead3..a5fcdafba4 100644 --- a/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go @@ -60,6 +60,7 @@ ScheduleBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ScheduleBackupParams struct { + // Body. Body ScheduleBackupBody @@ -129,6 +130,7 @@ func (o *ScheduleBackupParams) SetBody(body ScheduleBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ScheduleBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/schedule_backup_responses.go b/api/managementpb/backup/json/client/backups/schedule_backup_responses.go index dc5aff4818..b5be3f43c8 100644 --- a/api/managementpb/backup/json/client/backups/schedule_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/schedule_backup_responses.go @@ -62,12 +62,12 @@ type ScheduleBackupOK struct { func (o *ScheduleBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Schedule][%d] scheduleBackupOk %+v", 200, o.Payload) } - func (o *ScheduleBackupOK) GetPayload() *ScheduleBackupOKBody { return o.Payload } func (o *ScheduleBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ScheduleBackupOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ScheduleBackupDefault) Code() int { func (o *ScheduleBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Schedule][%d] ScheduleBackup default %+v", o._statusCode, o.Payload) } - func (o *ScheduleBackupDefault) GetPayload() *ScheduleBackupDefaultBody { return o.Payload } func (o *ScheduleBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ScheduleBackupDefaultBody) // response payload @@ -125,6 +125,7 @@ ScheduleBackupBody schedule backup body swagger:model ScheduleBackupBody */ type ScheduleBackupBody struct { + // Service identifier where backup should be performed. ServiceID string `json:"service_id,omitempty"` @@ -323,6 +324,7 @@ ScheduleBackupDefaultBody schedule backup default body swagger:model ScheduleBackupDefaultBody */ type ScheduleBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -388,7 +390,9 @@ func (o *ScheduleBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -399,6 +403,7 @@ func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -427,6 +432,7 @@ ScheduleBackupDefaultBodyDetailsItems0 schedule backup default body details item swagger:model ScheduleBackupDefaultBodyDetailsItems0 */ type ScheduleBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -464,6 +470,7 @@ ScheduleBackupOKBody schedule backup OK body swagger:model ScheduleBackupOKBody */ type ScheduleBackupOKBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/start_backup_parameters.go b/api/managementpb/backup/json/client/backups/start_backup_parameters.go index 55fffd3ba5..fd66c34dcd 100644 --- a/api/managementpb/backup/json/client/backups/start_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/start_backup_parameters.go @@ -60,6 +60,7 @@ StartBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartBackupParams struct { + // Body. Body StartBackupBody @@ -129,6 +130,7 @@ func (o *StartBackupParams) SetBody(body StartBackupBody) { // WriteToRequest writes these params to a swagger request func (o *StartBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/start_backup_responses.go b/api/managementpb/backup/json/client/backups/start_backup_responses.go index 95949e6af9..a37dad21bd 100644 --- a/api/managementpb/backup/json/client/backups/start_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/start_backup_responses.go @@ -62,12 +62,12 @@ type StartBackupOK struct { func (o *StartBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Start][%d] startBackupOk %+v", 200, o.Payload) } - func (o *StartBackupOK) GetPayload() *StartBackupOKBody { return o.Payload } func (o *StartBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartBackupOKBody) // response payload @@ -104,12 +104,12 @@ func (o *StartBackupDefault) Code() int { func (o *StartBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Start][%d] StartBackup default %+v", o._statusCode, o.Payload) } - func (o *StartBackupDefault) GetPayload() *StartBackupDefaultBody { return o.Payload } func (o *StartBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartBackupDefaultBody) // response payload @@ -125,6 +125,7 @@ StartBackupBody start backup body swagger:model StartBackupBody */ type StartBackupBody struct { + // Service identifier. ServiceID string `json:"service_id,omitempty"` @@ -238,6 +239,7 @@ StartBackupDefaultBody start backup default body swagger:model StartBackupDefaultBody */ type StartBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -303,7 +305,9 @@ func (o *StartBackupDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -314,6 +318,7 @@ func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -342,6 +347,7 @@ StartBackupDefaultBodyDetailsItems0 start backup default body details items0 swagger:model StartBackupDefaultBodyDetailsItems0 */ type StartBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -379,6 +385,7 @@ StartBackupOKBody start backup OK body swagger:model StartBackupOKBody */ type StartBackupOKBody struct { + // Unique identifier. ArtifactID string `json:"artifact_id,omitempty"` } diff --git a/api/managementpb/backup/json/client/locations/add_location_parameters.go b/api/managementpb/backup/json/client/locations/add_location_parameters.go index 7c8120fc3d..595587c4a4 100644 --- a/api/managementpb/backup/json/client/locations/add_location_parameters.go +++ b/api/managementpb/backup/json/client/locations/add_location_parameters.go @@ -60,6 +60,7 @@ AddLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddLocationParams struct { + // Body. Body AddLocationBody @@ -129,6 +130,7 @@ func (o *AddLocationParams) SetBody(body AddLocationBody) { // WriteToRequest writes these params to a swagger request func (o *AddLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/add_location_responses.go b/api/managementpb/backup/json/client/locations/add_location_responses.go index 9267795dda..425c0c0a20 100644 --- a/api/managementpb/backup/json/client/locations/add_location_responses.go +++ b/api/managementpb/backup/json/client/locations/add_location_responses.go @@ -60,12 +60,12 @@ type AddLocationOK struct { func (o *AddLocationOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Add][%d] addLocationOk %+v", 200, o.Payload) } - func (o *AddLocationOK) GetPayload() *AddLocationOKBody { return o.Payload } func (o *AddLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddLocationOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddLocationDefault) Code() int { func (o *AddLocationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Add][%d] AddLocation default %+v", o._statusCode, o.Payload) } - func (o *AddLocationDefault) GetPayload() *AddLocationDefaultBody { return o.Payload } func (o *AddLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddLocationDefaultBody) // response payload @@ -123,6 +123,7 @@ AddLocationBody add location body swagger:model AddLocationBody */ type AddLocationBody struct { + // Location name Name string `json:"name,omitempty"` @@ -211,6 +212,7 @@ func (o *AddLocationBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -226,6 +228,7 @@ func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, f } func (o *AddLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -263,6 +266,7 @@ AddLocationDefaultBody add location default body swagger:model AddLocationDefaultBody */ type AddLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -328,7 +332,9 @@ func (o *AddLocationDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -339,6 +345,7 @@ func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -367,6 +374,7 @@ AddLocationDefaultBodyDetailsItems0 add location default body details items0 swagger:model AddLocationDefaultBodyDetailsItems0 */ type AddLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -404,6 +412,7 @@ AddLocationOKBody add location OK body swagger:model AddLocationOKBody */ type AddLocationOKBody struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` } @@ -441,6 +450,7 @@ AddLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents file s swagger:model AddLocationParamsBodyFilesystemConfig */ type AddLocationParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -478,6 +488,7 @@ AddLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configuratio swagger:model AddLocationParamsBodyS3Config */ type AddLocationParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/locations/change_location_parameters.go b/api/managementpb/backup/json/client/locations/change_location_parameters.go index c24f94e848..d86902776e 100644 --- a/api/managementpb/backup/json/client/locations/change_location_parameters.go +++ b/api/managementpb/backup/json/client/locations/change_location_parameters.go @@ -60,6 +60,7 @@ ChangeLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeLocationParams struct { + // Body. Body ChangeLocationBody @@ -129,6 +130,7 @@ func (o *ChangeLocationParams) SetBody(body ChangeLocationBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/change_location_responses.go b/api/managementpb/backup/json/client/locations/change_location_responses.go index fa79790e0f..11efb2b20f 100644 --- a/api/managementpb/backup/json/client/locations/change_location_responses.go +++ b/api/managementpb/backup/json/client/locations/change_location_responses.go @@ -60,12 +60,12 @@ type ChangeLocationOK struct { func (o *ChangeLocationOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Change][%d] changeLocationOk %+v", 200, o.Payload) } - func (o *ChangeLocationOK) GetPayload() interface{} { return o.Payload } func (o *ChangeLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ChangeLocationDefault) Code() int { func (o *ChangeLocationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Change][%d] ChangeLocation default %+v", o._statusCode, o.Payload) } - func (o *ChangeLocationDefault) GetPayload() *ChangeLocationDefaultBody { return o.Payload } func (o *ChangeLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeLocationDefaultBody) // response payload @@ -121,6 +121,7 @@ ChangeLocationBody change location body swagger:model ChangeLocationBody */ type ChangeLocationBody struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -212,6 +213,7 @@ func (o *ChangeLocationBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -227,6 +229,7 @@ func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context } func (o *ChangeLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -264,6 +267,7 @@ ChangeLocationDefaultBody change location default body swagger:model ChangeLocationDefaultBody */ type ChangeLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -329,7 +333,9 @@ func (o *ChangeLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -340,6 +346,7 @@ func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -368,6 +375,7 @@ ChangeLocationDefaultBodyDetailsItems0 change location default body details item swagger:model ChangeLocationDefaultBodyDetailsItems0 */ type ChangeLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -405,6 +413,7 @@ ChangeLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents fil swagger:model ChangeLocationParamsBodyFilesystemConfig */ type ChangeLocationParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -442,6 +451,7 @@ ChangeLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configura swagger:model ChangeLocationParamsBodyS3Config */ type ChangeLocationParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/locations/list_locations_parameters.go b/api/managementpb/backup/json/client/locations/list_locations_parameters.go index 070bf3c0d3..e26ff5121d 100644 --- a/api/managementpb/backup/json/client/locations/list_locations_parameters.go +++ b/api/managementpb/backup/json/client/locations/list_locations_parameters.go @@ -60,6 +60,7 @@ ListLocationsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListLocationsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListLocationsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListLocationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/list_locations_responses.go b/api/managementpb/backup/json/client/locations/list_locations_responses.go index a005e9b029..e9d7f9254f 100644 --- a/api/managementpb/backup/json/client/locations/list_locations_responses.go +++ b/api/managementpb/backup/json/client/locations/list_locations_responses.go @@ -60,12 +60,12 @@ type ListLocationsOK struct { func (o *ListLocationsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/List][%d] listLocationsOk %+v", 200, o.Payload) } - func (o *ListLocationsOK) GetPayload() *ListLocationsOKBody { return o.Payload } func (o *ListLocationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListLocationsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListLocationsDefault) Code() int { func (o *ListLocationsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/List][%d] ListLocations default %+v", o._statusCode, o.Payload) } - func (o *ListLocationsDefault) GetPayload() *ListLocationsDefaultBody { return o.Payload } func (o *ListLocationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListLocationsDefaultBody) // response payload @@ -123,6 +123,7 @@ ListLocationsDefaultBody list locations default body swagger:model ListLocationsDefaultBody */ type ListLocationsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *ListLocationsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -227,6 +231,7 @@ ListLocationsDefaultBodyDetailsItems0 list locations default body details items0 swagger:model ListLocationsDefaultBodyDetailsItems0 */ type ListLocationsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ ListLocationsOKBody list locations OK body swagger:model ListLocationsOKBody */ type ListLocationsOKBody struct { + // locations Locations []*ListLocationsOKBodyLocationsItems0 `json:"locations"` } @@ -323,7 +329,9 @@ func (o *ListLocationsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Locations); i++ { + if o.Locations[i] != nil { if err := o.Locations[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -334,6 +342,7 @@ func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, form return err } } + } return nil @@ -362,6 +371,7 @@ ListLocationsOKBodyLocationsItems0 Location represents single Backup Location. swagger:model ListLocationsOKBodyLocationsItems0 */ type ListLocationsOKBodyLocationsItems0 struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -453,6 +463,7 @@ func (o *ListLocationsOKBodyLocationsItems0) ContextValidate(ctx context.Context } func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -468,6 +479,7 @@ func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx } func (o *ListLocationsOKBodyLocationsItems0) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -505,6 +517,7 @@ ListLocationsOKBodyLocationsItems0FilesystemConfig FilesystemLocationConfig repr swagger:model ListLocationsOKBodyLocationsItems0FilesystemConfig */ type ListLocationsOKBodyLocationsItems0FilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -542,6 +555,7 @@ ListLocationsOKBodyLocationsItems0S3Config S3LocationConfig represents S3 bucket swagger:model ListLocationsOKBodyLocationsItems0S3Config */ type ListLocationsOKBodyLocationsItems0S3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/locations/remove_location_parameters.go b/api/managementpb/backup/json/client/locations/remove_location_parameters.go index 593dd04ecd..279d1a1654 100644 --- a/api/managementpb/backup/json/client/locations/remove_location_parameters.go +++ b/api/managementpb/backup/json/client/locations/remove_location_parameters.go @@ -60,6 +60,7 @@ RemoveLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveLocationParams struct { + // Body. Body RemoveLocationBody @@ -129,6 +130,7 @@ func (o *RemoveLocationParams) SetBody(body RemoveLocationBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/remove_location_responses.go b/api/managementpb/backup/json/client/locations/remove_location_responses.go index 9177250956..70c7ae2160 100644 --- a/api/managementpb/backup/json/client/locations/remove_location_responses.go +++ b/api/managementpb/backup/json/client/locations/remove_location_responses.go @@ -60,12 +60,12 @@ type RemoveLocationOK struct { func (o *RemoveLocationOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Remove][%d] removeLocationOk %+v", 200, o.Payload) } - func (o *RemoveLocationOK) GetPayload() interface{} { return o.Payload } func (o *RemoveLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveLocationDefault) Code() int { func (o *RemoveLocationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Remove][%d] RemoveLocation default %+v", o._statusCode, o.Payload) } - func (o *RemoveLocationDefault) GetPayload() *RemoveLocationDefaultBody { return o.Payload } func (o *RemoveLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveLocationDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveLocationBody remove location body swagger:model RemoveLocationBody */ type RemoveLocationBody struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -161,6 +162,7 @@ RemoveLocationDefaultBody remove location default body swagger:model RemoveLocationDefaultBody */ type RemoveLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *RemoveLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -265,6 +270,7 @@ RemoveLocationDefaultBodyDetailsItems0 remove location default body details item swagger:model RemoveLocationDefaultBodyDetailsItems0 */ type RemoveLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/locations/test_location_config_parameters.go b/api/managementpb/backup/json/client/locations/test_location_config_parameters.go index b694abba5e..4e65319e8a 100644 --- a/api/managementpb/backup/json/client/locations/test_location_config_parameters.go +++ b/api/managementpb/backup/json/client/locations/test_location_config_parameters.go @@ -60,6 +60,7 @@ TestLocationConfigParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type TestLocationConfigParams struct { + // Body. Body TestLocationConfigBody @@ -129,6 +130,7 @@ func (o *TestLocationConfigParams) SetBody(body TestLocationConfigBody) { // WriteToRequest writes these params to a swagger request func (o *TestLocationConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/test_location_config_responses.go b/api/managementpb/backup/json/client/locations/test_location_config_responses.go index 42948149c1..edce75b396 100644 --- a/api/managementpb/backup/json/client/locations/test_location_config_responses.go +++ b/api/managementpb/backup/json/client/locations/test_location_config_responses.go @@ -60,12 +60,12 @@ type TestLocationConfigOK struct { func (o *TestLocationConfigOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/TestConfig][%d] testLocationConfigOk %+v", 200, o.Payload) } - func (o *TestLocationConfigOK) GetPayload() interface{} { return o.Payload } func (o *TestLocationConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *TestLocationConfigDefault) Code() int { func (o *TestLocationConfigDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/TestConfig][%d] TestLocationConfig default %+v", o._statusCode, o.Payload) } - func (o *TestLocationConfigDefault) GetPayload() *TestLocationConfigDefaultBody { return o.Payload } func (o *TestLocationConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(TestLocationConfigDefaultBody) // response payload @@ -121,6 +121,7 @@ TestLocationConfigBody test location config body swagger:model TestLocationConfigBody */ type TestLocationConfigBody struct { + // filesystem config FilesystemConfig *TestLocationConfigParamsBodyFilesystemConfig `json:"filesystem_config,omitempty"` @@ -203,6 +204,7 @@ func (o *TestLocationConfigBody) ContextValidate(ctx context.Context, formats st } func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -218,6 +220,7 @@ func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Con } func (o *TestLocationConfigBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -255,6 +258,7 @@ TestLocationConfigDefaultBody test location config default body swagger:model TestLocationConfigDefaultBody */ type TestLocationConfigDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -320,7 +324,9 @@ func (o *TestLocationConfigDefaultBody) ContextValidate(ctx context.Context, for } func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -331,6 +337,7 @@ func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -359,6 +366,7 @@ TestLocationConfigDefaultBodyDetailsItems0 test location config default body det swagger:model TestLocationConfigDefaultBodyDetailsItems0 */ type TestLocationConfigDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -396,6 +404,7 @@ TestLocationConfigParamsBodyFilesystemConfig FilesystemLocationConfig represents swagger:model TestLocationConfigParamsBodyFilesystemConfig */ type TestLocationConfigParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -433,6 +442,7 @@ TestLocationConfigParamsBodyS3Config S3LocationConfig represents S3 bucket confi swagger:model TestLocationConfigParamsBodyS3Config */ type TestLocationConfigParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go b/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go index e9058f4280..d60458608c 100644 --- a/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go +++ b/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go @@ -60,6 +60,7 @@ ListRestoreHistoryParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListRestoreHistoryParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListRestoreHistoryParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListRestoreHistoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go b/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go index 2a30f3f837..741d91d4ff 100644 --- a/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go +++ b/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go @@ -62,12 +62,12 @@ type ListRestoreHistoryOK struct { func (o *ListRestoreHistoryOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/RestoreHistory/List][%d] listRestoreHistoryOk %+v", 200, o.Payload) } - func (o *ListRestoreHistoryOK) GetPayload() *ListRestoreHistoryOKBody { return o.Payload } func (o *ListRestoreHistoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRestoreHistoryOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListRestoreHistoryDefault) Code() int { func (o *ListRestoreHistoryDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/RestoreHistory/List][%d] ListRestoreHistory default %+v", o._statusCode, o.Payload) } - func (o *ListRestoreHistoryDefault) GetPayload() *ListRestoreHistoryDefaultBody { return o.Payload } func (o *ListRestoreHistoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRestoreHistoryDefaultBody) // response payload @@ -125,6 +125,7 @@ ListRestoreHistoryDefaultBody list restore history default body swagger:model ListRestoreHistoryDefaultBody */ type ListRestoreHistoryDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *ListRestoreHistoryDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListRestoreHistoryDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *ListRestoreHistoryDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -229,6 +233,7 @@ ListRestoreHistoryDefaultBodyDetailsItems0 list restore history default body det swagger:model ListRestoreHistoryDefaultBodyDetailsItems0 */ type ListRestoreHistoryDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ ListRestoreHistoryOKBody list restore history OK body swagger:model ListRestoreHistoryOKBody */ type ListRestoreHistoryOKBody struct { + // items Items []*ListRestoreHistoryOKBodyItemsItems0 `json:"items"` } @@ -325,7 +331,9 @@ func (o *ListRestoreHistoryOKBody) ContextValidate(ctx context.Context, formats } func (o *ListRestoreHistoryOKBody) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Items); i++ { + if o.Items[i] != nil { if err := o.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +344,7 @@ func (o *ListRestoreHistoryOKBody) contextValidateItems(ctx context.Context, for return err } } + } return nil @@ -364,6 +373,7 @@ ListRestoreHistoryOKBodyItemsItems0 RestoreHistoryItem represents single backup swagger:model ListRestoreHistoryOKBodyItemsItems0 */ type ListRestoreHistoryOKBodyItemsItems0 struct { + // Machine-readable restore id. RestoreID string `json:"restore_id,omitempty"` diff --git a/api/managementpb/backup/locations.pb.go b/api/managementpb/backup/locations.pb.go index 29c046325a..11e70cd034 100644 --- a/api/managementpb/backup/locations.pb.go +++ b/api/managementpb/backup/locations.pb.go @@ -7,13 +7,12 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -940,25 +939,22 @@ func file_managementpb_backup_locations_proto_rawDescGZIP() []byte { return file_managementpb_backup_locations_proto_rawDescData } -var ( - file_managementpb_backup_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_managementpb_backup_locations_proto_goTypes = []interface{}{ - (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig - (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig - (*Location)(nil), // 2: backup.v1.Location - (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest - (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse - (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest - (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse - (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest - (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse - (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest - (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse - (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest - (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse - } -) - +var file_managementpb_backup_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_managementpb_backup_locations_proto_goTypes = []interface{}{ + (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig + (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig + (*Location)(nil), // 2: backup.v1.Location + (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest + (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse + (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest + (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse + (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest + (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse + (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest + (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse + (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest + (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse +} var file_managementpb_backup_locations_proto_depIdxs = []int32{ 0, // 0: backup.v1.Location.filesystem_config:type_name -> backup.v1.FilesystemLocationConfig 1, // 1: backup.v1.Location.s3_config:type_name -> backup.v1.S3LocationConfig diff --git a/api/managementpb/backup/locations.pb.gw.go b/api/managementpb/backup/locations.pb.gw.go index 04abab82c8..10310efce6 100644 --- a/api/managementpb/backup/locations.pb.gw.go +++ b/api/managementpb/backup/locations.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Locations_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListLocationsRequest @@ -47,6 +45,7 @@ func request_Locations_ListLocations_0(ctx context.Context, marshaler runtime.Ma msg, err := client.ListLocations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Locations_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Locations_ListLocations_0(ctx context.Context, marshaler runt msg, err := server.ListLocations(ctx, &protoReq) return msg, metadata, err + } func request_Locations_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Locations_AddLocation_0(ctx context.Context, marshaler runtime.Mars msg, err := client.AddLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Locations_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Locations_AddLocation_0(ctx context.Context, marshaler runtim msg, err := server.AddLocation(ctx, &protoReq) return msg, metadata, err + } func request_Locations_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Locations_ChangeLocation_0(ctx context.Context, marshaler runtime.M msg, err := client.ChangeLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Locations_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Locations_ChangeLocation_0(ctx context.Context, marshaler run msg, err := server.ChangeLocation(ctx, &protoReq) return msg, metadata, err + } func request_Locations_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Locations_RemoveLocation_0(ctx context.Context, marshaler runtime.M msg, err := client.RemoveLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Locations_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Locations_RemoveLocation_0(ctx context.Context, marshaler run msg, err := server.RemoveLocation(ctx, &protoReq) return msg, metadata, err + } func request_Locations_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Locations_TestLocationConfig_0(ctx context.Context, marshaler runti msg, err := client.TestLocationConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Locations_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Locations_TestLocationConfig_0(ctx context.Context, marshaler msg, err := server.TestLocationConfig(ctx, &protoReq) return msg, metadata, err + } // RegisterLocationsHandlerServer registers the http handlers for service Locations to "mux". @@ -198,6 +206,7 @@ func local_request_Locations_TestLocationConfig_0(ctx context.Context, marshaler // 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 RegisterLocationsHandlerFromEndpoint instead. func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocationsServer) error { + mux.Handle("POST", pattern_Locations_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -220,6 +229,7 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -244,6 +254,7 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -268,6 +279,7 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -292,6 +304,7 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -316,6 +329,7 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -358,6 +372,7 @@ func RegisterLocationsHandler(ctx context.Context, mux *runtime.ServeMux, conn * // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "LocationsClient" to call the correct interceptors. func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocationsClient) error { + mux.Handle("POST", pattern_Locations_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -377,6 +392,7 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -398,6 +414,7 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -419,6 +436,7 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -440,6 +458,7 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Locations_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -461,6 +480,7 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/backup/locations.swagger.json b/api/managementpb/backup/locations.swagger.json new file mode 100644 index 0000000000..d1d9041779 --- /dev/null +++ b/api/managementpb/backup/locations.swagger.json @@ -0,0 +1,369 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/backup/locations.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Locations" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/backup/Locations/Add": { + "post": { + "summary": "AddLocation adds backup location.", + "operationId": "AddLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddLocationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddLocationRequest" + } + } + ], + "tags": [ + "Locations" + ] + } + }, + "/v1/management/backup/Locations/Change": { + "post": { + "summary": "ChangeLocation changes backup location.", + "operationId": "ChangeLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeLocationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ChangeLocationRequest" + } + } + ], + "tags": [ + "Locations" + ] + } + }, + "/v1/management/backup/Locations/List": { + "post": { + "summary": "ListLocations returns a list of all backup locations.", + "operationId": "ListLocations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListLocationsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListLocationsRequest" + } + } + ], + "tags": [ + "Locations" + ] + } + }, + "/v1/management/backup/Locations/Remove": { + "post": { + "summary": "RemoveLocation removes existing backup location.", + "operationId": "RemoveLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveLocationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RemoveLocationRequest" + } + } + ], + "tags": [ + "Locations" + ] + } + }, + "/v1/management/backup/Locations/TestConfig": { + "post": { + "summary": "TestLocationConfig tests backup location and credentials.", + "operationId": "TestLocationConfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1TestLocationConfigResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TestLocationConfigRequest" + } + } + ], + "tags": [ + "Locations" + ] + } + } + }, + "definitions": { + "backupv1Location": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "name": { + "type": "string", + "title": "Location name" + }, + "description": { + "type": "string", + "title": "Short description" + }, + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig" + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig" + } + }, + "description": "Location represents single Backup Location." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AddLocationRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Location name" + }, + "description": { + "type": "string" + }, + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig", + "description": "Filesystem location configuration. Exactly one config should be set." + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig", + "description": "S3 Bucket configuration. Exactly one config should be set." + } + } + }, + "v1AddLocationResponse": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Machine-readable ID." + } + } + }, + "v1ChangeLocationRequest": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "name": { + "type": "string", + "title": "Location name" + }, + "description": { + "type": "string" + }, + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig", + "description": "Filesystem location configuration. Exactly one config should be set." + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig", + "description": "S3 Bucket configuration. Exactly one config should be set." + } + } + }, + "v1ChangeLocationResponse": { + "type": "object" + }, + "v1FilesystemLocationConfig": { + "type": "object", + "properties": { + "path": { + "type": "string" + } + }, + "description": "FilesystemLocationConfig represents file system location config." + }, + "v1ListLocationsRequest": { + "type": "object" + }, + "v1ListLocationsResponse": { + "type": "object", + "properties": { + "locations": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/backupv1Location" + } + } + } + }, + "v1RemoveLocationRequest": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "force": { + "type": "boolean", + "title": "Force mode" + } + } + }, + "v1RemoveLocationResponse": { + "type": "object" + }, + "v1S3LocationConfig": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "access_key": { + "type": "string" + }, + "secret_key": { + "type": "string" + }, + "bucket_name": { + "type": "string" + } + }, + "description": "S3LocationConfig represents S3 bucket configuration." + }, + "v1TestLocationConfigRequest": { + "type": "object", + "properties": { + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig", + "description": "Filesystem location configuration. Exactly one config should be set." + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig", + "description": "S3 Bucket configuration. Exactly one config should be set." + } + } + }, + "v1TestLocationConfigResponse": { + "type": "object" + } + } +} diff --git a/api/managementpb/backup/locations_grpc.pb.go b/api/managementpb/backup/locations_grpc.pb.go index 1378eacc9b..948478bcc4 100644 --- a/api/managementpb/backup/locations_grpc.pb.go +++ b/api/managementpb/backup/locations_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -114,24 +113,21 @@ type LocationsServer interface { } // UnimplementedLocationsServer must be embedded to have forward compatible implementations. -type UnimplementedLocationsServer struct{} +type UnimplementedLocationsServer struct { +} func (UnimplementedLocationsServer) ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListLocations not implemented") } - func (UnimplementedLocationsServer) AddLocation(context.Context, *AddLocationRequest) (*AddLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddLocation not implemented") } - func (UnimplementedLocationsServer) ChangeLocation(context.Context, *ChangeLocationRequest) (*ChangeLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeLocation not implemented") } - func (UnimplementedLocationsServer) RemoveLocation(context.Context, *RemoveLocationRequest) (*RemoveLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveLocation not implemented") } - func (UnimplementedLocationsServer) TestLocationConfig(context.Context, *TestLocationConfigRequest) (*TestLocationConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestLocationConfig not implemented") } diff --git a/api/managementpb/backup/restores.pb.go b/api/managementpb/backup/restores.pb.go index 3b01fa4b43..adcfacfffc 100644 --- a/api/managementpb/backup/restores.pb.go +++ b/api/managementpb/backup/restores.pb.go @@ -7,13 +7,12 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -416,19 +415,16 @@ func file_managementpb_backup_restores_proto_rawDescGZIP() []byte { return file_managementpb_backup_restores_proto_rawDescData } -var ( - file_managementpb_backup_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_backup_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_backup_restores_proto_goTypes = []interface{}{ - (RestoreStatus)(0), // 0: backup.v1.RestoreStatus - (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem - (*ListRestoreHistoryRequest)(nil), // 2: backup.v1.ListRestoreHistoryRequest - (*ListRestoreHistoryResponse)(nil), // 3: backup.v1.ListRestoreHistoryResponse - (DataModel)(0), // 4: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - } -) - +var file_managementpb_backup_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_backup_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_backup_restores_proto_goTypes = []interface{}{ + (RestoreStatus)(0), // 0: backup.v1.RestoreStatus + (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem + (*ListRestoreHistoryRequest)(nil), // 2: backup.v1.ListRestoreHistoryRequest + (*ListRestoreHistoryResponse)(nil), // 3: backup.v1.ListRestoreHistoryResponse + (DataModel)(0), // 4: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} var file_managementpb_backup_restores_proto_depIdxs = []int32{ 4, // 0: backup.v1.RestoreHistoryItem.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.RestoreHistoryItem.status:type_name -> backup.v1.RestoreStatus diff --git a/api/managementpb/backup/restores.pb.gw.go b/api/managementpb/backup/restores.pb.gw.go index cab260bb0e..1a126bbc28 100644 --- a/api/managementpb/backup/restores.pb.gw.go +++ b/api/managementpb/backup/restores.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreHistoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListRestoreHistoryRequest @@ -47,6 +45,7 @@ func request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, marshaler msg, err := client.ListRestoreHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreHistoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, mars msg, err := server.ListRestoreHistory(ctx, &protoReq) return msg, metadata, err + } // RegisterRestoreHistoryHandlerServer registers the http handlers for service RestoreHistory to "mux". @@ -70,6 +70,7 @@ func local_request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, mars // 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 RegisterRestoreHistoryHandlerFromEndpoint instead. func RegisterRestoreHistoryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestoreHistoryServer) error { + mux.Handle("POST", pattern_RestoreHistory_ListRestoreHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterRestoreHistoryHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreHistory_ListRestoreHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterRestoreHistoryHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RestoreHistoryClient" to call the correct interceptors. func RegisterRestoreHistoryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestoreHistoryClient) error { + mux.Handle("POST", pattern_RestoreHistory_ListRestoreHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterRestoreHistoryHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreHistory_ListRestoreHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_RestoreHistory_ListRestoreHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "backup", "RestoreHistory", "List"}, "")) +var ( + pattern_RestoreHistory_ListRestoreHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "backup", "RestoreHistory", "List"}, "")) +) -var forward_RestoreHistory_ListRestoreHistory_0 = runtime.ForwardResponseMessage +var ( + forward_RestoreHistory_ListRestoreHistory_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/backup/restores.swagger.json b/api/managementpb/backup/restores.swagger.json new file mode 100644 index 0000000000..2f954ec810 --- /dev/null +++ b/api/managementpb/backup/restores.swagger.json @@ -0,0 +1,180 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/backup/restores.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "RestoreHistory" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/backup/RestoreHistory/List": { + "post": { + "summary": "ListRestoreHistory returns a list of all backup restore history items.", + "operationId": "ListRestoreHistory", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListRestoreHistoryResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListRestoreHistoryRequest" + } + } + ], + "tags": [ + "RestoreHistory" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1DataModel": { + "type": "string", + "enum": [ + "DATA_MODEL_INVALID", + "PHYSICAL", + "LOGICAL" + ], + "default": "DATA_MODEL_INVALID", + "description": "DataModel is a model used for performing a backup." + }, + "v1ListRestoreHistoryRequest": { + "type": "object" + }, + "v1ListRestoreHistoryResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RestoreHistoryItem" + } + } + } + }, + "v1RestoreHistoryItem": { + "type": "object", + "properties": { + "restore_id": { + "type": "string", + "description": "Machine-readable restore id." + }, + "artifact_id": { + "type": "string", + "description": "ID of the artifact used for restore." + }, + "name": { + "type": "string", + "description": "Artifact name used for restore." + }, + "vendor": { + "type": "string", + "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "location_name": { + "type": "string", + "description": "Location name." + }, + "service_id": { + "type": "string", + "description": "Machine-readable service ID." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model." + }, + "status": { + "$ref": "#/definitions/v1RestoreStatus", + "description": "Restore status." + }, + "started_at": { + "type": "string", + "format": "date-time", + "description": "Restore start time." + }, + "finished_at": { + "type": "string", + "format": "date-time", + "description": "Restore finish time." + }, + "pitr_timestamp": { + "type": "string", + "format": "date-time", + "description": "PITR timestamp is filled for PITR restores, empty otherwise." + } + }, + "description": "RestoreHistoryItem represents single backup restore item." + }, + "v1RestoreStatus": { + "type": "string", + "enum": [ + "RESTORE_STATUS_INVALID", + "RESTORE_STATUS_IN_PROGRESS", + "RESTORE_STATUS_SUCCESS", + "RESTORE_STATUS_ERROR" + ], + "default": "RESTORE_STATUS_INVALID", + "description": "RestoreStatus shows the current status of execution of restore." + } + } +} diff --git a/api/managementpb/backup/restores_grpc.pb.go b/api/managementpb/backup/restores_grpc.pb.go index 2dfd019fd7..dc960d39ec 100644 --- a/api/managementpb/backup/restores_grpc.pb.go +++ b/api/managementpb/backup/restores_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type RestoreHistoryServer interface { } // UnimplementedRestoreHistoryServer must be embedded to have forward compatible implementations. -type UnimplementedRestoreHistoryServer struct{} +type UnimplementedRestoreHistoryServer struct { +} func (UnimplementedRestoreHistoryServer) ListRestoreHistory(context.Context, *ListRestoreHistoryRequest) (*ListRestoreHistoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRestoreHistory not implemented") diff --git a/api/managementpb/boolean_flag.pb.go b/api/managementpb/boolean_flag.pb.go index 5451b2e878..26d8d16a4a 100644 --- a/api/managementpb/boolean_flag.pb.go +++ b/api/managementpb/boolean_flag.pb.go @@ -7,11 +7,10 @@ package managementpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -109,13 +108,10 @@ func file_managementpb_boolean_flag_proto_rawDescGZIP() []byte { return file_managementpb_boolean_flag_proto_rawDescData } -var ( - file_managementpb_boolean_flag_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_boolean_flag_proto_goTypes = []interface{}{ - (BooleanFlag)(0), // 0: managementpb.BooleanFlag - } -) - +var file_managementpb_boolean_flag_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_boolean_flag_proto_goTypes = []interface{}{ + (BooleanFlag)(0), // 0: managementpb.BooleanFlag +} var file_managementpb_boolean_flag_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/boolean_flag.swagger.json b/api/managementpb/boolean_flag.swagger.json new file mode 100644 index 0000000000..422954b7a5 --- /dev/null +++ b/api/managementpb/boolean_flag.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/boolean_flag.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/checks.pb.go b/api/managementpb/checks.pb.go index ead9da805a..fa93fdce84 100644 --- a/api/managementpb/checks.pb.go +++ b/api/managementpb/checks.pb.go @@ -7,13 +7,12 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "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 ( @@ -1805,42 +1804,39 @@ func file_managementpb_checks_proto_rawDescGZIP() []byte { return file_managementpb_checks_proto_rawDescData } -var ( - file_managementpb_checks_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_managementpb_checks_proto_msgTypes = make([]protoimpl.MessageInfo, 24) - file_managementpb_checks_proto_goTypes = []interface{}{ - (SecurityCheckInterval)(0), // 0: management.SecurityCheckInterval - (AdvisorCheckFamily)(0), // 1: management.AdvisorCheckFamily - (*SecurityCheckResult)(nil), // 2: management.SecurityCheckResult - (*CheckResultSummary)(nil), // 3: management.CheckResultSummary - (*CheckResult)(nil), // 4: management.CheckResult - (*SecurityCheck)(nil), // 5: management.SecurityCheck - (*Advisor)(nil), // 6: management.Advisor - (*ChangeSecurityCheckParams)(nil), // 7: management.ChangeSecurityCheckParams - (*GetSecurityCheckResultsRequest)(nil), // 8: management.GetSecurityCheckResultsRequest - (*GetSecurityCheckResultsResponse)(nil), // 9: management.GetSecurityCheckResultsResponse - (*StartSecurityChecksRequest)(nil), // 10: management.StartSecurityChecksRequest - (*StartSecurityChecksResponse)(nil), // 11: management.StartSecurityChecksResponse - (*ListSecurityChecksRequest)(nil), // 12: management.ListSecurityChecksRequest - (*ListSecurityChecksResponse)(nil), // 13: management.ListSecurityChecksResponse - (*ListAdvisorsRequest)(nil), // 14: management.ListAdvisorsRequest - (*ListAdvisorsResponse)(nil), // 15: management.ListAdvisorsResponse - (*ChangeSecurityChecksRequest)(nil), // 16: management.ChangeSecurityChecksRequest - (*ChangeSecurityChecksResponse)(nil), // 17: management.ChangeSecurityChecksResponse - (*ListFailedServicesRequest)(nil), // 18: management.ListFailedServicesRequest - (*ListFailedServicesResponse)(nil), // 19: management.ListFailedServicesResponse - (*GetFailedChecksRequest)(nil), // 20: management.GetFailedChecksRequest - (*GetFailedChecksResponse)(nil), // 21: management.GetFailedChecksResponse - (*ToggleCheckAlertRequest)(nil), // 22: management.ToggleCheckAlertRequest - (*ToggleCheckAlertResponse)(nil), // 23: management.ToggleCheckAlertResponse - nil, // 24: management.SecurityCheckResult.LabelsEntry - nil, // 25: management.CheckResult.LabelsEntry - (Severity)(0), // 26: management.Severity - (*PageParams)(nil), // 27: management.PageParams - (*PageTotals)(nil), // 28: management.PageTotals - } -) - +var file_managementpb_checks_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_managementpb_checks_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_managementpb_checks_proto_goTypes = []interface{}{ + (SecurityCheckInterval)(0), // 0: management.SecurityCheckInterval + (AdvisorCheckFamily)(0), // 1: management.AdvisorCheckFamily + (*SecurityCheckResult)(nil), // 2: management.SecurityCheckResult + (*CheckResultSummary)(nil), // 3: management.CheckResultSummary + (*CheckResult)(nil), // 4: management.CheckResult + (*SecurityCheck)(nil), // 5: management.SecurityCheck + (*Advisor)(nil), // 6: management.Advisor + (*ChangeSecurityCheckParams)(nil), // 7: management.ChangeSecurityCheckParams + (*GetSecurityCheckResultsRequest)(nil), // 8: management.GetSecurityCheckResultsRequest + (*GetSecurityCheckResultsResponse)(nil), // 9: management.GetSecurityCheckResultsResponse + (*StartSecurityChecksRequest)(nil), // 10: management.StartSecurityChecksRequest + (*StartSecurityChecksResponse)(nil), // 11: management.StartSecurityChecksResponse + (*ListSecurityChecksRequest)(nil), // 12: management.ListSecurityChecksRequest + (*ListSecurityChecksResponse)(nil), // 13: management.ListSecurityChecksResponse + (*ListAdvisorsRequest)(nil), // 14: management.ListAdvisorsRequest + (*ListAdvisorsResponse)(nil), // 15: management.ListAdvisorsResponse + (*ChangeSecurityChecksRequest)(nil), // 16: management.ChangeSecurityChecksRequest + (*ChangeSecurityChecksResponse)(nil), // 17: management.ChangeSecurityChecksResponse + (*ListFailedServicesRequest)(nil), // 18: management.ListFailedServicesRequest + (*ListFailedServicesResponse)(nil), // 19: management.ListFailedServicesResponse + (*GetFailedChecksRequest)(nil), // 20: management.GetFailedChecksRequest + (*GetFailedChecksResponse)(nil), // 21: management.GetFailedChecksResponse + (*ToggleCheckAlertRequest)(nil), // 22: management.ToggleCheckAlertRequest + (*ToggleCheckAlertResponse)(nil), // 23: management.ToggleCheckAlertResponse + nil, // 24: management.SecurityCheckResult.LabelsEntry + nil, // 25: management.CheckResult.LabelsEntry + (Severity)(0), // 26: management.Severity + (*PageParams)(nil), // 27: management.PageParams + (*PageTotals)(nil), // 28: management.PageTotals +} var file_managementpb_checks_proto_depIdxs = []int32{ 26, // 0: management.SecurityCheckResult.severity:type_name -> management.Severity 24, // 1: management.SecurityCheckResult.labels:type_name -> management.SecurityCheckResult.LabelsEntry diff --git a/api/managementpb/checks.pb.gw.go b/api/managementpb/checks.pb.gw.go index ab78dffe20..900e577d80 100644 --- a/api/managementpb/checks.pb.gw.go +++ b/api/managementpb/checks.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_SecurityChecks_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListFailedServicesRequest @@ -47,6 +45,7 @@ func request_SecurityChecks_ListFailedServices_0(ctx context.Context, marshaler msg, err := client.ListFailedServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_SecurityChecks_ListFailedServices_0(ctx context.Context, mars msg, err := server.ListFailedServices(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshaler run msg, err := client.GetFailedChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshal msg, err := server.GetFailedChecks(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marshaler ru msg, err := client.ToggleCheckAlert(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marsha msg, err := server.ToggleCheckAlert(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, marsh msg, err := client.GetSecurityCheckResults(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, msg, err := server.GetSecurityCheckResults(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, marshaler msg, err := client.StartSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, mar msg, err := server.StartSecurityChecks(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, marshaler msg, err := client.ListSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, mars msg, err := server.ListSecurityChecks(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler runtim msg, err := client.ListAdvisors(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler msg, err := server.ListAdvisors(ctx, &protoReq) return msg, metadata, err + } func request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, marshale msg, err := client.ChangeSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, ma msg, err := server.ChangeSecurityChecks(ctx, &protoReq) return msg, metadata, err + } // RegisterSecurityChecksHandlerServer registers the http handlers for service SecurityChecks to "mux". @@ -294,6 +308,7 @@ func local_request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, ma // 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 RegisterSecurityChecksHandlerFromEndpoint instead. func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityChecksServer) error { + mux.Handle("POST", pattern_SecurityChecks_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -316,6 +331,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -340,6 +356,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ToggleCheckAlert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -364,6 +381,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ToggleCheckAlert_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_GetSecurityCheckResults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -388,6 +406,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetSecurityCheckResults_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_StartSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -412,6 +431,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_StartSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ListSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,6 +456,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -460,6 +481,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ChangeSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -484,6 +506,7 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ChangeSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -526,6 +549,7 @@ func RegisterSecurityChecksHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "SecurityChecksClient" to call the correct interceptors. func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityChecksClient) error { + mux.Handle("POST", pattern_SecurityChecks_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -545,6 +569,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -566,6 +591,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ToggleCheckAlert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -587,6 +613,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ToggleCheckAlert_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_GetSecurityCheckResults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -608,6 +635,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetSecurityCheckResults_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_StartSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -629,6 +657,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_StartSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ListSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -650,6 +679,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -671,6 +701,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_SecurityChecks_ChangeSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -692,6 +723,7 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ChangeSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/checks.swagger.json b/api/managementpb/checks.swagger.json new file mode 100644 index 0000000000..d0c7039491 --- /dev/null +++ b/api/managementpb/checks.swagger.json @@ -0,0 +1,732 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/checks.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "SecurityChecks" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Advisors/List": { + "post": { + "summary": "List advisors", + "description": "Returns a list of advisors available to the user.", + "operationId": "ListAdvisors", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementListAdvisorsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementListAdvisorsRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/Change": { + "post": { + "summary": "Change Security Checks", + "description": "Enables/disables Security Thread Tool checks or changes their interval by names.", + "operationId": "ChangeSecurityChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementChangeSecurityChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementChangeSecurityChecksRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/FailedChecks": { + "post": { + "summary": "Get Failed Checks", + "description": "Returns the latest check results for a given service.", + "operationId": "GetFailedChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementGetFailedChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementGetFailedChecksRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/GetCheckResults": { + "post": { + "summary": "Get Security Check Results", + "description": "Returns Security Thread Tool's latest checks results.", + "operationId": "GetSecurityCheckResults", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementGetSecurityCheckResultsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementGetSecurityCheckResultsRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/List": { + "post": { + "summary": "List advisor checks", + "description": "Returns a list of checks available to the user.", + "operationId": "ListSecurityChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementListSecurityChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementListSecurityChecksRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/ListFailedServices": { + "post": { + "summary": "List Failed Services", + "description": "Returns a list of services with failed checks and a summary of check results.", + "operationId": "ListFailedServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementListFailedServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementListFailedServicesRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/Start": { + "post": { + "summary": "Start Security Checks", + "description": "Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", + "operationId": "StartSecurityChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementStartSecurityChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementStartSecurityChecksRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + }, + "/v1/management/SecurityChecks/ToggleCheckAlert": { + "post": { + "summary": "Toggle Check Alert", + "description": "Silence/Unsilence alerts for a specific check result.", + "operationId": "ToggleCheckAlert", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementToggleCheckAlertResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementToggleCheckAlertRequest" + } + } + ], + "tags": [ + "SecurityChecks" + ] + } + } + }, + "definitions": { + "managementAdvisor": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "description": { + "type": "string", + "description": "Long human-readable description." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "comment": { + "type": "string", + "description": "Comment." + }, + "category": { + "type": "string", + "description": "Category." + }, + "checks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementSecurityCheck" + }, + "description": "Advisor checks." + } + } + }, + "managementAdvisorCheckFamily": { + "type": "string", + "enum": [ + "ADVISOR_CHECK_FAMILY_INVALID", + "ADVISOR_CHECK_FAMILY_MYSQL", + "ADVISOR_CHECK_FAMILY_POSTGRESQL", + "ADVISOR_CHECK_FAMILY_MONGODB" + ], + "default": "ADVISOR_CHECK_FAMILY_INVALID" + }, + "managementChangeSecurityCheckParams": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the check to change." + }, + "enable": { + "type": "boolean" + }, + "disable": { + "type": "boolean" + }, + "interval": { + "$ref": "#/definitions/managementSecurityCheckInterval", + "description": "check execution interval." + } + }, + "description": "ChangeSecurityCheckParams specifies a single check parameters." + }, + "managementChangeSecurityChecksRequest": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementChangeSecurityCheckParams" + } + } + } + }, + "managementChangeSecurityChecksResponse": { + "type": "object" + }, + "managementCheckResult": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "severity": { + "$ref": "#/definitions/managementSeverity" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "read_more_url": { + "type": "string", + "description": "URL containing information on how to resolve an issue detected by an STT check." + }, + "service_name": { + "type": "string", + "description": "Name of the monitored service on which the check ran." + }, + "service_id": { + "type": "string", + "description": "ID of the monitored service on which the check ran." + }, + "check_name": { + "type": "string", + "title": "Name of the check that failed" + }, + "alert_id": { + "type": "string", + "title": "ID of the check result as stored in AlertManager" + }, + "silenced": { + "type": "boolean", + "title": "Silence status of the check result" + } + }, + "description": "CheckResult represents the check results for a given service." + }, + "managementCheckResultSummary": { + "type": "object", + "properties": { + "service_name": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "emergency_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"EMERGENCY\"." + }, + "alert_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"ALERT\"." + }, + "critical_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"CRITICAL\"." + }, + "error_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"ERROR\"." + }, + "warning_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"WARNING\"." + }, + "notice_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"NOTICE\"." + }, + "info_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"INFO\"." + }, + "debug_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"DEBUG\"." + } + }, + "description": "CheckResultSummary is a summary of check results." + }, + "managementGetFailedChecksRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string" + }, + "page_params": { + "$ref": "#/definitions/managementPageParams" + } + } + }, + "managementGetFailedChecksResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementCheckResult" + } + }, + "page_totals": { + "$ref": "#/definitions/managementPageTotals" + } + } + }, + "managementGetSecurityCheckResultsRequest": { + "type": "object" + }, + "managementGetSecurityCheckResultsResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementSecurityCheckResult" + } + } + } + }, + "managementListAdvisorsRequest": { + "type": "object" + }, + "managementListAdvisorsResponse": { + "type": "object", + "properties": { + "advisors": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementAdvisor" + } + } + } + }, + "managementListFailedServicesRequest": { + "type": "object" + }, + "managementListFailedServicesResponse": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementCheckResultSummary" + } + } + } + }, + "managementListSecurityChecksRequest": { + "type": "object" + }, + "managementListSecurityChecksResponse": { + "type": "object", + "properties": { + "checks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementSecurityCheck" + } + } + } + }, + "managementPageParams": { + "type": "object", + "properties": { + "page_size": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results per page." + }, + "index": { + "type": "integer", + "format": "int32", + "description": "Index of the requested page, starts from 0." + } + }, + "description": "PageParams represents page request parameters for pagination." + }, + "managementPageTotals": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + } + }, + "description": "PageTotals represents total values for pagination." + }, + "managementSecurityCheck": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "disabled": { + "type": "boolean", + "description": "True if that check is disabled." + }, + "description": { + "type": "string", + "description": "Long human-readable description." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "interval": { + "$ref": "#/definitions/managementSecurityCheckInterval", + "description": "Check execution interval." + }, + "family": { + "$ref": "#/definitions/managementAdvisorCheckFamily", + "description": "DB family." + } + }, + "description": "SecurityCheck contains check name and status." + }, + "managementSecurityCheckInterval": { + "type": "string", + "enum": [ + "SECURITY_CHECK_INTERVAL_INVALID", + "STANDARD", + "FREQUENT", + "RARE" + ], + "default": "SECURITY_CHECK_INTERVAL_INVALID", + "description": "SecurityCheckInterval represents possible execution interval values for checks." + }, + "managementSecurityCheckResult": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "severity": { + "$ref": "#/definitions/managementSeverity" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "read_more_url": { + "type": "string", + "description": "URL containing information on how to resolve an issue detected by an STT check." + }, + "service_name": { + "type": "string", + "description": "Name of the monitored service on which the check ran." + } + }, + "description": "SecurityCheckResult represents the check result returned from pmm-managed after running the check." + }, + "managementSeverity": { + "type": "string", + "enum": [ + "SEVERITY_INVALID", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "default": "SEVERITY_INVALID", + "description": "Severity represents severity level of the check result or alert." + }, + "managementStartSecurityChecksRequest": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Names of the checks that should be started." + } + } + }, + "managementStartSecurityChecksResponse": { + "type": "object" + }, + "managementToggleCheckAlertRequest": { + "type": "object", + "properties": { + "alert_id": { + "type": "string", + "description": "Alert ID of the check result." + }, + "silence": { + "type": "boolean", + "description": "Silence the check result if set to true, unsilence otherwise." + } + } + }, + "managementToggleCheckAlertResponse": { + "type": "object" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/checks_grpc.pb.go b/api/managementpb/checks_grpc.pb.go index bfa8496cd4..4aeccc6f93 100644 --- a/api/managementpb/checks_grpc.pb.go +++ b/api/managementpb/checks_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -159,36 +158,30 @@ type SecurityChecksServer interface { } // UnimplementedSecurityChecksServer must be embedded to have forward compatible implementations. -type UnimplementedSecurityChecksServer struct{} +type UnimplementedSecurityChecksServer struct { +} func (UnimplementedSecurityChecksServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFailedServices not implemented") } - func (UnimplementedSecurityChecksServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFailedChecks not implemented") } - func (UnimplementedSecurityChecksServer) ToggleCheckAlert(context.Context, *ToggleCheckAlertRequest) (*ToggleCheckAlertResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ToggleCheckAlert not implemented") } - func (UnimplementedSecurityChecksServer) GetSecurityCheckResults(context.Context, *GetSecurityCheckResultsRequest) (*GetSecurityCheckResultsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSecurityCheckResults not implemented") } - func (UnimplementedSecurityChecksServer) StartSecurityChecks(context.Context, *StartSecurityChecksRequest) (*StartSecurityChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartSecurityChecks not implemented") } - func (UnimplementedSecurityChecksServer) ListSecurityChecks(context.Context, *ListSecurityChecksRequest) (*ListSecurityChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSecurityChecks not implemented") } - func (UnimplementedSecurityChecksServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisors not implemented") } - func (UnimplementedSecurityChecksServer) ChangeSecurityChecks(context.Context, *ChangeSecurityChecksRequest) (*ChangeSecurityChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSecurityChecks not implemented") } diff --git a/api/managementpb/external.pb.go b/api/managementpb/external.pb.go index 81ca2e7509..49f06ec969 100644 --- a/api/managementpb/external.pb.go +++ b/api/managementpb/external.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -420,19 +418,16 @@ func file_managementpb_external_proto_rawDescGZIP() []byte { return file_managementpb_external_proto_rawDescData } -var ( - file_managementpb_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_external_proto_goTypes = []interface{}{ - (*AddExternalRequest)(nil), // 0: management.AddExternalRequest - (*AddExternalResponse)(nil), // 1: management.AddExternalResponse - nil, // 2: management.AddExternalRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (*inventorypb.ExternalService)(nil), // 5: inventory.ExternalService - (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter - } -) - +var file_managementpb_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_external_proto_goTypes = []interface{}{ + (*AddExternalRequest)(nil), // 0: management.AddExternalRequest + (*AddExternalResponse)(nil), // 1: management.AddExternalResponse + nil, // 2: management.AddExternalRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (*inventorypb.ExternalService)(nil), // 5: inventory.ExternalService + (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter +} var file_managementpb_external_proto_depIdxs = []int32{ 3, // 0: management.AddExternalRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddExternalRequest.custom_labels:type_name -> management.AddExternalRequest.CustomLabelsEntry diff --git a/api/managementpb/external.pb.gw.go b/api/managementpb/external.pb.gw.go index 315f8a4d17..01431e1b12 100644 --- a/api/managementpb/external.pb.gw.go +++ b/api/managementpb/external.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_External_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, client ExternalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddExternalRequest @@ -47,6 +45,7 @@ func request_External_AddExternal_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddExternal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_External_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, server ExternalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_External_AddExternal_0(ctx context.Context, marshaler runtime msg, err := server.AddExternal(ctx, &protoReq) return msg, metadata, err + } // RegisterExternalHandlerServer registers the http handlers for service External to "mux". @@ -70,6 +70,7 @@ func local_request_External_AddExternal_0(ctx context.Context, marshaler runtime // 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 RegisterExternalHandlerFromEndpoint instead. func RegisterExternalHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExternalServer) error { + mux.Handle("POST", pattern_External_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterExternalHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_External_AddExternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterExternalHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ExternalClient" to call the correct interceptors. func RegisterExternalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExternalClient) error { + mux.Handle("POST", pattern_External_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterExternalHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_External_AddExternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_External_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) +var ( + pattern_External_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) +) -var forward_External_AddExternal_0 = runtime.ForwardResponseMessage +var ( + forward_External_AddExternal_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/external.swagger.json b/api/managementpb/external.swagger.json new file mode 100644 index 0000000000..ed6a42932e --- /dev/null +++ b/api/managementpb/external.swagger.json @@ -0,0 +1,343 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/external.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "External" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/External/Add": { + "post": { + "summary": "Add External Service", + "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "operationId": "AddExternal", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddExternalResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddExternalRequest" + } + } + ], + "tags": [ + "External" + ] + } + } + }, + "definitions": { + "inventoryExternalExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "disabled": { + "type": "boolean", + "description": "If disabled, metrics from this exporter will not be collected." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "ExternalExporter runs on any Node type, including Remote Node." + }, + "inventoryExternalService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "group": { + "type": "string", + "description": "Group name of external service." + } + }, + "description": "ExternalService represents a generic External service instance." + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "managementAddExternalRequest": { + "type": "object", + "properties": { + "runs_on_node_id": { + "type": "string", + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/managementAddNodeParams", + "description": "Create a new Node with those parameters.\nadd_node always should be passed with address.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "address": { + "type": "string", + "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "password": { + "type": "string", + "description": "HTTP basic auth password for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "node_id": { + "type": "string", + "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "group": { + "type": "string", + "description": "Group name of external service." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically.\nNode with registered pmm_agent_id must present at pmm-server\nin case of push metrics_mode." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + } + } + }, + "managementAddExternalResponse": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/inventoryExternalService" + }, + "external_exporter": { + "$ref": "#/definitions/inventoryExternalExporter" + } + } + }, + "managementAddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/external_grpc.pb.go b/api/managementpb/external_grpc.pb.go index 6d28285b1f..f069641f0a 100644 --- a/api/managementpb/external_grpc.pb.go +++ b/api/managementpb/external_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -62,7 +61,8 @@ type ExternalServer interface { } // UnimplementedExternalServer must be embedded to have forward compatible implementations. -type UnimplementedExternalServer struct{} +type UnimplementedExternalServer struct { +} func (UnimplementedExternalServer) AddExternal(context.Context, *AddExternalRequest) (*AddExternalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternal not implemented") diff --git a/api/managementpb/haproxy.pb.go b/api/managementpb/haproxy.pb.go index ec9e677887..ad81b48688 100644 --- a/api/managementpb/haproxy.pb.go +++ b/api/managementpb/haproxy.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -392,19 +390,16 @@ func file_managementpb_haproxy_proto_rawDescGZIP() []byte { return file_managementpb_haproxy_proto_rawDescData } -var ( - file_managementpb_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_haproxy_proto_goTypes = []interface{}{ - (*AddHAProxyRequest)(nil), // 0: management.AddHAProxyRequest - (*AddHAProxyResponse)(nil), // 1: management.AddHAProxyResponse - nil, // 2: management.AddHAProxyRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (*inventorypb.HAProxyService)(nil), // 5: inventory.HAProxyService - (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter - } -) - +var file_managementpb_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_haproxy_proto_goTypes = []interface{}{ + (*AddHAProxyRequest)(nil), // 0: management.AddHAProxyRequest + (*AddHAProxyResponse)(nil), // 1: management.AddHAProxyResponse + nil, // 2: management.AddHAProxyRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (*inventorypb.HAProxyService)(nil), // 5: inventory.HAProxyService + (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter +} var file_managementpb_haproxy_proto_depIdxs = []int32{ 3, // 0: management.AddHAProxyRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddHAProxyRequest.custom_labels:type_name -> management.AddHAProxyRequest.CustomLabelsEntry diff --git a/api/managementpb/haproxy.pb.gw.go b/api/managementpb/haproxy.pb.gw.go index dba51d5a1e..37013f743a 100644 --- a/api/managementpb/haproxy.pb.gw.go +++ b/api/managementpb/haproxy.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.Marshaler, client HAProxyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddHAProxyRequest @@ -47,6 +45,7 @@ func request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.AddHAProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.Marshaler, server HAProxyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.M msg, err := server.AddHAProxy(ctx, &protoReq) return msg, metadata, err + } // RegisterHAProxyHandlerServer registers the http handlers for service HAProxy to "mux". @@ -70,6 +70,7 @@ func local_request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.M // 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 RegisterHAProxyHandlerFromEndpoint instead. func RegisterHAProxyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HAProxyServer) error { + mux.Handle("POST", pattern_HAProxy_AddHAProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterHAProxyHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_HAProxy_AddHAProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterHAProxyHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "HAProxyClient" to call the correct interceptors. func RegisterHAProxyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HAProxyClient) error { + mux.Handle("POST", pattern_HAProxy_AddHAProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterHAProxyHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_HAProxy_AddHAProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_HAProxy_AddHAProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "HAProxy", "Add"}, "")) +var ( + pattern_HAProxy_AddHAProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "HAProxy", "Add"}, "")) +) -var forward_HAProxy_AddHAProxy_0 = runtime.ForwardResponseMessage +var ( + forward_HAProxy_AddHAProxy_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/haproxy.swagger.json b/api/managementpb/haproxy.swagger.json new file mode 100644 index 0000000000..2930f745b5 --- /dev/null +++ b/api/managementpb/haproxy.swagger.json @@ -0,0 +1,331 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/haproxy.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "HAProxy" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/HAProxy/Add": { + "post": { + "summary": "Add HAProxy", + "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", + "operationId": "AddHAProxy", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddHAProxyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddHAProxyRequest" + } + } + ], + "tags": [ + "HAProxy" + ] + } + } + }, + "definitions": { + "inventoryExternalExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "disabled": { + "type": "boolean", + "description": "If disabled, metrics from this exporter will not be collected." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "ExternalExporter runs on any Node type, including Remote Node." + }, + "inventoryHAProxyService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "HAProxyService represents a generic HAProxy service instance." + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "managementAddHAProxyRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/managementAddNodeParams", + "description": "Create a new Node with those parameters.\nadd_node always should be passed with address.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "address": { + "type": "string", + "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "password": { + "type": "string", + "description": "HTTP basic auth password for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically.\nNode with registered pmm_agent_id must present at pmm-server\nin case of push metrics_mode." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + } + } + }, + "managementAddHAProxyResponse": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/inventoryHAProxyService" + }, + "external_exporter": { + "$ref": "#/definitions/inventoryExternalExporter" + } + } + }, + "managementAddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/haproxy_grpc.pb.go b/api/managementpb/haproxy_grpc.pb.go index d9deef0550..b8560eda2c 100644 --- a/api/managementpb/haproxy_grpc.pb.go +++ b/api/managementpb/haproxy_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -62,7 +61,8 @@ type HAProxyServer interface { } // UnimplementedHAProxyServer must be embedded to have forward compatible implementations. -type UnimplementedHAProxyServer struct{} +type UnimplementedHAProxyServer struct { +} func (UnimplementedHAProxyServer) AddHAProxy(context.Context, *AddHAProxyRequest) (*AddHAProxyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddHAProxy not implemented") diff --git a/api/managementpb/ia/alerts.pb.go b/api/managementpb/ia/alerts.pb.go index c8ac098177..8250a20799 100644 --- a/api/managementpb/ia/alerts.pb.go +++ b/api/managementpb/ia/alerts.pb.go @@ -7,16 +7,14 @@ package iav1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + managementpb "github.com/percona/pmm/api/managementpb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - managementpb "github.com/percona/pmm/api/managementpb" + reflect "reflect" + sync "sync" ) const ( @@ -460,25 +458,22 @@ func file_managementpb_ia_alerts_proto_rawDescGZIP() []byte { return file_managementpb_ia_alerts_proto_rawDescData } -var ( - file_managementpb_ia_alerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_managementpb_ia_alerts_proto_goTypes = []interface{}{ - (*Alert)(nil), // 0: ia.v1beta1.Alert - (*ListAlertsRequest)(nil), // 1: ia.v1beta1.ListAlertsRequest - (*ListAlertsResponse)(nil), // 2: ia.v1beta1.ListAlertsResponse - (*ToggleAlertsRequest)(nil), // 3: ia.v1beta1.ToggleAlertsRequest - (*ToggleAlertsResponse)(nil), // 4: ia.v1beta1.ToggleAlertsResponse - nil, // 5: ia.v1beta1.Alert.LabelsEntry - (managementpb.Severity)(0), // 6: management.Severity - (Status)(0), // 7: ia.v1beta1.Status - (*Rule)(nil), // 8: ia.v1beta1.Rule - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (*managementpb.PageParams)(nil), // 10: management.PageParams - (*managementpb.PageTotals)(nil), // 11: management.PageTotals - (managementpb.BooleanFlag)(0), // 12: managementpb.BooleanFlag - } -) - +var file_managementpb_ia_alerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_managementpb_ia_alerts_proto_goTypes = []interface{}{ + (*Alert)(nil), // 0: ia.v1beta1.Alert + (*ListAlertsRequest)(nil), // 1: ia.v1beta1.ListAlertsRequest + (*ListAlertsResponse)(nil), // 2: ia.v1beta1.ListAlertsResponse + (*ToggleAlertsRequest)(nil), // 3: ia.v1beta1.ToggleAlertsRequest + (*ToggleAlertsResponse)(nil), // 4: ia.v1beta1.ToggleAlertsResponse + nil, // 5: ia.v1beta1.Alert.LabelsEntry + (managementpb.Severity)(0), // 6: management.Severity + (Status)(0), // 7: ia.v1beta1.Status + (*Rule)(nil), // 8: ia.v1beta1.Rule + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*managementpb.PageParams)(nil), // 10: management.PageParams + (*managementpb.PageTotals)(nil), // 11: management.PageTotals + (managementpb.BooleanFlag)(0), // 12: managementpb.BooleanFlag +} var file_managementpb_ia_alerts_proto_depIdxs = []int32{ 6, // 0: ia.v1beta1.Alert.severity:type_name -> management.Severity 7, // 1: ia.v1beta1.Alert.status:type_name -> ia.v1beta1.Status diff --git a/api/managementpb/ia/alerts.pb.gw.go b/api/managementpb/ia/alerts.pb.gw.go index 00ed66298e..993d678a8c 100644 --- a/api/managementpb/ia/alerts.pb.gw.go +++ b/api/managementpb/ia/alerts.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Marshaler, client AlertsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAlertsRequest @@ -47,6 +45,7 @@ func request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.ListAlerts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Marshaler, server AlertsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Ma msg, err := server.ListAlerts(ctx, &protoReq) return msg, metadata, err + } func request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime.Marshaler, client AlertsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.ToggleAlerts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime.Marshaler, server AlertsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime. msg, err := server.ToggleAlerts(ctx, &protoReq) return msg, metadata, err + } // RegisterAlertsHandlerServer registers the http handlers for service Alerts to "mux". @@ -102,6 +104,7 @@ func local_request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime. // 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 RegisterAlertsHandlerFromEndpoint instead. func RegisterAlertsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertsServer) error { + mux.Handle("POST", pattern_Alerts_ListAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -124,6 +127,7 @@ func RegisterAlertsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Alerts_ListAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerts_ToggleAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -148,6 +152,7 @@ func RegisterAlertsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Alerts_ToggleAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -190,6 +195,7 @@ func RegisterAlertsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AlertsClient" to call the correct interceptors. func RegisterAlertsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertsClient) error { + mux.Handle("POST", pattern_Alerts_ListAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -209,6 +215,7 @@ func RegisterAlertsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Alerts_ListAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Alerts_ToggleAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -230,6 +237,7 @@ func RegisterAlertsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Alerts_ToggleAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/ia/alerts.swagger.json b/api/managementpb/ia/alerts.swagger.json new file mode 100644 index 0000000000..50af528a20 --- /dev/null +++ b/api/managementpb/ia/alerts.swagger.json @@ -0,0 +1,716 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/ia/alerts.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Alerts" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/ia/Alerts/List": { + "post": { + "summary": "ListAlerts returns a list of all Alerts.", + "operationId": "ListAlerts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListAlertsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListAlertsRequest" + } + } + ], + "tags": [ + "Alerts" + ], + "deprecated": true + } + }, + "/v1/management/ia/Alerts/Toggle": { + "post": { + "summary": "ToggleAlerts allows to switch alerts state between silenced and unsilenced.", + "description": "Pass empty list to apply toggle action to all existing alerts", + "operationId": "ToggleAlerts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ToggleAlertsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ToggleAlertsRequest" + } + } + ], + "tags": [ + "Alerts" + ], + "deprecated": true + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "iav1beta1Filter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/iav1beta1FilterType" + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "description": "Filter repsents a single filter condition." + }, + "iav1beta1FilterType": { + "type": "string", + "enum": [ + "FILTER_TYPE_INVALID", + "EQUAL", + "REGEX" + ], + "default": "FILTER_TYPE_INVALID", + "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;" + }, + "iav1beta1ParamValue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "type": "boolean", + "description": "Bool value." + }, + "float": { + "type": "number", + "format": "double", + "description": "Float value." + }, + "string": { + "type": "string", + "description": "String value." + } + }, + "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs." + }, + "iav1beta1Status": { + "type": "string", + "enum": [ + "STATUS_INVALID", + "CLEAR", + "PENDING", + "TRIGGERING", + "SILENCED" + ], + "default": "STATUS_INVALID", + "description": "Status represents Alert Rule's and Alert's combined status.\n\n - CLEAR: No alert.\n - PENDING: Pending, but not triggering alert.\n - TRIGGERING: Triggering (firing) alert.\n - SILENCED: Silenced alert." + }, + "managementPageParams": { + "type": "object", + "properties": { + "page_size": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results per page." + }, + "index": { + "type": "integer", + "format": "int32", + "description": "Index of the requested page, starts from 0." + } + }, + "description": "PageParams represents page request parameters for pagination." + }, + "managementPageTotals": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + } + }, + "description": "PageTotals represents total values for pagination." + }, + "managementSeverity": { + "type": "string", + "enum": [ + "SEVERITY_INVALID", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "default": "SEVERITY_INVALID", + "description": "Severity represents severity level of the check result or alert." + }, + "managementpbBooleanFlag": { + "type": "string", + "enum": [ + "DO_NOT_CHANGE", + "TRUE", + "FALSE" + ], + "default": "DO_NOT_CHANGE", + "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1BoolParamDefinition": { + "type": "object", + "properties": { + "default": { + "$ref": "#/definitions/managementpbBooleanFlag" + } + }, + "description": "BoolParamDefinition represents boolean parameter's default value." + }, + "v1FloatParamDefinition": { + "type": "object", + "properties": { + "has_default": { + "type": "boolean", + "description": "True if default value is set." + }, + "default": { + "type": "number", + "format": "double", + "description": "Default value if has_default is true." + }, + "has_min": { + "type": "boolean", + "description": "True if minimal valid value is set." + }, + "min": { + "type": "number", + "format": "double", + "description": "Minimal valid value (inclusive) if has_min is true." + }, + "has_max": { + "type": "boolean", + "description": "True if maximal valid value is set." + }, + "max": { + "type": "number", + "format": "double", + "description": "Maximal valid value (inclusive) if has_max is true." + } + }, + "description": "FloatParamDefinition represents float parameter's default value and valid range." + }, + "v1ParamDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "summary": { + "type": "string", + "description": "Short human-readable parameter summary." + }, + "unit": { + "$ref": "#/definitions/v1ParamUnit", + "description": "Parameter unit." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "$ref": "#/definitions/v1BoolParamDefinition", + "description": "Bool value." + }, + "float": { + "$ref": "#/definitions/v1FloatParamDefinition", + "description": "Float value." + }, + "string": { + "$ref": "#/definitions/v1StringParamDefinition", + "description": "String value." + } + }, + "description": "ParamDefinition represents a single query parameter." + }, + "v1ParamType": { + "type": "string", + "enum": [ + "PARAM_TYPE_INVALID", + "BOOL", + "FLOAT", + "STRING" + ], + "default": "PARAM_TYPE_INVALID", + "description": "ParamType represents template parameter type." + }, + "v1ParamUnit": { + "type": "string", + "enum": [ + "PARAM_UNIT_INVALID", + "PERCENTAGE", + "SECONDS" + ], + "default": "PARAM_UNIT_INVALID", + "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s" + }, + "v1StringParamDefinition": { + "type": "object", + "properties": { + "has_default": { + "type": "boolean", + "description": "True if default value is set." + }, + "default": { + "type": "string", + "description": "Default value if has_default is true." + } + }, + "description": "StringParamDefinition represents string parameter's default value." + }, + "v1beta1Alert": { + "type": "object", + "properties": { + "alert_id": { + "type": "string", + "description": "ID." + }, + "summary": { + "type": "string", + "description": "Human-readable summary." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Severity." + }, + "status": { + "$ref": "#/definitions/iav1beta1Status", + "description": "Status." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Combined labels." + }, + "rule": { + "$ref": "#/definitions/v1beta1Rule", + "description": "The current Alert Rule." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Alert creation time." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Alert last update time." + } + }, + "description": "Alert represents Alert." + }, + "v1beta1BasicAuth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "password_file": { + "type": "string" + } + }, + "description": "BasicAuth represents basic HTTP auth configuration." + }, + "v1beta1Channel": { + "type": "object", + "properties": { + "channel_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "email_config": { + "$ref": "#/definitions/v1beta1EmailConfig" + }, + "pagerduty_config": { + "$ref": "#/definitions/v1beta1PagerDutyConfig" + }, + "slack_config": { + "$ref": "#/definitions/v1beta1SlackConfig" + }, + "webhook_config": { + "$ref": "#/definitions/v1beta1WebhookConfig" + }, + "disabled": { + "type": "boolean", + "description": "True if that channel is disabled." + } + }, + "description": "Channel represents a single Notification Channel." + }, + "v1beta1EmailConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "to": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "EmailConfig represents email configuration." + }, + "v1beta1HTTPConfig": { + "type": "object", + "properties": { + "basic_auth": { + "$ref": "#/definitions/v1beta1BasicAuth", + "description": "Basic HTTP auth configuration. Zero value will remove it." + }, + "bearer_token": { + "type": "string" + }, + "bearer_token_file": { + "type": "string" + }, + "tls_config": { + "$ref": "#/definitions/v1beta1TLSConfig", + "description": "TLS configuration. Zero value will remove it." + }, + "proxy_url": { + "type": "string" + } + }, + "description": "HTTPConfig represents HTTP client configuration." + }, + "v1beta1ListAlertsRequest": { + "type": "object", + "properties": { + "page_params": { + "$ref": "#/definitions/managementPageParams", + "description": "Page request." + } + } + }, + "v1beta1ListAlertsResponse": { + "type": "object", + "properties": { + "alerts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Alert" + } + }, + "totals": { + "$ref": "#/definitions/managementPageTotals", + "description": "Total items and pages." + } + } + }, + "v1beta1PagerDutyConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "routing_key": { + "type": "string", + "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set." + }, + "service_key": { + "type": "string", + "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set." + } + }, + "description": "PagerDutyConfig represents PagerDuty configuration." + }, + "v1beta1Rule": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "summary": { + "type": "string", + "description": "Rule human-readable summary." + }, + "template_name": { + "type": "string", + "description": "Template used for this rule." + }, + "disabled": { + "type": "boolean", + "description": "True if that rule is disabled." + }, + "expr_template": { + "type": "string", + "description": "Expression template." + }, + "expr": { + "type": "string", + "description": "Expression filled with parameters." + }, + "params_definitions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ParamDefinition" + }, + "description": "Expression parameters definitions." + }, + "params_values": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1ParamValue" + }, + "description": "Expression parameters values." + }, + "default_for": { + "type": "string", + "description": "Default for duration." + }, + "for": { + "type": "string", + "description": "For duration." + }, + "default_severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Default severity." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Severity." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels." + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1Filter" + }, + "description": "Filters." + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Channel" + }, + "description": "Channels." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Rule creation time." + } + }, + "description": "Rule represents Alert Rule." + }, + "v1beta1SlackConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "channel": { + "type": "string" + } + }, + "description": "SlackConfig represents Slack configuration." + }, + "v1beta1TLSConfig": { + "type": "object", + "properties": { + "ca_file": { + "type": "string", + "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." + }, + "cert_file": { + "type": "string", + "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." + }, + "key_file": { + "type": "string", + "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." + }, + "server_name": { + "type": "string", + "description": "Name of the server." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Disable validation of the server certificate." + }, + "ca_file_content": { + "type": "string", + "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." + }, + "cert_file_content": { + "type": "string", + "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." + }, + "key_file_content": { + "type": "string", + "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." + } + }, + "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config" + }, + "v1beta1ToggleAlertsRequest": { + "type": "object", + "properties": { + "alert_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of alerts that silence state should be switched. If provided array is empty than all\nexisting alerts are switched." + }, + "silenced": { + "$ref": "#/definitions/managementpbBooleanFlag", + "description": "Silences or unsilences alert if set." + } + } + }, + "v1beta1ToggleAlertsResponse": { + "type": "object" + }, + "v1beta1WebhookConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "http_config": { + "$ref": "#/definitions/v1beta1HTTPConfig" + }, + "max_alerts": { + "type": "integer", + "format": "int32" + } + }, + "description": "WebhookConfig represents webhook configuration." + } + } +} diff --git a/api/managementpb/ia/alerts_grpc.pb.go b/api/managementpb/ia/alerts_grpc.pb.go index 33c9513f7a..c094ffa8fb 100644 --- a/api/managementpb/ia/alerts_grpc.pb.go +++ b/api/managementpb/ia/alerts_grpc.pb.go @@ -8,7 +8,6 @@ package iav1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -78,12 +77,12 @@ type AlertsServer interface { } // UnimplementedAlertsServer must be embedded to have forward compatible implementations. -type UnimplementedAlertsServer struct{} +type UnimplementedAlertsServer struct { +} func (UnimplementedAlertsServer) ListAlerts(context.Context, *ListAlertsRequest) (*ListAlertsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAlerts not implemented") } - func (UnimplementedAlertsServer) ToggleAlerts(context.Context, *ToggleAlertsRequest) (*ToggleAlertsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ToggleAlerts not implemented") } diff --git a/api/managementpb/ia/channels.pb.go b/api/managementpb/ia/channels.pb.go index 70636dd1af..78cdb04a8b 100644 --- a/api/managementpb/ia/channels.pb.go +++ b/api/managementpb/ia/channels.pb.go @@ -7,16 +7,14 @@ package iav1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + managementpb "github.com/percona/pmm/api/managementpb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - managementpb "github.com/percona/pmm/api/managementpb" + reflect "reflect" + sync "sync" ) const ( @@ -1410,30 +1408,27 @@ func file_managementpb_ia_channels_proto_rawDescGZIP() []byte { return file_managementpb_ia_channels_proto_rawDescData } -var ( - file_managementpb_ia_channels_proto_msgTypes = make([]protoimpl.MessageInfo, 16) - file_managementpb_ia_channels_proto_goTypes = []interface{}{ - (*BasicAuth)(nil), // 0: ia.v1beta1.BasicAuth - (*TLSConfig)(nil), // 1: ia.v1beta1.TLSConfig - (*HTTPConfig)(nil), // 2: ia.v1beta1.HTTPConfig - (*EmailConfig)(nil), // 3: ia.v1beta1.EmailConfig - (*PagerDutyConfig)(nil), // 4: ia.v1beta1.PagerDutyConfig - (*SlackConfig)(nil), // 5: ia.v1beta1.SlackConfig - (*WebhookConfig)(nil), // 6: ia.v1beta1.WebhookConfig - (*Channel)(nil), // 7: ia.v1beta1.Channel - (*ListChannelsRequest)(nil), // 8: ia.v1beta1.ListChannelsRequest - (*ListChannelsResponse)(nil), // 9: ia.v1beta1.ListChannelsResponse - (*AddChannelRequest)(nil), // 10: ia.v1beta1.AddChannelRequest - (*AddChannelResponse)(nil), // 11: ia.v1beta1.AddChannelResponse - (*ChangeChannelRequest)(nil), // 12: ia.v1beta1.ChangeChannelRequest - (*ChangeChannelResponse)(nil), // 13: ia.v1beta1.ChangeChannelResponse - (*RemoveChannelRequest)(nil), // 14: ia.v1beta1.RemoveChannelRequest - (*RemoveChannelResponse)(nil), // 15: ia.v1beta1.RemoveChannelResponse - (*managementpb.PageParams)(nil), // 16: management.PageParams - (*managementpb.PageTotals)(nil), // 17: management.PageTotals - } -) - +var file_managementpb_ia_channels_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_managementpb_ia_channels_proto_goTypes = []interface{}{ + (*BasicAuth)(nil), // 0: ia.v1beta1.BasicAuth + (*TLSConfig)(nil), // 1: ia.v1beta1.TLSConfig + (*HTTPConfig)(nil), // 2: ia.v1beta1.HTTPConfig + (*EmailConfig)(nil), // 3: ia.v1beta1.EmailConfig + (*PagerDutyConfig)(nil), // 4: ia.v1beta1.PagerDutyConfig + (*SlackConfig)(nil), // 5: ia.v1beta1.SlackConfig + (*WebhookConfig)(nil), // 6: ia.v1beta1.WebhookConfig + (*Channel)(nil), // 7: ia.v1beta1.Channel + (*ListChannelsRequest)(nil), // 8: ia.v1beta1.ListChannelsRequest + (*ListChannelsResponse)(nil), // 9: ia.v1beta1.ListChannelsResponse + (*AddChannelRequest)(nil), // 10: ia.v1beta1.AddChannelRequest + (*AddChannelResponse)(nil), // 11: ia.v1beta1.AddChannelResponse + (*ChangeChannelRequest)(nil), // 12: ia.v1beta1.ChangeChannelRequest + (*ChangeChannelResponse)(nil), // 13: ia.v1beta1.ChangeChannelResponse + (*RemoveChannelRequest)(nil), // 14: ia.v1beta1.RemoveChannelRequest + (*RemoveChannelResponse)(nil), // 15: ia.v1beta1.RemoveChannelResponse + (*managementpb.PageParams)(nil), // 16: management.PageParams + (*managementpb.PageTotals)(nil), // 17: management.PageTotals +} var file_managementpb_ia_channels_proto_depIdxs = []int32{ 0, // 0: ia.v1beta1.HTTPConfig.basic_auth:type_name -> ia.v1beta1.BasicAuth 1, // 1: ia.v1beta1.HTTPConfig.tls_config:type_name -> ia.v1beta1.TLSConfig diff --git a/api/managementpb/ia/channels.pb.gw.go b/api/managementpb/ia/channels.pb.gw.go index f47eb473a1..3975c6a3de 100644 --- a/api/managementpb/ia/channels.pb.gw.go +++ b/api/managementpb/ia/channels.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Channels_ListChannels_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListChannelsRequest @@ -47,6 +45,7 @@ func request_Channels_ListChannels_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListChannels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Channels_ListChannels_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Channels_ListChannels_0(ctx context.Context, marshaler runtim msg, err := server.ListChannels(ctx, &protoReq) return msg, metadata, err + } func request_Channels_AddChannel_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Channels_AddChannel_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.AddChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Channels_AddChannel_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Channels_AddChannel_0(ctx context.Context, marshaler runtime. msg, err := server.AddChannel(ctx, &protoReq) return msg, metadata, err + } func request_Channels_ChangeChannel_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Channels_ChangeChannel_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ChangeChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Channels_ChangeChannel_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Channels_ChangeChannel_0(ctx context.Context, marshaler runti msg, err := server.ChangeChannel(ctx, &protoReq) return msg, metadata, err + } func request_Channels_RemoveChannel_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Channels_RemoveChannel_0(ctx context.Context, marshaler runtime.Mar msg, err := client.RemoveChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Channels_RemoveChannel_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Channels_RemoveChannel_0(ctx context.Context, marshaler runti msg, err := server.RemoveChannel(ctx, &protoReq) return msg, metadata, err + } // RegisterChannelsHandlerServer registers the http handlers for service Channels to "mux". @@ -166,6 +172,7 @@ func local_request_Channels_RemoveChannel_0(ctx context.Context, marshaler runti // 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 RegisterChannelsHandlerFromEndpoint instead. func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChannelsServer) error { + mux.Handle("POST", pattern_Channels_ListChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -188,6 +195,7 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_ListChannels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Channels_AddChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -212,6 +220,7 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_AddChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Channels_ChangeChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -236,6 +245,7 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_ChangeChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Channels_RemoveChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -260,6 +270,7 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_RemoveChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -302,6 +313,7 @@ func RegisterChannelsHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ChannelsClient" to call the correct interceptors. func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChannelsClient) error { + mux.Handle("POST", pattern_Channels_ListChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -321,6 +333,7 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_ListChannels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Channels_AddChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -342,6 +355,7 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_AddChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Channels_ChangeChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -363,6 +377,7 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_ChangeChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Channels_RemoveChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -384,6 +399,7 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_RemoveChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/ia/channels.swagger.json b/api/managementpb/ia/channels.swagger.json new file mode 100644 index 0000000000..845d5df45e --- /dev/null +++ b/api/managementpb/ia/channels.swagger.json @@ -0,0 +1,497 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/ia/channels.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Channels" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/ia/Channels/Add": { + "post": { + "summary": "AddChannel adds notification channel.", + "operationId": "AddChannel", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1AddChannelResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1AddChannelRequest" + } + } + ], + "tags": [ + "Channels" + ], + "deprecated": true + } + }, + "/v1/management/ia/Channels/Change": { + "post": { + "summary": "ChangeChannel changes notification channel.", + "operationId": "ChangeChannel", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ChangeChannelResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ChangeChannelRequest" + } + } + ], + "tags": [ + "Channels" + ], + "deprecated": true + } + }, + "/v1/management/ia/Channels/List": { + "post": { + "summary": "ListChannels returns a list of all notifation channels.", + "operationId": "ListChannels", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListChannelsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListChannelsRequest" + } + } + ], + "tags": [ + "Channels" + ], + "deprecated": true + } + }, + "/v1/management/ia/Channels/Remove": { + "post": { + "summary": "RemoveChannel removes notification channel.", + "operationId": "RemoveChannel", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1RemoveChannelResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1RemoveChannelRequest" + } + } + ], + "tags": [ + "Channels" + ], + "deprecated": true + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "managementPageParams": { + "type": "object", + "properties": { + "page_size": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results per page." + }, + "index": { + "type": "integer", + "format": "int32", + "description": "Index of the requested page, starts from 0." + } + }, + "description": "PageParams represents page request parameters for pagination." + }, + "managementPageTotals": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + } + }, + "description": "PageTotals represents total values for pagination." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1beta1AddChannelRequest": { + "type": "object", + "properties": { + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "email_config": { + "$ref": "#/definitions/v1beta1EmailConfig", + "description": "Email configuration. Exactly one config should be set." + }, + "pagerduty_config": { + "$ref": "#/definitions/v1beta1PagerDutyConfig", + "description": "PagerDuty configuration. Exactly one config should be set." + }, + "slack_config": { + "$ref": "#/definitions/v1beta1SlackConfig", + "description": "Slack configuration. Exactly one config should be set." + }, + "webhook_config": { + "$ref": "#/definitions/v1beta1WebhookConfig", + "description": "Webhook configuration. Exactly one config should be set." + }, + "disabled": { + "type": "boolean", + "description": "New channel status." + } + } + }, + "v1beta1AddChannelResponse": { + "type": "object", + "properties": { + "channel_id": { + "type": "string", + "description": "Machine-readable ID." + } + } + }, + "v1beta1BasicAuth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "password_file": { + "type": "string" + } + }, + "description": "BasicAuth represents basic HTTP auth configuration." + }, + "v1beta1ChangeChannelRequest": { + "type": "object", + "properties": { + "channel_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary. Empty value will not change it." + }, + "email_config": { + "$ref": "#/definitions/v1beta1EmailConfig", + "description": "Email configuration. Exactly one config should be set." + }, + "pagerduty_config": { + "$ref": "#/definitions/v1beta1PagerDutyConfig", + "description": "PagerDuty configuration. Exactly one config should be set." + }, + "slack_config": { + "$ref": "#/definitions/v1beta1SlackConfig", + "description": "Slack configuration. Exactly one config should be set." + }, + "webhook_config": { + "$ref": "#/definitions/v1beta1WebhookConfig", + "description": "Webhook configuration. Exactly one config should be set." + }, + "disabled": { + "type": "boolean", + "description": "Enables or disables that channel. Should be set." + } + } + }, + "v1beta1ChangeChannelResponse": { + "type": "object" + }, + "v1beta1Channel": { + "type": "object", + "properties": { + "channel_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "email_config": { + "$ref": "#/definitions/v1beta1EmailConfig" + }, + "pagerduty_config": { + "$ref": "#/definitions/v1beta1PagerDutyConfig" + }, + "slack_config": { + "$ref": "#/definitions/v1beta1SlackConfig" + }, + "webhook_config": { + "$ref": "#/definitions/v1beta1WebhookConfig" + }, + "disabled": { + "type": "boolean", + "description": "True if that channel is disabled." + } + }, + "description": "Channel represents a single Notification Channel." + }, + "v1beta1EmailConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "to": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "EmailConfig represents email configuration." + }, + "v1beta1HTTPConfig": { + "type": "object", + "properties": { + "basic_auth": { + "$ref": "#/definitions/v1beta1BasicAuth", + "description": "Basic HTTP auth configuration. Zero value will remove it." + }, + "bearer_token": { + "type": "string" + }, + "bearer_token_file": { + "type": "string" + }, + "tls_config": { + "$ref": "#/definitions/v1beta1TLSConfig", + "description": "TLS configuration. Zero value will remove it." + }, + "proxy_url": { + "type": "string" + } + }, + "description": "HTTPConfig represents HTTP client configuration." + }, + "v1beta1ListChannelsRequest": { + "type": "object", + "properties": { + "page_params": { + "$ref": "#/definitions/managementPageParams", + "description": "Page request." + } + } + }, + "v1beta1ListChannelsResponse": { + "type": "object", + "properties": { + "channels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Channel" + } + }, + "totals": { + "$ref": "#/definitions/managementPageTotals", + "description": "Total items and pages." + } + } + }, + "v1beta1PagerDutyConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "routing_key": { + "type": "string", + "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set." + }, + "service_key": { + "type": "string", + "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set." + } + }, + "description": "PagerDutyConfig represents PagerDuty configuration." + }, + "v1beta1RemoveChannelRequest": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + } + } + }, + "v1beta1RemoveChannelResponse": { + "type": "object" + }, + "v1beta1SlackConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "channel": { + "type": "string" + } + }, + "description": "SlackConfig represents Slack configuration." + }, + "v1beta1TLSConfig": { + "type": "object", + "properties": { + "ca_file": { + "type": "string", + "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." + }, + "cert_file": { + "type": "string", + "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." + }, + "key_file": { + "type": "string", + "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." + }, + "server_name": { + "type": "string", + "description": "Name of the server." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Disable validation of the server certificate." + }, + "ca_file_content": { + "type": "string", + "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." + }, + "cert_file_content": { + "type": "string", + "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." + }, + "key_file_content": { + "type": "string", + "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." + } + }, + "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config" + }, + "v1beta1WebhookConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "http_config": { + "$ref": "#/definitions/v1beta1HTTPConfig" + }, + "max_alerts": { + "type": "integer", + "format": "int32" + } + }, + "description": "WebhookConfig represents webhook configuration." + } + } +} diff --git a/api/managementpb/ia/channels_grpc.pb.go b/api/managementpb/ia/channels_grpc.pb.go index 48806962f5..aac562030f 100644 --- a/api/managementpb/ia/channels_grpc.pb.go +++ b/api/managementpb/ia/channels_grpc.pb.go @@ -8,7 +8,6 @@ package iav1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -112,20 +111,18 @@ type ChannelsServer interface { } // UnimplementedChannelsServer must be embedded to have forward compatible implementations. -type UnimplementedChannelsServer struct{} +type UnimplementedChannelsServer struct { +} func (UnimplementedChannelsServer) ListChannels(context.Context, *ListChannelsRequest) (*ListChannelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListChannels not implemented") } - func (UnimplementedChannelsServer) AddChannel(context.Context, *AddChannelRequest) (*AddChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddChannel not implemented") } - func (UnimplementedChannelsServer) ChangeChannel(context.Context, *ChangeChannelRequest) (*ChangeChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeChannel not implemented") } - func (UnimplementedChannelsServer) RemoveChannel(context.Context, *RemoveChannelRequest) (*RemoveChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveChannel not implemented") } diff --git a/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go b/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go index b2937ec92e..aa37053416 100644 --- a/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go +++ b/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go @@ -60,6 +60,7 @@ ListAlertsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAlertsParams struct { + // Body. Body ListAlertsBody @@ -129,6 +130,7 @@ func (o *ListAlertsParams) SetBody(body ListAlertsBody) { // WriteToRequest writes these params to a swagger request func (o *ListAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/alerts/list_alerts_responses.go b/api/managementpb/ia/json/client/alerts/list_alerts_responses.go index e1728b1587..a7f186de3f 100644 --- a/api/managementpb/ia/json/client/alerts/list_alerts_responses.go +++ b/api/managementpb/ia/json/client/alerts/list_alerts_responses.go @@ -62,12 +62,12 @@ type ListAlertsOK struct { func (o *ListAlertsOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/List][%d] listAlertsOk %+v", 200, o.Payload) } - func (o *ListAlertsOK) GetPayload() *ListAlertsOKBody { return o.Payload } func (o *ListAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAlertsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAlertsDefault) Code() int { func (o *ListAlertsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/List][%d] ListAlerts default %+v", o._statusCode, o.Payload) } - func (o *ListAlertsDefault) GetPayload() *ListAlertsDefaultBody { return o.Payload } func (o *ListAlertsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAlertsDefaultBody) // response payload @@ -125,6 +125,7 @@ ListAlertsBody list alerts body swagger:model ListAlertsBody */ type ListAlertsBody struct { + // page params PageParams *ListAlertsParamsBodyPageParams `json:"page_params,omitempty"` } @@ -177,6 +178,7 @@ func (o *ListAlertsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *ListAlertsBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { + if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -214,6 +216,7 @@ ListAlertsDefaultBody list alerts default body swagger:model ListAlertsDefaultBody */ type ListAlertsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -279,7 +282,9 @@ func (o *ListAlertsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAlertsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -290,6 +295,7 @@ func (o *ListAlertsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -318,6 +324,7 @@ ListAlertsDefaultBodyDetailsItems0 list alerts default body details items0 swagger:model ListAlertsDefaultBodyDetailsItems0 */ type ListAlertsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +362,7 @@ ListAlertsOKBody list alerts OK body swagger:model ListAlertsOKBody */ type ListAlertsOKBody struct { + // alerts Alerts []*ListAlertsOKBodyAlertsItems0 `json:"alerts"` @@ -444,7 +452,9 @@ func (o *ListAlertsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAlertsOKBody) contextValidateAlerts(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Alerts); i++ { + if o.Alerts[i] != nil { if err := o.Alerts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -455,12 +465,14 @@ func (o *ListAlertsOKBody) contextValidateAlerts(ctx context.Context, formats st return err } } + } return nil } func (o *ListAlertsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -498,6 +510,7 @@ ListAlertsOKBodyAlertsItems0 Alert represents Alert. swagger:model ListAlertsOKBodyAlertsItems0 */ type ListAlertsOKBodyAlertsItems0 struct { + // ID. AlertID string `json:"alert_id,omitempty"` @@ -734,6 +747,7 @@ func (o *ListAlertsOKBodyAlertsItems0) ContextValidate(ctx context.Context, form } func (o *ListAlertsOKBodyAlertsItems0) contextValidateRule(ctx context.Context, formats strfmt.Registry) error { + if o.Rule != nil { if err := o.Rule.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -771,6 +785,7 @@ ListAlertsOKBodyAlertsItems0Rule Rule represents Alert Rule. swagger:model ListAlertsOKBodyAlertsItems0Rule */ type ListAlertsOKBodyAlertsItems0Rule struct { + // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -1139,7 +1154,9 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) ContextValidate(ctx context.Context, } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsDefinitions(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ParamsDefinitions); i++ { + if o.ParamsDefinitions[i] != nil { if err := o.ParamsDefinitions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1150,13 +1167,16 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsDefinitions(ctx return err } } + } return nil } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsValues(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ParamsValues); i++ { + if o.ParamsValues[i] != nil { if err := o.ParamsValues[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1167,13 +1187,16 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsValues(ctx conte return err } } + } return nil } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1184,13 +1207,16 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateFilters(ctx context.Co return err } } + } return nil } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Channels); i++ { + if o.Channels[i] != nil { if err := o.Channels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1201,6 +1227,7 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateChannels(ctx context.C return err } } + } return nil @@ -1229,6 +1256,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0 Channel represents a single Notif swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0 */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0 struct { + // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -1380,6 +1408,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) ContextValidate(ctx con } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { + if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1395,6 +1424,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateEmailCon } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { + if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1410,6 +1440,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidatePagerdut } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { + if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1425,6 +1456,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateSlackCon } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { + if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1462,6 +1494,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0EmailConfig EmailConfig represents swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0EmailConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0EmailConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1502,6 +1535,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0PagerdutyConfig PagerDutyConfig re swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0PagerdutyConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0PagerdutyConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1545,6 +1579,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0SlackConfig SlackConfig represents swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0SlackConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0SlackConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1585,6 +1620,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig WebhookConfig repres swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1646,6 +1682,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig) ContextVal } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { + if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1683,6 +1720,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig HTTPConfig swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig struct { + // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -1774,6 +1812,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { + if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1789,6 +1828,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { + if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1826,6 +1866,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigBasicAuth B swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigBasicAuth */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigBasicAuth struct { + // username Username string `json:"username,omitempty"` @@ -1870,6 +1911,7 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigTLSConfig T swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigTLSConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigTLSConfig struct { + // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` @@ -1934,6 +1976,7 @@ ListAlertsOKBodyAlertsItems0RuleFiltersItems0 Filter repsents a single filter co swagger:model ListAlertsOKBodyAlertsItems0RuleFiltersItems0 */ type ListAlertsOKBodyAlertsItems0RuleFiltersItems0 struct { + // FilterType represents filter matching type. // // - EQUAL: = @@ -2041,6 +2084,7 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0 ParamDefinition represen swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0 */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2272,6 +2316,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) ContextValidat } func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { + if o.Bool != nil { if err := o.Bool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2287,6 +2332,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidat } func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { + if o.Float != nil { if err := o.Float.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2302,6 +2348,7 @@ func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidat } func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { + if o.String != nil { if err := o.String.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2339,6 +2386,7 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Bool BoolParamDefinition swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Bool */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Bool struct { + // BooleanFlag represent a command to set some boolean property to true, // to false, or avoid changing that property. // @@ -2436,6 +2484,7 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Float FloatParamDefinitio swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Float */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Float struct { + // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2488,6 +2537,7 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0String StringParamDefinit swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0String */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0String struct { + // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2528,6 +2578,7 @@ ListAlertsOKBodyAlertsItems0RuleParamsValuesItems0 ParamValue represents a singl swagger:model ListAlertsOKBodyAlertsItems0RuleParamsValuesItems0 */ type ListAlertsOKBodyAlertsItems0RuleParamsValuesItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2635,6 +2686,7 @@ ListAlertsOKBodyTotals PageTotals represents total values for pagination. swagger:model ListAlertsOKBodyTotals */ type ListAlertsOKBodyTotals struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -2675,6 +2727,7 @@ ListAlertsParamsBodyPageParams PageParams represents page request parameters for swagger:model ListAlertsParamsBodyPageParams */ type ListAlertsParamsBodyPageParams struct { + // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go b/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go index 91f845542b..994425b487 100644 --- a/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go +++ b/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go @@ -60,6 +60,7 @@ ToggleAlertsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ToggleAlertsParams struct { + // Body. Body ToggleAlertsBody @@ -129,6 +130,7 @@ func (o *ToggleAlertsParams) SetBody(body ToggleAlertsBody) { // WriteToRequest writes these params to a swagger request func (o *ToggleAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go b/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go index bba76b097d..d2dcb850d7 100644 --- a/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go +++ b/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go @@ -62,12 +62,12 @@ type ToggleAlertsOK struct { func (o *ToggleAlertsOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/Toggle][%d] toggleAlertsOk %+v", 200, o.Payload) } - func (o *ToggleAlertsOK) GetPayload() interface{} { return o.Payload } func (o *ToggleAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *ToggleAlertsDefault) Code() int { func (o *ToggleAlertsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/Toggle][%d] ToggleAlerts default %+v", o._statusCode, o.Payload) } - func (o *ToggleAlertsDefault) GetPayload() *ToggleAlertsDefaultBody { return o.Payload } func (o *ToggleAlertsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ToggleAlertsDefaultBody) // response payload @@ -123,6 +123,7 @@ ToggleAlertsBody toggle alerts body swagger:model ToggleAlertsBody */ type ToggleAlertsBody struct { + // List of alerts that silence state should be switched. If provided array is empty than all // existing alerts are switched. AlertIds []string `json:"alert_ids"` @@ -224,6 +225,7 @@ ToggleAlertsDefaultBody toggle alerts default body swagger:model ToggleAlertsDefaultBody */ type ToggleAlertsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -289,7 +291,9 @@ func (o *ToggleAlertsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ToggleAlertsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -300,6 +304,7 @@ func (o *ToggleAlertsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -328,6 +333,7 @@ ToggleAlertsDefaultBodyDetailsItems0 toggle alerts default body details items0 swagger:model ToggleAlertsDefaultBodyDetailsItems0 */ type ToggleAlertsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/channels/add_channel_parameters.go b/api/managementpb/ia/json/client/channels/add_channel_parameters.go index dda611d4a5..e44b4a0b07 100644 --- a/api/managementpb/ia/json/client/channels/add_channel_parameters.go +++ b/api/managementpb/ia/json/client/channels/add_channel_parameters.go @@ -60,6 +60,7 @@ AddChannelParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddChannelParams struct { + // Body. Body AddChannelBody @@ -129,6 +130,7 @@ func (o *AddChannelParams) SetBody(body AddChannelBody) { // WriteToRequest writes these params to a swagger request func (o *AddChannelParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/add_channel_responses.go b/api/managementpb/ia/json/client/channels/add_channel_responses.go index 96a7a1f087..2ccd14ea0f 100644 --- a/api/managementpb/ia/json/client/channels/add_channel_responses.go +++ b/api/managementpb/ia/json/client/channels/add_channel_responses.go @@ -60,12 +60,12 @@ type AddChannelOK struct { func (o *AddChannelOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Add][%d] addChannelOk %+v", 200, o.Payload) } - func (o *AddChannelOK) GetPayload() *AddChannelOKBody { return o.Payload } func (o *AddChannelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddChannelOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddChannelDefault) Code() int { func (o *AddChannelDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Add][%d] AddChannel default %+v", o._statusCode, o.Payload) } - func (o *AddChannelDefault) GetPayload() *AddChannelDefaultBody { return o.Payload } func (o *AddChannelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddChannelDefaultBody) // response payload @@ -123,6 +123,7 @@ AddChannelBody add channel body swagger:model AddChannelBody */ type AddChannelBody struct { + // Short human-readable summary. Summary string `json:"summary,omitempty"` @@ -271,6 +272,7 @@ func (o *AddChannelBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddChannelBody) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { + if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -286,6 +288,7 @@ func (o *AddChannelBody) contextValidateEmailConfig(ctx context.Context, formats } func (o *AddChannelBody) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { + if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -301,6 +304,7 @@ func (o *AddChannelBody) contextValidatePagerdutyConfig(ctx context.Context, for } func (o *AddChannelBody) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { + if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -316,6 +320,7 @@ func (o *AddChannelBody) contextValidateSlackConfig(ctx context.Context, formats } func (o *AddChannelBody) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { + if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -353,6 +358,7 @@ AddChannelDefaultBody add channel default body swagger:model AddChannelDefaultBody */ type AddChannelDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -418,7 +424,9 @@ func (o *AddChannelDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddChannelDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -429,6 +437,7 @@ func (o *AddChannelDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -457,6 +466,7 @@ AddChannelDefaultBodyDetailsItems0 add channel default body details items0 swagger:model AddChannelDefaultBodyDetailsItems0 */ type AddChannelDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -494,6 +504,7 @@ AddChannelOKBody add channel OK body swagger:model AddChannelOKBody */ type AddChannelOKBody struct { + // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` } @@ -531,6 +542,7 @@ AddChannelParamsBodyEmailConfig EmailConfig represents email configuration. swagger:model AddChannelParamsBodyEmailConfig */ type AddChannelParamsBodyEmailConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -571,6 +583,7 @@ AddChannelParamsBodyPagerdutyConfig PagerDutyConfig represents PagerDuty configu swagger:model AddChannelParamsBodyPagerdutyConfig */ type AddChannelParamsBodyPagerdutyConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -614,6 +627,7 @@ AddChannelParamsBodySlackConfig SlackConfig represents Slack configuration. swagger:model AddChannelParamsBodySlackConfig */ type AddChannelParamsBodySlackConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -654,6 +668,7 @@ AddChannelParamsBodyWebhookConfig WebhookConfig represents webhook configuration swagger:model AddChannelParamsBodyWebhookConfig */ type AddChannelParamsBodyWebhookConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -715,6 +730,7 @@ func (o *AddChannelParamsBodyWebhookConfig) ContextValidate(ctx context.Context, } func (o *AddChannelParamsBodyWebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { + if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -752,6 +768,7 @@ AddChannelParamsBodyWebhookConfigHTTPConfig HTTPConfig represents HTTP client co swagger:model AddChannelParamsBodyWebhookConfigHTTPConfig */ type AddChannelParamsBodyWebhookConfigHTTPConfig struct { + // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -843,6 +860,7 @@ func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) ContextValidate(ctx contex } func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { + if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -858,6 +876,7 @@ func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAuth(c } func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { + if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -895,6 +914,7 @@ AddChannelParamsBodyWebhookConfigHTTPConfigBasicAuth BasicAuth represents basic swagger:model AddChannelParamsBodyWebhookConfigHTTPConfigBasicAuth */ type AddChannelParamsBodyWebhookConfigHTTPConfigBasicAuth struct { + // username Username string `json:"username,omitempty"` @@ -939,6 +959,7 @@ AddChannelParamsBodyWebhookConfigHTTPConfigTLSConfig TLSConfig represents TLS co swagger:model AddChannelParamsBodyWebhookConfigHTTPConfigTLSConfig */ type AddChannelParamsBodyWebhookConfigHTTPConfigTLSConfig struct { + // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` diff --git a/api/managementpb/ia/json/client/channels/change_channel_parameters.go b/api/managementpb/ia/json/client/channels/change_channel_parameters.go index 569379c6b6..a6c229806e 100644 --- a/api/managementpb/ia/json/client/channels/change_channel_parameters.go +++ b/api/managementpb/ia/json/client/channels/change_channel_parameters.go @@ -60,6 +60,7 @@ ChangeChannelParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeChannelParams struct { + // Body. Body ChangeChannelBody @@ -129,6 +130,7 @@ func (o *ChangeChannelParams) SetBody(body ChangeChannelBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeChannelParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/change_channel_responses.go b/api/managementpb/ia/json/client/channels/change_channel_responses.go index d4fb8eea19..653b6672be 100644 --- a/api/managementpb/ia/json/client/channels/change_channel_responses.go +++ b/api/managementpb/ia/json/client/channels/change_channel_responses.go @@ -60,12 +60,12 @@ type ChangeChannelOK struct { func (o *ChangeChannelOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Change][%d] changeChannelOk %+v", 200, o.Payload) } - func (o *ChangeChannelOK) GetPayload() interface{} { return o.Payload } func (o *ChangeChannelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ChangeChannelDefault) Code() int { func (o *ChangeChannelDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Change][%d] ChangeChannel default %+v", o._statusCode, o.Payload) } - func (o *ChangeChannelDefault) GetPayload() *ChangeChannelDefaultBody { return o.Payload } func (o *ChangeChannelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeChannelDefaultBody) // response payload @@ -121,6 +121,7 @@ ChangeChannelBody change channel body swagger:model ChangeChannelBody */ type ChangeChannelBody struct { + // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -272,6 +273,7 @@ func (o *ChangeChannelBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeChannelBody) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { + if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -287,6 +289,7 @@ func (o *ChangeChannelBody) contextValidateEmailConfig(ctx context.Context, form } func (o *ChangeChannelBody) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { + if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -302,6 +305,7 @@ func (o *ChangeChannelBody) contextValidatePagerdutyConfig(ctx context.Context, } func (o *ChangeChannelBody) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { + if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -317,6 +321,7 @@ func (o *ChangeChannelBody) contextValidateSlackConfig(ctx context.Context, form } func (o *ChangeChannelBody) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { + if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -354,6 +359,7 @@ ChangeChannelDefaultBody change channel default body swagger:model ChangeChannelDefaultBody */ type ChangeChannelDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -419,7 +425,9 @@ func (o *ChangeChannelDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeChannelDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -430,6 +438,7 @@ func (o *ChangeChannelDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -458,6 +467,7 @@ ChangeChannelDefaultBodyDetailsItems0 change channel default body details items0 swagger:model ChangeChannelDefaultBodyDetailsItems0 */ type ChangeChannelDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -495,6 +505,7 @@ ChangeChannelParamsBodyEmailConfig EmailConfig represents email configuration. swagger:model ChangeChannelParamsBodyEmailConfig */ type ChangeChannelParamsBodyEmailConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -535,6 +546,7 @@ ChangeChannelParamsBodyPagerdutyConfig PagerDutyConfig represents PagerDuty conf swagger:model ChangeChannelParamsBodyPagerdutyConfig */ type ChangeChannelParamsBodyPagerdutyConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -578,6 +590,7 @@ ChangeChannelParamsBodySlackConfig SlackConfig represents Slack configuration. swagger:model ChangeChannelParamsBodySlackConfig */ type ChangeChannelParamsBodySlackConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -618,6 +631,7 @@ ChangeChannelParamsBodyWebhookConfig WebhookConfig represents webhook configurat swagger:model ChangeChannelParamsBodyWebhookConfig */ type ChangeChannelParamsBodyWebhookConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -679,6 +693,7 @@ func (o *ChangeChannelParamsBodyWebhookConfig) ContextValidate(ctx context.Conte } func (o *ChangeChannelParamsBodyWebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { + if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -716,6 +731,7 @@ ChangeChannelParamsBodyWebhookConfigHTTPConfig HTTPConfig represents HTTP client swagger:model ChangeChannelParamsBodyWebhookConfigHTTPConfig */ type ChangeChannelParamsBodyWebhookConfigHTTPConfig struct { + // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -807,6 +823,7 @@ func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) ContextValidate(ctx con } func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { + if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -822,6 +839,7 @@ func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAut } func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { + if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -859,6 +877,7 @@ ChangeChannelParamsBodyWebhookConfigHTTPConfigBasicAuth BasicAuth represents bas swagger:model ChangeChannelParamsBodyWebhookConfigHTTPConfigBasicAuth */ type ChangeChannelParamsBodyWebhookConfigHTTPConfigBasicAuth struct { + // username Username string `json:"username,omitempty"` @@ -903,6 +922,7 @@ ChangeChannelParamsBodyWebhookConfigHTTPConfigTLSConfig TLSConfig represents TLS swagger:model ChangeChannelParamsBodyWebhookConfigHTTPConfigTLSConfig */ type ChangeChannelParamsBodyWebhookConfigHTTPConfigTLSConfig struct { + // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` diff --git a/api/managementpb/ia/json/client/channels/list_channels_parameters.go b/api/managementpb/ia/json/client/channels/list_channels_parameters.go index 4f6948c977..9e2504e37f 100644 --- a/api/managementpb/ia/json/client/channels/list_channels_parameters.go +++ b/api/managementpb/ia/json/client/channels/list_channels_parameters.go @@ -60,6 +60,7 @@ ListChannelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListChannelsParams struct { + // Body. Body ListChannelsBody @@ -129,6 +130,7 @@ func (o *ListChannelsParams) SetBody(body ListChannelsBody) { // WriteToRequest writes these params to a swagger request func (o *ListChannelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/list_channels_responses.go b/api/managementpb/ia/json/client/channels/list_channels_responses.go index ec672a76db..85df129ef9 100644 --- a/api/managementpb/ia/json/client/channels/list_channels_responses.go +++ b/api/managementpb/ia/json/client/channels/list_channels_responses.go @@ -60,12 +60,12 @@ type ListChannelsOK struct { func (o *ListChannelsOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/List][%d] listChannelsOk %+v", 200, o.Payload) } - func (o *ListChannelsOK) GetPayload() *ListChannelsOKBody { return o.Payload } func (o *ListChannelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListChannelsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListChannelsDefault) Code() int { func (o *ListChannelsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/List][%d] ListChannels default %+v", o._statusCode, o.Payload) } - func (o *ListChannelsDefault) GetPayload() *ListChannelsDefaultBody { return o.Payload } func (o *ListChannelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListChannelsDefaultBody) // response payload @@ -123,6 +123,7 @@ ListChannelsBody list channels body swagger:model ListChannelsBody */ type ListChannelsBody struct { + // page params PageParams *ListChannelsParamsBodyPageParams `json:"page_params,omitempty"` } @@ -175,6 +176,7 @@ func (o *ListChannelsBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListChannelsBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { + if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -212,6 +214,7 @@ ListChannelsDefaultBody list channels default body swagger:model ListChannelsDefaultBody */ type ListChannelsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -277,7 +280,9 @@ func (o *ListChannelsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListChannelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -288,6 +293,7 @@ func (o *ListChannelsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -316,6 +322,7 @@ ListChannelsDefaultBodyDetailsItems0 list channels default body details items0 swagger:model ListChannelsDefaultBodyDetailsItems0 */ type ListChannelsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -353,6 +360,7 @@ ListChannelsOKBody list channels OK body swagger:model ListChannelsOKBody */ type ListChannelsOKBody struct { + // channels Channels []*ListChannelsOKBodyChannelsItems0 `json:"channels"` @@ -442,7 +450,9 @@ func (o *ListChannelsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListChannelsOKBody) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Channels); i++ { + if o.Channels[i] != nil { if err := o.Channels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -453,12 +463,14 @@ func (o *ListChannelsOKBody) contextValidateChannels(ctx context.Context, format return err } } + } return nil } func (o *ListChannelsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -496,6 +508,7 @@ ListChannelsOKBodyChannelsItems0 Channel represents a single Notification Channe swagger:model ListChannelsOKBodyChannelsItems0 */ type ListChannelsOKBodyChannelsItems0 struct { + // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -647,6 +660,7 @@ func (o *ListChannelsOKBodyChannelsItems0) ContextValidate(ctx context.Context, } func (o *ListChannelsOKBodyChannelsItems0) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { + if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -662,6 +676,7 @@ func (o *ListChannelsOKBodyChannelsItems0) contextValidateEmailConfig(ctx contex } func (o *ListChannelsOKBodyChannelsItems0) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { + if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -677,6 +692,7 @@ func (o *ListChannelsOKBodyChannelsItems0) contextValidatePagerdutyConfig(ctx co } func (o *ListChannelsOKBodyChannelsItems0) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { + if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -692,6 +708,7 @@ func (o *ListChannelsOKBodyChannelsItems0) contextValidateSlackConfig(ctx contex } func (o *ListChannelsOKBodyChannelsItems0) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { + if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -729,6 +746,7 @@ ListChannelsOKBodyChannelsItems0EmailConfig EmailConfig represents email configu swagger:model ListChannelsOKBodyChannelsItems0EmailConfig */ type ListChannelsOKBodyChannelsItems0EmailConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -769,6 +787,7 @@ ListChannelsOKBodyChannelsItems0PagerdutyConfig PagerDutyConfig represents Pager swagger:model ListChannelsOKBodyChannelsItems0PagerdutyConfig */ type ListChannelsOKBodyChannelsItems0PagerdutyConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -812,6 +831,7 @@ ListChannelsOKBodyChannelsItems0SlackConfig SlackConfig represents Slack configu swagger:model ListChannelsOKBodyChannelsItems0SlackConfig */ type ListChannelsOKBodyChannelsItems0SlackConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -852,6 +872,7 @@ ListChannelsOKBodyChannelsItems0WebhookConfig WebhookConfig represents webhook c swagger:model ListChannelsOKBodyChannelsItems0WebhookConfig */ type ListChannelsOKBodyChannelsItems0WebhookConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -913,6 +934,7 @@ func (o *ListChannelsOKBodyChannelsItems0WebhookConfig) ContextValidate(ctx cont } func (o *ListChannelsOKBodyChannelsItems0WebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { + if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -950,6 +972,7 @@ ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig HTTPConfig represents HT swagger:model ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig */ type ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig struct { + // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -1041,6 +1064,7 @@ func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) ContextValidat } func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { + if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1056,6 +1080,7 @@ func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) contextValidat } func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { + if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1093,6 +1118,7 @@ ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigBasicAuth BasicAuth repre swagger:model ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigBasicAuth */ type ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigBasicAuth struct { + // username Username string `json:"username,omitempty"` @@ -1137,6 +1163,7 @@ ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigTLSConfig TLSConfig repre swagger:model ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigTLSConfig */ type ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigTLSConfig struct { + // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` @@ -1201,6 +1228,7 @@ ListChannelsOKBodyTotals PageTotals represents total values for pagination. swagger:model ListChannelsOKBodyTotals */ type ListChannelsOKBodyTotals struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -1241,6 +1269,7 @@ ListChannelsParamsBodyPageParams PageParams represents page request parameters f swagger:model ListChannelsParamsBodyPageParams */ type ListChannelsParamsBodyPageParams struct { + // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/ia/json/client/channels/remove_channel_parameters.go b/api/managementpb/ia/json/client/channels/remove_channel_parameters.go index bc094beef7..60f0132346 100644 --- a/api/managementpb/ia/json/client/channels/remove_channel_parameters.go +++ b/api/managementpb/ia/json/client/channels/remove_channel_parameters.go @@ -60,6 +60,7 @@ RemoveChannelParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveChannelParams struct { + // Body. Body RemoveChannelBody @@ -129,6 +130,7 @@ func (o *RemoveChannelParams) SetBody(body RemoveChannelBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveChannelParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/remove_channel_responses.go b/api/managementpb/ia/json/client/channels/remove_channel_responses.go index eb6aa49b30..6f80dc95d9 100644 --- a/api/managementpb/ia/json/client/channels/remove_channel_responses.go +++ b/api/managementpb/ia/json/client/channels/remove_channel_responses.go @@ -60,12 +60,12 @@ type RemoveChannelOK struct { func (o *RemoveChannelOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Remove][%d] removeChannelOk %+v", 200, o.Payload) } - func (o *RemoveChannelOK) GetPayload() interface{} { return o.Payload } func (o *RemoveChannelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveChannelDefault) Code() int { func (o *RemoveChannelDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Remove][%d] RemoveChannel default %+v", o._statusCode, o.Payload) } - func (o *RemoveChannelDefault) GetPayload() *RemoveChannelDefaultBody { return o.Payload } func (o *RemoveChannelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveChannelDefaultBody) // response payload @@ -121,6 +121,7 @@ RemoveChannelBody remove channel body swagger:model RemoveChannelBody */ type RemoveChannelBody struct { + // channel id ChannelID string `json:"channel_id,omitempty"` } @@ -158,6 +159,7 @@ RemoveChannelDefaultBody remove channel default body swagger:model RemoveChannelDefaultBody */ type RemoveChannelDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *RemoveChannelDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveChannelDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *RemoveChannelDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -262,6 +267,7 @@ RemoveChannelDefaultBodyDetailsItems0 remove channel default body details items0 swagger:model RemoveChannelDefaultBodyDetailsItems0 */ type RemoveChannelDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go index c361a3c197..1178c51528 100644 --- a/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go @@ -60,6 +60,7 @@ CreateAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateAlertRuleParams struct { + // Body. Body CreateAlertRuleBody @@ -129,6 +130,7 @@ func (o *CreateAlertRuleParams) SetBody(body CreateAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go index d7102f2eb4..6ad8aadd2b 100644 --- a/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go @@ -62,12 +62,12 @@ type CreateAlertRuleOK struct { func (o *CreateAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Create][%d] createAlertRuleOk %+v", 200, o.Payload) } - func (o *CreateAlertRuleOK) GetPayload() *CreateAlertRuleOKBody { return o.Payload } func (o *CreateAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateAlertRuleOKBody) // response payload @@ -104,12 +104,12 @@ func (o *CreateAlertRuleDefault) Code() int { func (o *CreateAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Create][%d] CreateAlertRule default %+v", o._statusCode, o.Payload) } - func (o *CreateAlertRuleDefault) GetPayload() *CreateAlertRuleDefaultBody { return o.Payload } func (o *CreateAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateAlertRuleDefaultBody) // response payload @@ -125,6 +125,7 @@ CreateAlertRuleBody create alert rule body swagger:model CreateAlertRuleBody */ type CreateAlertRuleBody struct { + // Template name. Can't be specified simultaneously with source_rule_id. TemplateName string `json:"template_name,omitempty"` @@ -313,7 +314,9 @@ func (o *CreateAlertRuleBody) ContextValidate(ctx context.Context, formats strfm } func (o *CreateAlertRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -324,13 +327,16 @@ func (o *CreateAlertRuleBody) contextValidateParams(ctx context.Context, formats return err } } + } return nil } func (o *CreateAlertRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -341,6 +347,7 @@ func (o *CreateAlertRuleBody) contextValidateFilters(ctx context.Context, format return err } } + } return nil @@ -369,6 +376,7 @@ CreateAlertRuleDefaultBody create alert rule default body swagger:model CreateAlertRuleDefaultBody */ type CreateAlertRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -434,7 +442,9 @@ func (o *CreateAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *CreateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -445,6 +455,7 @@ func (o *CreateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -473,6 +484,7 @@ CreateAlertRuleDefaultBodyDetailsItems0 create alert rule default body details i swagger:model CreateAlertRuleDefaultBodyDetailsItems0 */ type CreateAlertRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -510,6 +522,7 @@ CreateAlertRuleOKBody create alert rule OK body swagger:model CreateAlertRuleOKBody */ type CreateAlertRuleOKBody struct { + // Rule ID. RuleID string `json:"rule_id,omitempty"` } @@ -547,6 +560,7 @@ CreateAlertRuleParamsBodyFiltersItems0 Filter repsents a single filter condition swagger:model CreateAlertRuleParamsBodyFiltersItems0 */ type CreateAlertRuleParamsBodyFiltersItems0 struct { + // FilterType represents filter matching type. // // - EQUAL: = @@ -654,6 +668,7 @@ CreateAlertRuleParamsBodyParamsItems0 ParamValue represents a single rule parame swagger:model CreateAlertRuleParamsBodyParamsItems0 */ type CreateAlertRuleParamsBodyParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go index 7b24bccb74..9b740d644e 100644 --- a/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go @@ -60,6 +60,7 @@ DeleteAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteAlertRuleParams struct { + // Body. Body DeleteAlertRuleBody @@ -129,6 +130,7 @@ func (o *DeleteAlertRuleParams) SetBody(body DeleteAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go index accdebbdc8..fb62fa0197 100644 --- a/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go @@ -60,12 +60,12 @@ type DeleteAlertRuleOK struct { func (o *DeleteAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Delete][%d] deleteAlertRuleOk %+v", 200, o.Payload) } - func (o *DeleteAlertRuleOK) GetPayload() interface{} { return o.Payload } func (o *DeleteAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteAlertRuleDefault) Code() int { func (o *DeleteAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Delete][%d] DeleteAlertRule default %+v", o._statusCode, o.Payload) } - func (o *DeleteAlertRuleDefault) GetPayload() *DeleteAlertRuleDefaultBody { return o.Payload } func (o *DeleteAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteAlertRuleDefaultBody) // response payload @@ -121,6 +121,7 @@ DeleteAlertRuleBody delete alert rule body swagger:model DeleteAlertRuleBody */ type DeleteAlertRuleBody struct { + // Rule ID. RuleID string `json:"rule_id,omitempty"` } @@ -158,6 +159,7 @@ DeleteAlertRuleDefaultBody delete alert rule default body swagger:model DeleteAlertRuleDefaultBody */ type DeleteAlertRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *DeleteAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *DeleteAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *DeleteAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -262,6 +267,7 @@ DeleteAlertRuleDefaultBodyDetailsItems0 delete alert rule default body details i swagger:model DeleteAlertRuleDefaultBodyDetailsItems0 */ type DeleteAlertRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go b/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go index 324b22bb8c..b13ca0ae7b 100644 --- a/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go +++ b/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go @@ -60,6 +60,7 @@ ListAlertRulesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAlertRulesParams struct { + // Body. Body ListAlertRulesBody @@ -129,6 +130,7 @@ func (o *ListAlertRulesParams) SetBody(body ListAlertRulesBody) { // WriteToRequest writes these params to a swagger request func (o *ListAlertRulesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go b/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go index 2231679875..9361df179d 100644 --- a/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go +++ b/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go @@ -62,12 +62,12 @@ type ListAlertRulesOK struct { func (o *ListAlertRulesOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/List][%d] listAlertRulesOk %+v", 200, o.Payload) } - func (o *ListAlertRulesOK) GetPayload() *ListAlertRulesOKBody { return o.Payload } func (o *ListAlertRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAlertRulesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAlertRulesDefault) Code() int { func (o *ListAlertRulesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/List][%d] ListAlertRules default %+v", o._statusCode, o.Payload) } - func (o *ListAlertRulesDefault) GetPayload() *ListAlertRulesDefaultBody { return o.Payload } func (o *ListAlertRulesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAlertRulesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListAlertRulesBody list alert rules body swagger:model ListAlertRulesBody */ type ListAlertRulesBody struct { + // page params PageParams *ListAlertRulesParamsBodyPageParams `json:"page_params,omitempty"` } @@ -177,6 +178,7 @@ func (o *ListAlertRulesBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAlertRulesBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { + if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -214,6 +216,7 @@ ListAlertRulesDefaultBody list alert rules default body swagger:model ListAlertRulesDefaultBody */ type ListAlertRulesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -279,7 +282,9 @@ func (o *ListAlertRulesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListAlertRulesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -290,6 +295,7 @@ func (o *ListAlertRulesDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -318,6 +324,7 @@ ListAlertRulesDefaultBodyDetailsItems0 list alert rules default body details ite swagger:model ListAlertRulesDefaultBodyDetailsItems0 */ type ListAlertRulesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +362,7 @@ ListAlertRulesOKBody list alert rules OK body swagger:model ListAlertRulesOKBody */ type ListAlertRulesOKBody struct { + // rules Rules []*ListAlertRulesOKBodyRulesItems0 `json:"rules"` @@ -444,7 +452,9 @@ func (o *ListAlertRulesOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ListAlertRulesOKBody) contextValidateRules(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Rules); i++ { + if o.Rules[i] != nil { if err := o.Rules[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -455,12 +465,14 @@ func (o *ListAlertRulesOKBody) contextValidateRules(ctx context.Context, formats return err } } + } return nil } func (o *ListAlertRulesOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -498,6 +510,7 @@ ListAlertRulesOKBodyRulesItems0 Rule represents Alert Rule. swagger:model ListAlertRulesOKBodyRulesItems0 */ type ListAlertRulesOKBodyRulesItems0 struct { + // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -866,7 +879,9 @@ func (o *ListAlertRulesOKBodyRulesItems0) ContextValidate(ctx context.Context, f } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsDefinitions(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ParamsDefinitions); i++ { + if o.ParamsDefinitions[i] != nil { if err := o.ParamsDefinitions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -877,13 +892,16 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsDefinitions(ctx c return err } } + } return nil } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsValues(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ParamsValues); i++ { + if o.ParamsValues[i] != nil { if err := o.ParamsValues[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -894,13 +912,16 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsValues(ctx contex return err } } + } return nil } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -911,13 +932,16 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateFilters(ctx context.Con return err } } + } return nil } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Channels); i++ { + if o.Channels[i] != nil { if err := o.Channels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -928,6 +952,7 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateChannels(ctx context.Co return err } } + } return nil @@ -956,6 +981,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0 Channel represents a single Notifi swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0 */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0 struct { + // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -1107,6 +1133,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) ContextValidate(ctx cont } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { + if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1122,6 +1149,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateEmailConf } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { + if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1137,6 +1165,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidatePagerduty } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { + if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1152,6 +1181,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateSlackConf } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { + if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1189,6 +1219,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0EmailConfig EmailConfig represents swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0EmailConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0EmailConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1229,6 +1260,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0PagerdutyConfig PagerDutyConfig rep swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0PagerdutyConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0PagerdutyConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1272,6 +1304,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0SlackConfig SlackConfig represents swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0SlackConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0SlackConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1312,6 +1345,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig WebhookConfig represe swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig struct { + // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1373,6 +1407,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig) ContextVali } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { + if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1410,6 +1445,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig HTTPConfig swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig struct { + // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -1501,6 +1537,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) C } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { + if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1516,6 +1553,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) c } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { + if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1553,6 +1591,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigBasicAuth Ba swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigBasicAuth */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigBasicAuth struct { + // username Username string `json:"username,omitempty"` @@ -1597,6 +1636,7 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigTLSConfig TL swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigTLSConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigTLSConfig struct { + // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` @@ -1661,6 +1701,7 @@ ListAlertRulesOKBodyRulesItems0FiltersItems0 Filter repsents a single filter con swagger:model ListAlertRulesOKBodyRulesItems0FiltersItems0 */ type ListAlertRulesOKBodyRulesItems0FiltersItems0 struct { + // FilterType represents filter matching type. // // - EQUAL: = @@ -1768,6 +1809,7 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0 ParamDefinition represent swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0 */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -1999,6 +2041,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) ContextValidate } func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { + if o.Bool != nil { if err := o.Bool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2014,6 +2057,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidate } func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { + if o.Float != nil { if err := o.Float.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2029,6 +2073,7 @@ func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidate } func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { + if o.String != nil { if err := o.String.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2066,6 +2111,7 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Bool BoolParamDefinition r swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Bool */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Bool struct { + // BooleanFlag represent a command to set some boolean property to true, // to false, or avoid changing that property. // @@ -2163,6 +2209,7 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Float FloatParamDefinition swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Float */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Float struct { + // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2215,6 +2262,7 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0String StringParamDefiniti swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0String */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0String struct { + // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2255,6 +2303,7 @@ ListAlertRulesOKBodyRulesItems0ParamsValuesItems0 ParamValue represents a single swagger:model ListAlertRulesOKBodyRulesItems0ParamsValuesItems0 */ type ListAlertRulesOKBodyRulesItems0ParamsValuesItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2362,6 +2411,7 @@ ListAlertRulesOKBodyTotals PageTotals represents total values for pagination. swagger:model ListAlertRulesOKBodyTotals */ type ListAlertRulesOKBodyTotals struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -2402,6 +2452,7 @@ ListAlertRulesParamsBodyPageParams PageParams represents page request parameters swagger:model ListAlertRulesParamsBodyPageParams */ type ListAlertRulesParamsBodyPageParams struct { + // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go index 98c9657468..3632436df6 100644 --- a/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go @@ -60,6 +60,7 @@ ToggleAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ToggleAlertRuleParams struct { + // Body. Body ToggleAlertRuleBody @@ -129,6 +130,7 @@ func (o *ToggleAlertRuleParams) SetBody(body ToggleAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *ToggleAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go index afbd371436..e00f61fc71 100644 --- a/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go @@ -62,12 +62,12 @@ type ToggleAlertRuleOK struct { func (o *ToggleAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Toggle][%d] toggleAlertRuleOk %+v", 200, o.Payload) } - func (o *ToggleAlertRuleOK) GetPayload() interface{} { return o.Payload } func (o *ToggleAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *ToggleAlertRuleDefault) Code() int { func (o *ToggleAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Toggle][%d] ToggleAlertRule default %+v", o._statusCode, o.Payload) } - func (o *ToggleAlertRuleDefault) GetPayload() *ToggleAlertRuleDefaultBody { return o.Payload } func (o *ToggleAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ToggleAlertRuleDefaultBody) // response payload @@ -123,6 +123,7 @@ ToggleAlertRuleBody toggle alert rule body swagger:model ToggleAlertRuleBody */ type ToggleAlertRuleBody struct { + // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -223,6 +224,7 @@ ToggleAlertRuleDefaultBody toggle alert rule default body swagger:model ToggleAlertRuleDefaultBody */ type ToggleAlertRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -288,7 +290,9 @@ func (o *ToggleAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *ToggleAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -299,6 +303,7 @@ func (o *ToggleAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -327,6 +332,7 @@ ToggleAlertRuleDefaultBodyDetailsItems0 toggle alert rule default body details i swagger:model ToggleAlertRuleDefaultBodyDetailsItems0 */ type ToggleAlertRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go index 0e0b4d7bc6..770e3df238 100644 --- a/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go @@ -60,6 +60,7 @@ UpdateAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateAlertRuleParams struct { + // Body. Body UpdateAlertRuleBody @@ -129,6 +130,7 @@ func (o *UpdateAlertRuleParams) SetBody(body UpdateAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go index 13854b9415..07d2767319 100644 --- a/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go @@ -62,12 +62,12 @@ type UpdateAlertRuleOK struct { func (o *UpdateAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Update][%d] updateAlertRuleOk %+v", 200, o.Payload) } - func (o *UpdateAlertRuleOK) GetPayload() interface{} { return o.Payload } func (o *UpdateAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *UpdateAlertRuleDefault) Code() int { func (o *UpdateAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Update][%d] UpdateAlertRule default %+v", o._statusCode, o.Payload) } - func (o *UpdateAlertRuleDefault) GetPayload() *UpdateAlertRuleDefaultBody { return o.Payload } func (o *UpdateAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateAlertRuleDefaultBody) // response payload @@ -123,6 +123,7 @@ UpdateAlertRuleBody update alert rule body swagger:model UpdateAlertRuleBody */ type UpdateAlertRuleBody struct { + // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -308,7 +309,9 @@ func (o *UpdateAlertRuleBody) ContextValidate(ctx context.Context, formats strfm } func (o *UpdateAlertRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -319,13 +322,16 @@ func (o *UpdateAlertRuleBody) contextValidateParams(ctx context.Context, formats return err } } + } return nil } func (o *UpdateAlertRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +342,7 @@ func (o *UpdateAlertRuleBody) contextValidateFilters(ctx context.Context, format return err } } + } return nil @@ -364,6 +371,7 @@ UpdateAlertRuleDefaultBody update alert rule default body swagger:model UpdateAlertRuleDefaultBody */ type UpdateAlertRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -429,7 +437,9 @@ func (o *UpdateAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *UpdateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -440,6 +450,7 @@ func (o *UpdateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -468,6 +479,7 @@ UpdateAlertRuleDefaultBodyDetailsItems0 update alert rule default body details i swagger:model UpdateAlertRuleDefaultBodyDetailsItems0 */ type UpdateAlertRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -505,6 +517,7 @@ UpdateAlertRuleParamsBodyFiltersItems0 Filter repsents a single filter condition swagger:model UpdateAlertRuleParamsBodyFiltersItems0 */ type UpdateAlertRuleParamsBodyFiltersItems0 struct { + // FilterType represents filter matching type. // // - EQUAL: = @@ -612,6 +625,7 @@ UpdateAlertRuleParamsBodyParamsItems0 ParamValue represents a single rule parame swagger:model UpdateAlertRuleParamsBodyParamsItems0 */ type UpdateAlertRuleParamsBodyParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/ia/rules.pb.go b/api/managementpb/ia/rules.pb.go index 68a00efa00..dc91251e59 100644 --- a/api/managementpb/ia/rules.pb.go +++ b/api/managementpb/ia/rules.pb.go @@ -7,19 +7,17 @@ package iav1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + managementpb "github.com/percona/pmm/api/managementpb" + alerting "github.com/percona/pmm/api/managementpb/alerting" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - managementpb "github.com/percona/pmm/api/managementpb" - alerting "github.com/percona/pmm/api/managementpb/alerting" + reflect "reflect" + sync "sync" ) const ( @@ -1399,41 +1397,38 @@ func file_managementpb_ia_rules_proto_rawDescGZIP() []byte { return file_managementpb_ia_rules_proto_rawDescData } -var ( - file_managementpb_ia_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_ia_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 18) - file_managementpb_ia_rules_proto_goTypes = []interface{}{ - (FilterType)(0), // 0: ia.v1beta1.FilterType - (*Filter)(nil), // 1: ia.v1beta1.Filter - (*ParamValue)(nil), // 2: ia.v1beta1.ParamValue - (*Rule)(nil), // 3: ia.v1beta1.Rule - (*ListAlertRulesRequest)(nil), // 4: ia.v1beta1.ListAlertRulesRequest - (*ListAlertRulesResponse)(nil), // 5: ia.v1beta1.ListAlertRulesResponse - (*CreateAlertRuleRequest)(nil), // 6: ia.v1beta1.CreateAlertRuleRequest - (*CreateAlertRuleResponse)(nil), // 7: ia.v1beta1.CreateAlertRuleResponse - (*UpdateAlertRuleRequest)(nil), // 8: ia.v1beta1.UpdateAlertRuleRequest - (*UpdateAlertRuleResponse)(nil), // 9: ia.v1beta1.UpdateAlertRuleResponse - (*ToggleAlertRuleRequest)(nil), // 10: ia.v1beta1.ToggleAlertRuleRequest - (*ToggleAlertRuleResponse)(nil), // 11: ia.v1beta1.ToggleAlertRuleResponse - (*DeleteAlertRuleRequest)(nil), // 12: ia.v1beta1.DeleteAlertRuleRequest - (*DeleteAlertRuleResponse)(nil), // 13: ia.v1beta1.DeleteAlertRuleResponse - nil, // 14: ia.v1beta1.Rule.CustomLabelsEntry - nil, // 15: ia.v1beta1.Rule.LabelsEntry - nil, // 16: ia.v1beta1.Rule.AnnotationsEntry - nil, // 17: ia.v1beta1.CreateAlertRuleRequest.CustomLabelsEntry - nil, // 18: ia.v1beta1.UpdateAlertRuleRequest.CustomLabelsEntry - (alerting.ParamType)(0), // 19: alerting.v1.ParamType - (*alerting.ParamDefinition)(nil), // 20: alerting.v1.ParamDefinition - (*durationpb.Duration)(nil), // 21: google.protobuf.Duration - (managementpb.Severity)(0), // 22: management.Severity - (*Channel)(nil), // 23: ia.v1beta1.Channel - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*managementpb.PageParams)(nil), // 25: management.PageParams - (*managementpb.PageTotals)(nil), // 26: management.PageTotals - (managementpb.BooleanFlag)(0), // 27: managementpb.BooleanFlag - } -) - +var file_managementpb_ia_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_ia_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_managementpb_ia_rules_proto_goTypes = []interface{}{ + (FilterType)(0), // 0: ia.v1beta1.FilterType + (*Filter)(nil), // 1: ia.v1beta1.Filter + (*ParamValue)(nil), // 2: ia.v1beta1.ParamValue + (*Rule)(nil), // 3: ia.v1beta1.Rule + (*ListAlertRulesRequest)(nil), // 4: ia.v1beta1.ListAlertRulesRequest + (*ListAlertRulesResponse)(nil), // 5: ia.v1beta1.ListAlertRulesResponse + (*CreateAlertRuleRequest)(nil), // 6: ia.v1beta1.CreateAlertRuleRequest + (*CreateAlertRuleResponse)(nil), // 7: ia.v1beta1.CreateAlertRuleResponse + (*UpdateAlertRuleRequest)(nil), // 8: ia.v1beta1.UpdateAlertRuleRequest + (*UpdateAlertRuleResponse)(nil), // 9: ia.v1beta1.UpdateAlertRuleResponse + (*ToggleAlertRuleRequest)(nil), // 10: ia.v1beta1.ToggleAlertRuleRequest + (*ToggleAlertRuleResponse)(nil), // 11: ia.v1beta1.ToggleAlertRuleResponse + (*DeleteAlertRuleRequest)(nil), // 12: ia.v1beta1.DeleteAlertRuleRequest + (*DeleteAlertRuleResponse)(nil), // 13: ia.v1beta1.DeleteAlertRuleResponse + nil, // 14: ia.v1beta1.Rule.CustomLabelsEntry + nil, // 15: ia.v1beta1.Rule.LabelsEntry + nil, // 16: ia.v1beta1.Rule.AnnotationsEntry + nil, // 17: ia.v1beta1.CreateAlertRuleRequest.CustomLabelsEntry + nil, // 18: ia.v1beta1.UpdateAlertRuleRequest.CustomLabelsEntry + (alerting.ParamType)(0), // 19: alerting.v1.ParamType + (*alerting.ParamDefinition)(nil), // 20: alerting.v1.ParamDefinition + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration + (managementpb.Severity)(0), // 22: management.Severity + (*Channel)(nil), // 23: ia.v1beta1.Channel + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*managementpb.PageParams)(nil), // 25: management.PageParams + (*managementpb.PageTotals)(nil), // 26: management.PageTotals + (managementpb.BooleanFlag)(0), // 27: managementpb.BooleanFlag +} var file_managementpb_ia_rules_proto_depIdxs = []int32{ 0, // 0: ia.v1beta1.Filter.type:type_name -> ia.v1beta1.FilterType 19, // 1: ia.v1beta1.ParamValue.type:type_name -> alerting.v1.ParamType diff --git a/api/managementpb/ia/rules.pb.gw.go b/api/managementpb/ia/rules.pb.gw.go index 8458714bcb..50dd2b5b0e 100644 --- a/api/managementpb/ia/rules.pb.gw.go +++ b/api/managementpb/ia/rules.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAlertRulesRequest @@ -47,6 +45,7 @@ func request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.ListAlertRules(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime msg, err := server.ListAlertRules(ctx, &protoReq) return msg, metadata, err + } func request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.CreateAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.CreateAlertRule(ctx, &protoReq) return msg, metadata, err + } func request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.UpdateAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.UpdateAlertRule(ctx, &protoReq) return msg, metadata, err + } func request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ToggleAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.ToggleAlertRule(ctx, &protoReq) return msg, metadata, err + } func request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.DeleteAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.DeleteAlertRule(ctx, &protoReq) return msg, metadata, err + } // RegisterRulesHandlerServer registers the http handlers for service Rules to "mux". @@ -198,6 +206,7 @@ func local_request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtim // 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 RegisterRulesHandlerFromEndpoint instead. func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RulesServer) error { + mux.Handle("POST", pattern_Rules_ListAlertRules_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -220,6 +229,7 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_ListAlertRules_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_CreateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -244,6 +254,7 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_CreateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_UpdateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -268,6 +279,7 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_UpdateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_ToggleAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -292,6 +304,7 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_ToggleAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_DeleteAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -316,6 +329,7 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_DeleteAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -358,6 +372,7 @@ func RegisterRulesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RulesClient" to call the correct interceptors. func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RulesClient) error { + mux.Handle("POST", pattern_Rules_ListAlertRules_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -377,6 +392,7 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_ListAlertRules_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_CreateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -398,6 +414,7 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_CreateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_UpdateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -419,6 +436,7 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_UpdateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_ToggleAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -440,6 +458,7 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_ToggleAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Rules_DeleteAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -461,6 +480,7 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_DeleteAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/ia/rules.pb.validate.go b/api/managementpb/ia/rules.pb.validate.go index 03d92e46f4..e53b8a2c46 100644 --- a/api/managementpb/ia/rules.pb.validate.go +++ b/api/managementpb/ia/rules.pb.validate.go @@ -18,8 +18,9 @@ import ( "google.golang.org/protobuf/types/known/anypb" - managementpb "github.com/percona/pmm/api/managementpb" alertingv1 "github.com/percona/pmm/api/managementpb/alerting" + + managementpb "github.com/percona/pmm/api/managementpb" ) // ensure the imports are used diff --git a/api/managementpb/ia/rules.swagger.json b/api/managementpb/ia/rules.swagger.json new file mode 100644 index 0000000000..d73a81d2a8 --- /dev/null +++ b/api/managementpb/ia/rules.swagger.json @@ -0,0 +1,897 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/ia/rules.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Rules" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/ia/Rules/Create": { + "post": { + "summary": "CreateAlertRule creates Alerting rule.", + "operationId": "CreateAlertRule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1CreateAlertRuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1CreateAlertRuleRequest" + } + } + ], + "tags": [ + "Rules" + ], + "deprecated": true + } + }, + "/v1/management/ia/Rules/Delete": { + "post": { + "summary": "DeleteAlertRule deletes Alerting rule.", + "operationId": "DeleteAlertRule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1DeleteAlertRuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1DeleteAlertRuleRequest" + } + } + ], + "tags": [ + "Rules" + ], + "deprecated": true + } + }, + "/v1/management/ia/Rules/List": { + "post": { + "summary": "ListAlertRules returns a list of all Alerting rules.", + "operationId": "ListAlertRules", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListAlertRulesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListAlertRulesRequest" + } + } + ], + "tags": [ + "Rules" + ], + "deprecated": true + } + }, + "/v1/management/ia/Rules/Toggle": { + "post": { + "summary": "ToggleAlertRule allows to switch between disabled and enabled states of an Alert Rule.", + "operationId": "ToggleAlertRule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ToggleAlertRuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ToggleAlertRuleRequest" + } + } + ], + "tags": [ + "Rules" + ], + "deprecated": true + } + }, + "/v1/management/ia/Rules/Update": { + "post": { + "summary": "UpdateAlertRule updates Alerting rule.", + "operationId": "UpdateAlertRule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1UpdateAlertRuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1UpdateAlertRuleRequest" + } + } + ], + "tags": [ + "Rules" + ], + "deprecated": true + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "iav1beta1Filter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/iav1beta1FilterType" + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "description": "Filter repsents a single filter condition." + }, + "iav1beta1FilterType": { + "type": "string", + "enum": [ + "FILTER_TYPE_INVALID", + "EQUAL", + "REGEX" + ], + "default": "FILTER_TYPE_INVALID", + "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;" + }, + "iav1beta1ParamValue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "type": "boolean", + "description": "Bool value." + }, + "float": { + "type": "number", + "format": "double", + "description": "Float value." + }, + "string": { + "type": "string", + "description": "String value." + } + }, + "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs." + }, + "managementPageParams": { + "type": "object", + "properties": { + "page_size": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results per page." + }, + "index": { + "type": "integer", + "format": "int32", + "description": "Index of the requested page, starts from 0." + } + }, + "description": "PageParams represents page request parameters for pagination." + }, + "managementPageTotals": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + } + }, + "description": "PageTotals represents total values for pagination." + }, + "managementSeverity": { + "type": "string", + "enum": [ + "SEVERITY_INVALID", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "default": "SEVERITY_INVALID", + "description": "Severity represents severity level of the check result or alert." + }, + "managementpbBooleanFlag": { + "type": "string", + "enum": [ + "DO_NOT_CHANGE", + "TRUE", + "FALSE" + ], + "default": "DO_NOT_CHANGE", + "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1BoolParamDefinition": { + "type": "object", + "properties": { + "default": { + "$ref": "#/definitions/managementpbBooleanFlag" + } + }, + "description": "BoolParamDefinition represents boolean parameter's default value." + }, + "v1FloatParamDefinition": { + "type": "object", + "properties": { + "has_default": { + "type": "boolean", + "description": "True if default value is set." + }, + "default": { + "type": "number", + "format": "double", + "description": "Default value if has_default is true." + }, + "has_min": { + "type": "boolean", + "description": "True if minimal valid value is set." + }, + "min": { + "type": "number", + "format": "double", + "description": "Minimal valid value (inclusive) if has_min is true." + }, + "has_max": { + "type": "boolean", + "description": "True if maximal valid value is set." + }, + "max": { + "type": "number", + "format": "double", + "description": "Maximal valid value (inclusive) if has_max is true." + } + }, + "description": "FloatParamDefinition represents float parameter's default value and valid range." + }, + "v1ParamDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "summary": { + "type": "string", + "description": "Short human-readable parameter summary." + }, + "unit": { + "$ref": "#/definitions/v1ParamUnit", + "description": "Parameter unit." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "$ref": "#/definitions/v1BoolParamDefinition", + "description": "Bool value." + }, + "float": { + "$ref": "#/definitions/v1FloatParamDefinition", + "description": "Float value." + }, + "string": { + "$ref": "#/definitions/v1StringParamDefinition", + "description": "String value." + } + }, + "description": "ParamDefinition represents a single query parameter." + }, + "v1ParamType": { + "type": "string", + "enum": [ + "PARAM_TYPE_INVALID", + "BOOL", + "FLOAT", + "STRING" + ], + "default": "PARAM_TYPE_INVALID", + "description": "ParamType represents template parameter type." + }, + "v1ParamUnit": { + "type": "string", + "enum": [ + "PARAM_UNIT_INVALID", + "PERCENTAGE", + "SECONDS" + ], + "default": "PARAM_UNIT_INVALID", + "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s" + }, + "v1StringParamDefinition": { + "type": "object", + "properties": { + "has_default": { + "type": "boolean", + "description": "True if default value is set." + }, + "default": { + "type": "string", + "description": "Default value if has_default is true." + } + }, + "description": "StringParamDefinition represents string parameter's default value." + }, + "v1beta1BasicAuth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "password_file": { + "type": "string" + } + }, + "description": "BasicAuth represents basic HTTP auth configuration." + }, + "v1beta1Channel": { + "type": "object", + "properties": { + "channel_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "email_config": { + "$ref": "#/definitions/v1beta1EmailConfig" + }, + "pagerduty_config": { + "$ref": "#/definitions/v1beta1PagerDutyConfig" + }, + "slack_config": { + "$ref": "#/definitions/v1beta1SlackConfig" + }, + "webhook_config": { + "$ref": "#/definitions/v1beta1WebhookConfig" + }, + "disabled": { + "type": "boolean", + "description": "True if that channel is disabled." + } + }, + "description": "Channel represents a single Notification Channel." + }, + "v1beta1CreateAlertRuleRequest": { + "type": "object", + "properties": { + "template_name": { + "type": "string", + "description": "Template name. Can't be specified simultaneously with source_rule_id." + }, + "source_rule_id": { + "type": "string", + "description": "ID of the rule that will be used as source. Can't be specified simultaneously with template_name." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "disabled": { + "type": "boolean", + "description": "New rule status." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1ParamValue" + }, + "description": "Rule parameters. All template parameters should be set." + }, + "for": { + "type": "string", + "description": "Rule duration. Should be set." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Rule severity. Should be set." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All custom labels to add or remove (with empty values) to default labels from template." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1Filter" + }, + "description": "Filters. Should be set." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels. Should be set." + } + } + }, + "v1beta1CreateAlertRuleResponse": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + } + } + }, + "v1beta1DeleteAlertRuleRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + } + } + }, + "v1beta1DeleteAlertRuleResponse": { + "type": "object" + }, + "v1beta1EmailConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "to": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "EmailConfig represents email configuration." + }, + "v1beta1HTTPConfig": { + "type": "object", + "properties": { + "basic_auth": { + "$ref": "#/definitions/v1beta1BasicAuth", + "description": "Basic HTTP auth configuration. Zero value will remove it." + }, + "bearer_token": { + "type": "string" + }, + "bearer_token_file": { + "type": "string" + }, + "tls_config": { + "$ref": "#/definitions/v1beta1TLSConfig", + "description": "TLS configuration. Zero value will remove it." + }, + "proxy_url": { + "type": "string" + } + }, + "description": "HTTPConfig represents HTTP client configuration." + }, + "v1beta1ListAlertRulesRequest": { + "type": "object", + "properties": { + "page_params": { + "$ref": "#/definitions/managementPageParams", + "description": "Page request." + } + } + }, + "v1beta1ListAlertRulesResponse": { + "type": "object", + "properties": { + "rules": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Rule" + } + }, + "totals": { + "$ref": "#/definitions/managementPageTotals", + "description": "Total items and pages." + } + } + }, + "v1beta1PagerDutyConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "routing_key": { + "type": "string", + "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set." + }, + "service_key": { + "type": "string", + "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set." + } + }, + "description": "PagerDutyConfig represents PagerDuty configuration." + }, + "v1beta1Rule": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "summary": { + "type": "string", + "description": "Rule human-readable summary." + }, + "template_name": { + "type": "string", + "description": "Template used for this rule." + }, + "disabled": { + "type": "boolean", + "description": "True if that rule is disabled." + }, + "expr_template": { + "type": "string", + "description": "Expression template." + }, + "expr": { + "type": "string", + "description": "Expression filled with parameters." + }, + "params_definitions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ParamDefinition" + }, + "description": "Expression parameters definitions." + }, + "params_values": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1ParamValue" + }, + "description": "Expression parameters values." + }, + "default_for": { + "type": "string", + "description": "Default for duration." + }, + "for": { + "type": "string", + "description": "For duration." + }, + "default_severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Default severity." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Severity." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels." + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1Filter" + }, + "description": "Filters." + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Channel" + }, + "description": "Channels." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Rule creation time." + } + }, + "description": "Rule represents Alert Rule." + }, + "v1beta1SlackConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "channel": { + "type": "string" + } + }, + "description": "SlackConfig represents Slack configuration." + }, + "v1beta1TLSConfig": { + "type": "object", + "properties": { + "ca_file": { + "type": "string", + "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." + }, + "cert_file": { + "type": "string", + "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." + }, + "key_file": { + "type": "string", + "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." + }, + "server_name": { + "type": "string", + "description": "Name of the server." + }, + "insecure_skip_verify": { + "type": "boolean", + "description": "Disable validation of the server certificate." + }, + "ca_file_content": { + "type": "string", + "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." + }, + "cert_file_content": { + "type": "string", + "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." + }, + "key_file_content": { + "type": "string", + "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." + } + }, + "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config" + }, + "v1beta1ToggleAlertRuleRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + }, + "disabled": { + "$ref": "#/definitions/managementpbBooleanFlag", + "description": "New rule status, if set." + } + } + }, + "v1beta1ToggleAlertRuleResponse": { + "type": "object" + }, + "v1beta1UpdateAlertRuleRequest": { + "type": "object", + "properties": { + "rule_id": { + "type": "string", + "description": "Rule ID." + }, + "name": { + "type": "string", + "description": "Rule name. Should be set." + }, + "disabled": { + "type": "boolean", + "description": "New rule status. Should be set." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1ParamValue" + }, + "description": "Rule parameters. All template parameters should be set." + }, + "for": { + "type": "string", + "description": "Rule duration. Should be set." + }, + "severity": { + "$ref": "#/definitions/managementSeverity", + "description": "Rule severity. Should be set." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All custom labels to add or remove (with empty values) to default labels from template." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/iav1beta1Filter" + }, + "description": "Filters. Should be set." + }, + "channel_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Channels. Should be set." + } + } + }, + "v1beta1UpdateAlertRuleResponse": { + "type": "object" + }, + "v1beta1WebhookConfig": { + "type": "object", + "properties": { + "send_resolved": { + "type": "boolean" + }, + "url": { + "type": "string" + }, + "http_config": { + "$ref": "#/definitions/v1beta1HTTPConfig" + }, + "max_alerts": { + "type": "integer", + "format": "int32" + } + }, + "description": "WebhookConfig represents webhook configuration." + } + } +} diff --git a/api/managementpb/ia/rules_grpc.pb.go b/api/managementpb/ia/rules_grpc.pb.go index 786492a856..7ca27c80e1 100644 --- a/api/managementpb/ia/rules_grpc.pb.go +++ b/api/managementpb/ia/rules_grpc.pb.go @@ -8,7 +8,6 @@ package iav1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -129,24 +128,21 @@ type RulesServer interface { } // UnimplementedRulesServer must be embedded to have forward compatible implementations. -type UnimplementedRulesServer struct{} +type UnimplementedRulesServer struct { +} func (UnimplementedRulesServer) ListAlertRules(context.Context, *ListAlertRulesRequest) (*ListAlertRulesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAlertRules not implemented") } - func (UnimplementedRulesServer) CreateAlertRule(context.Context, *CreateAlertRuleRequest) (*CreateAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateAlertRule not implemented") } - func (UnimplementedRulesServer) UpdateAlertRule(context.Context, *UpdateAlertRuleRequest) (*UpdateAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAlertRule not implemented") } - func (UnimplementedRulesServer) ToggleAlertRule(context.Context, *ToggleAlertRuleRequest) (*ToggleAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ToggleAlertRule not implemented") } - func (UnimplementedRulesServer) DeleteAlertRule(context.Context, *DeleteAlertRuleRequest) (*DeleteAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAlertRule not implemented") } diff --git a/api/managementpb/ia/status.pb.go b/api/managementpb/ia/status.pb.go index 681fef5a4e..ab96f0277d 100644 --- a/api/managementpb/ia/status.pb.go +++ b/api/managementpb/ia/status.pb.go @@ -7,11 +7,10 @@ package iav1beta1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -119,13 +118,10 @@ func file_managementpb_ia_status_proto_rawDescGZIP() []byte { return file_managementpb_ia_status_proto_rawDescData } -var ( - file_managementpb_ia_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_ia_status_proto_goTypes = []interface{}{ - (Status)(0), // 0: ia.v1beta1.Status - } -) - +var file_managementpb_ia_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_ia_status_proto_goTypes = []interface{}{ + (Status)(0), // 0: ia.v1beta1.Status +} var file_managementpb_ia_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/ia/status.swagger.json b/api/managementpb/ia/status.swagger.json new file mode 100644 index 0000000000..7f2c791081 --- /dev/null +++ b/api/managementpb/ia/status.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/ia/status.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/managementpb/json/client/actions/cancel_action_parameters.go b/api/managementpb/json/client/actions/cancel_action_parameters.go index f89e277a27..64a13fef98 100644 --- a/api/managementpb/json/client/actions/cancel_action_parameters.go +++ b/api/managementpb/json/client/actions/cancel_action_parameters.go @@ -60,6 +60,7 @@ CancelActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CancelActionParams struct { + // Body. Body CancelActionBody @@ -129,6 +130,7 @@ func (o *CancelActionParams) SetBody(body CancelActionBody) { // WriteToRequest writes these params to a swagger request func (o *CancelActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/cancel_action_responses.go b/api/managementpb/json/client/actions/cancel_action_responses.go index 0816b2f0b2..f336f42d75 100644 --- a/api/managementpb/json/client/actions/cancel_action_responses.go +++ b/api/managementpb/json/client/actions/cancel_action_responses.go @@ -60,12 +60,12 @@ type CancelActionOK struct { func (o *CancelActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Cancel][%d] cancelActionOk %+v", 200, o.Payload) } - func (o *CancelActionOK) GetPayload() interface{} { return o.Payload } func (o *CancelActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *CancelActionDefault) Code() int { func (o *CancelActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Cancel][%d] CancelAction default %+v", o._statusCode, o.Payload) } - func (o *CancelActionDefault) GetPayload() *CancelActionDefaultBody { return o.Payload } func (o *CancelActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CancelActionDefaultBody) // response payload @@ -121,6 +121,7 @@ CancelActionBody cancel action body swagger:model CancelActionBody */ type CancelActionBody struct { + // Unique Action ID. Required. ActionID string `json:"action_id,omitempty"` } @@ -158,6 +159,7 @@ CancelActionDefaultBody cancel action default body swagger:model CancelActionDefaultBody */ type CancelActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *CancelActionDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -262,6 +267,7 @@ CancelActionDefaultBodyDetailsItems0 cancel action default body details items0 swagger:model CancelActionDefaultBodyDetailsItems0 */ type CancelActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/actions/get_action_parameters.go b/api/managementpb/json/client/actions/get_action_parameters.go index b3a87a7fcb..68bc7cd52b 100644 --- a/api/managementpb/json/client/actions/get_action_parameters.go +++ b/api/managementpb/json/client/actions/get_action_parameters.go @@ -60,6 +60,7 @@ GetActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetActionParams struct { + // Body. Body GetActionBody @@ -129,6 +130,7 @@ func (o *GetActionParams) SetBody(body GetActionBody) { // WriteToRequest writes these params to a swagger request func (o *GetActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/get_action_responses.go b/api/managementpb/json/client/actions/get_action_responses.go index f8819af27a..11e9b642be 100644 --- a/api/managementpb/json/client/actions/get_action_responses.go +++ b/api/managementpb/json/client/actions/get_action_responses.go @@ -60,12 +60,12 @@ type GetActionOK struct { func (o *GetActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Get][%d] getActionOk %+v", 200, o.Payload) } - func (o *GetActionOK) GetPayload() *GetActionOKBody { return o.Payload } func (o *GetActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetActionDefault) Code() int { func (o *GetActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Get][%d] GetAction default %+v", o._statusCode, o.Payload) } - func (o *GetActionDefault) GetPayload() *GetActionDefaultBody { return o.Payload } func (o *GetActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetActionDefaultBody) // response payload @@ -123,6 +123,7 @@ GetActionBody get action body swagger:model GetActionBody */ type GetActionBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` } @@ -160,6 +161,7 @@ GetActionDefaultBody get action default body swagger:model GetActionDefaultBody */ type GetActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -225,7 +227,9 @@ func (o *GetActionDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -236,6 +240,7 @@ func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -264,6 +269,7 @@ GetActionDefaultBodyDetailsItems0 get action default body details items0 swagger:model GetActionDefaultBodyDetailsItems0 */ type GetActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -301,6 +307,7 @@ GetActionOKBody get action OK body swagger:model GetActionOKBody */ type GetActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go b/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go index dfe69462d0..645603cb1d 100644 --- a/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go +++ b/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go @@ -60,6 +60,7 @@ StartMongoDBExplainActionParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type StartMongoDBExplainActionParams struct { + // Body. Body StartMongoDBExplainActionBody @@ -129,6 +130,7 @@ func (o *StartMongoDBExplainActionParams) SetBody(body StartMongoDBExplainAction // WriteToRequest writes these params to a swagger request func (o *StartMongoDBExplainActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go b/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go index 68531bf73c..7492987ad8 100644 --- a/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go +++ b/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go @@ -60,12 +60,12 @@ type StartMongoDBExplainActionOK struct { func (o *StartMongoDBExplainActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMongoDBExplain][%d] startMongoDbExplainActionOk %+v", 200, o.Payload) } - func (o *StartMongoDBExplainActionOK) GetPayload() *StartMongoDBExplainActionOKBody { return o.Payload } func (o *StartMongoDBExplainActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMongoDBExplainActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMongoDBExplainActionDefault) Code() int { func (o *StartMongoDBExplainActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMongoDBExplain][%d] StartMongoDBExplainAction default %+v", o._statusCode, o.Payload) } - func (o *StartMongoDBExplainActionDefault) GetPayload() *StartMongoDBExplainActionDefaultBody { return o.Payload } func (o *StartMongoDBExplainActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMongoDBExplainActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMongoDBExplainActionBody start mongo DB explain action body swagger:model StartMongoDBExplainActionBody */ type StartMongoDBExplainActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -166,6 +167,7 @@ StartMongoDBExplainActionDefaultBody start mongo DB explain action default body swagger:model StartMongoDBExplainActionDefaultBody */ type StartMongoDBExplainActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -231,7 +233,9 @@ func (o *StartMongoDBExplainActionDefaultBody) ContextValidate(ctx context.Conte } func (o *StartMongoDBExplainActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -242,6 +246,7 @@ func (o *StartMongoDBExplainActionDefaultBody) contextValidateDetails(ctx contex return err } } + } return nil @@ -270,6 +275,7 @@ StartMongoDBExplainActionDefaultBodyDetailsItems0 start mongo DB explain action swagger:model StartMongoDBExplainActionDefaultBodyDetailsItems0 */ type StartMongoDBExplainActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -307,6 +313,7 @@ StartMongoDBExplainActionOKBody start mongo DB explain action OK body swagger:model StartMongoDBExplainActionOKBody */ type StartMongoDBExplainActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go index c6046f432b..53a5e5575b 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go @@ -60,6 +60,7 @@ StartMySQLExplainActionParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type StartMySQLExplainActionParams struct { + // Body. Body StartMySQLExplainActionBody @@ -129,6 +130,7 @@ func (o *StartMySQLExplainActionParams) SetBody(body StartMySQLExplainActionBody // WriteToRequest writes these params to a swagger request func (o *StartMySQLExplainActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go index d115b52d62..0cbc508c57 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLExplainActionOK struct { func (o *StartMySQLExplainActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplain][%d] startMySqlExplainActionOk %+v", 200, o.Payload) } - func (o *StartMySQLExplainActionOK) GetPayload() *StartMySQLExplainActionOKBody { return o.Payload } func (o *StartMySQLExplainActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLExplainActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLExplainActionDefault) Code() int { func (o *StartMySQLExplainActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplain][%d] StartMySQLExplainAction default %+v", o._statusCode, o.Payload) } - func (o *StartMySQLExplainActionDefault) GetPayload() *StartMySQLExplainActionDefaultBody { return o.Payload } func (o *StartMySQLExplainActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLExplainActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMySQLExplainActionBody start my SQL explain action body swagger:model StartMySQLExplainActionBody */ type StartMySQLExplainActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -176,6 +177,7 @@ StartMySQLExplainActionDefaultBody start my SQL explain action default body swagger:model StartMySQLExplainActionDefaultBody */ type StartMySQLExplainActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -241,7 +243,9 @@ func (o *StartMySQLExplainActionDefaultBody) ContextValidate(ctx context.Context } func (o *StartMySQLExplainActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -252,6 +256,7 @@ func (o *StartMySQLExplainActionDefaultBody) contextValidateDetails(ctx context. return err } } + } return nil @@ -280,6 +285,7 @@ StartMySQLExplainActionDefaultBodyDetailsItems0 start my SQL explain action defa swagger:model StartMySQLExplainActionDefaultBodyDetailsItems0 */ type StartMySQLExplainActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -317,6 +323,7 @@ StartMySQLExplainActionOKBody start my SQL explain action OK body swagger:model StartMySQLExplainActionOKBody */ type StartMySQLExplainActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go index 03d9f224b7..dff9e0b6eb 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go @@ -60,6 +60,7 @@ StartMySQLExplainJSONActionParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type StartMySQLExplainJSONActionParams struct { + // Body. Body StartMySQLExplainJSONActionBody @@ -129,6 +130,7 @@ func (o *StartMySQLExplainJSONActionParams) SetBody(body StartMySQLExplainJSONAc // WriteToRequest writes these params to a swagger request func (o *StartMySQLExplainJSONActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go index 779788fbf4..c723166405 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLExplainJSONActionOK struct { func (o *StartMySQLExplainJSONActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainJSON][%d] startMySqlExplainJsonActionOk %+v", 200, o.Payload) } - func (o *StartMySQLExplainJSONActionOK) GetPayload() *StartMySQLExplainJSONActionOKBody { return o.Payload } func (o *StartMySQLExplainJSONActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLExplainJSONActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLExplainJSONActionDefault) Code() int { func (o *StartMySQLExplainJSONActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainJSON][%d] StartMySQLExplainJSONAction default %+v", o._statusCode, o.Payload) } - func (o *StartMySQLExplainJSONActionDefault) GetPayload() *StartMySQLExplainJSONActionDefaultBody { return o.Payload } func (o *StartMySQLExplainJSONActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLExplainJSONActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMySQLExplainJSONActionBody start my SQL explain JSON action body swagger:model StartMySQLExplainJSONActionBody */ type StartMySQLExplainJSONActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -176,6 +177,7 @@ StartMySQLExplainJSONActionDefaultBody start my SQL explain JSON action default swagger:model StartMySQLExplainJSONActionDefaultBody */ type StartMySQLExplainJSONActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -241,7 +243,9 @@ func (o *StartMySQLExplainJSONActionDefaultBody) ContextValidate(ctx context.Con } func (o *StartMySQLExplainJSONActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -252,6 +256,7 @@ func (o *StartMySQLExplainJSONActionDefaultBody) contextValidateDetails(ctx cont return err } } + } return nil @@ -280,6 +285,7 @@ StartMySQLExplainJSONActionDefaultBodyDetailsItems0 start my SQL explain JSON ac swagger:model StartMySQLExplainJSONActionDefaultBodyDetailsItems0 */ type StartMySQLExplainJSONActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -317,6 +323,7 @@ StartMySQLExplainJSONActionOKBody start my SQL explain JSON action OK body swagger:model StartMySQLExplainJSONActionOKBody */ type StartMySQLExplainJSONActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go index d182205d2b..d1ee5323aa 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go @@ -60,6 +60,7 @@ StartMySQLExplainTraditionalJSONActionParams contains all the parameters to send Typically these are written to a http.Request. */ type StartMySQLExplainTraditionalJSONActionParams struct { + // Body. Body StartMySQLExplainTraditionalJSONActionBody @@ -129,6 +130,7 @@ func (o *StartMySQLExplainTraditionalJSONActionParams) SetBody(body StartMySQLEx // WriteToRequest writes these params to a swagger request func (o *StartMySQLExplainTraditionalJSONActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go index 42787c093e..9eaf4d0c77 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLExplainTraditionalJSONActionOK struct { func (o *StartMySQLExplainTraditionalJSONActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainTraditionalJSON][%d] startMySqlExplainTraditionalJsonActionOk %+v", 200, o.Payload) } - func (o *StartMySQLExplainTraditionalJSONActionOK) GetPayload() *StartMySQLExplainTraditionalJSONActionOKBody { return o.Payload } func (o *StartMySQLExplainTraditionalJSONActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLExplainTraditionalJSONActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLExplainTraditionalJSONActionDefault) Code() int { func (o *StartMySQLExplainTraditionalJSONActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainTraditionalJSON][%d] StartMySQLExplainTraditionalJSONAction default %+v", o._statusCode, o.Payload) } - func (o *StartMySQLExplainTraditionalJSONActionDefault) GetPayload() *StartMySQLExplainTraditionalJSONActionDefaultBody { return o.Payload } func (o *StartMySQLExplainTraditionalJSONActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLExplainTraditionalJSONActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMySQLExplainTraditionalJSONActionBody start my SQL explain traditional JSON swagger:model StartMySQLExplainTraditionalJSONActionBody */ type StartMySQLExplainTraditionalJSONActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -176,6 +177,7 @@ StartMySQLExplainTraditionalJSONActionDefaultBody start my SQL explain tradition swagger:model StartMySQLExplainTraditionalJSONActionDefaultBody */ type StartMySQLExplainTraditionalJSONActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -241,7 +243,9 @@ func (o *StartMySQLExplainTraditionalJSONActionDefaultBody) ContextValidate(ctx } func (o *StartMySQLExplainTraditionalJSONActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -252,6 +256,7 @@ func (o *StartMySQLExplainTraditionalJSONActionDefaultBody) contextValidateDetai return err } } + } return nil @@ -280,6 +285,7 @@ StartMySQLExplainTraditionalJSONActionDefaultBodyDetailsItems0 start my SQL expl swagger:model StartMySQLExplainTraditionalJSONActionDefaultBodyDetailsItems0 */ type StartMySQLExplainTraditionalJSONActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -317,6 +323,7 @@ StartMySQLExplainTraditionalJSONActionOKBody start my SQL explain traditional JS swagger:model StartMySQLExplainTraditionalJSONActionOKBody */ type StartMySQLExplainTraditionalJSONActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go index cdb30a1274..3925d5e0b1 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go @@ -60,6 +60,7 @@ StartMySQLShowCreateTableActionParams contains all the parameters to send to the Typically these are written to a http.Request. */ type StartMySQLShowCreateTableActionParams struct { + // Body. Body StartMySQLShowCreateTableActionBody @@ -129,6 +130,7 @@ func (o *StartMySQLShowCreateTableActionParams) SetBody(body StartMySQLShowCreat // WriteToRequest writes these params to a swagger request func (o *StartMySQLShowCreateTableActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go index 3115a5efbf..da0e9f818b 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLShowCreateTableActionOK struct { func (o *StartMySQLShowCreateTableActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowCreateTable][%d] startMySqlShowCreateTableActionOk %+v", 200, o.Payload) } - func (o *StartMySQLShowCreateTableActionOK) GetPayload() *StartMySQLShowCreateTableActionOKBody { return o.Payload } func (o *StartMySQLShowCreateTableActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLShowCreateTableActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLShowCreateTableActionDefault) Code() int { func (o *StartMySQLShowCreateTableActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowCreateTable][%d] StartMySQLShowCreateTableAction default %+v", o._statusCode, o.Payload) } - func (o *StartMySQLShowCreateTableActionDefault) GetPayload() *StartMySQLShowCreateTableActionDefaultBody { return o.Payload } func (o *StartMySQLShowCreateTableActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLShowCreateTableActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMySQLShowCreateTableActionBody start my SQL show create table action body swagger:model StartMySQLShowCreateTableActionBody */ type StartMySQLShowCreateTableActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -169,6 +170,7 @@ StartMySQLShowCreateTableActionDefaultBody start my SQL show create table action swagger:model StartMySQLShowCreateTableActionDefaultBody */ type StartMySQLShowCreateTableActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -234,7 +236,9 @@ func (o *StartMySQLShowCreateTableActionDefaultBody) ContextValidate(ctx context } func (o *StartMySQLShowCreateTableActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +249,7 @@ func (o *StartMySQLShowCreateTableActionDefaultBody) contextValidateDetails(ctx return err } } + } return nil @@ -273,6 +278,7 @@ StartMySQLShowCreateTableActionDefaultBodyDetailsItems0 start my SQL show create swagger:model StartMySQLShowCreateTableActionDefaultBodyDetailsItems0 */ type StartMySQLShowCreateTableActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -310,6 +316,7 @@ StartMySQLShowCreateTableActionOKBody start my SQL show create table action OK b swagger:model StartMySQLShowCreateTableActionOKBody */ type StartMySQLShowCreateTableActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go index a21d88fb3a..084c7e3303 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go @@ -60,6 +60,7 @@ StartMySQLShowIndexActionParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type StartMySQLShowIndexActionParams struct { + // Body. Body StartMySQLShowIndexActionBody @@ -129,6 +130,7 @@ func (o *StartMySQLShowIndexActionParams) SetBody(body StartMySQLShowIndexAction // WriteToRequest writes these params to a swagger request func (o *StartMySQLShowIndexActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go index b82022dd6d..4ab5d4e157 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLShowIndexActionOK struct { func (o *StartMySQLShowIndexActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowIndex][%d] startMySqlShowIndexActionOk %+v", 200, o.Payload) } - func (o *StartMySQLShowIndexActionOK) GetPayload() *StartMySQLShowIndexActionOKBody { return o.Payload } func (o *StartMySQLShowIndexActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLShowIndexActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLShowIndexActionDefault) Code() int { func (o *StartMySQLShowIndexActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowIndex][%d] StartMySQLShowIndexAction default %+v", o._statusCode, o.Payload) } - func (o *StartMySQLShowIndexActionDefault) GetPayload() *StartMySQLShowIndexActionDefaultBody { return o.Payload } func (o *StartMySQLShowIndexActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLShowIndexActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMySQLShowIndexActionBody start my SQL show index action body swagger:model StartMySQLShowIndexActionBody */ type StartMySQLShowIndexActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -169,6 +170,7 @@ StartMySQLShowIndexActionDefaultBody start my SQL show index action default body swagger:model StartMySQLShowIndexActionDefaultBody */ type StartMySQLShowIndexActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -234,7 +236,9 @@ func (o *StartMySQLShowIndexActionDefaultBody) ContextValidate(ctx context.Conte } func (o *StartMySQLShowIndexActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +249,7 @@ func (o *StartMySQLShowIndexActionDefaultBody) contextValidateDetails(ctx contex return err } } + } return nil @@ -273,6 +278,7 @@ StartMySQLShowIndexActionDefaultBodyDetailsItems0 start my SQL show index action swagger:model StartMySQLShowIndexActionDefaultBodyDetailsItems0 */ type StartMySQLShowIndexActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -310,6 +316,7 @@ StartMySQLShowIndexActionOKBody start my SQL show index action OK body swagger:model StartMySQLShowIndexActionOKBody */ type StartMySQLShowIndexActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go index 9aca846274..fe206c8b70 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go @@ -60,6 +60,7 @@ StartMySQLShowTableStatusActionParams contains all the parameters to send to the Typically these are written to a http.Request. */ type StartMySQLShowTableStatusActionParams struct { + // Body. Body StartMySQLShowTableStatusActionBody @@ -129,6 +130,7 @@ func (o *StartMySQLShowTableStatusActionParams) SetBody(body StartMySQLShowTable // WriteToRequest writes these params to a swagger request func (o *StartMySQLShowTableStatusActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go index d3403dc057..ce045b702e 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLShowTableStatusActionOK struct { func (o *StartMySQLShowTableStatusActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowTableStatus][%d] startMySqlShowTableStatusActionOk %+v", 200, o.Payload) } - func (o *StartMySQLShowTableStatusActionOK) GetPayload() *StartMySQLShowTableStatusActionOKBody { return o.Payload } func (o *StartMySQLShowTableStatusActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLShowTableStatusActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLShowTableStatusActionDefault) Code() int { func (o *StartMySQLShowTableStatusActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowTableStatus][%d] StartMySQLShowTableStatusAction default %+v", o._statusCode, o.Payload) } - func (o *StartMySQLShowTableStatusActionDefault) GetPayload() *StartMySQLShowTableStatusActionDefaultBody { return o.Payload } func (o *StartMySQLShowTableStatusActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartMySQLShowTableStatusActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartMySQLShowTableStatusActionBody start my SQL show table status action body swagger:model StartMySQLShowTableStatusActionBody */ type StartMySQLShowTableStatusActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -169,6 +170,7 @@ StartMySQLShowTableStatusActionDefaultBody start my SQL show table status action swagger:model StartMySQLShowTableStatusActionDefaultBody */ type StartMySQLShowTableStatusActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -234,7 +236,9 @@ func (o *StartMySQLShowTableStatusActionDefaultBody) ContextValidate(ctx context } func (o *StartMySQLShowTableStatusActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +249,7 @@ func (o *StartMySQLShowTableStatusActionDefaultBody) contextValidateDetails(ctx return err } } + } return nil @@ -273,6 +278,7 @@ StartMySQLShowTableStatusActionDefaultBodyDetailsItems0 start my SQL show table swagger:model StartMySQLShowTableStatusActionDefaultBodyDetailsItems0 */ type StartMySQLShowTableStatusActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -310,6 +316,7 @@ StartMySQLShowTableStatusActionOKBody start my SQL show table status action OK b swagger:model StartMySQLShowTableStatusActionOKBody */ type StartMySQLShowTableStatusActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go index bd14d9a514..5245d3004d 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go @@ -60,6 +60,7 @@ StartPostgreSQLShowCreateTableActionParams contains all the parameters to send t Typically these are written to a http.Request. */ type StartPostgreSQLShowCreateTableActionParams struct { + // Body. Body StartPostgreSQLShowCreateTableActionBody @@ -129,6 +130,7 @@ func (o *StartPostgreSQLShowCreateTableActionParams) SetBody(body StartPostgreSQ // WriteToRequest writes these params to a swagger request func (o *StartPostgreSQLShowCreateTableActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go index 97260190f8..3fb66062e4 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go @@ -60,12 +60,12 @@ type StartPostgreSQLShowCreateTableActionOK struct { func (o *StartPostgreSQLShowCreateTableActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowCreateTable][%d] startPostgreSqlShowCreateTableActionOk %+v", 200, o.Payload) } - func (o *StartPostgreSQLShowCreateTableActionOK) GetPayload() *StartPostgreSQLShowCreateTableActionOKBody { return o.Payload } func (o *StartPostgreSQLShowCreateTableActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPostgreSQLShowCreateTableActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPostgreSQLShowCreateTableActionDefault) Code() int { func (o *StartPostgreSQLShowCreateTableActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowCreateTable][%d] StartPostgreSQLShowCreateTableAction default %+v", o._statusCode, o.Payload) } - func (o *StartPostgreSQLShowCreateTableActionDefault) GetPayload() *StartPostgreSQLShowCreateTableActionDefaultBody { return o.Payload } func (o *StartPostgreSQLShowCreateTableActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPostgreSQLShowCreateTableActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartPostgreSQLShowCreateTableActionBody start postgre SQL show create table act swagger:model StartPostgreSQLShowCreateTableActionBody */ type StartPostgreSQLShowCreateTableActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -169,6 +170,7 @@ StartPostgreSQLShowCreateTableActionDefaultBody start postgre SQL show create ta swagger:model StartPostgreSQLShowCreateTableActionDefaultBody */ type StartPostgreSQLShowCreateTableActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -234,7 +236,9 @@ func (o *StartPostgreSQLShowCreateTableActionDefaultBody) ContextValidate(ctx co } func (o *StartPostgreSQLShowCreateTableActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +249,7 @@ func (o *StartPostgreSQLShowCreateTableActionDefaultBody) contextValidateDetails return err } } + } return nil @@ -273,6 +278,7 @@ StartPostgreSQLShowCreateTableActionDefaultBodyDetailsItems0 start postgre SQL s swagger:model StartPostgreSQLShowCreateTableActionDefaultBodyDetailsItems0 */ type StartPostgreSQLShowCreateTableActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -310,6 +316,7 @@ StartPostgreSQLShowCreateTableActionOKBody start postgre SQL show create table a swagger:model StartPostgreSQLShowCreateTableActionOKBody */ type StartPostgreSQLShowCreateTableActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go index c124c400d3..a856b6602c 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go @@ -60,6 +60,7 @@ StartPostgreSQLShowIndexActionParams contains all the parameters to send to the Typically these are written to a http.Request. */ type StartPostgreSQLShowIndexActionParams struct { + // Body. Body StartPostgreSQLShowIndexActionBody @@ -129,6 +130,7 @@ func (o *StartPostgreSQLShowIndexActionParams) SetBody(body StartPostgreSQLShowI // WriteToRequest writes these params to a swagger request func (o *StartPostgreSQLShowIndexActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go index 767c1aa85a..b971a606d0 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go @@ -60,12 +60,12 @@ type StartPostgreSQLShowIndexActionOK struct { func (o *StartPostgreSQLShowIndexActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowIndex][%d] startPostgreSqlShowIndexActionOk %+v", 200, o.Payload) } - func (o *StartPostgreSQLShowIndexActionOK) GetPayload() *StartPostgreSQLShowIndexActionOKBody { return o.Payload } func (o *StartPostgreSQLShowIndexActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPostgreSQLShowIndexActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPostgreSQLShowIndexActionDefault) Code() int { func (o *StartPostgreSQLShowIndexActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowIndex][%d] StartPostgreSQLShowIndexAction default %+v", o._statusCode, o.Payload) } - func (o *StartPostgreSQLShowIndexActionDefault) GetPayload() *StartPostgreSQLShowIndexActionDefaultBody { return o.Payload } func (o *StartPostgreSQLShowIndexActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPostgreSQLShowIndexActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartPostgreSQLShowIndexActionBody start postgre SQL show index action body swagger:model StartPostgreSQLShowIndexActionBody */ type StartPostgreSQLShowIndexActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -169,6 +170,7 @@ StartPostgreSQLShowIndexActionDefaultBody start postgre SQL show index action de swagger:model StartPostgreSQLShowIndexActionDefaultBody */ type StartPostgreSQLShowIndexActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -234,7 +236,9 @@ func (o *StartPostgreSQLShowIndexActionDefaultBody) ContextValidate(ctx context. } func (o *StartPostgreSQLShowIndexActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +249,7 @@ func (o *StartPostgreSQLShowIndexActionDefaultBody) contextValidateDetails(ctx c return err } } + } return nil @@ -273,6 +278,7 @@ StartPostgreSQLShowIndexActionDefaultBodyDetailsItems0 start postgre SQL show in swagger:model StartPostgreSQLShowIndexActionDefaultBodyDetailsItems0 */ type StartPostgreSQLShowIndexActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -310,6 +316,7 @@ StartPostgreSQLShowIndexActionOKBody start postgre SQL show index action OK body swagger:model StartPostgreSQLShowIndexActionOKBody */ type StartPostgreSQLShowIndexActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go index c970df2211..96eb6cab1c 100644 --- a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go @@ -60,6 +60,7 @@ StartPTMongoDBSummaryActionParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type StartPTMongoDBSummaryActionParams struct { + // Body. Body StartPTMongoDBSummaryActionBody @@ -129,6 +130,7 @@ func (o *StartPTMongoDBSummaryActionParams) SetBody(body StartPTMongoDBSummaryAc // WriteToRequest writes these params to a swagger request func (o *StartPTMongoDBSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go index 506059ad1f..b14c02c25d 100644 --- a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTMongoDBSummaryActionOK struct { func (o *StartPTMongoDBSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMongoDBSummary][%d] startPtMongoDbSummaryActionOk %+v", 200, o.Payload) } - func (o *StartPTMongoDBSummaryActionOK) GetPayload() *StartPTMongoDBSummaryActionOKBody { return o.Payload } func (o *StartPTMongoDBSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTMongoDBSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTMongoDBSummaryActionDefault) Code() int { func (o *StartPTMongoDBSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMongoDBSummary][%d] StartPTMongoDBSummaryAction default %+v", o._statusCode, o.Payload) } - func (o *StartPTMongoDBSummaryActionDefault) GetPayload() *StartPTMongoDBSummaryActionDefaultBody { return o.Payload } func (o *StartPTMongoDBSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTMongoDBSummaryActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartPTMongoDBSummaryActionBody Message to prepare pt-mongodb-summary data swagger:model StartPTMongoDBSummaryActionBody */ type StartPTMongoDBSummaryActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -163,6 +164,7 @@ StartPTMongoDBSummaryActionDefaultBody start PT mongo DB summary action default swagger:model StartPTMongoDBSummaryActionDefaultBody */ type StartPTMongoDBSummaryActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *StartPTMongoDBSummaryActionDefaultBody) ContextValidate(ctx context.Con } func (o *StartPTMongoDBSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *StartPTMongoDBSummaryActionDefaultBody) contextValidateDetails(ctx cont return err } } + } return nil @@ -267,6 +272,7 @@ StartPTMongoDBSummaryActionDefaultBodyDetailsItems0 start PT mongo DB summary ac swagger:model StartPTMongoDBSummaryActionDefaultBodyDetailsItems0 */ type StartPTMongoDBSummaryActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ StartPTMongoDBSummaryActionOKBody Message to retrieve the prepared pt-mongodb-su swagger:model StartPTMongoDBSummaryActionOKBody */ type StartPTMongoDBSummaryActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go index ae4ddbcf89..9f1f2000f6 100644 --- a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go @@ -60,6 +60,7 @@ StartPTMySQLSummaryActionParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type StartPTMySQLSummaryActionParams struct { + // Body. Body StartPTMySQLSummaryActionBody @@ -129,6 +130,7 @@ func (o *StartPTMySQLSummaryActionParams) SetBody(body StartPTMySQLSummaryAction // WriteToRequest writes these params to a swagger request func (o *StartPTMySQLSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go index dcd6b0a240..dfc628253f 100644 --- a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTMySQLSummaryActionOK struct { func (o *StartPTMySQLSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMySQLSummary][%d] startPtMySqlSummaryActionOk %+v", 200, o.Payload) } - func (o *StartPTMySQLSummaryActionOK) GetPayload() *StartPTMySQLSummaryActionOKBody { return o.Payload } func (o *StartPTMySQLSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTMySQLSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTMySQLSummaryActionDefault) Code() int { func (o *StartPTMySQLSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMySQLSummary][%d] StartPTMySQLSummaryAction default %+v", o._statusCode, o.Payload) } - func (o *StartPTMySQLSummaryActionDefault) GetPayload() *StartPTMySQLSummaryActionDefaultBody { return o.Payload } func (o *StartPTMySQLSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTMySQLSummaryActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartPTMySQLSummaryActionBody Message to prepare pt-mysql-summary data swagger:model StartPTMySQLSummaryActionBody */ type StartPTMySQLSummaryActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -163,6 +164,7 @@ StartPTMySQLSummaryActionDefaultBody start PT my SQL summary action default body swagger:model StartPTMySQLSummaryActionDefaultBody */ type StartPTMySQLSummaryActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *StartPTMySQLSummaryActionDefaultBody) ContextValidate(ctx context.Conte } func (o *StartPTMySQLSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *StartPTMySQLSummaryActionDefaultBody) contextValidateDetails(ctx contex return err } } + } return nil @@ -267,6 +272,7 @@ StartPTMySQLSummaryActionDefaultBodyDetailsItems0 start PT my SQL summary action swagger:model StartPTMySQLSummaryActionDefaultBodyDetailsItems0 */ type StartPTMySQLSummaryActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ StartPTMySQLSummaryActionOKBody Message to retrieve the prepared pt-mysql-summar swagger:model StartPTMySQLSummaryActionOKBody */ type StartPTMySQLSummaryActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go index f2eff89d17..e1571372d0 100644 --- a/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go @@ -60,6 +60,7 @@ StartPTPgSummaryActionParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type StartPTPgSummaryActionParams struct { + // Body. Body StartPTPgSummaryActionBody @@ -129,6 +130,7 @@ func (o *StartPTPgSummaryActionParams) SetBody(body StartPTPgSummaryActionBody) // WriteToRequest writes these params to a swagger request func (o *StartPTPgSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go index 92cf81cfbf..7cd914b581 100644 --- a/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTPgSummaryActionOK struct { func (o *StartPTPgSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTPgSummary][%d] startPtPgSummaryActionOk %+v", 200, o.Payload) } - func (o *StartPTPgSummaryActionOK) GetPayload() *StartPTPgSummaryActionOKBody { return o.Payload } func (o *StartPTPgSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTPgSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTPgSummaryActionDefault) Code() int { func (o *StartPTPgSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTPgSummary][%d] StartPTPgSummaryAction default %+v", o._statusCode, o.Payload) } - func (o *StartPTPgSummaryActionDefault) GetPayload() *StartPTPgSummaryActionDefaultBody { return o.Payload } func (o *StartPTPgSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTPgSummaryActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartPTPgSummaryActionBody Message to prepare pt-pg-summary data swagger:model StartPTPgSummaryActionBody */ type StartPTPgSummaryActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -163,6 +164,7 @@ StartPTPgSummaryActionDefaultBody start PT pg summary action default body swagger:model StartPTPgSummaryActionDefaultBody */ type StartPTPgSummaryActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *StartPTPgSummaryActionDefaultBody) ContextValidate(ctx context.Context, } func (o *StartPTPgSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *StartPTPgSummaryActionDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -267,6 +272,7 @@ StartPTPgSummaryActionDefaultBodyDetailsItems0 start PT pg summary action defaul swagger:model StartPTPgSummaryActionDefaultBodyDetailsItems0 */ type StartPTPgSummaryActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ StartPTPgSummaryActionOKBody Message to retrieve the prepared pt-pg-summary data swagger:model StartPTPgSummaryActionOKBody */ type StartPTPgSummaryActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go index 816c3e8e05..055d38f5ba 100644 --- a/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go @@ -60,6 +60,7 @@ StartPTSummaryActionParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type StartPTSummaryActionParams struct { + // Body. Body StartPTSummaryActionBody @@ -129,6 +130,7 @@ func (o *StartPTSummaryActionParams) SetBody(body StartPTSummaryActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartPTSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_summary_action_responses.go index d935512a5c..8be0539893 100644 --- a/api/managementpb/json/client/actions/start_pt_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTSummaryActionOK struct { func (o *StartPTSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTSummary][%d] startPtSummaryActionOk %+v", 200, o.Payload) } - func (o *StartPTSummaryActionOK) GetPayload() *StartPTSummaryActionOKBody { return o.Payload } func (o *StartPTSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTSummaryActionDefault) Code() int { func (o *StartPTSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTSummary][%d] StartPTSummaryAction default %+v", o._statusCode, o.Payload) } - func (o *StartPTSummaryActionDefault) GetPayload() *StartPTSummaryActionDefaultBody { return o.Payload } func (o *StartPTSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTSummaryActionDefaultBody) // response payload @@ -123,6 +123,7 @@ StartPTSummaryActionBody start PT summary action body swagger:model StartPTSummaryActionBody */ type StartPTSummaryActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -163,6 +164,7 @@ StartPTSummaryActionDefaultBody start PT summary action default body swagger:model StartPTSummaryActionDefaultBody */ type StartPTSummaryActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *StartPTSummaryActionDefaultBody) ContextValidate(ctx context.Context, f } func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -267,6 +272,7 @@ StartPTSummaryActionDefaultBodyDetailsItems0 start PT summary action default bod swagger:model StartPTSummaryActionDefaultBodyDetailsItems0 */ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ StartPTSummaryActionOKBody start PT summary action OK body swagger:model StartPTSummaryActionOKBody */ type StartPTSummaryActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/annotation/add_annotation_parameters.go b/api/managementpb/json/client/annotation/add_annotation_parameters.go index dfd1c36bc5..a3c3439116 100644 --- a/api/managementpb/json/client/annotation/add_annotation_parameters.go +++ b/api/managementpb/json/client/annotation/add_annotation_parameters.go @@ -60,6 +60,7 @@ AddAnnotationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAnnotationParams struct { + /* Body. AddAnnotationRequest is a params to add new annotation. @@ -132,6 +133,7 @@ func (o *AddAnnotationParams) SetBody(body AddAnnotationBody) { // WriteToRequest writes these params to a swagger request func (o *AddAnnotationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/annotation/add_annotation_responses.go b/api/managementpb/json/client/annotation/add_annotation_responses.go index 6f9cf3e3e1..3701159fc5 100644 --- a/api/managementpb/json/client/annotation/add_annotation_responses.go +++ b/api/managementpb/json/client/annotation/add_annotation_responses.go @@ -60,12 +60,12 @@ type AddAnnotationOK struct { func (o *AddAnnotationOK) Error() string { return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] addAnnotationOk %+v", 200, o.Payload) } - func (o *AddAnnotationOK) GetPayload() interface{} { return o.Payload } func (o *AddAnnotationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AddAnnotationDefault) Code() int { func (o *AddAnnotationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] AddAnnotation default %+v", o._statusCode, o.Payload) } - func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { return o.Payload } func (o *AddAnnotationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAnnotationDefaultBody) // response payload @@ -121,6 +121,7 @@ AddAnnotationBody AddAnnotationRequest is a params to add new annotation. swagger:model AddAnnotationBody */ type AddAnnotationBody struct { + // An annotation description. Required. Text string `json:"text,omitempty"` @@ -167,6 +168,7 @@ AddAnnotationDefaultBody add annotation default body swagger:model AddAnnotationDefaultBody */ type AddAnnotationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -232,7 +234,9 @@ func (o *AddAnnotationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,6 +247,7 @@ func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -271,6 +276,7 @@ AddAnnotationDefaultBodyDetailsItems0 add annotation default body details items0 swagger:model AddAnnotationDefaultBodyDetailsItems0 */ type AddAnnotationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/external/add_external_parameters.go b/api/managementpb/json/client/external/add_external_parameters.go index f58a91ff4f..e965c9d141 100644 --- a/api/managementpb/json/client/external/add_external_parameters.go +++ b/api/managementpb/json/client/external/add_external_parameters.go @@ -60,6 +60,7 @@ AddExternalParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddExternalParams struct { + // Body. Body AddExternalBody @@ -129,6 +130,7 @@ func (o *AddExternalParams) SetBody(body AddExternalBody) { // WriteToRequest writes these params to a swagger request func (o *AddExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/external/add_external_responses.go b/api/managementpb/json/client/external/add_external_responses.go index 3fa642bb18..e64cd798b8 100644 --- a/api/managementpb/json/client/external/add_external_responses.go +++ b/api/managementpb/json/client/external/add_external_responses.go @@ -62,12 +62,12 @@ type AddExternalOK struct { func (o *AddExternalOK) Error() string { return fmt.Sprintf("[POST /v1/management/External/Add][%d] addExternalOk %+v", 200, o.Payload) } - func (o *AddExternalOK) GetPayload() *AddExternalOKBody { return o.Payload } func (o *AddExternalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddExternalOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddExternalDefault) Code() int { func (o *AddExternalDefault) Error() string { return fmt.Sprintf("[POST /v1/management/External/Add][%d] AddExternal default %+v", o._statusCode, o.Payload) } - func (o *AddExternalDefault) GetPayload() *AddExternalDefaultBody { return o.Payload } func (o *AddExternalDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddExternalDefaultBody) // response payload @@ -125,6 +125,7 @@ AddExternalBody add external body swagger:model AddExternalBody */ type AddExternalBody struct { + // Node identifier on which an external exporter is been running. // runs_on_node_id always should be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. @@ -284,6 +285,7 @@ func (o *AddExternalBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddExternalBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -321,6 +323,7 @@ AddExternalDefaultBody add external default body swagger:model AddExternalDefaultBody */ type AddExternalDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -386,7 +389,9 @@ func (o *AddExternalDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddExternalDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -397,6 +402,7 @@ func (o *AddExternalDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -425,6 +431,7 @@ AddExternalDefaultBodyDetailsItems0 add external default body details items0 swagger:model AddExternalDefaultBodyDetailsItems0 */ type AddExternalDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -462,6 +469,7 @@ AddExternalOKBody add external OK body swagger:model AddExternalOKBody */ type AddExternalOKBody struct { + // external exporter ExternalExporter *AddExternalOKBodyExternalExporter `json:"external_exporter,omitempty"` @@ -544,6 +552,7 @@ func (o *AddExternalOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddExternalOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -559,6 +568,7 @@ func (o *AddExternalOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *AddExternalOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -596,6 +606,7 @@ AddExternalOKBodyExternalExporter ExternalExporter runs on any Node type, includ swagger:model AddExternalOKBodyExternalExporter */ type AddExternalOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -663,6 +674,7 @@ AddExternalOKBodyService ExternalService represents a generic External service i swagger:model AddExternalOKBodyService */ type AddExternalOKBodyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -721,6 +733,7 @@ AddExternalParamsBodyAddNode AddNodeParams holds node params and is used to add swagger:model AddExternalParamsBodyAddNode */ type AddExternalParamsBodyAddNode struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go b/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go index ac06a0fc9d..aeacacdc0b 100644 --- a/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go +++ b/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go @@ -60,6 +60,7 @@ AddHAProxyParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddHAProxyParams struct { + // Body. Body AddHAProxyBody @@ -129,6 +130,7 @@ func (o *AddHAProxyParams) SetBody(body AddHAProxyBody) { // WriteToRequest writes these params to a swagger request func (o *AddHAProxyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go b/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go index b32ca5d114..1acc8473c1 100644 --- a/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go +++ b/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go @@ -62,12 +62,12 @@ type AddHAProxyOK struct { func (o *AddHAProxyOK) Error() string { return fmt.Sprintf("[POST /v1/management/HAProxy/Add][%d] addHaProxyOk %+v", 200, o.Payload) } - func (o *AddHAProxyOK) GetPayload() *AddHAProxyOKBody { return o.Payload } func (o *AddHAProxyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddHAProxyOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddHAProxyDefault) Code() int { func (o *AddHAProxyDefault) Error() string { return fmt.Sprintf("[POST /v1/management/HAProxy/Add][%d] AddHAProxy default %+v", o._statusCode, o.Payload) } - func (o *AddHAProxyDefault) GetPayload() *AddHAProxyDefaultBody { return o.Payload } func (o *AddHAProxyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddHAProxyDefaultBody) // response payload @@ -125,6 +125,7 @@ AddHAProxyBody add HA proxy body swagger:model AddHAProxyBody */ type AddHAProxyBody struct { + // Node identifier on which an external exporter is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -276,6 +277,7 @@ func (o *AddHAProxyBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddHAProxyBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -313,6 +315,7 @@ AddHAProxyDefaultBody add HA proxy default body swagger:model AddHAProxyDefaultBody */ type AddHAProxyDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -378,7 +381,9 @@ func (o *AddHAProxyDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddHAProxyDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -389,6 +394,7 @@ func (o *AddHAProxyDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -417,6 +423,7 @@ AddHAProxyDefaultBodyDetailsItems0 add HA proxy default body details items0 swagger:model AddHAProxyDefaultBodyDetailsItems0 */ type AddHAProxyDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -454,6 +461,7 @@ AddHAProxyOKBody add HA proxy OK body swagger:model AddHAProxyOKBody */ type AddHAProxyOKBody struct { + // external exporter ExternalExporter *AddHAProxyOKBodyExternalExporter `json:"external_exporter,omitempty"` @@ -536,6 +544,7 @@ func (o *AddHAProxyOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddHAProxyOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -551,6 +560,7 @@ func (o *AddHAProxyOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *AddHAProxyOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -588,6 +598,7 @@ AddHAProxyOKBodyExternalExporter ExternalExporter runs on any Node type, includi swagger:model AddHAProxyOKBodyExternalExporter */ type AddHAProxyOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -655,6 +666,7 @@ AddHAProxyOKBodyService HAProxyService represents a generic HAProxy service inst swagger:model AddHAProxyOKBodyService */ type AddHAProxyOKBodyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -710,6 +722,7 @@ AddHAProxyParamsBodyAddNode AddNodeParams holds node params and is used to add n swagger:model AddHAProxyParamsBodyAddNode */ type AddHAProxyParamsBodyAddNode struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go b/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go index d232151552..7990ce64f6 100644 --- a/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go +++ b/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go @@ -60,6 +60,7 @@ AddMongoDBParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMongoDBParams struct { + // Body. Body AddMongoDBBody @@ -129,6 +130,7 @@ func (o *AddMongoDBParams) SetBody(body AddMongoDBBody) { // WriteToRequest writes these params to a swagger request func (o *AddMongoDBParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go b/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go index 786557c464..2d6ad741e2 100644 --- a/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go +++ b/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go @@ -62,12 +62,12 @@ type AddMongoDBOK struct { func (o *AddMongoDBOK) Error() string { return fmt.Sprintf("[POST /v1/management/MongoDB/Add][%d] addMongoDbOk %+v", 200, o.Payload) } - func (o *AddMongoDBOK) GetPayload() *AddMongoDBOKBody { return o.Payload } func (o *AddMongoDBOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMongoDBOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMongoDBDefault) Code() int { func (o *AddMongoDBDefault) Error() string { return fmt.Sprintf("[POST /v1/management/MongoDB/Add][%d] AddMongoDB default %+v", o._statusCode, o.Payload) } - func (o *AddMongoDBDefault) GetPayload() *AddMongoDBDefaultBody { return o.Payload } func (o *AddMongoDBDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMongoDBDefaultBody) // response payload @@ -125,6 +125,7 @@ AddMongoDBBody add mongo DB body swagger:model AddMongoDBBody */ type AddMongoDBBody struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -388,6 +389,7 @@ func (o *AddMongoDBBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddMongoDBBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,6 +427,7 @@ AddMongoDBDefaultBody add mongo DB default body swagger:model AddMongoDBDefaultBody */ type AddMongoDBDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -490,7 +493,9 @@ func (o *AddMongoDBDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddMongoDBDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -501,6 +506,7 @@ func (o *AddMongoDBDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -529,6 +535,7 @@ AddMongoDBDefaultBodyDetailsItems0 add mongo DB default body details items0 swagger:model AddMongoDBDefaultBodyDetailsItems0 */ type AddMongoDBDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -566,6 +573,7 @@ AddMongoDBOKBody add mongo DB OK body swagger:model AddMongoDBOKBody */ type AddMongoDBOKBody struct { + // mongodb exporter MongodbExporter *AddMongoDBOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` @@ -678,6 +686,7 @@ func (o *AddMongoDBOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddMongoDBOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -693,6 +702,7 @@ func (o *AddMongoDBOKBody) contextValidateMongodbExporter(ctx context.Context, f } func (o *AddMongoDBOKBody) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfiler != nil { if err := o.QANMongodbProfiler.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -708,6 +718,7 @@ func (o *AddMongoDBOKBody) contextValidateQANMongodbProfiler(ctx context.Context } func (o *AddMongoDBOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -745,6 +756,7 @@ AddMongoDBOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Nod swagger:model AddMongoDBOKBodyMongodbExporter */ type AddMongoDBOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -966,6 +978,7 @@ AddMongoDBOKBodyQANMongodbProfiler QANMongoDBProfilerAgent runs within pmm-agent swagger:model AddMongoDBOKBodyQANMongodbProfiler */ type AddMongoDBOKBodyQANMongodbProfiler struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1174,6 +1187,7 @@ AddMongoDBOKBodyService MongoDBService represents a generic MongoDB instance. swagger:model AddMongoDBOKBodyService */ type AddMongoDBOKBodyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1241,6 +1255,7 @@ AddMongoDBParamsBodyAddNode AddNodeParams holds node params and is used to add n swagger:model AddMongoDBParamsBodyAddNode */ type AddMongoDBParamsBodyAddNode struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/my_sql/add_my_sql_parameters.go b/api/managementpb/json/client/my_sql/add_my_sql_parameters.go index 6055393fdc..569c9f5949 100644 --- a/api/managementpb/json/client/my_sql/add_my_sql_parameters.go +++ b/api/managementpb/json/client/my_sql/add_my_sql_parameters.go @@ -60,6 +60,7 @@ AddMySQLParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMySQLParams struct { + // Body. Body AddMySQLBody @@ -129,6 +130,7 @@ func (o *AddMySQLParams) SetBody(body AddMySQLBody) { // WriteToRequest writes these params to a swagger request func (o *AddMySQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/my_sql/add_my_sql_responses.go b/api/managementpb/json/client/my_sql/add_my_sql_responses.go index 97d0ea9998..5a7964a0e2 100644 --- a/api/managementpb/json/client/my_sql/add_my_sql_responses.go +++ b/api/managementpb/json/client/my_sql/add_my_sql_responses.go @@ -62,12 +62,12 @@ type AddMySQLOK struct { func (o *AddMySQLOK) Error() string { return fmt.Sprintf("[POST /v1/management/MySQL/Add][%d] addMySqlOk %+v", 200, o.Payload) } - func (o *AddMySQLOK) GetPayload() *AddMySQLOKBody { return o.Payload } func (o *AddMySQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMySQLOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMySQLDefault) Code() int { func (o *AddMySQLDefault) Error() string { return fmt.Sprintf("[POST /v1/management/MySQL/Add][%d] AddMySQL default %+v", o._statusCode, o.Payload) } - func (o *AddMySQLDefault) GetPayload() *AddMySQLDefaultBody { return o.Payload } func (o *AddMySQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddMySQLDefaultBody) // response payload @@ -125,6 +125,7 @@ AddMySQLBody add my SQL body swagger:model AddMySQLBody */ type AddMySQLBody struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -386,6 +387,7 @@ func (o *AddMySQLBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddMySQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -423,6 +425,7 @@ AddMySQLDefaultBody add my SQL default body swagger:model AddMySQLDefaultBody */ type AddMySQLDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -488,7 +491,9 @@ func (o *AddMySQLDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddMySQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -499,6 +504,7 @@ func (o *AddMySQLDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -527,6 +533,7 @@ AddMySQLDefaultBodyDetailsItems0 add my SQL default body details items0 swagger:model AddMySQLDefaultBodyDetailsItems0 */ type AddMySQLDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -564,6 +571,7 @@ AddMySQLOKBody add my SQL OK body swagger:model AddMySQLOKBody */ type AddMySQLOKBody struct { + // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -709,6 +717,7 @@ func (o *AddMySQLOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddMySQLOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -724,6 +733,7 @@ func (o *AddMySQLOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *AddMySQLOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { if err := o.QANMysqlPerfschema.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -739,6 +749,7 @@ func (o *AddMySQLOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, } func (o *AddMySQLOKBody) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlog != nil { if err := o.QANMysqlSlowlog.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -754,6 +765,7 @@ func (o *AddMySQLOKBody) contextValidateQANMysqlSlowlog(ctx context.Context, for } func (o *AddMySQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -791,6 +803,7 @@ AddMySQLOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model AddMySQLOKBodyMysqldExporter */ type AddMySQLOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1019,6 +1032,7 @@ AddMySQLOKBodyQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-agent a swagger:model AddMySQLOKBodyQANMysqlPerfschema */ type AddMySQLOKBodyQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1239,6 +1253,7 @@ AddMySQLOKBodyQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent and sen swagger:model AddMySQLOKBodyQANMysqlSlowlog */ type AddMySQLOKBodyQANMysqlSlowlog struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1462,6 +1477,7 @@ AddMySQLOKBodyService MySQLService represents a generic MySQL instance. swagger:model AddMySQLOKBodyService */ type AddMySQLOKBodyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1529,6 +1545,7 @@ AddMySQLParamsBodyAddNode AddNodeParams holds node params and is used to add new swagger:model AddMySQLParamsBodyAddNode */ type AddMySQLParamsBodyAddNode struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/node/register_node_parameters.go b/api/managementpb/json/client/node/register_node_parameters.go index df5bbc15e6..e50a9c1a89 100644 --- a/api/managementpb/json/client/node/register_node_parameters.go +++ b/api/managementpb/json/client/node/register_node_parameters.go @@ -60,6 +60,7 @@ RegisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RegisterNodeParams struct { + // Body. Body RegisterNodeBody @@ -129,6 +130,7 @@ func (o *RegisterNodeParams) SetBody(body RegisterNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RegisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/node/register_node_responses.go b/api/managementpb/json/client/node/register_node_responses.go index 747c5965d7..0fdaed8890 100644 --- a/api/managementpb/json/client/node/register_node_responses.go +++ b/api/managementpb/json/client/node/register_node_responses.go @@ -62,12 +62,12 @@ type RegisterNodeOK struct { func (o *RegisterNodeOK) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Register][%d] registerNodeOk %+v", 200, o.Payload) } - func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { return o.Payload } func (o *RegisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RegisterNodeOKBody) // response payload @@ -104,12 +104,12 @@ func (o *RegisterNodeDefault) Code() int { func (o *RegisterNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Register][%d] RegisterNode default %+v", o._statusCode, o.Payload) } - func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { return o.Payload } func (o *RegisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RegisterNodeDefaultBody) // response payload @@ -125,6 +125,7 @@ RegisterNodeBody register node body swagger:model RegisterNodeBody */ type RegisterNodeBody struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` @@ -319,6 +320,7 @@ RegisterNodeDefaultBody register node default body swagger:model RegisterNodeDefaultBody */ type RegisterNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -384,7 +386,9 @@ func (o *RegisterNodeDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -395,6 +399,7 @@ func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -423,6 +428,7 @@ RegisterNodeDefaultBodyDetailsItems0 register node default body details items0 swagger:model RegisterNodeDefaultBodyDetailsItems0 */ type RegisterNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -460,6 +466,7 @@ RegisterNodeOKBody register node OK body swagger:model RegisterNodeOKBody */ type RegisterNodeOKBody struct { + // Token represents token for vmagent auth config. Token string `json:"token,omitempty"` @@ -575,6 +582,7 @@ func (o *RegisterNodeOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, formats strfmt.Registry) error { + if o.ContainerNode != nil { if err := o.ContainerNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -590,6 +598,7 @@ func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, f } func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, formats strfmt.Registry) error { + if o.GenericNode != nil { if err := o.GenericNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -605,6 +614,7 @@ func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, for } func (o *RegisterNodeOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if err := o.PMMAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -642,6 +652,7 @@ RegisterNodeOKBodyContainerNode ContainerNode represents a Docker container. swagger:model RegisterNodeOKBodyContainerNode */ type RegisterNodeOKBodyContainerNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -706,6 +717,7 @@ RegisterNodeOKBodyGenericNode GenericNode represents a bare metal server or virt swagger:model RegisterNodeOKBodyGenericNode */ type RegisterNodeOKBodyGenericNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -767,6 +779,7 @@ RegisterNodeOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model RegisterNodeOKBodyPMMAgent */ type RegisterNodeOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go b/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go index 35e261e3fe..7b16633d78 100644 --- a/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go +++ b/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go @@ -60,6 +60,7 @@ AddPostgreSQLParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddPostgreSQLParams struct { + // Body. Body AddPostgreSQLBody @@ -129,6 +130,7 @@ func (o *AddPostgreSQLParams) SetBody(body AddPostgreSQLBody) { // WriteToRequest writes these params to a swagger request func (o *AddPostgreSQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go b/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go index ba2ec37478..a1391fd222 100644 --- a/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go +++ b/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go @@ -62,12 +62,12 @@ type AddPostgreSQLOK struct { func (o *AddPostgreSQLOK) Error() string { return fmt.Sprintf("[POST /v1/management/PostgreSQL/Add][%d] addPostgreSqlOk %+v", 200, o.Payload) } - func (o *AddPostgreSQLOK) GetPayload() *AddPostgreSQLOKBody { return o.Payload } func (o *AddPostgreSQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPostgreSQLOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddPostgreSQLDefault) Code() int { func (o *AddPostgreSQLDefault) Error() string { return fmt.Sprintf("[POST /v1/management/PostgreSQL/Add][%d] AddPostgreSQL default %+v", o._statusCode, o.Payload) } - func (o *AddPostgreSQLDefault) GetPayload() *AddPostgreSQLDefaultBody { return o.Payload } func (o *AddPostgreSQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddPostgreSQLDefaultBody) // response payload @@ -125,6 +125,7 @@ AddPostgreSQLBody add postgre SQL body swagger:model AddPostgreSQLBody */ type AddPostgreSQLBody struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -379,6 +380,7 @@ func (o *AddPostgreSQLBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddPostgreSQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -416,6 +418,7 @@ AddPostgreSQLDefaultBody add postgre SQL default body swagger:model AddPostgreSQLDefaultBody */ type AddPostgreSQLDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -481,7 +484,9 @@ func (o *AddPostgreSQLDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddPostgreSQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -492,6 +497,7 @@ func (o *AddPostgreSQLDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -520,6 +526,7 @@ AddPostgreSQLDefaultBodyDetailsItems0 add postgre SQL default body details items swagger:model AddPostgreSQLDefaultBodyDetailsItems0 */ type AddPostgreSQLDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -557,6 +564,7 @@ AddPostgreSQLOKBody add postgre SQL OK body swagger:model AddPostgreSQLOKBody */ type AddPostgreSQLOKBody struct { + // postgres exporter PostgresExporter *AddPostgreSQLOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` @@ -699,6 +707,7 @@ func (o *AddPostgreSQLOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddPostgreSQLOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -714,6 +723,7 @@ func (o *AddPostgreSQLOKBody) contextValidatePostgresExporter(ctx context.Contex } func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -729,6 +739,7 @@ func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx } func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -744,6 +755,7 @@ func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx } func (o *AddPostgreSQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -781,6 +793,7 @@ AddPostgreSQLOKBodyPostgresExporter PostgresExporter runs on Generic or Containe swagger:model AddPostgreSQLOKBodyPostgresExporter */ type AddPostgreSQLOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -990,6 +1003,7 @@ AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent swagger:model AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent */ type AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1198,6 +1212,7 @@ AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAge swagger:model AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent */ type AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1409,6 +1424,7 @@ AddPostgreSQLOKBodyService PostgreSQLService represents a generic PostgreSQL ins swagger:model AddPostgreSQLOKBodyService */ type AddPostgreSQLOKBodyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1479,6 +1495,7 @@ AddPostgreSQLParamsBodyAddNode AddNodeParams holds node params and is used to ad swagger:model AddPostgreSQLParamsBodyAddNode */ type AddPostgreSQLParamsBodyAddNode struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go b/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go index 7857dd35b2..f212574e29 100644 --- a/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go +++ b/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go @@ -60,6 +60,7 @@ AddProxySQLParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddProxySQLParams struct { + // Body. Body AddProxySQLBody @@ -129,6 +130,7 @@ func (o *AddProxySQLParams) SetBody(body AddProxySQLBody) { // WriteToRequest writes these params to a swagger request func (o *AddProxySQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go b/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go index f653aa22f4..144c99236c 100644 --- a/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go +++ b/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go @@ -62,12 +62,12 @@ type AddProxySQLOK struct { func (o *AddProxySQLOK) Error() string { return fmt.Sprintf("[POST /v1/management/ProxySQL/Add][%d] addProxySqlOk %+v", 200, o.Payload) } - func (o *AddProxySQLOK) GetPayload() *AddProxySQLOKBody { return o.Payload } func (o *AddProxySQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddProxySQLOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddProxySQLDefault) Code() int { func (o *AddProxySQLDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ProxySQL/Add][%d] AddProxySQL default %+v", o._statusCode, o.Payload) } - func (o *AddProxySQLDefault) GetPayload() *AddProxySQLDefaultBody { return o.Payload } func (o *AddProxySQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddProxySQLDefaultBody) // response payload @@ -125,6 +125,7 @@ AddProxySQLBody add proxy SQL body swagger:model AddProxySQLBody */ type AddProxySQLBody struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -352,6 +353,7 @@ func (o *AddProxySQLBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddProxySQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -389,6 +391,7 @@ AddProxySQLDefaultBody add proxy SQL default body swagger:model AddProxySQLDefaultBody */ type AddProxySQLDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -454,7 +457,9 @@ func (o *AddProxySQLDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddProxySQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -465,6 +470,7 @@ func (o *AddProxySQLDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -493,6 +499,7 @@ AddProxySQLDefaultBodyDetailsItems0 add proxy SQL default body details items0 swagger:model AddProxySQLDefaultBodyDetailsItems0 */ type AddProxySQLDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -530,6 +537,7 @@ AddProxySQLOKBody add proxy SQL OK body swagger:model AddProxySQLOKBody */ type AddProxySQLOKBody struct { + // proxysql exporter ProxysqlExporter *AddProxySQLOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` @@ -612,6 +620,7 @@ func (o *AddProxySQLOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddProxySQLOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -627,6 +636,7 @@ func (o *AddProxySQLOKBody) contextValidateProxysqlExporter(ctx context.Context, } func (o *AddProxySQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -664,6 +674,7 @@ AddProxySQLOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container swagger:model AddProxySQLOKBodyProxysqlExporter */ type AddProxySQLOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -875,6 +886,7 @@ AddProxySQLOKBodyService ProxySQLService represents a generic ProxySQL instance. swagger:model AddProxySQLOKBodyService */ type AddProxySQLOKBodyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -942,6 +954,7 @@ AddProxySQLParamsBodyAddNode AddNodeParams holds node params and is used to add swagger:model AddProxySQLParamsBodyAddNode */ type AddProxySQLParamsBodyAddNode struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/rds/add_rds_parameters.go b/api/managementpb/json/client/rds/add_rds_parameters.go index a2dc2089bf..8d9148608c 100644 --- a/api/managementpb/json/client/rds/add_rds_parameters.go +++ b/api/managementpb/json/client/rds/add_rds_parameters.go @@ -60,6 +60,7 @@ AddRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRDSParams struct { + // Body. Body AddRDSBody @@ -129,6 +130,7 @@ func (o *AddRDSParams) SetBody(body AddRDSBody) { // WriteToRequest writes these params to a swagger request func (o *AddRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/rds/add_rds_responses.go b/api/managementpb/json/client/rds/add_rds_responses.go index 0c5c17da70..4d0d86021f 100644 --- a/api/managementpb/json/client/rds/add_rds_responses.go +++ b/api/managementpb/json/client/rds/add_rds_responses.go @@ -62,12 +62,12 @@ type AddRDSOK struct { func (o *AddRDSOK) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Add][%d] addRdsOk %+v", 200, o.Payload) } - func (o *AddRDSOK) GetPayload() *AddRDSOKBody { return o.Payload } func (o *AddRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRDSOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddRDSDefault) Code() int { func (o *AddRDSDefault) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Add][%d] AddRDS default %+v", o._statusCode, o.Payload) } - func (o *AddRDSDefault) GetPayload() *AddRDSDefaultBody { return o.Payload } func (o *AddRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddRDSDefaultBody) // response payload @@ -125,6 +125,7 @@ AddRDSBody add RDS body swagger:model AddRDSBody */ type AddRDSBody struct { + // AWS region. Region string `json:"region,omitempty"` @@ -357,6 +358,7 @@ AddRDSDefaultBody add RDS default body swagger:model AddRDSDefaultBody */ type AddRDSDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -422,7 +424,9 @@ func (o *AddRDSDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -433,6 +437,7 @@ func (o *AddRDSDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -461,6 +466,7 @@ AddRDSDefaultBodyDetailsItems0 add RDS default body details items0 swagger:model AddRDSDefaultBodyDetailsItems0 */ type AddRDSDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -498,6 +504,7 @@ AddRDSOKBody add RDS OK body swagger:model AddRDSOKBody */ type AddRDSOKBody struct { + // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -763,6 +770,7 @@ func (o *AddRDSOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddRDSOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if err := o.Mysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -778,6 +786,7 @@ func (o *AddRDSOKBody) contextValidateMysql(ctx context.Context, formats strfmt. } func (o *AddRDSOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -793,6 +802,7 @@ func (o *AddRDSOKBody) contextValidateMysqldExporter(ctx context.Context, format } func (o *AddRDSOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { + if o.Node != nil { if err := o.Node.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -808,6 +818,7 @@ func (o *AddRDSOKBody) contextValidateNode(ctx context.Context, formats strfmt.R } func (o *AddRDSOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -823,6 +834,7 @@ func (o *AddRDSOKBody) contextValidatePostgresql(ctx context.Context, formats st } func (o *AddRDSOKBody) contextValidatePostgresqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlExporter != nil { if err := o.PostgresqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -838,6 +850,7 @@ func (o *AddRDSOKBody) contextValidatePostgresqlExporter(ctx context.Context, fo } func (o *AddRDSOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { if err := o.QANMysqlPerfschema.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -853,6 +866,7 @@ func (o *AddRDSOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, fo } func (o *AddRDSOKBody) contextValidateQANPostgresqlPgstatements(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatements != nil { if err := o.QANPostgresqlPgstatements.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -868,6 +882,7 @@ func (o *AddRDSOKBody) contextValidateQANPostgresqlPgstatements(ctx context.Cont } func (o *AddRDSOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -905,6 +920,7 @@ AddRDSOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddRDSOKBodyMysql */ type AddRDSOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -972,6 +988,7 @@ AddRDSOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node and swagger:model AddRDSOKBodyMysqldExporter */ type AddRDSOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1200,6 +1217,7 @@ AddRDSOKBodyNode RemoteRDSNode represents remote RDS Node. Agents can't run on R swagger:model AddRDSOKBodyNode */ type AddRDSOKBodyNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1259,6 +1277,7 @@ AddRDSOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL instanc swagger:model AddRDSOKBodyPostgresql */ type AddRDSOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1329,6 +1348,7 @@ AddRDSOKBodyPostgresqlExporter PostgresExporter runs on Generic or Container Nod swagger:model AddRDSOKBodyPostgresqlExporter */ type AddRDSOKBodyPostgresqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1538,6 +1558,7 @@ AddRDSOKBodyQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-agent and swagger:model AddRDSOKBodyQANMysqlPerfschema */ type AddRDSOKBodyQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1758,6 +1779,7 @@ AddRDSOKBodyQANPostgresqlPgstatements QANPostgreSQLPgStatementsAgent runs within swagger:model AddRDSOKBodyQANPostgresqlPgstatements */ type AddRDSOKBodyQANPostgresqlPgstatements struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1966,6 +1988,7 @@ AddRDSOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expose swagger:model AddRDSOKBodyRDSExporter */ type AddRDSOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/managementpb/json/client/rds/discover_rds_parameters.go b/api/managementpb/json/client/rds/discover_rds_parameters.go index 2866e7202c..0d74bf2782 100644 --- a/api/managementpb/json/client/rds/discover_rds_parameters.go +++ b/api/managementpb/json/client/rds/discover_rds_parameters.go @@ -60,6 +60,7 @@ DiscoverRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DiscoverRDSParams struct { + // Body. Body DiscoverRDSBody @@ -129,6 +130,7 @@ func (o *DiscoverRDSParams) SetBody(body DiscoverRDSBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/rds/discover_rds_responses.go b/api/managementpb/json/client/rds/discover_rds_responses.go index aab13344e2..43bb9fe549 100644 --- a/api/managementpb/json/client/rds/discover_rds_responses.go +++ b/api/managementpb/json/client/rds/discover_rds_responses.go @@ -62,12 +62,12 @@ type DiscoverRDSOK struct { func (o *DiscoverRDSOK) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Discover][%d] discoverRdsOk %+v", 200, o.Payload) } - func (o *DiscoverRDSOK) GetPayload() *DiscoverRDSOKBody { return o.Payload } func (o *DiscoverRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverRDSOKBody) // response payload @@ -104,12 +104,12 @@ func (o *DiscoverRDSDefault) Code() int { func (o *DiscoverRDSDefault) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Discover][%d] DiscoverRDS default %+v", o._statusCode, o.Payload) } - func (o *DiscoverRDSDefault) GetPayload() *DiscoverRDSDefaultBody { return o.Payload } func (o *DiscoverRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverRDSDefaultBody) // response payload @@ -125,6 +125,7 @@ DiscoverRDSBody discover RDS body swagger:model DiscoverRDSBody */ type DiscoverRDSBody struct { + // AWS Access key. Optional. AWSAccessKey string `json:"aws_access_key,omitempty"` @@ -165,6 +166,7 @@ DiscoverRDSDefaultBody discover RDS default body swagger:model DiscoverRDSDefaultBody */ type DiscoverRDSDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -230,7 +232,9 @@ func (o *DiscoverRDSDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,6 +245,7 @@ func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -269,6 +274,7 @@ DiscoverRDSDefaultBodyDetailsItems0 discover RDS default body details items0 swagger:model DiscoverRDSDefaultBodyDetailsItems0 */ type DiscoverRDSDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -306,6 +312,7 @@ DiscoverRDSOKBody discover RDS OK body swagger:model DiscoverRDSOKBody */ type DiscoverRDSOKBody struct { + // rds instances RDSInstances []*DiscoverRDSOKBodyRDSInstancesItems0 `json:"rds_instances"` } @@ -365,7 +372,9 @@ func (o *DiscoverRDSOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSInstances); i++ { + if o.RDSInstances[i] != nil { if err := o.RDSInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -376,6 +385,7 @@ func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, for return err } } + } return nil @@ -404,6 +414,7 @@ DiscoverRDSOKBodyRDSInstancesItems0 DiscoverRDSInstance models an unique RDS ins swagger:model DiscoverRDSOKBodyRDSInstancesItems0 */ type DiscoverRDSOKBodyRDSInstancesItems0 struct { + // AWS region. Region string `json:"region,omitempty"` diff --git a/api/managementpb/json/client/security_checks/change_security_checks_parameters.go b/api/managementpb/json/client/security_checks/change_security_checks_parameters.go index 36cfeac04a..8120533c57 100644 --- a/api/managementpb/json/client/security_checks/change_security_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/change_security_checks_parameters.go @@ -60,6 +60,7 @@ ChangeSecurityChecksParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type ChangeSecurityChecksParams struct { + // Body. Body ChangeSecurityChecksBody @@ -129,6 +130,7 @@ func (o *ChangeSecurityChecksParams) SetBody(body ChangeSecurityChecksBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/change_security_checks_responses.go b/api/managementpb/json/client/security_checks/change_security_checks_responses.go index 01c8381711..cda296b947 100644 --- a/api/managementpb/json/client/security_checks/change_security_checks_responses.go +++ b/api/managementpb/json/client/security_checks/change_security_checks_responses.go @@ -62,12 +62,12 @@ type ChangeSecurityChecksOK struct { func (o *ChangeSecurityChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Change][%d] changeSecurityChecksOk %+v", 200, o.Payload) } - func (o *ChangeSecurityChecksOK) GetPayload() interface{} { return o.Payload } func (o *ChangeSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *ChangeSecurityChecksDefault) Code() int { func (o *ChangeSecurityChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Change][%d] ChangeSecurityChecks default %+v", o._statusCode, o.Payload) } - func (o *ChangeSecurityChecksDefault) GetPayload() *ChangeSecurityChecksDefaultBody { return o.Payload } func (o *ChangeSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSecurityChecksDefaultBody) // response payload @@ -123,6 +123,7 @@ ChangeSecurityChecksBody change security checks body swagger:model ChangeSecurityChecksBody */ type ChangeSecurityChecksBody struct { + // params Params []*ChangeSecurityChecksParamsBodyParamsItems0 `json:"params"` } @@ -182,7 +183,9 @@ func (o *ChangeSecurityChecksBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSecurityChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -193,6 +196,7 @@ func (o *ChangeSecurityChecksBody) contextValidateParams(ctx context.Context, fo return err } } + } return nil @@ -221,6 +225,7 @@ ChangeSecurityChecksDefaultBody change security checks default body swagger:model ChangeSecurityChecksDefaultBody */ type ChangeSecurityChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -286,7 +291,9 @@ func (o *ChangeSecurityChecksDefaultBody) ContextValidate(ctx context.Context, f } func (o *ChangeSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -297,6 +304,7 @@ func (o *ChangeSecurityChecksDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -325,6 +333,7 @@ ChangeSecurityChecksDefaultBodyDetailsItems0 change security checks default body swagger:model ChangeSecurityChecksDefaultBodyDetailsItems0 */ type ChangeSecurityChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -362,6 +371,7 @@ ChangeSecurityChecksParamsBodyParamsItems0 ChangeSecurityCheckParams specifies a swagger:model ChangeSecurityChecksParamsBodyParamsItems0 */ type ChangeSecurityChecksParamsBodyParamsItems0 struct { + // The name of the check to change. Name string `json:"name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go b/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go index 5cfe658f09..607838916c 100644 --- a/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go @@ -60,6 +60,7 @@ GetFailedChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetFailedChecksParams struct { + // Body. Body GetFailedChecksBody @@ -129,6 +130,7 @@ func (o *GetFailedChecksParams) SetBody(body GetFailedChecksBody) { // WriteToRequest writes these params to a swagger request func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/get_failed_checks_responses.go b/api/managementpb/json/client/security_checks/get_failed_checks_responses.go index f095ef0be5..d8a5c38d34 100644 --- a/api/managementpb/json/client/security_checks/get_failed_checks_responses.go +++ b/api/managementpb/json/client/security_checks/get_failed_checks_responses.go @@ -62,12 +62,12 @@ type GetFailedChecksOK struct { func (o *GetFailedChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/FailedChecks][%d] getFailedChecksOk %+v", 200, o.Payload) } - func (o *GetFailedChecksOK) GetPayload() *GetFailedChecksOKBody { return o.Payload } func (o *GetFailedChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFailedChecksOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetFailedChecksDefault) Code() int { func (o *GetFailedChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/FailedChecks][%d] GetFailedChecks default %+v", o._statusCode, o.Payload) } - func (o *GetFailedChecksDefault) GetPayload() *GetFailedChecksDefaultBody { return o.Payload } func (o *GetFailedChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFailedChecksDefaultBody) // response payload @@ -125,6 +125,7 @@ GetFailedChecksBody get failed checks body swagger:model GetFailedChecksBody */ type GetFailedChecksBody struct { + // service id ServiceID string `json:"service_id,omitempty"` @@ -180,6 +181,7 @@ func (o *GetFailedChecksBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetFailedChecksBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { + if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,6 +219,7 @@ GetFailedChecksDefaultBody get failed checks default body swagger:model GetFailedChecksDefaultBody */ type GetFailedChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -282,7 +285,9 @@ func (o *GetFailedChecksDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,6 +298,7 @@ func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -321,6 +327,7 @@ GetFailedChecksDefaultBodyDetailsItems0 get failed checks default body details i swagger:model GetFailedChecksDefaultBodyDetailsItems0 */ type GetFailedChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +365,7 @@ GetFailedChecksOKBody get failed checks OK body swagger:model GetFailedChecksOKBody */ type GetFailedChecksOKBody struct { + // results Results []*GetFailedChecksOKBodyResultsItems0 `json:"results"` @@ -447,7 +455,9 @@ func (o *GetFailedChecksOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Results); i++ { + if o.Results[i] != nil { if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -458,12 +468,14 @@ func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, form return err } } + } return nil } func (o *GetFailedChecksOKBody) contextValidatePageTotals(ctx context.Context, formats strfmt.Registry) error { + if o.PageTotals != nil { if err := o.PageTotals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -501,6 +513,7 @@ GetFailedChecksOKBodyPageTotals PageTotals represents total values for paginatio swagger:model GetFailedChecksOKBodyPageTotals */ type GetFailedChecksOKBodyPageTotals struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -541,6 +554,7 @@ GetFailedChecksOKBodyResultsItems0 CheckResult represents the check results for swagger:model GetFailedChecksOKBodyResultsItems0 */ type GetFailedChecksOKBodyResultsItems0 struct { + // summary Summary string `json:"summary,omitempty"` @@ -678,6 +692,7 @@ GetFailedChecksParamsBodyPageParams PageParams represents page request parameter swagger:model GetFailedChecksParamsBodyPageParams */ type GetFailedChecksParamsBodyPageParams struct { + // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go b/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go index 36c1b70857..197bcab662 100644 --- a/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go +++ b/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go @@ -60,6 +60,7 @@ GetSecurityCheckResultsParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type GetSecurityCheckResultsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *GetSecurityCheckResultsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetSecurityCheckResultsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/get_security_check_results_responses.go b/api/managementpb/json/client/security_checks/get_security_check_results_responses.go index aa03b1b477..432fa0919a 100644 --- a/api/managementpb/json/client/security_checks/get_security_check_results_responses.go +++ b/api/managementpb/json/client/security_checks/get_security_check_results_responses.go @@ -62,12 +62,12 @@ type GetSecurityCheckResultsOK struct { func (o *GetSecurityCheckResultsOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/GetCheckResults][%d] getSecurityCheckResultsOk %+v", 200, o.Payload) } - func (o *GetSecurityCheckResultsOK) GetPayload() *GetSecurityCheckResultsOKBody { return o.Payload } func (o *GetSecurityCheckResultsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSecurityCheckResultsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetSecurityCheckResultsDefault) Code() int { func (o *GetSecurityCheckResultsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/GetCheckResults][%d] GetSecurityCheckResults default %+v", o._statusCode, o.Payload) } - func (o *GetSecurityCheckResultsDefault) GetPayload() *GetSecurityCheckResultsDefaultBody { return o.Payload } func (o *GetSecurityCheckResultsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSecurityCheckResultsDefaultBody) // response payload @@ -125,6 +125,7 @@ GetSecurityCheckResultsDefaultBody get security check results default body swagger:model GetSecurityCheckResultsDefaultBody */ type GetSecurityCheckResultsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *GetSecurityCheckResultsDefaultBody) ContextValidate(ctx context.Context } func (o *GetSecurityCheckResultsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *GetSecurityCheckResultsDefaultBody) contextValidateDetails(ctx context. return err } } + } return nil @@ -229,6 +233,7 @@ GetSecurityCheckResultsDefaultBodyDetailsItems0 get security check results defau swagger:model GetSecurityCheckResultsDefaultBodyDetailsItems0 */ type GetSecurityCheckResultsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ GetSecurityCheckResultsOKBody get security check results OK body swagger:model GetSecurityCheckResultsOKBody */ type GetSecurityCheckResultsOKBody struct { + // results Results []*GetSecurityCheckResultsOKBodyResultsItems0 `json:"results"` } @@ -325,7 +331,9 @@ func (o *GetSecurityCheckResultsOKBody) ContextValidate(ctx context.Context, for } func (o *GetSecurityCheckResultsOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Results); i++ { + if o.Results[i] != nil { if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +344,7 @@ func (o *GetSecurityCheckResultsOKBody) contextValidateResults(ctx context.Conte return err } } + } return nil @@ -364,6 +373,7 @@ GetSecurityCheckResultsOKBodyResultsItems0 SecurityCheckResult represents the ch swagger:model GetSecurityCheckResultsOKBodyResultsItems0 */ type GetSecurityCheckResultsOKBodyResultsItems0 struct { + // summary Summary string `json:"summary,omitempty"` diff --git a/api/managementpb/json/client/security_checks/list_advisors_parameters.go b/api/managementpb/json/client/security_checks/list_advisors_parameters.go index a426d57d4c..e5f97cf934 100644 --- a/api/managementpb/json/client/security_checks/list_advisors_parameters.go +++ b/api/managementpb/json/client/security_checks/list_advisors_parameters.go @@ -60,6 +60,7 @@ ListAdvisorsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAdvisorsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListAdvisorsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/list_advisors_responses.go b/api/managementpb/json/client/security_checks/list_advisors_responses.go index cc98f1942d..6d72edeef1 100644 --- a/api/managementpb/json/client/security_checks/list_advisors_responses.go +++ b/api/managementpb/json/client/security_checks/list_advisors_responses.go @@ -62,12 +62,12 @@ type ListAdvisorsOK struct { func (o *ListAdvisorsOK) Error() string { return fmt.Sprintf("[POST /v1/management/Advisors/List][%d] listAdvisorsOk %+v", 200, o.Payload) } - func (o *ListAdvisorsOK) GetPayload() *ListAdvisorsOKBody { return o.Payload } func (o *ListAdvisorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAdvisorsDefault) Code() int { func (o *ListAdvisorsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Advisors/List][%d] ListAdvisors default %+v", o._statusCode, o.Payload) } - func (o *ListAdvisorsDefault) GetPayload() *ListAdvisorsDefaultBody { return o.Payload } func (o *ListAdvisorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorsDefaultBody) // response payload @@ -125,6 +125,7 @@ ListAdvisorsDefaultBody list advisors default body swagger:model ListAdvisorsDefaultBody */ type ListAdvisorsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *ListAdvisorsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -229,6 +233,7 @@ ListAdvisorsDefaultBodyDetailsItems0 list advisors default body details items0 swagger:model ListAdvisorsDefaultBodyDetailsItems0 */ type ListAdvisorsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ ListAdvisorsOKBody list advisors OK body swagger:model ListAdvisorsOKBody */ type ListAdvisorsOKBody struct { + // advisors Advisors []*ListAdvisorsOKBodyAdvisorsItems0 `json:"advisors"` } @@ -325,7 +331,9 @@ func (o *ListAdvisorsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Advisors); i++ { + if o.Advisors[i] != nil { if err := o.Advisors[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +344,7 @@ func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, format return err } } + } return nil @@ -364,6 +373,7 @@ ListAdvisorsOKBodyAdvisorsItems0 list advisors OK body advisors items0 swagger:model ListAdvisorsOKBodyAdvisorsItems0 */ type ListAdvisorsOKBodyAdvisorsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -438,7 +448,9 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) ContextValidate(ctx context.Context, } func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { if err := o.Checks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -449,6 +461,7 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Con return err } } + } return nil @@ -477,6 +490,7 @@ ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 SecurityCheck contains check name a swagger:model ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 */ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/list_failed_services_parameters.go b/api/managementpb/json/client/security_checks/list_failed_services_parameters.go index 72d842a5c6..38f79dc68c 100644 --- a/api/managementpb/json/client/security_checks/list_failed_services_parameters.go +++ b/api/managementpb/json/client/security_checks/list_failed_services_parameters.go @@ -60,6 +60,7 @@ ListFailedServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListFailedServicesParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListFailedServicesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListFailedServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/list_failed_services_responses.go b/api/managementpb/json/client/security_checks/list_failed_services_responses.go index 5720854349..5b4a499acc 100644 --- a/api/managementpb/json/client/security_checks/list_failed_services_responses.go +++ b/api/managementpb/json/client/security_checks/list_failed_services_responses.go @@ -60,12 +60,12 @@ type ListFailedServicesOK struct { func (o *ListFailedServicesOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ListFailedServices][%d] listFailedServicesOk %+v", 200, o.Payload) } - func (o *ListFailedServicesOK) GetPayload() *ListFailedServicesOKBody { return o.Payload } func (o *ListFailedServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListFailedServicesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListFailedServicesDefault) Code() int { func (o *ListFailedServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ListFailedServices][%d] ListFailedServices default %+v", o._statusCode, o.Payload) } - func (o *ListFailedServicesDefault) GetPayload() *ListFailedServicesDefaultBody { return o.Payload } func (o *ListFailedServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListFailedServicesDefaultBody) // response payload @@ -123,6 +123,7 @@ ListFailedServicesDefaultBody list failed services default body swagger:model ListFailedServicesDefaultBody */ type ListFailedServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *ListFailedServicesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -227,6 +231,7 @@ ListFailedServicesDefaultBodyDetailsItems0 list failed services default body det swagger:model ListFailedServicesDefaultBodyDetailsItems0 */ type ListFailedServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ ListFailedServicesOKBody list failed services OK body swagger:model ListFailedServicesOKBody */ type ListFailedServicesOKBody struct { + // result Result []*ListFailedServicesOKBodyResultItems0 `json:"result"` } @@ -323,7 +329,9 @@ func (o *ListFailedServicesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Result); i++ { + if o.Result[i] != nil { if err := o.Result[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -334,6 +342,7 @@ func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, fo return err } } + } return nil @@ -362,6 +371,7 @@ ListFailedServicesOKBodyResultItems0 CheckResultSummary is a summary of check re swagger:model ListFailedServicesOKBodyResultItems0 */ type ListFailedServicesOKBodyResultItems0 struct { + // service name ServiceName string `json:"service_name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/list_security_checks_parameters.go b/api/managementpb/json/client/security_checks/list_security_checks_parameters.go index cee211cf84..5ca872ec7b 100644 --- a/api/managementpb/json/client/security_checks/list_security_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/list_security_checks_parameters.go @@ -60,6 +60,7 @@ ListSecurityChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListSecurityChecksParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListSecurityChecksParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/list_security_checks_responses.go b/api/managementpb/json/client/security_checks/list_security_checks_responses.go index dd59c7333b..0f1bd25fe3 100644 --- a/api/managementpb/json/client/security_checks/list_security_checks_responses.go +++ b/api/managementpb/json/client/security_checks/list_security_checks_responses.go @@ -62,12 +62,12 @@ type ListSecurityChecksOK struct { func (o *ListSecurityChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/List][%d] listSecurityChecksOk %+v", 200, o.Payload) } - func (o *ListSecurityChecksOK) GetPayload() *ListSecurityChecksOKBody { return o.Payload } func (o *ListSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListSecurityChecksOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListSecurityChecksDefault) Code() int { func (o *ListSecurityChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/List][%d] ListSecurityChecks default %+v", o._statusCode, o.Payload) } - func (o *ListSecurityChecksDefault) GetPayload() *ListSecurityChecksDefaultBody { return o.Payload } func (o *ListSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListSecurityChecksDefaultBody) // response payload @@ -125,6 +125,7 @@ ListSecurityChecksDefaultBody list security checks default body swagger:model ListSecurityChecksDefaultBody */ type ListSecurityChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *ListSecurityChecksDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *ListSecurityChecksDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -229,6 +233,7 @@ ListSecurityChecksDefaultBodyDetailsItems0 list security checks default body det swagger:model ListSecurityChecksDefaultBodyDetailsItems0 */ type ListSecurityChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ ListSecurityChecksOKBody list security checks OK body swagger:model ListSecurityChecksOKBody */ type ListSecurityChecksOKBody struct { + // checks Checks []*ListSecurityChecksOKBodyChecksItems0 `json:"checks"` } @@ -325,7 +331,9 @@ func (o *ListSecurityChecksOKBody) ContextValidate(ctx context.Context, formats } func (o *ListSecurityChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { if err := o.Checks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -336,6 +344,7 @@ func (o *ListSecurityChecksOKBody) contextValidateChecks(ctx context.Context, fo return err } } + } return nil @@ -364,6 +373,7 @@ ListSecurityChecksOKBodyChecksItems0 SecurityCheck contains check name and statu swagger:model ListSecurityChecksOKBodyChecksItems0 */ type ListSecurityChecksOKBodyChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/start_security_checks_parameters.go b/api/managementpb/json/client/security_checks/start_security_checks_parameters.go index 71f2f60549..ef322b5fe7 100644 --- a/api/managementpb/json/client/security_checks/start_security_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/start_security_checks_parameters.go @@ -60,6 +60,7 @@ StartSecurityChecksParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type StartSecurityChecksParams struct { + // Body. Body StartSecurityChecksBody @@ -129,6 +130,7 @@ func (o *StartSecurityChecksParams) SetBody(body StartSecurityChecksBody) { // WriteToRequest writes these params to a swagger request func (o *StartSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/start_security_checks_responses.go b/api/managementpb/json/client/security_checks/start_security_checks_responses.go index 8ca64fa631..7857206ea2 100644 --- a/api/managementpb/json/client/security_checks/start_security_checks_responses.go +++ b/api/managementpb/json/client/security_checks/start_security_checks_responses.go @@ -60,12 +60,12 @@ type StartSecurityChecksOK struct { func (o *StartSecurityChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Start][%d] startSecurityChecksOk %+v", 200, o.Payload) } - func (o *StartSecurityChecksOK) GetPayload() interface{} { return o.Payload } func (o *StartSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *StartSecurityChecksDefault) Code() int { func (o *StartSecurityChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Start][%d] StartSecurityChecks default %+v", o._statusCode, o.Payload) } - func (o *StartSecurityChecksDefault) GetPayload() *StartSecurityChecksDefaultBody { return o.Payload } func (o *StartSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartSecurityChecksDefaultBody) // response payload @@ -121,6 +121,7 @@ StartSecurityChecksBody start security checks body swagger:model StartSecurityChecksBody */ type StartSecurityChecksBody struct { + // Names of the checks that should be started. Names []string `json:"names"` } @@ -158,6 +159,7 @@ StartSecurityChecksDefaultBody start security checks default body swagger:model StartSecurityChecksDefaultBody */ type StartSecurityChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *StartSecurityChecksDefaultBody) ContextValidate(ctx context.Context, fo } func (o *StartSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *StartSecurityChecksDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -262,6 +267,7 @@ StartSecurityChecksDefaultBodyDetailsItems0 start security checks default body d swagger:model StartSecurityChecksDefaultBodyDetailsItems0 */ type StartSecurityChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go b/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go index 9ebd6258a3..e75fc485f0 100644 --- a/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go +++ b/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go @@ -60,6 +60,7 @@ ToggleCheckAlertParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ToggleCheckAlertParams struct { + // Body. Body ToggleCheckAlertBody @@ -129,6 +130,7 @@ func (o *ToggleCheckAlertParams) SetBody(body ToggleCheckAlertBody) { // WriteToRequest writes these params to a swagger request func (o *ToggleCheckAlertParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go b/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go index 7ef640998f..4b08115b05 100644 --- a/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go +++ b/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go @@ -60,12 +60,12 @@ type ToggleCheckAlertOK struct { func (o *ToggleCheckAlertOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ToggleCheckAlert][%d] toggleCheckAlertOk %+v", 200, o.Payload) } - func (o *ToggleCheckAlertOK) GetPayload() interface{} { return o.Payload } func (o *ToggleCheckAlertOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ToggleCheckAlertDefault) Code() int { func (o *ToggleCheckAlertDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ToggleCheckAlert][%d] ToggleCheckAlert default %+v", o._statusCode, o.Payload) } - func (o *ToggleCheckAlertDefault) GetPayload() *ToggleCheckAlertDefaultBody { return o.Payload } func (o *ToggleCheckAlertDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ToggleCheckAlertDefaultBody) // response payload @@ -121,6 +121,7 @@ ToggleCheckAlertBody toggle check alert body swagger:model ToggleCheckAlertBody */ type ToggleCheckAlertBody struct { + // Alert ID of the check result. AlertID string `json:"alert_id,omitempty"` @@ -161,6 +162,7 @@ ToggleCheckAlertDefaultBody toggle check alert default body swagger:model ToggleCheckAlertDefaultBody */ type ToggleCheckAlertDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *ToggleCheckAlertDefaultBody) ContextValidate(ctx context.Context, forma } func (o *ToggleCheckAlertDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *ToggleCheckAlertDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -265,6 +270,7 @@ ToggleCheckAlertDefaultBodyDetailsItems0 toggle check alert default body details swagger:model ToggleCheckAlertDefaultBodyDetailsItems0 */ type ToggleCheckAlertDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/service/remove_service_parameters.go b/api/managementpb/json/client/service/remove_service_parameters.go index 8e50ba2a18..ecf4d056b8 100644 --- a/api/managementpb/json/client/service/remove_service_parameters.go +++ b/api/managementpb/json/client/service/remove_service_parameters.go @@ -60,6 +60,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + // Body. Body RemoveServiceBody @@ -129,6 +130,7 @@ func (o *RemoveServiceParams) SetBody(body RemoveServiceBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/service/remove_service_responses.go b/api/managementpb/json/client/service/remove_service_responses.go index 054bb9437b..4e197ba1ed 100644 --- a/api/managementpb/json/client/service/remove_service_responses.go +++ b/api/managementpb/json/client/service/remove_service_responses.go @@ -62,12 +62,12 @@ type RemoveServiceOK struct { func (o *RemoveServiceOK) Error() string { return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] removeServiceOk %+v", 200, o.Payload) } - func (o *RemoveServiceOK) GetPayload() interface{} { return o.Payload } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *RemoveServiceDefault) Code() int { func (o *RemoveServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] RemoveService default %+v", o._statusCode, o.Payload) } - func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { return o.Payload } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -123,6 +123,7 @@ RemoveServiceBody remove service body swagger:model RemoveServiceBody */ type RemoveServiceBody struct { + // ServiceType describes supported Service types. // Enum: [SERVICE_TYPE_INVALID MYSQL_SERVICE MONGODB_SERVICE POSTGRESQL_SERVICE PROXYSQL_SERVICE HAPROXY_SERVICE EXTERNAL_SERVICE] ServiceType *string `json:"service_type,omitempty"` @@ -234,6 +235,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +301,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -310,6 +314,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -338,6 +343,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/metrics.pb.go b/api/managementpb/metrics.pb.go index 9587c1862a..d4d99240b2 100644 --- a/api/managementpb/metrics.pb.go +++ b/api/managementpb/metrics.pb.go @@ -7,11 +7,10 @@ package managementpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -104,13 +103,10 @@ func file_managementpb_metrics_proto_rawDescGZIP() []byte { return file_managementpb_metrics_proto_rawDescData } -var ( - file_managementpb_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_metrics_proto_goTypes = []interface{}{ - (MetricsMode)(0), // 0: management.MetricsMode - } -) - +var file_managementpb_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_metrics_proto_goTypes = []interface{}{ + (MetricsMode)(0), // 0: management.MetricsMode +} var file_managementpb_metrics_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/metrics.swagger.json b/api/managementpb/metrics.swagger.json new file mode 100644 index 0000000000..8357e126c0 --- /dev/null +++ b/api/managementpb/metrics.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/metrics.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/mongodb.pb.go b/api/managementpb/mongodb.pb.go index cf351f3a90..ba30117443 100644 --- a/api/managementpb/mongodb.pb.go +++ b/api/managementpb/mongodb.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -590,21 +588,18 @@ func file_managementpb_mongodb_proto_rawDescGZIP() []byte { return file_managementpb_mongodb_proto_rawDescData } -var ( - file_managementpb_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_mongodb_proto_goTypes = []interface{}{ - (*AddMongoDBRequest)(nil), // 0: management.AddMongoDBRequest - (*AddMongoDBResponse)(nil), // 1: management.AddMongoDBResponse - nil, // 2: management.AddMongoDBRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.MongoDBService)(nil), // 6: inventory.MongoDBService - (*inventorypb.MongoDBExporter)(nil), // 7: inventory.MongoDBExporter - (*inventorypb.QANMongoDBProfilerAgent)(nil), // 8: inventory.QANMongoDBProfilerAgent - } -) - +var file_managementpb_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_mongodb_proto_goTypes = []interface{}{ + (*AddMongoDBRequest)(nil), // 0: management.AddMongoDBRequest + (*AddMongoDBResponse)(nil), // 1: management.AddMongoDBResponse + nil, // 2: management.AddMongoDBRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.MongoDBService)(nil), // 6: inventory.MongoDBService + (*inventorypb.MongoDBExporter)(nil), // 7: inventory.MongoDBExporter + (*inventorypb.QANMongoDBProfilerAgent)(nil), // 8: inventory.QANMongoDBProfilerAgent +} var file_managementpb_mongodb_proto_depIdxs = []int32{ 3, // 0: management.AddMongoDBRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddMongoDBRequest.custom_labels:type_name -> management.AddMongoDBRequest.CustomLabelsEntry diff --git a/api/managementpb/mongodb.pb.gw.go b/api/managementpb/mongodb.pb.gw.go index bf71ae102f..a9be5d60a1 100644 --- a/api/managementpb/mongodb.pb.gw.go +++ b/api/managementpb/mongodb.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshaler, client MongoDBClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddMongoDBRequest @@ -47,6 +45,7 @@ func request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.AddMongoDB(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshaler, server MongoDBServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.M msg, err := server.AddMongoDB(ctx, &protoReq) return msg, metadata, err + } // RegisterMongoDBHandlerServer registers the http handlers for service MongoDB to "mux". @@ -70,6 +70,7 @@ func local_request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.M // 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 RegisterMongoDBHandlerFromEndpoint instead. func RegisterMongoDBHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MongoDBServer) error { + mux.Handle("POST", pattern_MongoDB_AddMongoDB_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterMongoDBHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_MongoDB_AddMongoDB_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterMongoDBHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MongoDBClient" to call the correct interceptors. func RegisterMongoDBHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MongoDBClient) error { + mux.Handle("POST", pattern_MongoDB_AddMongoDB_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterMongoDBHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_MongoDB_AddMongoDB_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_MongoDB_AddMongoDB_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MongoDB", "Add"}, "")) +var ( + pattern_MongoDB_AddMongoDB_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MongoDB", "Add"}, "")) +) -var forward_MongoDB_AddMongoDB_0 = runtime.ForwardResponseMessage +var ( + forward_MongoDB_AddMongoDB_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/mongodb.swagger.json b/api/managementpb/mongodb.swagger.json new file mode 100644 index 0000000000..4d0662e58c --- /dev/null +++ b/api/managementpb/mongodb.swagger.json @@ -0,0 +1,531 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/mongodb.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "MongoDB" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/MongoDB/Add": { + "post": { + "summary": "Add MongoDB", + "description": "Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mongodb_exporter\", and \"qan_mongodb_profiler\" agents with the provided \"pmm_agent_id\" and other parameters.", + "operationId": "AddMongoDB", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddMongoDBResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddMongoDBRequest" + } + } + ], + "tags": [ + "MongoDB" + ] + } + } + }, + "definitions": { + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryLogLevel": { + "type": "string", + "enum": [ + "auto", + "fatal", + "error", + "warn", + "info", + "debug" + ], + "default": "auto", + "title": "Log level for exporters" + }, + "inventoryMongoDBExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of colletions to get stats from. Can use *" + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" + }, + "enable_all_collectors": { + "type": "boolean", + "description": "Enable All collectors." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics." + }, + "inventoryMongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "inventoryQANMongoDBProfilerAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit).\n\nTrue if query examples are disabled.\n bool query_examples_disabled = 8; TODO https://jira.percona.com/browse/PMM-4650" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." + }, + "managementAddMongoDBRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/managementAddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "MongoDB username for exporter and QAN agent access." + }, + "password": { + "type": "string", + "description": "MongoDB password for exporter and QAN agent access." + }, + "qan_mongodb_profiler": { + "type": "boolean", + "description": "If true, adds qan-mongodb-profiler-agent for provided service." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check.\n\nDisable query examples.\n bool disable_query_examples = 16; TODO https://jira.percona.com/browse/PMM-4650" + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collections to get stats from. Can use * ." + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" + }, + "enable_all_collectors": { + "type": "boolean", + "title": "Enable all collectors" + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "title": "Exporter log level" + } + } + }, + "managementAddMongoDBResponse": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/inventoryMongoDBService" + }, + "mongodb_exporter": { + "$ref": "#/definitions/inventoryMongoDBExporter" + }, + "qan_mongodb_profiler": { + "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" + } + } + }, + "managementAddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/mongodb_grpc.pb.go b/api/managementpb/mongodb_grpc.pb.go index 43f024bc66..9b83ee0c7f 100644 --- a/api/managementpb/mongodb_grpc.pb.go +++ b/api/managementpb/mongodb_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -64,7 +63,8 @@ type MongoDBServer interface { } // UnimplementedMongoDBServer must be embedded to have forward compatible implementations. -type UnimplementedMongoDBServer struct{} +type UnimplementedMongoDBServer struct { +} func (UnimplementedMongoDBServer) AddMongoDB(context.Context, *AddMongoDBRequest) (*AddMongoDBResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMongoDB not implemented") diff --git a/api/managementpb/mysql.pb.go b/api/managementpb/mysql.pb.go index 773e63da5b..540abc8049 100644 --- a/api/managementpb/mysql.pb.go +++ b/api/managementpb/mysql.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -610,22 +608,19 @@ func file_managementpb_mysql_proto_rawDescGZIP() []byte { return file_managementpb_mysql_proto_rawDescData } -var ( - file_managementpb_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_mysql_proto_goTypes = []interface{}{ - (*AddMySQLRequest)(nil), // 0: management.AddMySQLRequest - (*AddMySQLResponse)(nil), // 1: management.AddMySQLResponse - nil, // 2: management.AddMySQLRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.MySQLService)(nil), // 6: inventory.MySQLService - (*inventorypb.MySQLdExporter)(nil), // 7: inventory.MySQLdExporter - (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent - (*inventorypb.QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent - } -) - +var file_managementpb_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_mysql_proto_goTypes = []interface{}{ + (*AddMySQLRequest)(nil), // 0: management.AddMySQLRequest + (*AddMySQLResponse)(nil), // 1: management.AddMySQLResponse + nil, // 2: management.AddMySQLRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.MySQLService)(nil), // 6: inventory.MySQLService + (*inventorypb.MySQLdExporter)(nil), // 7: inventory.MySQLdExporter + (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent + (*inventorypb.QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent +} var file_managementpb_mysql_proto_depIdxs = []int32{ 3, // 0: management.AddMySQLRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddMySQLRequest.custom_labels:type_name -> management.AddMySQLRequest.CustomLabelsEntry diff --git a/api/managementpb/mysql.pb.gw.go b/api/managementpb/mysql.pb.gw.go index bde4f775fe..b0a9152a08 100644 --- a/api/managementpb/mysql.pb.gw.go +++ b/api/managementpb/mysql.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, client MySQLClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddMySQLRequest @@ -47,6 +45,7 @@ func request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.AddMySQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, server MySQLServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.AddMySQL(ctx, &protoReq) return msg, metadata, err + } // RegisterMySQLHandlerServer registers the http handlers for service MySQL to "mux". @@ -70,6 +70,7 @@ func local_request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marsh // 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 RegisterMySQLHandlerFromEndpoint instead. func RegisterMySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MySQLServer) error { + mux.Handle("POST", pattern_MySQL_AddMySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterMySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_MySQL_AddMySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterMySQLHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MySQLClient" to call the correct interceptors. func RegisterMySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MySQLClient) error { + mux.Handle("POST", pattern_MySQL_AddMySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterMySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_MySQL_AddMySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_MySQL_AddMySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MySQL", "Add"}, "")) +var ( + pattern_MySQL_AddMySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MySQL", "Add"}, "")) +) -var forward_MySQL_AddMySQL_0 = runtime.ForwardResponseMessage +var ( + forward_MySQL_AddMySQL_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/mysql.swagger.json b/api/managementpb/mysql.swagger.json new file mode 100644 index 0000000000..aac6fd98e5 --- /dev/null +++ b/api/managementpb/mysql.swagger.json @@ -0,0 +1,645 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/mysql.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "MySQL" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/MySQL/Add": { + "post": { + "summary": "Add MySQL", + "description": "Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mysqld_exporter\", and \"qan_mysql_perfschema\" agents with the provided \"pmm_agent_id\" and other parameters.", + "operationId": "AddMySQL", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddMySQLResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddMySQLRequest" + } + } + ], + "tags": [ + "MySQL" + ] + } + } + }, + "definitions": { + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryLogLevel": { + "type": "string", + "enum": [ + "auto", + "fatal", + "error", + "warn", + "info", + "debug" + ], + "default": "auto", + "title": "Log level for exporters" + }, + "inventoryMySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "inventoryMySQLdExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "tablestats_group_disabled": { + "type": "boolean", + "description": "True if tablestats group collectors are currently disabled." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "inventoryQANMySQLPerfSchemaAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "inventoryQANMySQLSlowlogAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)" + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "Slowlog file is rotated at this size if \u003e 0." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy" + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "managementAddMySQLRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/managementAddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "MySQL password for scraping metrics." + }, + "qan_mysql_perfschema": { + "type": "boolean", + "description": "If true, adds qan-mysql-perfschema-agent for provided service." + }, + "qan_mysql_slowlog": { + "type": "boolean", + "description": "If true, adds qan-mysql-slowlog-agent for provided service." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "title": "Exporter log level" + } + } + }, + "managementAddMySQLResponse": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/inventoryMySQLService" + }, + "mysqld_exporter": { + "$ref": "#/definitions/inventoryMySQLdExporter" + }, + "qan_mysql_perfschema": { + "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" + }, + "qan_mysql_slowlog": { + "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Actual table count at the moment of adding." + } + } + }, + "managementAddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/mysql_grpc.pb.go b/api/managementpb/mysql_grpc.pb.go index 3451910944..af4039782c 100644 --- a/api/managementpb/mysql_grpc.pb.go +++ b/api/managementpb/mysql_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -64,7 +63,8 @@ type MySQLServer interface { } // UnimplementedMySQLServer must be embedded to have forward compatible implementations. -type UnimplementedMySQLServer struct{} +type UnimplementedMySQLServer struct { +} func (UnimplementedMySQLServer) AddMySQL(context.Context, *AddMySQLRequest) (*AddMySQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMySQL not implemented") diff --git a/api/managementpb/node.pb.go b/api/managementpb/node.pb.go index 2f557c0dab..87de85bd39 100644 --- a/api/managementpb/node.pb.go +++ b/api/managementpb/node.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -382,20 +380,17 @@ func file_managementpb_node_proto_rawDescGZIP() []byte { return file_managementpb_node_proto_rawDescData } -var ( - file_managementpb_node_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_node_proto_goTypes = []interface{}{ - (*RegisterNodeRequest)(nil), // 0: management.RegisterNodeRequest - (*RegisterNodeResponse)(nil), // 1: management.RegisterNodeResponse - nil, // 2: management.RegisterNodeRequest.CustomLabelsEntry - (inventorypb.NodeType)(0), // 3: inventory.NodeType - (MetricsMode)(0), // 4: management.MetricsMode - (*inventorypb.GenericNode)(nil), // 5: inventory.GenericNode - (*inventorypb.ContainerNode)(nil), // 6: inventory.ContainerNode - (*inventorypb.PMMAgent)(nil), // 7: inventory.PMMAgent - } -) - +var file_managementpb_node_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_node_proto_goTypes = []interface{}{ + (*RegisterNodeRequest)(nil), // 0: management.RegisterNodeRequest + (*RegisterNodeResponse)(nil), // 1: management.RegisterNodeResponse + nil, // 2: management.RegisterNodeRequest.CustomLabelsEntry + (inventorypb.NodeType)(0), // 3: inventory.NodeType + (MetricsMode)(0), // 4: management.MetricsMode + (*inventorypb.GenericNode)(nil), // 5: inventory.GenericNode + (*inventorypb.ContainerNode)(nil), // 6: inventory.ContainerNode + (*inventorypb.PMMAgent)(nil), // 7: inventory.PMMAgent +} var file_managementpb_node_proto_depIdxs = []int32{ 3, // 0: management.RegisterNodeRequest.node_type:type_name -> inventory.NodeType 2, // 1: management.RegisterNodeRequest.custom_labels:type_name -> management.RegisterNodeRequest.CustomLabelsEntry diff --git a/api/managementpb/node.pb.gw.go b/api/managementpb/node.pb.gw.go index 3107389032..ea170a0c85 100644 --- a/api/managementpb/node.pb.gw.go +++ b/api/managementpb/node.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RegisterNodeRequest @@ -47,6 +45,7 @@ func request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Ma msg, err := server.RegisterNode(ctx, &protoReq) return msg, metadata, err + } // RegisterNodeHandlerServer registers the http handlers for service Node to "mux". @@ -70,6 +70,7 @@ func local_request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Ma // 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 RegisterNodeHandlerFromEndpoint instead. func RegisterNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodeServer) error { + mux.Handle("POST", pattern_Node_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Node_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodeClient" to call the correct interceptors. func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeClient) error { + mux.Handle("POST", pattern_Node_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Node_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_Node_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) +var ( + pattern_Node_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) +) -var forward_Node_RegisterNode_0 = runtime.ForwardResponseMessage +var ( + forward_Node_RegisterNode_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/node.swagger.json b/api/managementpb/node.swagger.json new file mode 100644 index 0000000000..ecbcb8bc78 --- /dev/null +++ b/api/managementpb/node.swagger.json @@ -0,0 +1,319 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/node.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Node" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Node/Register": { + "post": { + "summary": "Register Node", + "description": "Registers a new Node and pmm-agent.", + "operationId": "RegisterNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementRegisterNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementRegisterNodeRequest" + } + } + ], + "tags": [ + "Node" + ] + } + } + }, + "definitions": { + "inventoryContainerNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id of the Generic Node where this Container Node runs." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "ContainerNode represents a Docker container." + }, + "inventoryGenericNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "GenericNode represents a bare metal server or virtual machine." + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "inventoryPMMAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "PMMAgent runs on Generic or Container Node." + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "managementRegisterNodeRequest": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + }, + "reregister": { + "type": "boolean", + "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for node_exporter being added by this request.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + } + } + }, + "managementRegisterNodeResponse": { + "type": "object", + "properties": { + "generic_node": { + "$ref": "#/definitions/inventoryGenericNode" + }, + "container_node": { + "$ref": "#/definitions/inventoryContainerNode" + }, + "pmm_agent": { + "$ref": "#/definitions/inventoryPMMAgent" + }, + "token": { + "type": "string", + "description": "Token represents token for vmagent auth config." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go b/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go index 01d945a85b..ea3e696461 100644 --- a/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go +++ b/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go @@ -60,6 +60,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + // Body. Body GetNodeBody @@ -129,6 +130,7 @@ func (o *GetNodeParams) SetBody(body GetNodeBody) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/node/json/client/mgmt_node/get_node_responses.go b/api/managementpb/node/json/client/mgmt_node/get_node_responses.go index 8168ec3df5..46fde0d57c 100644 --- a/api/managementpb/node/json/client/mgmt_node/get_node_responses.go +++ b/api/managementpb/node/json/client/mgmt_node/get_node_responses.go @@ -62,12 +62,12 @@ type GetNodeOK struct { func (o *GetNodeOK) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Get][%d] getNodeOk %+v", 200, o.Payload) } - func (o *GetNodeOK) GetPayload() *GetNodeOKBody { return o.Payload } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetNodeDefault) Code() int { func (o *GetNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Get][%d] GetNode default %+v", o._statusCode, o.Payload) } - func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { return o.Payload } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -125,6 +125,7 @@ GetNodeBody get node body swagger:model GetNodeBody */ type GetNodeBody struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` } @@ -162,6 +163,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -227,7 +229,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,6 +242,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -266,6 +271,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -303,6 +309,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // node Node *GetNodeOKBodyNode `json:"node,omitempty"` } @@ -355,6 +362,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { + if o.Node != nil { if err := o.Node.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -392,6 +400,7 @@ GetNodeOKBodyNode get node OK body node swagger:model GetNodeOKBodyNode */ type GetNodeOKBodyNode struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -625,7 +634,9 @@ func (o *GetNodeOKBodyNode) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -636,13 +647,16 @@ func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats s return err } } + } return nil } func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if err := o.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -653,6 +667,7 @@ func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats return err } } + } return nil @@ -681,6 +696,7 @@ GetNodeOKBodyNodeAgentsItems0 get node OK body node agents items0 swagger:model GetNodeOKBodyNodeAgentsItems0 */ type GetNodeOKBodyNodeAgentsItems0 struct { + // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -727,6 +743,7 @@ GetNodeOKBodyNodeServicesItems0 Service represents a service running on a node. swagger:model GetNodeOKBodyNodeServicesItems0 */ type GetNodeOKBodyNodeServicesItems0 struct { + // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go b/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go index b60cd62ce8..43f3f5b97b 100644 --- a/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go +++ b/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go @@ -60,6 +60,7 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { + // Body. Body ListNodesBody @@ -129,6 +130,7 @@ func (o *ListNodesParams) SetBody(body ListNodesBody) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go b/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go index 26974fdbac..294ee26e00 100644 --- a/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go +++ b/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go @@ -62,12 +62,12 @@ type ListNodesOK struct { func (o *ListNodesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Node/List][%d] listNodesOk %+v", 200, o.Payload) } - func (o *ListNodesOK) GetPayload() *ListNodesOKBody { return o.Payload } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListNodesDefault) Code() int { func (o *ListNodesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Node/List][%d] ListNodes default %+v", o._statusCode, o.Payload) } - func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { return o.Payload } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListNodesBody list nodes body swagger:model ListNodesBody */ type ListNodesBody struct { + // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` @@ -226,6 +227,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +293,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -302,6 +306,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -330,6 +335,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -367,6 +373,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // nodes Nodes []*ListNodesOKBodyNodesItems0 `json:"nodes"` } @@ -426,7 +433,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Nodes); i++ { + if o.Nodes[i] != nil { if err := o.Nodes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -437,6 +446,7 @@ func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strf return err } } + } return nil @@ -465,6 +475,7 @@ ListNodesOKBodyNodesItems0 list nodes OK body nodes items0 swagger:model ListNodesOKBodyNodesItems0 */ type ListNodesOKBodyNodesItems0 struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -698,7 +709,9 @@ func (o *ListNodesOKBodyNodesItems0) ContextValidate(ctx context.Context, format } func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -709,13 +722,16 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, return err } } + } return nil } func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if err := o.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -726,6 +742,7 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context return err } } + } return nil @@ -754,6 +771,7 @@ ListNodesOKBodyNodesItems0AgentsItems0 list nodes OK body nodes items0 agents it swagger:model ListNodesOKBodyNodesItems0AgentsItems0 */ type ListNodesOKBodyNodesItems0AgentsItems0 struct { + // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -800,6 +818,7 @@ ListNodesOKBodyNodesItems0ServicesItems0 Service represents a service running on swagger:model ListNodesOKBodyNodesItems0ServicesItems0 */ type ListNodesOKBodyNodesItems0ServicesItems0 struct { + // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/managementpb/node/node.pb.go b/api/managementpb/node/node.pb.go index 6f1f081347..3080963d3c 100644 --- a/api/managementpb/node/node.pb.go +++ b/api/managementpb/node/node.pb.go @@ -7,18 +7,16 @@ package nodev1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" + _ "github.com/percona/pmm/api/managementpb/agent" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - inventorypb "github.com/percona/pmm/api/inventorypb" - _ "github.com/percona/pmm/api/managementpb/agent" + reflect "reflect" + sync "sync" ) const ( @@ -758,24 +756,21 @@ func file_managementpb_node_node_proto_rawDescGZIP() []byte { return file_managementpb_node_node_proto_rawDescData } -var ( - file_managementpb_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_managementpb_node_node_proto_goTypes = []interface{}{ - (UniversalNode_Status)(0), // 0: node.v1beta1.UniversalNode.Status - (*UniversalNode)(nil), // 1: node.v1beta1.UniversalNode - (*ListNodeRequest)(nil), // 2: node.v1beta1.ListNodeRequest - (*ListNodeResponse)(nil), // 3: node.v1beta1.ListNodeResponse - (*GetNodeRequest)(nil), // 4: node.v1beta1.GetNodeRequest - (*GetNodeResponse)(nil), // 5: node.v1beta1.GetNodeResponse - (*UniversalNode_Service)(nil), // 6: node.v1beta1.UniversalNode.Service - (*UniversalNode_Agent)(nil), // 7: node.v1beta1.UniversalNode.Agent - nil, // 8: node.v1beta1.UniversalNode.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (inventorypb.NodeType)(0), // 10: inventory.NodeType - } -) - +var file_managementpb_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_managementpb_node_node_proto_goTypes = []interface{}{ + (UniversalNode_Status)(0), // 0: node.v1beta1.UniversalNode.Status + (*UniversalNode)(nil), // 1: node.v1beta1.UniversalNode + (*ListNodeRequest)(nil), // 2: node.v1beta1.ListNodeRequest + (*ListNodeResponse)(nil), // 3: node.v1beta1.ListNodeResponse + (*GetNodeRequest)(nil), // 4: node.v1beta1.GetNodeRequest + (*GetNodeResponse)(nil), // 5: node.v1beta1.GetNodeResponse + (*UniversalNode_Service)(nil), // 6: node.v1beta1.UniversalNode.Service + (*UniversalNode_Agent)(nil), // 7: node.v1beta1.UniversalNode.Agent + nil, // 8: node.v1beta1.UniversalNode.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (inventorypb.NodeType)(0), // 10: inventory.NodeType +} var file_managementpb_node_node_proto_depIdxs = []int32{ 8, // 0: node.v1beta1.UniversalNode.custom_labels:type_name -> node.v1beta1.UniversalNode.CustomLabelsEntry 9, // 1: node.v1beta1.UniversalNode.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/node/node.pb.gw.go b/api/managementpb/node/node.pb.gw.go index 13c3ff3c92..845e3eba2d 100644 --- a/api/managementpb/node/node.pb.gw.go +++ b/api/managementpb/node/node.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client MgmtNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodeRequest @@ -47,6 +45,7 @@ func request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server MgmtNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.M msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err + } func request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client MgmtNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server MgmtNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Mar msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err + } // RegisterMgmtNodeHandlerServer registers the http handlers for service MgmtNode to "mux". @@ -102,6 +104,7 @@ func local_request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Mar // 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 RegisterMgmtNodeHandlerFromEndpoint instead. func RegisterMgmtNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MgmtNodeServer) error { + mux.Handle("POST", pattern_MgmtNode_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -124,6 +127,7 @@ func RegisterMgmtNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_MgmtNode_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_MgmtNode_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -148,6 +152,7 @@ func RegisterMgmtNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_MgmtNode_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -190,6 +195,7 @@ func RegisterMgmtNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MgmtNodeClient" to call the correct interceptors. func RegisterMgmtNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MgmtNodeClient) error { + mux.Handle("POST", pattern_MgmtNode_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -209,6 +215,7 @@ func RegisterMgmtNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_MgmtNode_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_MgmtNode_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -230,6 +237,7 @@ func RegisterMgmtNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_MgmtNode_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/node/node.swagger.json b/api/managementpb/node/node.swagger.json new file mode 100644 index 0000000000..9c8ed81a51 --- /dev/null +++ b/api/managementpb/node/node.swagger.json @@ -0,0 +1,305 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/node/node.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "MgmtNode" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Node/Get": { + "post": { + "summary": "Get Node", + "description": "Returns a single Node by ID.", + "operationId": "GetNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nodev1beta1GetNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/nodev1beta1GetNodeRequest" + } + } + ], + "tags": [ + "MgmtNode" + ] + } + }, + "/v1/management/Node/List": { + "post": { + "summary": "List Nodes", + "description": "Returns a filtered list of Nodes.", + "operationId": "ListNodes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListNodeRequest" + } + } + ], + "tags": [ + "MgmtNode" + ] + } + } + }, + "definitions": { + "UniversalNodeAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique Agent identifier." + }, + "agent_type": { + "type": "string", + "description": "Agent type." + }, + "status": { + "type": "string", + "description": "Actual Agent status." + }, + "is_connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + } + } + }, + "UniversalNodeService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique Service identifier." + }, + "service_type": { + "type": "string", + "description": "Service type." + }, + "service_name": { + "type": "string", + "description": "Service name." + } + }, + "description": "Service represents a service running on a node." + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "nodev1beta1GetNodeRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique Node identifier." + } + } + }, + "nodev1beta1GetNodeResponse": { + "type": "object", + "properties": { + "node": { + "$ref": "#/definitions/v1beta1UniversalNode" + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1beta1ListNodeRequest": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be filtered out." + } + } + }, + "v1beta1ListNodeResponse": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1UniversalNode" + } + } + } + }, + "v1beta1UniversalNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique Node identifier." + }, + "node_type": { + "type": "string", + "description": "Node type." + }, + "node_name": { + "type": "string", + "description": "User-defined node name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "container_id": { + "type": "string", + "description": "A node's unique docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "status": { + "$ref": "#/definitions/v1beta1UniversalNodeStatus", + "description": "The health status of the node." + }, + "agents": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UniversalNodeAgent" + }, + "description": "List of agents related to this node." + }, + "services": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UniversalNodeService" + }, + "description": "List of services running on this node." + } + } + }, + "v1beta1UniversalNodeStatus": { + "type": "string", + "enum": [ + "STATUS_INVALID", + "UP", + "DOWN", + "UNKNOWN" + ], + "default": "STATUS_INVALID", + "description": "Node status.\n\n - STATUS_INVALID: Invalid status.\n - UP: The node is up.\n - DOWN: The node is down.\n - UNKNOWN: The node's status cannot be known (e.g. there are no metrics yet)." + } + } +} diff --git a/api/managementpb/node/node_grpc.pb.go b/api/managementpb/node/node_grpc.pb.go index 14e4f461d1..611084078c 100644 --- a/api/managementpb/node/node_grpc.pb.go +++ b/api/managementpb/node/node_grpc.pb.go @@ -8,7 +8,6 @@ package nodev1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -72,12 +71,12 @@ type MgmtNodeServer interface { } // UnimplementedMgmtNodeServer must be embedded to have forward compatible implementations. -type UnimplementedMgmtNodeServer struct{} +type UnimplementedMgmtNodeServer struct { +} func (UnimplementedMgmtNodeServer) ListNodes(context.Context, *ListNodeRequest) (*ListNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } - func (UnimplementedMgmtNodeServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } diff --git a/api/managementpb/node_grpc.pb.go b/api/managementpb/node_grpc.pb.go index ee9850d2aa..aca765aa4f 100644 --- a/api/managementpb/node_grpc.pb.go +++ b/api/managementpb/node_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type NodeServer interface { } // UnimplementedNodeServer must be embedded to have forward compatible implementations. -type UnimplementedNodeServer struct{} +type UnimplementedNodeServer struct { +} func (UnimplementedNodeServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") diff --git a/api/managementpb/pagination.pb.go b/api/managementpb/pagination.pb.go index 69716872ad..e1d0b3d5f6 100644 --- a/api/managementpb/pagination.pb.go +++ b/api/managementpb/pagination.pb.go @@ -7,12 +7,11 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -180,14 +179,11 @@ func file_managementpb_pagination_proto_rawDescGZIP() []byte { return file_managementpb_pagination_proto_rawDescData } -var ( - file_managementpb_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_managementpb_pagination_proto_goTypes = []interface{}{ - (*PageParams)(nil), // 0: management.PageParams - (*PageTotals)(nil), // 1: management.PageTotals - } -) - +var file_managementpb_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_managementpb_pagination_proto_goTypes = []interface{}{ + (*PageParams)(nil), // 0: management.PageParams + (*PageTotals)(nil), // 1: management.PageTotals +} var file_managementpb_pagination_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/pagination.swagger.json b/api/managementpb/pagination.swagger.json new file mode 100644 index 0000000000..7f1e50c833 --- /dev/null +++ b/api/managementpb/pagination.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/pagination.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/postgresql.pb.go b/api/managementpb/postgresql.pb.go index f9e679c139..761fed2dec 100644 --- a/api/managementpb/postgresql.pb.go +++ b/api/managementpb/postgresql.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -591,22 +589,19 @@ func file_managementpb_postgresql_proto_rawDescGZIP() []byte { return file_managementpb_postgresql_proto_rawDescData } -var ( - file_managementpb_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_postgresql_proto_goTypes = []interface{}{ - (*AddPostgreSQLRequest)(nil), // 0: management.AddPostgreSQLRequest - (*AddPostgreSQLResponse)(nil), // 1: management.AddPostgreSQLResponse - nil, // 2: management.AddPostgreSQLRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.PostgreSQLService)(nil), // 6: inventory.PostgreSQLService - (*inventorypb.PostgresExporter)(nil), // 7: inventory.PostgresExporter - (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.QANPostgreSQLPgStatementsAgent - (*inventorypb.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.QANPostgreSQLPgStatMonitorAgent - } -) - +var file_managementpb_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_postgresql_proto_goTypes = []interface{}{ + (*AddPostgreSQLRequest)(nil), // 0: management.AddPostgreSQLRequest + (*AddPostgreSQLResponse)(nil), // 1: management.AddPostgreSQLResponse + nil, // 2: management.AddPostgreSQLRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.PostgreSQLService)(nil), // 6: inventory.PostgreSQLService + (*inventorypb.PostgresExporter)(nil), // 7: inventory.PostgresExporter + (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.QANPostgreSQLPgStatementsAgent + (*inventorypb.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.QANPostgreSQLPgStatMonitorAgent +} var file_managementpb_postgresql_proto_depIdxs = []int32{ 3, // 0: management.AddPostgreSQLRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddPostgreSQLRequest.custom_labels:type_name -> management.AddPostgreSQLRequest.CustomLabelsEntry diff --git a/api/managementpb/postgresql.pb.gw.go b/api/managementpb/postgresql.pb.gw.go index 85b4b2ee38..f6c3bdfe8f 100644 --- a/api/managementpb/postgresql.pb.gw.go +++ b/api/managementpb/postgresql.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler runtime.Marshaler, client PostgreSQLClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddPostgreSQLRequest @@ -47,6 +45,7 @@ func request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler runtime.M msg, err := client.AddPostgreSQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler runtime.Marshaler, server PostgreSQLServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler run msg, err := server.AddPostgreSQL(ctx, &protoReq) return msg, metadata, err + } // RegisterPostgreSQLHandlerServer registers the http handlers for service PostgreSQL to "mux". @@ -70,6 +70,7 @@ func local_request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler run // 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 RegisterPostgreSQLHandlerFromEndpoint instead. func RegisterPostgreSQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PostgreSQLServer) error { + mux.Handle("POST", pattern_PostgreSQL_AddPostgreSQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterPostgreSQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_PostgreSQL_AddPostgreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterPostgreSQLHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PostgreSQLClient" to call the correct interceptors. func RegisterPostgreSQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PostgreSQLClient) error { + mux.Handle("POST", pattern_PostgreSQL_AddPostgreSQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterPostgreSQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_PostgreSQL_AddPostgreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_PostgreSQL_AddPostgreSQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "PostgreSQL", "Add"}, "")) +var ( + pattern_PostgreSQL_AddPostgreSQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "PostgreSQL", "Add"}, "")) +) -var forward_PostgreSQL_AddPostgreSQL_0 = runtime.ForwardResponseMessage +var ( + forward_PostgreSQL_AddPostgreSQL_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/postgresql.swagger.json b/api/managementpb/postgresql.swagger.json new file mode 100644 index 0000000000..bbd0bbe906 --- /dev/null +++ b/api/managementpb/postgresql.swagger.json @@ -0,0 +1,584 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/postgresql.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "PostgreSQL" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/PostgreSQL/Add": { + "post": { + "summary": "Add PostgreSQL", + "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "operationId": "AddPostgreSQL", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddPostgreSQLResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddPostgreSQLRequest" + } + } + ], + "tags": [ + "PostgreSQL" + ] + } + } + }, + "definitions": { + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryLogLevel": { + "type": "string", + "enum": [ + "auto", + "fatal", + "error", + "warn", + "info", + "debug" + ], + "default": "auto", + "title": "Log level for exporters" + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "inventoryPostgreSQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "PostgreSQLService represents a generic PostgreSQL instance." + }, + "inventoryPostgresExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." + }, + "inventoryQANPostgreSQLPgStatMonitorAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "inventoryQANPostgreSQLPgStatementsAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "managementAddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "managementAddPostgreSQLRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/managementAddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "database": { + "type": "string", + "description": "Database name." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for scraping metrics." + }, + "qan_postgresql_pgstatements_agent": { + "type": "boolean", + "description": "If true, adds qan-postgresql-pgstatements-agent for provided service." + }, + "qan_postgresql_pgstatmonitor_agent": { + "type": "boolean", + "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "title": "Exporter log level" + } + } + }, + "managementAddPostgreSQLResponse": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/inventoryPostgreSQLService" + }, + "postgres_exporter": { + "$ref": "#/definitions/inventoryPostgresExporter" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" + } + } + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/postgresql_grpc.pb.go b/api/managementpb/postgresql_grpc.pb.go index 1852de174a..28c9f301c0 100644 --- a/api/managementpb/postgresql_grpc.pb.go +++ b/api/managementpb/postgresql_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -62,7 +61,8 @@ type PostgreSQLServer interface { } // UnimplementedPostgreSQLServer must be embedded to have forward compatible implementations. -type UnimplementedPostgreSQLServer struct{} +type UnimplementedPostgreSQLServer struct { +} func (UnimplementedPostgreSQLServer) AddPostgreSQL(context.Context, *AddPostgreSQLRequest) (*AddPostgreSQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPostgreSQL not implemented") diff --git a/api/managementpb/proxysql.pb.go b/api/managementpb/proxysql.pb.go index 6a499d59c2..06ea06d55c 100644 --- a/api/managementpb/proxysql.pb.go +++ b/api/managementpb/proxysql.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -452,20 +450,17 @@ func file_managementpb_proxysql_proto_rawDescGZIP() []byte { return file_managementpb_proxysql_proto_rawDescData } -var ( - file_managementpb_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_managementpb_proxysql_proto_goTypes = []interface{}{ - (*AddProxySQLRequest)(nil), // 0: management.AddProxySQLRequest - (*AddProxySQLResponse)(nil), // 1: management.AddProxySQLResponse - nil, // 2: management.AddProxySQLRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.ProxySQLService)(nil), // 6: inventory.ProxySQLService - (*inventorypb.ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter - } -) - +var file_managementpb_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_managementpb_proxysql_proto_goTypes = []interface{}{ + (*AddProxySQLRequest)(nil), // 0: management.AddProxySQLRequest + (*AddProxySQLResponse)(nil), // 1: management.AddProxySQLResponse + nil, // 2: management.AddProxySQLRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.ProxySQLService)(nil), // 6: inventory.ProxySQLService + (*inventorypb.ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter +} var file_managementpb_proxysql_proto_depIdxs = []int32{ 3, // 0: management.AddProxySQLRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddProxySQLRequest.custom_labels:type_name -> management.AddProxySQLRequest.CustomLabelsEntry diff --git a/api/managementpb/proxysql.pb.gw.go b/api/managementpb/proxysql.pb.gw.go index 3101c325a3..85f99f2db8 100644 --- a/api/managementpb/proxysql.pb.gw.go +++ b/api/managementpb/proxysql.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime.Marshaler, client ProxySQLClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddProxySQLRequest @@ -47,6 +45,7 @@ func request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddProxySQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime.Marshaler, server ProxySQLServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime msg, err := server.AddProxySQL(ctx, &protoReq) return msg, metadata, err + } // RegisterProxySQLHandlerServer registers the http handlers for service ProxySQL to "mux". @@ -70,6 +70,7 @@ func local_request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime // 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 RegisterProxySQLHandlerFromEndpoint instead. func RegisterProxySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProxySQLServer) error { + mux.Handle("POST", pattern_ProxySQL_AddProxySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterProxySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_ProxySQL_AddProxySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterProxySQLHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ProxySQLClient" to call the correct interceptors. func RegisterProxySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProxySQLClient) error { + mux.Handle("POST", pattern_ProxySQL_AddProxySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterProxySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_ProxySQL_AddProxySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_ProxySQL_AddProxySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "ProxySQL", "Add"}, "")) +var ( + pattern_ProxySQL_AddProxySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "ProxySQL", "Add"}, "")) +) -var forward_ProxySQL_AddProxySQL_0 = runtime.ForwardResponseMessage +var ( + forward_ProxySQL_AddProxySQL_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/proxysql.swagger.json b/api/managementpb/proxysql.swagger.json new file mode 100644 index 0000000000..d2c72a7519 --- /dev/null +++ b/api/managementpb/proxysql.swagger.json @@ -0,0 +1,409 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/proxysql.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ProxySQL" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/ProxySQL/Add": { + "post": { + "summary": "Add ProxySQL", + "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "operationId": "AddProxySQL", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddProxySQLResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddProxySQLRequest" + } + } + ], + "tags": [ + "ProxySQL" + ] + } + } + }, + "definitions": { + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryLogLevel": { + "type": "string", + "enum": [ + "auto", + "fatal", + "error", + "warn", + "info", + "debug" + ], + "default": "auto", + "title": "Log level for exporters" + }, + "inventoryNodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_INVALID", + "GENERIC_NODE", + "CONTAINER_NODE", + "REMOTE_NODE", + "REMOTE_RDS_NODE", + "REMOTE_AZURE_DATABASE_NODE" + ], + "default": "NODE_TYPE_INVALID", + "description": "NodeType describes supported Node types." + }, + "inventoryProxySQLExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics." + }, + "inventoryProxySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "ProxySQLService represents a generic ProxySQL instance." + }, + "managementAddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/inventoryNodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "managementAddProxySQLRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/managementAddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "ProxySQL password for scraping metrics." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "title": "Exporter log level" + } + } + }, + "managementAddProxySQLResponse": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/inventoryProxySQLService" + }, + "proxysql_exporter": { + "$ref": "#/definitions/inventoryProxySQLExporter" + } + } + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/proxysql_grpc.pb.go b/api/managementpb/proxysql_grpc.pb.go index 197f0f2498..c9f0b5d12a 100644 --- a/api/managementpb/proxysql_grpc.pb.go +++ b/api/managementpb/proxysql_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -62,7 +61,8 @@ type ProxySQLServer interface { } // UnimplementedProxySQLServer must be embedded to have forward compatible implementations. -type UnimplementedProxySQLServer struct{} +type UnimplementedProxySQLServer struct { +} func (UnimplementedProxySQLServer) AddProxySQL(context.Context, *AddProxySQLRequest) (*AddProxySQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQL not implemented") diff --git a/api/managementpb/rds.pb.go b/api/managementpb/rds.pb.go index 8214ca2777..286b39ddff 100644 --- a/api/managementpb/rds.pb.go +++ b/api/managementpb/rds.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -933,29 +931,26 @@ func file_managementpb_rds_proto_rawDescGZIP() []byte { return file_managementpb_rds_proto_rawDescData } -var ( - file_managementpb_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_managementpb_rds_proto_goTypes = []interface{}{ - (DiscoverRDSEngine)(0), // 0: management.DiscoverRDSEngine - (*DiscoverRDSInstance)(nil), // 1: management.DiscoverRDSInstance - (*DiscoverRDSRequest)(nil), // 2: management.DiscoverRDSRequest - (*DiscoverRDSResponse)(nil), // 3: management.DiscoverRDSResponse - (*AddRDSRequest)(nil), // 4: management.AddRDSRequest - (*AddRDSResponse)(nil), // 5: management.AddRDSResponse - nil, // 6: management.AddRDSRequest.CustomLabelsEntry - (MetricsMode)(0), // 7: management.MetricsMode - (*inventorypb.RemoteRDSNode)(nil), // 8: inventory.RemoteRDSNode - (*inventorypb.RDSExporter)(nil), // 9: inventory.RDSExporter - (*inventorypb.MySQLService)(nil), // 10: inventory.MySQLService - (*inventorypb.MySQLdExporter)(nil), // 11: inventory.MySQLdExporter - (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.QANMySQLPerfSchemaAgent - (*inventorypb.PostgreSQLService)(nil), // 13: inventory.PostgreSQLService - (*inventorypb.PostgresExporter)(nil), // 14: inventory.PostgresExporter - (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.QANPostgreSQLPgStatementsAgent - } -) - +var file_managementpb_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_managementpb_rds_proto_goTypes = []interface{}{ + (DiscoverRDSEngine)(0), // 0: management.DiscoverRDSEngine + (*DiscoverRDSInstance)(nil), // 1: management.DiscoverRDSInstance + (*DiscoverRDSRequest)(nil), // 2: management.DiscoverRDSRequest + (*DiscoverRDSResponse)(nil), // 3: management.DiscoverRDSResponse + (*AddRDSRequest)(nil), // 4: management.AddRDSRequest + (*AddRDSResponse)(nil), // 5: management.AddRDSResponse + nil, // 6: management.AddRDSRequest.CustomLabelsEntry + (MetricsMode)(0), // 7: management.MetricsMode + (*inventorypb.RemoteRDSNode)(nil), // 8: inventory.RemoteRDSNode + (*inventorypb.RDSExporter)(nil), // 9: inventory.RDSExporter + (*inventorypb.MySQLService)(nil), // 10: inventory.MySQLService + (*inventorypb.MySQLdExporter)(nil), // 11: inventory.MySQLdExporter + (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.QANMySQLPerfSchemaAgent + (*inventorypb.PostgreSQLService)(nil), // 13: inventory.PostgreSQLService + (*inventorypb.PostgresExporter)(nil), // 14: inventory.PostgresExporter + (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.QANPostgreSQLPgStatementsAgent +} var file_managementpb_rds_proto_depIdxs = []int32{ 0, // 0: management.DiscoverRDSInstance.engine:type_name -> management.DiscoverRDSEngine 1, // 1: management.DiscoverRDSResponse.rds_instances:type_name -> management.DiscoverRDSInstance diff --git a/api/managementpb/rds.pb.gw.go b/api/managementpb/rds.pb.gw.go index b07e7b7196..ece18ea2d6 100644 --- a/api/managementpb/rds.pb.gw.go +++ b/api/managementpb/rds.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, client RDSClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DiscoverRDSRequest @@ -47,6 +45,7 @@ func request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.DiscoverRDS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, server RDSServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Mars msg, err := server.DiscoverRDS(ctx, &protoReq) return msg, metadata, err + } func request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler, client RDSClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler, clie msg, err := client.AddRDS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler, server RDSServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler msg, err := server.AddRDS(ctx, &protoReq) return msg, metadata, err + } // RegisterRDSHandlerServer registers the http handlers for service RDS to "mux". @@ -102,6 +104,7 @@ func local_request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler // 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 RegisterRDSHandlerFromEndpoint instead. func RegisterRDSHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RDSServer) error { + mux.Handle("POST", pattern_RDS_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -124,6 +127,7 @@ func RegisterRDSHandlerServer(ctx context.Context, mux *runtime.ServeMux, server } forward_RDS_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_RDS_AddRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -148,6 +152,7 @@ func RegisterRDSHandlerServer(ctx context.Context, mux *runtime.ServeMux, server } forward_RDS_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -190,6 +195,7 @@ func RegisterRDSHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.C // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RDSClient" to call the correct interceptors. func RegisterRDSHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RDSClient) error { + mux.Handle("POST", pattern_RDS_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -209,6 +215,7 @@ func RegisterRDSHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } forward_RDS_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_RDS_AddRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -230,6 +237,7 @@ func RegisterRDSHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } forward_RDS_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/rds.swagger.json b/api/managementpb/rds.swagger.json new file mode 100644 index 0000000000..4fac77be84 --- /dev/null +++ b/api/managementpb/rds.swagger.json @@ -0,0 +1,895 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/rds.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "RDS" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/RDS/Add": { + "post": { + "summary": "Add RDS", + "description": "Adds RDS instance.", + "operationId": "AddRDS", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementAddRDSResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementAddRDSRequest" + } + } + ], + "tags": [ + "RDS" + ] + } + }, + "/v1/management/RDS/Discover": { + "post": { + "summary": "Discover RDS", + "description": "Discovers RDS instances.", + "operationId": "DiscoverRDS", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementDiscoverRDSResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementDiscoverRDSRequest" + } + } + ], + "tags": [ + "RDS" + ] + } + } + }, + "definitions": { + "inventoryAgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_INVALID", + "STARTING", + "RUNNING", + "WAITING", + "STOPPING", + "DONE", + "UNKNOWN" + ], + "default": "AGENT_STATUS_INVALID", + "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "inventoryLogLevel": { + "type": "string", + "enum": [ + "auto", + "fatal", + "error", + "warn", + "info", + "debug" + ], + "default": "auto", + "title": "Log level for exporters" + }, + "inventoryMySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "inventoryMySQLdExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "tablestats_group_disabled": { + "type": "boolean", + "description": "True if tablestats group collectors are currently disabled." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." + }, + "inventoryPostgreSQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "PostgreSQLService represents a generic PostgreSQL instance." + }, + "inventoryPostgresExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." + }, + "inventoryQANMySQLPerfSchemaAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "inventoryQANPostgreSQLPgStatementsAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "inventoryRDSExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nStatus fields below." + }, + "status": { + "$ref": "#/definitions/inventoryAgentStatus", + "description": "Actual Agent status (the same for several configurations)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics (the same for several configurations).\n\nMetric collections flags below." + }, + "basic_metrics_disabled": { + "type": "boolean", + "description": "Basic metrics are disabled." + }, + "enhanced_metrics_disabled": { + "type": "boolean", + "description": "Enhanced metrics are disabled." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/inventoryLogLevel", + "description": "Log level for exporter." + } + }, + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics." + }, + "inventoryRemoteRDSNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;" + } + }, + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes." + }, + "managementAddRDSRequest": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "AWS region." + }, + "az": { + "type": "string", + "description": "AWS availability zone." + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + }, + "node_model": { + "type": "string", + "description": "AWS instance class." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + }, + "engine": { + "$ref": "#/definitions/managementDiscoverRDSEngine", + "description": "Instance engine." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Defaults to AWS instance ID." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "Username for scraping metrics." + }, + "password": { + "type": "string", + "description": "Password for scraping metrics." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access key." + }, + "aws_secret_key": { + "type": "string", + "description": "AWS Secret key." + }, + "rds_exporter": { + "type": "boolean", + "description": "If true, adds rds_exporter." + }, + "qan_mysql_perfschema": { + "type": "boolean", + "description": "If true, adds qan-mysql-perfschema-agent." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node and Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them." + }, + "disable_basic_metrics": { + "type": "boolean", + "description": "Disable basic metrics." + }, + "disable_enhanced_metrics": { + "type": "boolean", + "description": "Disable enhanced metrics." + }, + "metrics_mode": { + "$ref": "#/definitions/managementMetricsMode", + "description": "Defines metrics flow model for this exporter.\nPush metrics mode is not allowed." + }, + "qan_postgresql_pgstatements": { + "type": "boolean", + "title": "If true, add qan-pgstatements" + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "database": { + "type": "string", + "description": "Database name." + } + } + }, + "managementAddRDSResponse": { + "type": "object", + "properties": { + "node": { + "$ref": "#/definitions/inventoryRemoteRDSNode" + }, + "rds_exporter": { + "$ref": "#/definitions/inventoryRDSExporter" + }, + "mysql": { + "$ref": "#/definitions/inventoryMySQLService" + }, + "mysqld_exporter": { + "$ref": "#/definitions/inventoryMySQLdExporter" + }, + "qan_mysql_perfschema": { + "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Actual table count at the moment of adding." + }, + "postgresql": { + "$ref": "#/definitions/inventoryPostgreSQLService" + }, + "postgresql_exporter": { + "$ref": "#/definitions/inventoryPostgresExporter" + }, + "qan_postgresql_pgstatements": { + "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" + } + } + }, + "managementDiscoverRDSEngine": { + "type": "string", + "enum": [ + "DISCOVER_RDS_ENGINE_INVALID", + "DISCOVER_RDS_MYSQL", + "DISCOVER_RDS_POSTGRESQL" + ], + "default": "DISCOVER_RDS_ENGINE_INVALID", + "description": "DiscoverRDSEngine describes supported RDS instance engines." + }, + "managementDiscoverRDSInstance": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "AWS region." + }, + "az": { + "type": "string", + "description": "AWS availability zone." + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + }, + "node_model": { + "type": "string", + "description": "AWS instance class." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + }, + "engine": { + "$ref": "#/definitions/managementDiscoverRDSEngine", + "description": "Instance engine." + }, + "engine_version": { + "type": "string", + "description": "Engine version." + } + }, + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery." + }, + "managementDiscoverRDSRequest": { + "type": "object", + "properties": { + "aws_access_key": { + "type": "string", + "description": "AWS Access key. Optional." + }, + "aws_secret_key": { + "type": "string", + "description": "AWS Secret key. Optional." + } + } + }, + "managementDiscoverRDSResponse": { + "type": "object", + "properties": { + "rds_instances": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/managementDiscoverRDSInstance" + } + } + } + }, + "managementMetricsMode": { + "type": "string", + "enum": [ + "AUTO", + "PULL", + "PUSH" + ], + "default": "AUTO", + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/rds_grpc.pb.go b/api/managementpb/rds_grpc.pb.go index 68e6fb4950..1ac9d05f14 100644 --- a/api/managementpb/rds_grpc.pb.go +++ b/api/managementpb/rds_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -72,12 +71,12 @@ type RDSServer interface { } // UnimplementedRDSServer must be embedded to have forward compatible implementations. -type UnimplementedRDSServer struct{} +type UnimplementedRDSServer struct { +} func (UnimplementedRDSServer) DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverRDS not implemented") } - func (UnimplementedRDSServer) AddRDS(context.Context, *AddRDSRequest) (*AddRDSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRDS not implemented") } diff --git a/api/managementpb/role/json/client/role/assign_roles_parameters.go b/api/managementpb/role/json/client/role/assign_roles_parameters.go index 9e36296a7d..7a9b3c6bbe 100644 --- a/api/managementpb/role/json/client/role/assign_roles_parameters.go +++ b/api/managementpb/role/json/client/role/assign_roles_parameters.go @@ -60,6 +60,7 @@ AssignRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AssignRolesParams struct { + // Body. Body AssignRolesBody @@ -129,6 +130,7 @@ func (o *AssignRolesParams) SetBody(body AssignRolesBody) { // WriteToRequest writes these params to a swagger request func (o *AssignRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/assign_roles_responses.go b/api/managementpb/role/json/client/role/assign_roles_responses.go index 65b8223e78..d792e42480 100644 --- a/api/managementpb/role/json/client/role/assign_roles_responses.go +++ b/api/managementpb/role/json/client/role/assign_roles_responses.go @@ -60,12 +60,12 @@ type AssignRolesOK struct { func (o *AssignRolesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Assign][%d] assignRolesOk %+v", 200, o.Payload) } - func (o *AssignRolesOK) GetPayload() interface{} { return o.Payload } func (o *AssignRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AssignRolesDefault) Code() int { func (o *AssignRolesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Assign][%d] AssignRoles default %+v", o._statusCode, o.Payload) } - func (o *AssignRolesDefault) GetPayload() *AssignRolesDefaultBody { return o.Payload } func (o *AssignRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AssignRolesDefaultBody) // response payload @@ -121,6 +121,7 @@ AssignRolesBody assign roles body swagger:model AssignRolesBody */ type AssignRolesBody struct { + // role ids RoleIds []int64 `json:"role_ids"` @@ -161,6 +162,7 @@ AssignRolesDefaultBody assign roles default body swagger:model AssignRolesDefaultBody */ type AssignRolesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *AssignRolesDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -265,6 +270,7 @@ AssignRolesDefaultBodyDetailsItems0 assign roles default body details items0 swagger:model AssignRolesDefaultBodyDetailsItems0 */ type AssignRolesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/json/client/role/create_role_parameters.go b/api/managementpb/role/json/client/role/create_role_parameters.go index 15dcde77e8..d54637d6c7 100644 --- a/api/managementpb/role/json/client/role/create_role_parameters.go +++ b/api/managementpb/role/json/client/role/create_role_parameters.go @@ -60,6 +60,7 @@ CreateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRoleParams struct { + // Body. Body CreateRoleBody @@ -129,6 +130,7 @@ func (o *CreateRoleParams) SetBody(body CreateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/create_role_responses.go b/api/managementpb/role/json/client/role/create_role_responses.go index dd98247388..6c8e8b8539 100644 --- a/api/managementpb/role/json/client/role/create_role_responses.go +++ b/api/managementpb/role/json/client/role/create_role_responses.go @@ -60,12 +60,12 @@ type CreateRoleOK struct { func (o *CreateRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Create][%d] createRoleOk %+v", 200, o.Payload) } - func (o *CreateRoleOK) GetPayload() *CreateRoleOKBody { return o.Payload } func (o *CreateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRoleOKBody) // response payload @@ -102,12 +102,12 @@ func (o *CreateRoleDefault) Code() int { func (o *CreateRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Create][%d] CreateRole default %+v", o._statusCode, o.Payload) } - func (o *CreateRoleDefault) GetPayload() *CreateRoleDefaultBody { return o.Payload } func (o *CreateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRoleDefaultBody) // response payload @@ -123,6 +123,7 @@ CreateRoleBody create role body swagger:model CreateRoleBody */ type CreateRoleBody struct { + // title Title string `json:"title,omitempty"` @@ -166,6 +167,7 @@ CreateRoleDefaultBody create role default body swagger:model CreateRoleDefaultBody */ type CreateRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -231,7 +233,9 @@ func (o *CreateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -242,6 +246,7 @@ func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -270,6 +275,7 @@ CreateRoleDefaultBodyDetailsItems0 create role default body details items0 swagger:model CreateRoleDefaultBodyDetailsItems0 */ type CreateRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -307,6 +313,7 @@ CreateRoleOKBody create role OK body swagger:model CreateRoleOKBody */ type CreateRoleOKBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } diff --git a/api/managementpb/role/json/client/role/delete_role_parameters.go b/api/managementpb/role/json/client/role/delete_role_parameters.go index e1671af439..2e6f585ac7 100644 --- a/api/managementpb/role/json/client/role/delete_role_parameters.go +++ b/api/managementpb/role/json/client/role/delete_role_parameters.go @@ -60,6 +60,7 @@ DeleteRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteRoleParams struct { + // Body. Body DeleteRoleBody @@ -129,6 +130,7 @@ func (o *DeleteRoleParams) SetBody(body DeleteRoleBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/delete_role_responses.go b/api/managementpb/role/json/client/role/delete_role_responses.go index 9ecfa87e12..704ff7404d 100644 --- a/api/managementpb/role/json/client/role/delete_role_responses.go +++ b/api/managementpb/role/json/client/role/delete_role_responses.go @@ -60,12 +60,12 @@ type DeleteRoleOK struct { func (o *DeleteRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Delete][%d] deleteRoleOk %+v", 200, o.Payload) } - func (o *DeleteRoleOK) GetPayload() interface{} { return o.Payload } func (o *DeleteRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteRoleDefault) Code() int { func (o *DeleteRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Delete][%d] DeleteRole default %+v", o._statusCode, o.Payload) } - func (o *DeleteRoleDefault) GetPayload() *DeleteRoleDefaultBody { return o.Payload } func (o *DeleteRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteRoleDefaultBody) // response payload @@ -121,6 +121,7 @@ DeleteRoleBody delete role body swagger:model DeleteRoleBody */ type DeleteRoleBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` @@ -161,6 +162,7 @@ DeleteRoleDefaultBody delete role default body swagger:model DeleteRoleDefaultBody */ type DeleteRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *DeleteRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -265,6 +270,7 @@ DeleteRoleDefaultBodyDetailsItems0 delete role default body details items0 swagger:model DeleteRoleDefaultBodyDetailsItems0 */ type DeleteRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/json/client/role/get_role_parameters.go b/api/managementpb/role/json/client/role/get_role_parameters.go index 9ec0ede0d8..3d0a82e0ac 100644 --- a/api/managementpb/role/json/client/role/get_role_parameters.go +++ b/api/managementpb/role/json/client/role/get_role_parameters.go @@ -60,6 +60,7 @@ GetRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetRoleParams struct { + // Body. Body GetRoleBody @@ -129,6 +130,7 @@ func (o *GetRoleParams) SetBody(body GetRoleBody) { // WriteToRequest writes these params to a swagger request func (o *GetRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/get_role_responses.go b/api/managementpb/role/json/client/role/get_role_responses.go index 0894f153d2..2c4fb2115d 100644 --- a/api/managementpb/role/json/client/role/get_role_responses.go +++ b/api/managementpb/role/json/client/role/get_role_responses.go @@ -60,12 +60,12 @@ type GetRoleOK struct { func (o *GetRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Get][%d] getRoleOk %+v", 200, o.Payload) } - func (o *GetRoleOK) GetPayload() *GetRoleOKBody { return o.Payload } func (o *GetRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetRoleOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetRoleDefault) Code() int { func (o *GetRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Get][%d] GetRole default %+v", o._statusCode, o.Payload) } - func (o *GetRoleDefault) GetPayload() *GetRoleDefaultBody { return o.Payload } func (o *GetRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetRoleDefaultBody) // response payload @@ -123,6 +123,7 @@ GetRoleBody get role body swagger:model GetRoleBody */ type GetRoleBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } @@ -160,6 +161,7 @@ GetRoleDefaultBody get role default body swagger:model GetRoleDefaultBody */ type GetRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -225,7 +227,9 @@ func (o *GetRoleDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -236,6 +240,7 @@ func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -264,6 +269,7 @@ GetRoleDefaultBodyDetailsItems0 get role default body details items0 swagger:model GetRoleDefaultBodyDetailsItems0 */ type GetRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -301,6 +307,7 @@ GetRoleOKBody get role OK body swagger:model GetRoleOKBody */ type GetRoleOKBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/managementpb/role/json/client/role/list_roles_parameters.go b/api/managementpb/role/json/client/role/list_roles_parameters.go index 1f1a6cd85e..f075523305 100644 --- a/api/managementpb/role/json/client/role/list_roles_parameters.go +++ b/api/managementpb/role/json/client/role/list_roles_parameters.go @@ -60,6 +60,7 @@ ListRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListRolesParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListRolesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/list_roles_responses.go b/api/managementpb/role/json/client/role/list_roles_responses.go index 964d08d8a0..209264b39a 100644 --- a/api/managementpb/role/json/client/role/list_roles_responses.go +++ b/api/managementpb/role/json/client/role/list_roles_responses.go @@ -60,12 +60,12 @@ type ListRolesOK struct { func (o *ListRolesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/List][%d] listRolesOk %+v", 200, o.Payload) } - func (o *ListRolesOK) GetPayload() *ListRolesOKBody { return o.Payload } func (o *ListRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRolesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListRolesDefault) Code() int { func (o *ListRolesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/List][%d] ListRoles default %+v", o._statusCode, o.Payload) } - func (o *ListRolesDefault) GetPayload() *ListRolesDefaultBody { return o.Payload } func (o *ListRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRolesDefaultBody) // response payload @@ -123,6 +123,7 @@ ListRolesDefaultBody list roles default body swagger:model ListRolesDefaultBody */ type ListRolesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *ListRolesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -227,6 +231,7 @@ ListRolesDefaultBodyDetailsItems0 list roles default body details items0 swagger:model ListRolesDefaultBodyDetailsItems0 */ type ListRolesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ ListRolesOKBody list roles OK body swagger:model ListRolesOKBody */ type ListRolesOKBody struct { + // roles Roles []*ListRolesOKBodyRolesItems0 `json:"roles"` } @@ -323,7 +329,9 @@ func (o *ListRolesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Roles); i++ { + if o.Roles[i] != nil { if err := o.Roles[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -334,6 +342,7 @@ func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strf return err } } + } return nil @@ -362,6 +371,7 @@ ListRolesOKBodyRolesItems0 list roles OK body roles items0 swagger:model ListRolesOKBodyRolesItems0 */ type ListRolesOKBodyRolesItems0 struct { + // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/managementpb/role/json/client/role/set_default_role_parameters.go b/api/managementpb/role/json/client/role/set_default_role_parameters.go index 471e8d343d..030558fa9d 100644 --- a/api/managementpb/role/json/client/role/set_default_role_parameters.go +++ b/api/managementpb/role/json/client/role/set_default_role_parameters.go @@ -60,6 +60,7 @@ SetDefaultRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SetDefaultRoleParams struct { + // Body. Body SetDefaultRoleBody @@ -129,6 +130,7 @@ func (o *SetDefaultRoleParams) SetBody(body SetDefaultRoleBody) { // WriteToRequest writes these params to a swagger request func (o *SetDefaultRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/set_default_role_responses.go b/api/managementpb/role/json/client/role/set_default_role_responses.go index cb18ff70dc..bccbbef9ab 100644 --- a/api/managementpb/role/json/client/role/set_default_role_responses.go +++ b/api/managementpb/role/json/client/role/set_default_role_responses.go @@ -60,12 +60,12 @@ type SetDefaultRoleOK struct { func (o *SetDefaultRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/SetDefault][%d] setDefaultRoleOk %+v", 200, o.Payload) } - func (o *SetDefaultRoleOK) GetPayload() interface{} { return o.Payload } func (o *SetDefaultRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *SetDefaultRoleDefault) Code() int { func (o *SetDefaultRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/SetDefault][%d] SetDefaultRole default %+v", o._statusCode, o.Payload) } - func (o *SetDefaultRoleDefault) GetPayload() *SetDefaultRoleDefaultBody { return o.Payload } func (o *SetDefaultRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SetDefaultRoleDefaultBody) // response payload @@ -121,6 +121,7 @@ SetDefaultRoleBody set default role body swagger:model SetDefaultRoleBody */ type SetDefaultRoleBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } @@ -158,6 +159,7 @@ SetDefaultRoleDefaultBody set default role default body swagger:model SetDefaultRoleDefaultBody */ type SetDefaultRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *SetDefaultRoleDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -262,6 +267,7 @@ SetDefaultRoleDefaultBodyDetailsItems0 set default role default body details ite swagger:model SetDefaultRoleDefaultBodyDetailsItems0 */ type SetDefaultRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/json/client/role/update_role_parameters.go b/api/managementpb/role/json/client/role/update_role_parameters.go index f584f8c3b9..acbe211722 100644 --- a/api/managementpb/role/json/client/role/update_role_parameters.go +++ b/api/managementpb/role/json/client/role/update_role_parameters.go @@ -60,6 +60,7 @@ UpdateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateRoleParams struct { + // Body. Body UpdateRoleBody @@ -129,6 +130,7 @@ func (o *UpdateRoleParams) SetBody(body UpdateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/update_role_responses.go b/api/managementpb/role/json/client/role/update_role_responses.go index 809f3b65c0..36799c9752 100644 --- a/api/managementpb/role/json/client/role/update_role_responses.go +++ b/api/managementpb/role/json/client/role/update_role_responses.go @@ -60,12 +60,12 @@ type UpdateRoleOK struct { func (o *UpdateRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Update][%d] updateRoleOk %+v", 200, o.Payload) } - func (o *UpdateRoleOK) GetPayload() interface{} { return o.Payload } func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *UpdateRoleDefault) Code() int { func (o *UpdateRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Update][%d] UpdateRole default %+v", o._statusCode, o.Payload) } - func (o *UpdateRoleDefault) GetPayload() *UpdateRoleDefaultBody { return o.Payload } func (o *UpdateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateRoleDefaultBody) // response payload @@ -121,6 +121,7 @@ UpdateRoleBody update role body swagger:model UpdateRoleBody */ type UpdateRoleBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` @@ -167,6 +168,7 @@ UpdateRoleDefaultBody update role default body swagger:model UpdateRoleDefaultBody */ type UpdateRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -232,7 +234,9 @@ func (o *UpdateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,6 +247,7 @@ func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -271,6 +276,7 @@ UpdateRoleDefaultBodyDetailsItems0 update role default body details items0 swagger:model UpdateRoleDefaultBodyDetailsItems0 */ type UpdateRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/role.pb.go b/api/managementpb/role/role.pb.go index 96978fed8b..58e80af348 100644 --- a/api/managementpb/role/role.pb.go +++ b/api/managementpb/role/role.pb.go @@ -7,14 +7,13 @@ package rolev1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -965,27 +964,24 @@ func file_managementpb_role_role_proto_rawDescGZIP() []byte { return file_managementpb_role_role_proto_rawDescData } -var ( - file_managementpb_role_role_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_managementpb_role_role_proto_goTypes = []interface{}{ - (*CreateRoleRequest)(nil), // 0: role.v1beta1.CreateRoleRequest - (*CreateRoleResponse)(nil), // 1: role.v1beta1.CreateRoleResponse - (*UpdateRoleRequest)(nil), // 2: role.v1beta1.UpdateRoleRequest - (*UpdateRoleResponse)(nil), // 3: role.v1beta1.UpdateRoleResponse - (*DeleteRoleRequest)(nil), // 4: role.v1beta1.DeleteRoleRequest - (*DeleteRoleResponse)(nil), // 5: role.v1beta1.DeleteRoleResponse - (*GetRoleRequest)(nil), // 6: role.v1beta1.GetRoleRequest - (*GetRoleResponse)(nil), // 7: role.v1beta1.GetRoleResponse - (*SetDefaultRoleRequest)(nil), // 8: role.v1beta1.SetDefaultRoleRequest - (*SetDefaultRoleResponse)(nil), // 9: role.v1beta1.SetDefaultRoleResponse - (*AssignRolesRequest)(nil), // 10: role.v1beta1.AssignRolesRequest - (*AssignRolesResponse)(nil), // 11: role.v1beta1.AssignRolesResponse - (*ListRolesRequest)(nil), // 12: role.v1beta1.ListRolesRequest - (*ListRolesResponse)(nil), // 13: role.v1beta1.ListRolesResponse - (*ListRolesResponse_RoleData)(nil), // 14: role.v1beta1.ListRolesResponse.RoleData - } -) - +var file_managementpb_role_role_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_managementpb_role_role_proto_goTypes = []interface{}{ + (*CreateRoleRequest)(nil), // 0: role.v1beta1.CreateRoleRequest + (*CreateRoleResponse)(nil), // 1: role.v1beta1.CreateRoleResponse + (*UpdateRoleRequest)(nil), // 2: role.v1beta1.UpdateRoleRequest + (*UpdateRoleResponse)(nil), // 3: role.v1beta1.UpdateRoleResponse + (*DeleteRoleRequest)(nil), // 4: role.v1beta1.DeleteRoleRequest + (*DeleteRoleResponse)(nil), // 5: role.v1beta1.DeleteRoleResponse + (*GetRoleRequest)(nil), // 6: role.v1beta1.GetRoleRequest + (*GetRoleResponse)(nil), // 7: role.v1beta1.GetRoleResponse + (*SetDefaultRoleRequest)(nil), // 8: role.v1beta1.SetDefaultRoleRequest + (*SetDefaultRoleResponse)(nil), // 9: role.v1beta1.SetDefaultRoleResponse + (*AssignRolesRequest)(nil), // 10: role.v1beta1.AssignRolesRequest + (*AssignRolesResponse)(nil), // 11: role.v1beta1.AssignRolesResponse + (*ListRolesRequest)(nil), // 12: role.v1beta1.ListRolesRequest + (*ListRolesResponse)(nil), // 13: role.v1beta1.ListRolesResponse + (*ListRolesResponse_RoleData)(nil), // 14: role.v1beta1.ListRolesResponse.RoleData +} var file_managementpb_role_role_proto_depIdxs = []int32{ 14, // 0: role.v1beta1.ListRolesResponse.roles:type_name -> role.v1beta1.ListRolesResponse.RoleData 0, // 1: role.v1beta1.Role.CreateRole:input_type -> role.v1beta1.CreateRoleRequest diff --git a/api/managementpb/role/role.pb.gw.go b/api/managementpb/role/role.pb.gw.go index 08f67280cf..e27f7d8eaa 100644 --- a/api/managementpb/role/role.pb.gw.go +++ b/api/managementpb/role/role.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRoleRequest @@ -47,6 +45,7 @@ func request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Mars msg, err := server.CreateRole(ctx, &protoReq) return msg, metadata, err + } func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Mars msg, err := server.UpdateRole(ctx, &protoReq) return msg, metadata, err + } func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Mars msg, err := server.DeleteRole(ctx, &protoReq) return msg, metadata, err + } func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, cl msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshal msg, err := server.GetRole(ctx, &protoReq) return msg, metadata, err + } func request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.ListRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.ListRoles(ctx, &protoReq) return msg, metadata, err + } func request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.AssignRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Mar msg, err := server.AssignRoles(ctx, &protoReq) return msg, metadata, err + } func request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.SetDefaultRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime. msg, err := server.SetDefaultRole(ctx, &protoReq) return msg, metadata, err + } // RegisterRoleHandlerServer registers the http handlers for service Role to "mux". @@ -262,6 +274,7 @@ func local_request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime. // 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 RegisterRoleHandlerFromEndpoint instead. func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServer) error { + mux.Handle("POST", pattern_Role_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -284,6 +297,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -308,6 +322,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -332,6 +347,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,6 +372,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -380,6 +397,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -404,6 +422,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -428,6 +447,7 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -470,6 +490,7 @@ func RegisterRoleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RoleClient" to call the correct interceptors. func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleClient) error { + mux.Handle("POST", pattern_Role_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -489,6 +510,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -510,6 +532,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -531,6 +554,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -552,6 +576,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -573,6 +598,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -594,6 +620,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Role_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -615,6 +642,7 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/managementpb/role/role.swagger.json b/api/managementpb/role/role.swagger.json new file mode 100644 index 0000000000..47a71ee981 --- /dev/null +++ b/api/managementpb/role/role.swagger.json @@ -0,0 +1,440 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/role/role.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Role" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Role/Assign": { + "post": { + "summary": "Assign Roles", + "description": "Assigns Roles replaces all existing Roles for a User.", + "operationId": "AssignRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1AssignRolesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1AssignRolesRequest" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/v1/management/Role/Create": { + "post": { + "summary": "Create Role", + "description": "Creates a new Role.", + "operationId": "CreateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1CreateRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1CreateRoleRequest" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/v1/management/Role/Delete": { + "post": { + "summary": "Delete Role", + "description": "Deletes a Role.", + "operationId": "DeleteRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1DeleteRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1DeleteRoleRequest" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/v1/management/Role/Get": { + "post": { + "summary": "Get Role", + "description": "Retrieves a Role by ID.", + "operationId": "GetRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1GetRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1GetRoleRequest" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/v1/management/Role/List": { + "post": { + "summary": "List Roles", + "description": "Lists Roles.", + "operationId": "ListRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListRolesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListRolesRequest" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/v1/management/Role/SetDefault": { + "post": { + "summary": "Set default Role", + "description": "Configures default Role assigned to Users.", + "operationId": "SetDefaultRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1SetDefaultRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1SetDefaultRoleRequest" + } + } + ], + "tags": [ + "Role" + ] + } + }, + "/v1/management/Role/Update": { + "post": { + "summary": "Update Role", + "description": "Updates an existing Role.", + "operationId": "UpdateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1UpdateRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1UpdateRoleRequest" + } + } + ], + "tags": [ + "Role" + ] + } + } + }, + "definitions": { + "ListRolesResponseRoleData": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1AssignRolesRequest": { + "type": "object", + "properties": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "user_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1AssignRolesResponse": { + "type": "object" + }, + "v1beta1CreateRoleRequest": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "v1beta1CreateRoleResponse": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1DeleteRoleRequest": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + }, + "replacement_role_id": { + "type": "integer", + "format": "int64", + "description": "Role ID to be used as a replacement for the role. Additional logic applies." + } + } + }, + "v1beta1DeleteRoleResponse": { + "type": "object" + }, + "v1beta1GetRoleRequest": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1GetRoleResponse": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "v1beta1ListRolesRequest": { + "type": "object" + }, + "v1beta1ListRolesResponse": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ListRolesResponseRoleData" + } + } + } + }, + "v1beta1SetDefaultRoleRequest": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1SetDefaultRoleResponse": { + "type": "object" + }, + "v1beta1UpdateRoleRequest": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "v1beta1UpdateRoleResponse": { + "type": "object" + } + } +} diff --git a/api/managementpb/role/role_grpc.pb.go b/api/managementpb/role/role_grpc.pb.go index 84a7298d54..084d6e2276 100644 --- a/api/managementpb/role/role_grpc.pb.go +++ b/api/managementpb/role/role_grpc.pb.go @@ -8,7 +8,6 @@ package rolev1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -142,32 +141,27 @@ type RoleServer interface { } // UnimplementedRoleServer must be embedded to have forward compatible implementations. -type UnimplementedRoleServer struct{} +type UnimplementedRoleServer struct { +} func (UnimplementedRoleServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") } - func (UnimplementedRoleServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } - func (UnimplementedRoleServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } - func (UnimplementedRoleServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") } - func (UnimplementedRoleServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented") } - func (UnimplementedRoleServer) AssignRoles(context.Context, *AssignRolesRequest) (*AssignRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AssignRoles not implemented") } - func (UnimplementedRoleServer) SetDefaultRole(context.Context, *SetDefaultRoleRequest) (*SetDefaultRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetDefaultRole not implemented") } diff --git a/api/managementpb/service.pb.go b/api/managementpb/service.pb.go index 48647c2d68..a09d4b3bf6 100644 --- a/api/managementpb/service.pb.go +++ b/api/managementpb/service.pb.go @@ -7,16 +7,14 @@ package managementpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -352,18 +350,15 @@ func file_managementpb_service_proto_rawDescGZIP() []byte { return file_managementpb_service_proto_rawDescData } -var ( - file_managementpb_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) - file_managementpb_service_proto_goTypes = []interface{}{ - (*AddNodeParams)(nil), // 0: management.AddNodeParams - (*RemoveServiceRequest)(nil), // 1: management.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 2: management.RemoveServiceResponse - nil, // 3: management.AddNodeParams.CustomLabelsEntry - (inventorypb.NodeType)(0), // 4: inventory.NodeType - (inventorypb.ServiceType)(0), // 5: inventory.ServiceType - } -) - +var file_managementpb_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_managementpb_service_proto_goTypes = []interface{}{ + (*AddNodeParams)(nil), // 0: management.AddNodeParams + (*RemoveServiceRequest)(nil), // 1: management.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 2: management.RemoveServiceResponse + nil, // 3: management.AddNodeParams.CustomLabelsEntry + (inventorypb.NodeType)(0), // 4: inventory.NodeType + (inventorypb.ServiceType)(0), // 5: inventory.ServiceType +} var file_managementpb_service_proto_depIdxs = []int32{ 4, // 0: management.AddNodeParams.node_type:type_name -> inventory.NodeType 3, // 1: management.AddNodeParams.custom_labels:type_name -> management.AddNodeParams.CustomLabelsEntry diff --git a/api/managementpb/service.pb.gw.go b/api/managementpb/service.pb.gw.go index c8998723c2..30d68dd5bd 100644 --- a/api/managementpb/service.pb.gw.go +++ b/api/managementpb/service.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Service_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest @@ -47,6 +45,7 @@ func request_Service_RemoveService_0(ctx context.Context, marshaler runtime.Mars msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtim msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err + } // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". @@ -70,6 +70,7 @@ func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtim // 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 RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { + mux.Handle("POST", pattern_Service_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Service_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServiceClient" to call the correct interceptors. func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error { + mux.Handle("POST", pattern_Service_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Service_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_Service_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "Remove"}, "")) +var ( + pattern_Service_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "Remove"}, "")) +) -var forward_Service_RemoveService_0 = runtime.ForwardResponseMessage +var ( + forward_Service_RemoveService_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/service.swagger.json b/api/managementpb/service.swagger.json new file mode 100644 index 0000000000..7be4e886ac --- /dev/null +++ b/api/managementpb/service.swagger.json @@ -0,0 +1,118 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Service" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Service/Remove": { + "post": { + "summary": "Remove Service", + "description": "Removes a Service along with Agents.", + "operationId": "RemoveService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/managementRemoveServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/managementRemoveServiceRequest" + } + } + ], + "tags": [ + "Service" + ] + } + } + }, + "definitions": { + "inventoryServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_INVALID", + "MYSQL_SERVICE", + "MONGODB_SERVICE", + "POSTGRESQL_SERVICE", + "PROXYSQL_SERVICE", + "HAPROXY_SERVICE", + "EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_INVALID", + "description": "ServiceType describes supported Service types." + }, + "managementRemoveServiceRequest": { + "type": "object", + "properties": { + "service_type": { + "$ref": "#/definitions/inventoryServiceType", + "description": "Service type." + }, + "service_id": { + "type": "string", + "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + } + } + }, + "managementRemoveServiceResponse": { + "type": "object" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go b/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go index 5aa00c1906..2b2361678f 100644 --- a/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go +++ b/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + // Body. Body ListServicesBody @@ -129,6 +130,7 @@ func (o *ListServicesParams) SetBody(body ListServicesBody) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/service/json/client/mgmt_service/list_services_responses.go b/api/managementpb/service/json/client/mgmt_service/list_services_responses.go index fdc3b2c330..69d235ac85 100644 --- a/api/managementpb/service/json/client/mgmt_service/list_services_responses.go +++ b/api/managementpb/service/json/client/mgmt_service/list_services_responses.go @@ -62,12 +62,12 @@ type ListServicesOK struct { func (o *ListServicesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Service/List][%d] listServicesOk %+v", 200, o.Payload) } - func (o *ListServicesOK) GetPayload() *ListServicesOKBody { return o.Payload } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListServicesDefault) Code() int { func (o *ListServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Service/List][%d] ListServices default %+v", o._statusCode, o.Payload) } - func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { return o.Payload } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -125,6 +125,7 @@ ListServicesBody list services body swagger:model ListServicesBody */ type ListServicesBody struct { + // Return only Services running on that Node. NodeID string `json:"node_id,omitempty"` @@ -235,6 +236,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -300,7 +302,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -311,6 +315,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -339,6 +344,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -376,6 +382,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // List of Services. Services []*ListServicesOKBodyServicesItems0 `json:"services"` } @@ -435,7 +442,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if err := o.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -446,6 +455,7 @@ func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, format return err } } + } return nil @@ -474,6 +484,7 @@ ListServicesOKBodyServicesItems0 list services OK body services items0 swagger:model ListServicesOKBodyServicesItems0 */ type ListServicesOKBodyServicesItems0 struct { + // Unique service identifier. ServiceID string `json:"service_id,omitempty"` @@ -679,7 +690,9 @@ func (o *ListServicesOKBodyServicesItems0) ContextValidate(ctx context.Context, } func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -690,6 +703,7 @@ func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Con return err } } + } return nil @@ -718,6 +732,7 @@ ListServicesOKBodyServicesItems0AgentsItems0 list services OK body services item swagger:model ListServicesOKBodyServicesItems0AgentsItems0 */ type ListServicesOKBodyServicesItems0AgentsItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -1001,6 +1016,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) ContextValidate(ctx conte } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { + if o.AzureOptions != nil { if err := o.AzureOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1016,6 +1032,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBOptions != nil { if err := o.MongoDBOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1031,6 +1048,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOpt } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlOptions != nil { if err := o.MysqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1046,6 +1064,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlOptions != nil { if err := o.PostgresqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1083,6 +1102,7 @@ ListServicesOKBodyServicesItems0AgentsItems0AzureOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0AzureOptions */ type ListServicesOKBodyServicesItems0AgentsItems0AzureOptions struct { + // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1132,6 +1152,7 @@ ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions list services OK body swagger:model ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions struct { + // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1190,6 +1211,7 @@ ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions struct { + // TLS CA certificate. TLSCa string `json:"tls_ca,omitempty"` @@ -1233,6 +1255,7 @@ ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions list services OK b swagger:model ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions struct { + // TLS CA certificate. SslCa string `json:"ssl_ca,omitempty"` diff --git a/api/managementpb/service/service.pb.go b/api/managementpb/service/service.pb.go index 46248b0da4..6733be5fa4 100644 --- a/api/managementpb/service/service.pb.go +++ b/api/managementpb/service/service.pb.go @@ -7,17 +7,15 @@ package servicev1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + inventorypb "github.com/percona/pmm/api/inventorypb" + agent "github.com/percona/pmm/api/managementpb/agent" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - inventorypb "github.com/percona/pmm/api/inventorypb" - agent "github.com/percona/pmm/api/managementpb/agent" + reflect "reflect" + sync "sync" ) const ( @@ -530,21 +528,18 @@ func file_managementpb_service_service_proto_rawDescGZIP() []byte { return file_managementpb_service_service_proto_rawDescData } -var ( - file_managementpb_service_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_service_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) - file_managementpb_service_service_proto_goTypes = []interface{}{ - (UniversalService_Status)(0), // 0: service.v1beta1.UniversalService.Status - (*UniversalService)(nil), // 1: service.v1beta1.UniversalService - (*ListServiceRequest)(nil), // 2: service.v1beta1.ListServiceRequest - (*ListServiceResponse)(nil), // 3: service.v1beta1.ListServiceResponse - nil, // 4: service.v1beta1.UniversalService.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*agent.UniversalAgent)(nil), // 6: agent.v1beta1.UniversalAgent - (inventorypb.ServiceType)(0), // 7: inventory.ServiceType - } -) - +var file_managementpb_service_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_service_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_managementpb_service_service_proto_goTypes = []interface{}{ + (UniversalService_Status)(0), // 0: service.v1beta1.UniversalService.Status + (*UniversalService)(nil), // 1: service.v1beta1.UniversalService + (*ListServiceRequest)(nil), // 2: service.v1beta1.ListServiceRequest + (*ListServiceResponse)(nil), // 3: service.v1beta1.ListServiceResponse + nil, // 4: service.v1beta1.UniversalService.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*agent.UniversalAgent)(nil), // 6: agent.v1beta1.UniversalAgent + (inventorypb.ServiceType)(0), // 7: inventory.ServiceType +} var file_managementpb_service_service_proto_depIdxs = []int32{ 4, // 0: service.v1beta1.UniversalService.custom_labels:type_name -> service.v1beta1.UniversalService.CustomLabelsEntry 5, // 1: service.v1beta1.UniversalService.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/service/service.pb.gw.go b/api/managementpb/service/service.pb.gw.go index 12ebf2d2db..b7ff8d5458 100644 --- a/api/managementpb/service/service.pb.gw.go +++ b/api/managementpb/service/service.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_MgmtService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client MgmtServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServiceRequest @@ -47,6 +45,7 @@ func request_MgmtService_ListServices_0(ctx context.Context, marshaler runtime.M msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_MgmtService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server MgmtServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_MgmtService_ListServices_0(ctx context.Context, marshaler run msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err + } // RegisterMgmtServiceHandlerServer registers the http handlers for service MgmtService to "mux". @@ -70,6 +70,7 @@ func local_request_MgmtService_ListServices_0(ctx context.Context, marshaler run // 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 RegisterMgmtServiceHandlerFromEndpoint instead. func RegisterMgmtServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MgmtServiceServer) error { + mux.Handle("POST", pattern_MgmtService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterMgmtServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_MgmtService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterMgmtServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MgmtServiceClient" to call the correct interceptors. func RegisterMgmtServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MgmtServiceClient) error { + mux.Handle("POST", pattern_MgmtService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterMgmtServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_MgmtService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_MgmtService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "List"}, "")) +var ( + pattern_MgmtService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "List"}, "")) +) -var forward_MgmtService_ListServices_0 = runtime.ForwardResponseMessage +var ( + forward_MgmtService_ListServices_0 = runtime.ForwardResponseMessage +) diff --git a/api/managementpb/service/service.swagger.json b/api/managementpb/service/service.swagger.json new file mode 100644 index 0000000000..20f84c862a --- /dev/null +++ b/api/managementpb/service/service.swagger.json @@ -0,0 +1,500 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/service/service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "MgmtService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/Service/List": { + "post": { + "summary": "List Services", + "description": "Returns a filtered list of Services.", + "operationId": "ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ListServiceRequest" + } + } + ], + "tags": [ + "MgmtService" + ] + } + } + }, + "definitions": { + "UniversalAgentAzureOptions": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "Azure client ID." + }, + "is_client_secret_set": { + "type": "boolean", + "description": "True if Azure client secret is set." + }, + "resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "subscription_id": { + "type": "string", + "description": "Azure subscription ID." + }, + "tenant_id": { + "type": "string", + "description": "Azure tenant ID." + } + } + }, + "UniversalAgentMongoDBOptions": { + "type": "object", + "properties": { + "is_tls_certificate_key_set": { + "type": "boolean", + "description": "True if TLS certificate is set." + }, + "is_tls_certificate_key_file_password_set": { + "type": "boolean", + "description": "True if TLS certificate file password is set." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "authentication_mechanism": { + "type": "string", + "description": "MongoDB auth mechanism." + }, + "authentication_database": { + "type": "string", + "description": "MongoDB auth database." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "description": "MongoDB stats collections." + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "description": "MongoDB collections limit." + }, + "enable_all_collectors": { + "type": "boolean", + "description": "True if all collectors are enabled." + } + } + }, + "UniversalAgentMySQLOptions": { + "type": "object", + "properties": { + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS certificate." + }, + "is_tls_key_set": { + "type": "boolean", + "description": "True if TLS key is set." + } + } + }, + "UniversalAgentPostgreSQLOptions": { + "type": "object", + "properties": { + "ssl_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "ssl_cert": { + "type": "string", + "description": "TLS certificate." + }, + "is_ssl_key_set": { + "type": "boolean", + "description": "True if TLS key is set." + } + } + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "inventoryServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_INVALID", + "MYSQL_SERVICE", + "MONGODB_SERVICE", + "POSTGRESQL_SERVICE", + "PROXYSQL_SERVICE", + "HAPROXY_SERVICE", + "EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_INVALID", + "description": "ServiceType describes supported Service types." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1beta1ListServiceRequest": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Return only Services running on that Node." + }, + "service_type": { + "$ref": "#/definitions/inventoryServiceType", + "description": "Return only services filtered by service type." + }, + "external_group": { + "type": "string", + "description": "Return only services in this external group." + } + } + }, + "v1beta1ListServiceResponse": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1UniversalService" + }, + "description": "List of Services." + } + } + }, + "v1beta1UniversalAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique agent identifier." + }, + "is_agent_password_set": { + "type": "boolean", + "description": "True if the agent password is set." + }, + "agent_type": { + "type": "string", + "description": "Agent type." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "is_aws_secret_key_set": { + "type": "boolean", + "description": "True if AWS Secret Key is set." + }, + "azure_options": { + "$ref": "#/definitions/UniversalAgentAzureOptions", + "description": "Options used for connecting to Azure." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "log_level": { + "type": "string", + "description": "Log level for exporter." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN." + }, + "max_query_log_size": { + "type": "string", + "format": "int64", + "description": "Limit query log size in QAN." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "metrics_scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "mongo_db_options": { + "$ref": "#/definitions/UniversalAgentMongoDBOptions", + "description": "TLS and other options for connecting to MongoDB." + }, + "mysql_options": { + "$ref": "#/definitions/UniversalAgentMySQLOptions", + "description": "TLS options for connecting to MySQL." + }, + "node_id": { + "type": "string", + "description": "A unique node identifier." + }, + "is_password_set": { + "type": "boolean", + "description": "True if password for connecting the agent to the database is set." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier." + }, + "postgresql_options": { + "$ref": "#/definitions/UniversalAgentPostgreSQLOptions", + "description": "TLS options for connecting to PostgreSQL." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "push_metrics": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "comments_parsing_disabled": { + "type": "boolean", + "description": "True if query comments parsing is disabled." + }, + "rds_basic_metrics_disabled": { + "type": "boolean", + "description": "True if RDS basic metrics are disdabled." + }, + "rds_enhanced_metrics_disabled": { + "type": "boolean", + "description": "True if RDS enhanced metrics are disdabled." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "status": { + "type": "string", + "description": "Actual Agent status." + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Last known table count." + }, + "table_count_tablestats_group_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "version": { + "type": "string", + "description": "Agent version." + }, + "is_connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + } + } + }, + "v1beta1UniversalService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique service identifier." + }, + "service_type": { + "type": "string", + "description": "Service type." + }, + "service_name": { + "type": "string", + "description": "User-defined name unique across all Services." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "node_name": { + "type": "string", + "description": "Node name where this instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "external_group": { + "type": "string", + "description": "External group name." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "agents": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1UniversalAgent" + }, + "description": "List of agents related to this service." + }, + "status": { + "$ref": "#/definitions/v1beta1UniversalServiceStatus", + "description": "The health status of the service." + } + } + }, + "v1beta1UniversalServiceStatus": { + "type": "string", + "enum": [ + "STATUS_INVALID", + "UP", + "DOWN", + "UNKNOWN" + ], + "default": "STATUS_INVALID", + "description": "Service status.\n\n - STATUS_INVALID: In case we don't support the db vendor yet.\n - UP: The service is up.\n - DOWN: The service is down.\n - UNKNOWN: The service's status cannot be known (e.g. there are no metrics yet)." + } + } +} diff --git a/api/managementpb/service/service_grpc.pb.go b/api/managementpb/service/service_grpc.pb.go index 41509487cb..37486ce2f7 100644 --- a/api/managementpb/service/service_grpc.pb.go +++ b/api/managementpb/service/service_grpc.pb.go @@ -8,7 +8,6 @@ package servicev1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type MgmtServiceServer interface { } // UnimplementedMgmtServiceServer must be embedded to have forward compatible implementations. -type UnimplementedMgmtServiceServer struct{} +type UnimplementedMgmtServiceServer struct { +} func (UnimplementedMgmtServiceServer) ListServices(context.Context, *ListServiceRequest) (*ListServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") diff --git a/api/managementpb/service_grpc.pb.go b/api/managementpb/service_grpc.pb.go index 949cf2ebad..1e1ba99100 100644 --- a/api/managementpb/service_grpc.pb.go +++ b/api/managementpb/service_grpc.pb.go @@ -8,7 +8,6 @@ package managementpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type ServiceServer interface { } // UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct{} +type UnimplementedServiceServer struct { +} func (UnimplementedServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") diff --git a/api/managementpb/severity.pb.go b/api/managementpb/severity.pb.go index d7fa52c9c5..0f8281ef23 100644 --- a/api/managementpb/severity.pb.go +++ b/api/managementpb/severity.pb.go @@ -7,11 +7,10 @@ package managementpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -131,13 +130,10 @@ func file_managementpb_severity_proto_rawDescGZIP() []byte { return file_managementpb_severity_proto_rawDescData } -var ( - file_managementpb_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_managementpb_severity_proto_goTypes = []interface{}{ - (Severity)(0), // 0: management.Severity - } -) - +var file_managementpb_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_managementpb_severity_proto_goTypes = []interface{}{ + (Severity)(0), // 0: management.Severity +} var file_managementpb_severity_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/severity.swagger.json b/api/managementpb/severity.swagger.json new file mode 100644 index 0000000000..27c5fe7813 --- /dev/null +++ b/api/managementpb/severity.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "managementpb/severity.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/platformpb/json/client/platform/connect_parameters.go b/api/platformpb/json/client/platform/connect_parameters.go index 59a1edc83b..a12d7ec6ab 100644 --- a/api/platformpb/json/client/platform/connect_parameters.go +++ b/api/platformpb/json/client/platform/connect_parameters.go @@ -60,6 +60,7 @@ ConnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ConnectParams struct { + // Body. Body ConnectBody @@ -129,6 +130,7 @@ func (o *ConnectParams) SetBody(body ConnectBody) { // WriteToRequest writes these params to a swagger request func (o *ConnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/connect_responses.go b/api/platformpb/json/client/platform/connect_responses.go index 20c28115f6..b7c2a07bb7 100644 --- a/api/platformpb/json/client/platform/connect_responses.go +++ b/api/platformpb/json/client/platform/connect_responses.go @@ -60,12 +60,12 @@ type ConnectOK struct { func (o *ConnectOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/Connect][%d] connectOk %+v", 200, o.Payload) } - func (o *ConnectOK) GetPayload() interface{} { return o.Payload } func (o *ConnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ConnectDefault) Code() int { func (o *ConnectDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/Connect][%d] Connect default %+v", o._statusCode, o.Payload) } - func (o *ConnectDefault) GetPayload() *ConnectDefaultBody { return o.Payload } func (o *ConnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ConnectDefaultBody) // response payload @@ -121,6 +121,7 @@ ConnectBody connect body swagger:model ConnectBody */ type ConnectBody struct { + // User defined human readable PMM Server Name. ServerName string `json:"server_name,omitempty"` @@ -167,6 +168,7 @@ ConnectDefaultBody connect default body swagger:model ConnectDefaultBody */ type ConnectDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -232,7 +234,9 @@ func (o *ConnectDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,6 +247,7 @@ func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -271,6 +276,7 @@ ConnectDefaultBodyDetailsItems0 connect default body details items0 swagger:model ConnectDefaultBodyDetailsItems0 */ type ConnectDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platformpb/json/client/platform/disconnect_parameters.go b/api/platformpb/json/client/platform/disconnect_parameters.go index a7aa5c50e1..99956f968a 100644 --- a/api/platformpb/json/client/platform/disconnect_parameters.go +++ b/api/platformpb/json/client/platform/disconnect_parameters.go @@ -60,6 +60,7 @@ DisconnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DisconnectParams struct { + // Body. Body DisconnectBody @@ -129,6 +130,7 @@ func (o *DisconnectParams) SetBody(body DisconnectBody) { // WriteToRequest writes these params to a swagger request func (o *DisconnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/disconnect_responses.go b/api/platformpb/json/client/platform/disconnect_responses.go index 6ea415058e..f27f6052f4 100644 --- a/api/platformpb/json/client/platform/disconnect_responses.go +++ b/api/platformpb/json/client/platform/disconnect_responses.go @@ -60,12 +60,12 @@ type DisconnectOK struct { func (o *DisconnectOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/Disconnect][%d] disconnectOk %+v", 200, o.Payload) } - func (o *DisconnectOK) GetPayload() interface{} { return o.Payload } func (o *DisconnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DisconnectDefault) Code() int { func (o *DisconnectDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/Disconnect][%d] Disconnect default %+v", o._statusCode, o.Payload) } - func (o *DisconnectDefault) GetPayload() *DisconnectDefaultBody { return o.Payload } func (o *DisconnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DisconnectDefaultBody) // response payload @@ -121,6 +121,7 @@ DisconnectBody disconnect body swagger:model DisconnectBody */ type DisconnectBody struct { + // Forces the cleanup process for connected PMM instances regardless of the Portal API response Force bool `json:"force,omitempty"` } @@ -158,6 +159,7 @@ DisconnectDefaultBody disconnect default body swagger:model DisconnectDefaultBody */ type DisconnectDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *DisconnectDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -262,6 +267,7 @@ DisconnectDefaultBodyDetailsItems0 disconnect default body details items0 swagger:model DisconnectDefaultBodyDetailsItems0 */ type DisconnectDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platformpb/json/client/platform/get_contact_information_parameters.go b/api/platformpb/json/client/platform/get_contact_information_parameters.go index 33c2ad7236..9464f5e560 100644 --- a/api/platformpb/json/client/platform/get_contact_information_parameters.go +++ b/api/platformpb/json/client/platform/get_contact_information_parameters.go @@ -60,6 +60,7 @@ GetContactInformationParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type GetContactInformationParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *GetContactInformationParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetContactInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/get_contact_information_responses.go b/api/platformpb/json/client/platform/get_contact_information_responses.go index 81cf1651b0..c1eb711c91 100644 --- a/api/platformpb/json/client/platform/get_contact_information_responses.go +++ b/api/platformpb/json/client/platform/get_contact_information_responses.go @@ -60,12 +60,12 @@ type GetContactInformationOK struct { func (o *GetContactInformationOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/GetContactInformation][%d] getContactInformationOk %+v", 200, o.Payload) } - func (o *GetContactInformationOK) GetPayload() *GetContactInformationOKBody { return o.Payload } func (o *GetContactInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetContactInformationOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetContactInformationDefault) Code() int { func (o *GetContactInformationDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/GetContactInformation][%d] GetContactInformation default %+v", o._statusCode, o.Payload) } - func (o *GetContactInformationDefault) GetPayload() *GetContactInformationDefaultBody { return o.Payload } func (o *GetContactInformationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetContactInformationDefaultBody) // response payload @@ -123,6 +123,7 @@ GetContactInformationDefaultBody get contact information default body swagger:model GetContactInformationDefaultBody */ type GetContactInformationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *GetContactInformationDefaultBody) ContextValidate(ctx context.Context, } func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -227,6 +231,7 @@ GetContactInformationDefaultBodyDetailsItems0 get contact information default bo swagger:model GetContactInformationDefaultBodyDetailsItems0 */ type GetContactInformationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ GetContactInformationOKBody get contact information OK body swagger:model GetContactInformationOKBody */ type GetContactInformationOKBody struct { + // URL to open a new support ticket. NewTicketURL string `json:"new_ticket_url,omitempty"` @@ -319,6 +325,7 @@ func (o *GetContactInformationOKBody) ContextValidate(ctx context.Context, forma } func (o *GetContactInformationOKBody) contextValidateCustomerSuccess(ctx context.Context, formats strfmt.Registry) error { + if o.CustomerSuccess != nil { if err := o.CustomerSuccess.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -356,6 +363,7 @@ GetContactInformationOKBodyCustomerSuccess CustomerSuccess contains the contanct swagger:model GetContactInformationOKBodyCustomerSuccess */ type GetContactInformationOKBodyCustomerSuccess struct { + // name Name string `json:"name,omitempty"` diff --git a/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go b/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go index f13a953027..e7ab2c3344 100644 --- a/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go +++ b/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go @@ -60,6 +60,7 @@ SearchOrganizationEntitlementsParams contains all the parameters to send to the Typically these are written to a http.Request. */ type SearchOrganizationEntitlementsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *SearchOrganizationEntitlementsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationEntitlementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/search_organization_entitlements_responses.go b/api/platformpb/json/client/platform/search_organization_entitlements_responses.go index 4b8dc1c532..5150f6824e 100644 --- a/api/platformpb/json/client/platform/search_organization_entitlements_responses.go +++ b/api/platformpb/json/client/platform/search_organization_entitlements_responses.go @@ -61,12 +61,12 @@ type SearchOrganizationEntitlementsOK struct { func (o *SearchOrganizationEntitlementsOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationEntitlements][%d] searchOrganizationEntitlementsOk %+v", 200, o.Payload) } - func (o *SearchOrganizationEntitlementsOK) GetPayload() *SearchOrganizationEntitlementsOKBody { return o.Payload } func (o *SearchOrganizationEntitlementsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationEntitlementsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *SearchOrganizationEntitlementsDefault) Code() int { func (o *SearchOrganizationEntitlementsDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationEntitlements][%d] SearchOrganizationEntitlements default %+v", o._statusCode, o.Payload) } - func (o *SearchOrganizationEntitlementsDefault) GetPayload() *SearchOrganizationEntitlementsDefaultBody { return o.Payload } func (o *SearchOrganizationEntitlementsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationEntitlementsDefaultBody) // response payload @@ -124,6 +124,7 @@ SearchOrganizationEntitlementsDefaultBody search organization entitlements defau swagger:model SearchOrganizationEntitlementsDefaultBody */ type SearchOrganizationEntitlementsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -189,7 +190,9 @@ func (o *SearchOrganizationEntitlementsDefaultBody) ContextValidate(ctx context. } func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -200,6 +203,7 @@ func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx c return err } } + } return nil @@ -228,6 +232,7 @@ SearchOrganizationEntitlementsDefaultBodyDetailsItems0 search organization entit swagger:model SearchOrganizationEntitlementsDefaultBodyDetailsItems0 */ type SearchOrganizationEntitlementsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -265,6 +270,7 @@ SearchOrganizationEntitlementsOKBody search organization entitlements OK body swagger:model SearchOrganizationEntitlementsOKBody */ type SearchOrganizationEntitlementsOKBody struct { + // entitlements Entitlements []*SearchOrganizationEntitlementsOKBodyEntitlementsItems0 `json:"entitlements"` } @@ -324,7 +330,9 @@ func (o *SearchOrganizationEntitlementsOKBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Entitlements); i++ { + if o.Entitlements[i] != nil { if err := o.Entitlements[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -335,6 +343,7 @@ func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx c return err } } + } return nil @@ -363,6 +372,7 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0 OrganizationEntitlement c swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0 */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0 struct { + // Entitlement number. Number string `json:"number,omitempty"` @@ -481,6 +491,7 @@ func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) ContextValidate } func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) contextValidatePlatform(ctx context.Context, formats strfmt.Registry) error { + if o.Platform != nil { if err := o.Platform.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -518,6 +529,7 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform Platform indicate swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform struct { + // Flag indicates that security advisors are covered by this entitlement. SecurityAdvisor string `json:"security_advisor,omitempty"` diff --git a/api/platformpb/json/client/platform/search_organization_tickets_parameters.go b/api/platformpb/json/client/platform/search_organization_tickets_parameters.go index 61a7269406..72ef0b2a0c 100644 --- a/api/platformpb/json/client/platform/search_organization_tickets_parameters.go +++ b/api/platformpb/json/client/platform/search_organization_tickets_parameters.go @@ -60,6 +60,7 @@ SearchOrganizationTicketsParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type SearchOrganizationTicketsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *SearchOrganizationTicketsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/search_organization_tickets_responses.go b/api/platformpb/json/client/platform/search_organization_tickets_responses.go index 36c5824177..5fd1e2f7fb 100644 --- a/api/platformpb/json/client/platform/search_organization_tickets_responses.go +++ b/api/platformpb/json/client/platform/search_organization_tickets_responses.go @@ -61,12 +61,12 @@ type SearchOrganizationTicketsOK struct { func (o *SearchOrganizationTicketsOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationTickets][%d] searchOrganizationTicketsOk %+v", 200, o.Payload) } - func (o *SearchOrganizationTicketsOK) GetPayload() *SearchOrganizationTicketsOKBody { return o.Payload } func (o *SearchOrganizationTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationTicketsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *SearchOrganizationTicketsDefault) Code() int { func (o *SearchOrganizationTicketsDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationTickets][%d] SearchOrganizationTickets default %+v", o._statusCode, o.Payload) } - func (o *SearchOrganizationTicketsDefault) GetPayload() *SearchOrganizationTicketsDefaultBody { return o.Payload } func (o *SearchOrganizationTicketsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationTicketsDefaultBody) // response payload @@ -124,6 +124,7 @@ SearchOrganizationTicketsDefaultBody search organization tickets default body swagger:model SearchOrganizationTicketsDefaultBody */ type SearchOrganizationTicketsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -189,7 +190,9 @@ func (o *SearchOrganizationTicketsDefaultBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -200,6 +203,7 @@ func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx contex return err } } + } return nil @@ -228,6 +232,7 @@ SearchOrganizationTicketsDefaultBodyDetailsItems0 search organization tickets de swagger:model SearchOrganizationTicketsDefaultBodyDetailsItems0 */ type SearchOrganizationTicketsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -265,6 +270,7 @@ SearchOrganizationTicketsOKBody search organization tickets OK body swagger:model SearchOrganizationTicketsOKBody */ type SearchOrganizationTicketsOKBody struct { + // Support tickets belonging to the Percona Portal Organization. Tickets []*SearchOrganizationTicketsOKBodyTicketsItems0 `json:"tickets"` } @@ -324,7 +330,9 @@ func (o *SearchOrganizationTicketsOKBody) ContextValidate(ctx context.Context, f } func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Tickets); i++ { + if o.Tickets[i] != nil { if err := o.Tickets[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -335,6 +343,7 @@ func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Con return err } } + } return nil @@ -363,6 +372,7 @@ SearchOrganizationTicketsOKBodyTicketsItems0 OrganizationTicket contains informa swagger:model SearchOrganizationTicketsOKBodyTicketsItems0 */ type SearchOrganizationTicketsOKBodyTicketsItems0 struct { + // Ticket number. Number string `json:"number,omitempty"` diff --git a/api/platformpb/json/client/platform/server_info_parameters.go b/api/platformpb/json/client/platform/server_info_parameters.go index 895075df3b..a3e7ec413f 100644 --- a/api/platformpb/json/client/platform/server_info_parameters.go +++ b/api/platformpb/json/client/platform/server_info_parameters.go @@ -60,6 +60,7 @@ ServerInfoParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ServerInfoParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ServerInfoParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ServerInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/server_info_responses.go b/api/platformpb/json/client/platform/server_info_responses.go index 96d64f9b2b..394cd51d9b 100644 --- a/api/platformpb/json/client/platform/server_info_responses.go +++ b/api/platformpb/json/client/platform/server_info_responses.go @@ -60,12 +60,12 @@ type ServerInfoOK struct { func (o *ServerInfoOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/ServerInfo][%d] serverInfoOk %+v", 200, o.Payload) } - func (o *ServerInfoOK) GetPayload() *ServerInfoOKBody { return o.Payload } func (o *ServerInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ServerInfoOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ServerInfoDefault) Code() int { func (o *ServerInfoDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/ServerInfo][%d] ServerInfo default %+v", o._statusCode, o.Payload) } - func (o *ServerInfoDefault) GetPayload() *ServerInfoDefaultBody { return o.Payload } func (o *ServerInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ServerInfoDefaultBody) // response payload @@ -123,6 +123,7 @@ ServerInfoDefaultBody server info default body swagger:model ServerInfoDefaultBody */ type ServerInfoDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *ServerInfoDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -227,6 +231,7 @@ ServerInfoDefaultBodyDetailsItems0 server info default body details items0 swagger:model ServerInfoDefaultBodyDetailsItems0 */ type ServerInfoDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ ServerInfoOKBody server info OK body swagger:model ServerInfoOKBody */ type ServerInfoOKBody struct { + // pmm server name PMMServerName string `json:"pmm_server_name,omitempty"` diff --git a/api/platformpb/json/client/platform/user_status_parameters.go b/api/platformpb/json/client/platform/user_status_parameters.go index e8ef6ea0bf..1e08b3597a 100644 --- a/api/platformpb/json/client/platform/user_status_parameters.go +++ b/api/platformpb/json/client/platform/user_status_parameters.go @@ -60,6 +60,7 @@ UserStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UserStatusParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *UserStatusParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *UserStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/user_status_responses.go b/api/platformpb/json/client/platform/user_status_responses.go index 1456954c54..6c262e490a 100644 --- a/api/platformpb/json/client/platform/user_status_responses.go +++ b/api/platformpb/json/client/platform/user_status_responses.go @@ -60,12 +60,12 @@ type UserStatusOK struct { func (o *UserStatusOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/UserStatus][%d] userStatusOk %+v", 200, o.Payload) } - func (o *UserStatusOK) GetPayload() *UserStatusOKBody { return o.Payload } func (o *UserStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UserStatusOKBody) // response payload @@ -102,12 +102,12 @@ func (o *UserStatusDefault) Code() int { func (o *UserStatusDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/UserStatus][%d] UserStatus default %+v", o._statusCode, o.Payload) } - func (o *UserStatusDefault) GetPayload() *UserStatusDefaultBody { return o.Payload } func (o *UserStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UserStatusDefaultBody) // response payload @@ -123,6 +123,7 @@ UserStatusDefaultBody user status default body swagger:model UserStatusDefaultBody */ type UserStatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *UserStatusDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -227,6 +231,7 @@ UserStatusDefaultBodyDetailsItems0 user status default body details items0 swagger:model UserStatusDefaultBodyDetailsItems0 */ type UserStatusDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ UserStatusOKBody user status OK body swagger:model UserStatusOKBody */ type UserStatusOKBody struct { + // is platform user IsPlatformUser bool `json:"is_platform_user,omitempty"` } diff --git a/api/platformpb/platform.pb.go b/api/platformpb/platform.pb.go index 24e107c697..8454bafbce 100644 --- a/api/platformpb/platform.pb.go +++ b/api/platformpb/platform.pb.go @@ -7,9 +7,6 @@ package platformpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -17,6 +14,8 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) const ( @@ -1361,33 +1360,30 @@ func file_platformpb_platform_proto_rawDescGZIP() []byte { return file_platformpb_platform_proto_rawDescData } -var ( - file_platformpb_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) - file_platformpb_platform_proto_goTypes = []interface{}{ - (*ConnectRequest)(nil), // 0: platform.ConnectRequest - (*ConnectResponse)(nil), // 1: platform.ConnectResponse - (*DisconnectRequest)(nil), // 2: platform.DisconnectRequest - (*DisconnectResponse)(nil), // 3: platform.DisconnectResponse - (*SearchOrganizationTicketsRequest)(nil), // 4: platform.SearchOrganizationTicketsRequest - (*SearchOrganizationTicketsResponse)(nil), // 5: platform.SearchOrganizationTicketsResponse - (*OrganizationTicket)(nil), // 6: platform.OrganizationTicket - (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.SearchOrganizationEntitlementsRequest - (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.SearchOrganizationEntitlementsResponse - (*OrganizationEntitlement)(nil), // 9: platform.OrganizationEntitlement - (*GetContactInformationRequest)(nil), // 10: platform.GetContactInformationRequest - (*GetContactInformationResponse)(nil), // 11: platform.GetContactInformationResponse - (*ServerInfoRequest)(nil), // 12: platform.ServerInfoRequest - (*ServerInfoResponse)(nil), // 13: platform.ServerInfoResponse - (*UserStatusRequest)(nil), // 14: platform.UserStatusRequest - (*UserStatusResponse)(nil), // 15: platform.UserStatusResponse - (*OrganizationEntitlement_Platform)(nil), // 16: platform.OrganizationEntitlement.Platform - (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.GetContactInformationResponse.CustomerSuccess - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*wrapperspb.StringValue)(nil), // 19: google.protobuf.StringValue - (*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue - } -) - +var file_platformpb_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_platformpb_platform_proto_goTypes = []interface{}{ + (*ConnectRequest)(nil), // 0: platform.ConnectRequest + (*ConnectResponse)(nil), // 1: platform.ConnectResponse + (*DisconnectRequest)(nil), // 2: platform.DisconnectRequest + (*DisconnectResponse)(nil), // 3: platform.DisconnectResponse + (*SearchOrganizationTicketsRequest)(nil), // 4: platform.SearchOrganizationTicketsRequest + (*SearchOrganizationTicketsResponse)(nil), // 5: platform.SearchOrganizationTicketsResponse + (*OrganizationTicket)(nil), // 6: platform.OrganizationTicket + (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.SearchOrganizationEntitlementsRequest + (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.SearchOrganizationEntitlementsResponse + (*OrganizationEntitlement)(nil), // 9: platform.OrganizationEntitlement + (*GetContactInformationRequest)(nil), // 10: platform.GetContactInformationRequest + (*GetContactInformationResponse)(nil), // 11: platform.GetContactInformationResponse + (*ServerInfoRequest)(nil), // 12: platform.ServerInfoRequest + (*ServerInfoResponse)(nil), // 13: platform.ServerInfoResponse + (*UserStatusRequest)(nil), // 14: platform.UserStatusRequest + (*UserStatusResponse)(nil), // 15: platform.UserStatusResponse + (*OrganizationEntitlement_Platform)(nil), // 16: platform.OrganizationEntitlement.Platform + (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.GetContactInformationResponse.CustomerSuccess + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*wrapperspb.StringValue)(nil), // 19: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue +} var file_platformpb_platform_proto_depIdxs = []int32{ 6, // 0: platform.SearchOrganizationTicketsResponse.tickets:type_name -> platform.OrganizationTicket 18, // 1: platform.OrganizationTicket.create_time:type_name -> google.protobuf.Timestamp diff --git a/api/platformpb/platform.pb.gw.go b/api/platformpb/platform.pb.gw.go index 914bb13a95..99336535f5 100644 --- a/api/platformpb/platform.pb.gw.go +++ b/api/platformpb/platform.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Platform_Connect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ConnectRequest @@ -47,6 +45,7 @@ func request_Platform_Connect_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.Connect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_Connect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Platform_Connect_0(ctx context.Context, marshaler runtime.Mar msg, err := server.Connect(ctx, &protoReq) return msg, metadata, err + } func request_Platform_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_Platform_Disconnect_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.Disconnect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_Platform_Disconnect_0(ctx context.Context, marshaler runtime. msg, err := server.Disconnect(ctx, &protoReq) return msg, metadata, err + } func request_Platform_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_Platform_SearchOrganizationTickets_0(ctx context.Context, marshaler msg, err := client.SearchOrganizationTickets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_Platform_SearchOrganizationTickets_0(ctx context.Context, mar msg, err := server.SearchOrganizationTickets(ctx, &protoReq) return msg, metadata, err + } func request_Platform_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_Platform_SearchOrganizationEntitlements_0(ctx context.Context, mars msg, err := client.SearchOrganizationEntitlements(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_Platform_SearchOrganizationEntitlements_0(ctx context.Context msg, err := server.SearchOrganizationEntitlements(ctx, &protoReq) return msg, metadata, err + } func request_Platform_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_Platform_GetContactInformation_0(ctx context.Context, marshaler run msg, err := client.GetContactInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_Platform_GetContactInformation_0(ctx context.Context, marshal msg, err := server.GetContactInformation(ctx, &protoReq) return msg, metadata, err + } func request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.ServerInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime. msg, err := server.ServerInfo(ctx, &protoReq) return msg, metadata, err + } func request_Platform_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_Platform_UserStatus_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.UserStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Platform_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_Platform_UserStatus_0(ctx context.Context, marshaler runtime. msg, err := server.UserStatus(ctx, &protoReq) return msg, metadata, err + } // RegisterPlatformHandlerServer registers the http handlers for service Platform to "mux". @@ -262,6 +274,7 @@ func local_request_Platform_UserStatus_0(ctx context.Context, marshaler runtime. // 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 RegisterPlatformHandlerFromEndpoint instead. func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PlatformServer) error { + mux.Handle("POST", pattern_Platform_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -284,6 +297,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -308,6 +322,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -332,6 +347,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,6 +372,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -380,6 +397,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -404,6 +422,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -428,6 +447,7 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -470,6 +490,7 @@ func RegisterPlatformHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PlatformClient" to call the correct interceptors. func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PlatformClient) error { + mux.Handle("POST", pattern_Platform_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -489,6 +510,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -510,6 +532,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -531,6 +554,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -552,6 +576,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -573,6 +598,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -594,6 +620,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Platform_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -615,6 +642,7 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/platformpb/platform.swagger.json b/api/platformpb/platform.swagger.json new file mode 100644 index 0000000000..5326148d18 --- /dev/null +++ b/api/platformpb/platform.swagger.json @@ -0,0 +1,525 @@ +{ + "swagger": "2.0", + "info": { + "title": "Platform API", + "version": "version not set" + }, + "tags": [ + { + "name": "Platform" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/Platform/Connect": { + "post": { + "summary": "Connect", + "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", + "operationId": "Connect", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformConnectResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformConnectRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + }, + "/v1/Platform/Disconnect": { + "post": { + "summary": "Disconnect", + "description": "Disconnect a PMM server from the organization created on Percona Portal.", + "operationId": "Disconnect", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformDisconnectResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformDisconnectRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + }, + "/v1/Platform/GetContactInformation": { + "post": { + "summary": "GetContactInformation", + "description": "GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform.", + "operationId": "GetContactInformation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformGetContactInformationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformGetContactInformationRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + }, + "/v1/Platform/SearchOrganizationEntitlements": { + "post": { + "summary": "SearchOrganizationEntitlements", + "description": "SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to.", + "operationId": "SearchOrganizationEntitlements", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformSearchOrganizationEntitlementsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformSearchOrganizationEntitlementsRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + }, + "/v1/Platform/SearchOrganizationTickets": { + "post": { + "summary": "SearchOrganizationTickets", + "description": "SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", + "operationId": "SearchOrganizationTickets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformSearchOrganizationTicketsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformSearchOrganizationTicketsRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + }, + "/v1/Platform/ServerInfo": { + "post": { + "summary": "ServerInfo", + "description": "ServerInfo returns PMM server ID and name.", + "operationId": "ServerInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformServerInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformServerInfoRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + }, + "/v1/Platform/UserStatus": { + "post": { + "summary": "UserStatus", + "description": "UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not.", + "operationId": "UserStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/platformUserStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/platformUserStatusRequest" + } + } + ], + "tags": [ + "Platform" + ] + } + } + }, + "definitions": { + "GetContactInformationResponseCustomerSuccess": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "description": "CustomerSuccess contains the contanct details of the customer success employee assigned to a customer's account." + }, + "OrganizationEntitlementPlatform": { + "type": "object", + "properties": { + "security_advisor": { + "type": "string", + "description": "Flag indicates that security advisors are covered by this entitlement." + }, + "config_advisor": { + "type": "string", + "description": "Flag indicates that config advisors are covered by this entitlement." + } + }, + "description": "Platform indicates platform specific entitlements." + }, + "platformConnectRequest": { + "type": "object", + "properties": { + "server_name": { + "type": "string", + "description": "User defined human readable PMM Server Name." + }, + "email": { + "type": "string", + "description": "Existing Percona Platform user's email." + }, + "password": { + "type": "string", + "description": "Existing Percona Platform user's password." + }, + "personal_access_token": { + "type": "string", + "description": "Personal Access Token that the user obtains from Percona Portal." + } + } + }, + "platformConnectResponse": { + "type": "object" + }, + "platformDisconnectRequest": { + "type": "object", + "properties": { + "force": { + "type": "boolean", + "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response" + } + } + }, + "platformDisconnectResponse": { + "type": "object" + }, + "platformGetContactInformationRequest": { + "type": "object" + }, + "platformGetContactInformationResponse": { + "type": "object", + "properties": { + "customer_success": { + "$ref": "#/definitions/GetContactInformationResponseCustomerSuccess" + }, + "new_ticket_url": { + "type": "string", + "description": "URL to open a new support ticket." + } + } + }, + "platformOrganizationEntitlement": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Entitlement number." + }, + "name": { + "type": "string", + "description": "Entitlement name." + }, + "summary": { + "type": "string", + "description": "Entitlement short summary." + }, + "tier": { + "type": "string", + "description": "Entitlement tier." + }, + "total_units": { + "type": "string", + "description": "Total units covered by this entitlement." + }, + "unlimited_units": { + "type": "boolean", + "description": "Flag indicates that unlimited units are covered." + }, + "support_level": { + "type": "string", + "description": "Support level covered by this entitlement." + }, + "software_families": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Percona product families covered by this entitlement." + }, + "start_date": { + "type": "string", + "format": "date-time", + "description": "Entitlement start data.\nNote: only date is used here but not time." + }, + "end_date": { + "type": "string", + "format": "date-time", + "description": "Entitlement end date.\nNote: only date is used here but not time." + }, + "platform": { + "$ref": "#/definitions/OrganizationEntitlementPlatform", + "description": "Platform specific options covered by this entitlement." + } + }, + "description": "OrganizationEntitlement contains information about Organization entitlement." + }, + "platformOrganizationTicket": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Ticket number." + }, + "short_description": { + "type": "string", + "description": "Ticket short description." + }, + "priority": { + "type": "string", + "description": "Ticket priority." + }, + "state": { + "type": "string", + "description": "Ticket state." + }, + "create_time": { + "type": "string", + "format": "date-time", + "description": "Ticket creation time." + }, + "department": { + "type": "string", + "description": "Department." + }, + "requester": { + "type": "string", + "description": "Ticket requester." + }, + "task_type": { + "type": "string", + "description": "Task type." + }, + "url": { + "type": "string", + "description": "Ticket url." + } + }, + "description": "OrganizationTicket contains information about the support ticket." + }, + "platformSearchOrganizationEntitlementsRequest": { + "type": "object" + }, + "platformSearchOrganizationEntitlementsResponse": { + "type": "object", + "properties": { + "entitlements": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/platformOrganizationEntitlement" + } + } + } + }, + "platformSearchOrganizationTicketsRequest": { + "type": "object" + }, + "platformSearchOrganizationTicketsResponse": { + "type": "object", + "properties": { + "tickets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/platformOrganizationTicket" + }, + "description": "Support tickets belonging to the Percona Portal Organization." + } + } + }, + "platformServerInfoRequest": { + "type": "object" + }, + "platformServerInfoResponse": { + "type": "object", + "properties": { + "pmm_server_name": { + "type": "string" + }, + "pmm_server_id": { + "type": "string" + }, + "pmm_server_telemetry_id": { + "type": "string" + }, + "connected_to_portal": { + "type": "boolean" + } + } + }, + "platformUserStatusRequest": { + "type": "object" + }, + "platformUserStatusResponse": { + "type": "object", + "properties": { + "is_platform_user": { + "type": "boolean" + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/platformpb/platform_grpc.pb.go b/api/platformpb/platform_grpc.pb.go index efa637bcae..88be1fed02 100644 --- a/api/platformpb/platform_grpc.pb.go +++ b/api/platformpb/platform_grpc.pb.go @@ -8,7 +8,6 @@ package platformpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -142,32 +141,27 @@ type PlatformServer interface { } // UnimplementedPlatformServer must be embedded to have forward compatible implementations. -type UnimplementedPlatformServer struct{} +type UnimplementedPlatformServer struct { +} func (UnimplementedPlatformServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") } - func (UnimplementedPlatformServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Disconnect not implemented") } - func (UnimplementedPlatformServer) SearchOrganizationTickets(context.Context, *SearchOrganizationTicketsRequest) (*SearchOrganizationTicketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationTickets not implemented") } - func (UnimplementedPlatformServer) SearchOrganizationEntitlements(context.Context, *SearchOrganizationEntitlementsRequest) (*SearchOrganizationEntitlementsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationEntitlements not implemented") } - func (UnimplementedPlatformServer) GetContactInformation(context.Context, *GetContactInformationRequest) (*GetContactInformationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetContactInformation not implemented") } - func (UnimplementedPlatformServer) ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServerInfo not implemented") } - func (UnimplementedPlatformServer) UserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserStatus not implemented") } diff --git a/api/qanpb/collector.pb.go b/api/qanpb/collector.pb.go index 41552690e9..dccdaa69d3 100644 --- a/api/qanpb/collector.pb.go +++ b/api/qanpb/collector.pb.go @@ -7,13 +7,11 @@ package qanv1beta1 import ( - reflect "reflect" - sync "sync" - + inventorypb "github.com/percona/pmm/api/inventorypb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" ) const ( @@ -2717,21 +2715,18 @@ func file_qanpb_collector_proto_rawDescGZIP() []byte { return file_qanpb_collector_proto_rawDescData } -var ( - file_qanpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_qanpb_collector_proto_goTypes = []interface{}{ - (*CollectRequest)(nil), // 0: qan.v1beta1.CollectRequest - (*MetricsBucket)(nil), // 1: qan.v1beta1.MetricsBucket - (*CollectResponse)(nil), // 2: qan.v1beta1.CollectResponse - nil, // 3: qan.v1beta1.MetricsBucket.LabelsEntry - nil, // 4: qan.v1beta1.MetricsBucket.WarningsEntry - nil, // 5: qan.v1beta1.MetricsBucket.ErrorsEntry - (inventorypb.AgentType)(0), // 6: inventory.AgentType - (ExampleFormat)(0), // 7: qan.v1beta1.ExampleFormat - (ExampleType)(0), // 8: qan.v1beta1.ExampleType - } -) - +var file_qanpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_qanpb_collector_proto_goTypes = []interface{}{ + (*CollectRequest)(nil), // 0: qan.v1beta1.CollectRequest + (*MetricsBucket)(nil), // 1: qan.v1beta1.MetricsBucket + (*CollectResponse)(nil), // 2: qan.v1beta1.CollectResponse + nil, // 3: qan.v1beta1.MetricsBucket.LabelsEntry + nil, // 4: qan.v1beta1.MetricsBucket.WarningsEntry + nil, // 5: qan.v1beta1.MetricsBucket.ErrorsEntry + (inventorypb.AgentType)(0), // 6: inventory.AgentType + (ExampleFormat)(0), // 7: qan.v1beta1.ExampleFormat + (ExampleType)(0), // 8: qan.v1beta1.ExampleType +} var file_qanpb_collector_proto_depIdxs = []int32{ 1, // 0: qan.v1beta1.CollectRequest.metrics_bucket:type_name -> qan.v1beta1.MetricsBucket 6, // 1: qan.v1beta1.MetricsBucket.agent_type:type_name -> inventory.AgentType diff --git a/api/qanpb/collector.swagger.json b/api/qanpb/collector.swagger.json new file mode 100644 index 0000000000..968e4994af --- /dev/null +++ b/api/qanpb/collector.swagger.json @@ -0,0 +1,1066 @@ +{ + "swagger": "2.0", + "info": { + "title": "qanpb/collector.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Collector" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "inventoryAgentType": { + "type": "string", + "enum": [ + "AGENT_TYPE_INVALID", + "PMM_AGENT", + "VM_AGENT", + "NODE_EXPORTER", + "MYSQLD_EXPORTER", + "MONGODB_EXPORTER", + "POSTGRES_EXPORTER", + "PROXYSQL_EXPORTER", + "QAN_MYSQL_PERFSCHEMA_AGENT", + "QAN_MYSQL_SLOWLOG_AGENT", + "QAN_MONGODB_PROFILER_AGENT", + "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "RDS_EXPORTER", + "EXTERNAL_EXPORTER", + "AZURE_DATABASE_EXPORTER" + ], + "default": "AGENT_TYPE_INVALID", + "description": "AgentType describes supported Agent types." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1CollectResponse": { + "type": "object" + }, + "v1beta1ExampleFormat": { + "type": "string", + "enum": [ + "EXAMPLE_FORMAT_INVALID", + "EXAMPLE", + "FINGERPRINT" + ], + "default": "EXAMPLE_FORMAT_INVALID", + "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed." + }, + "v1beta1ExampleType": { + "type": "string", + "enum": [ + "EXAMPLE_TYPE_INVALID", + "RANDOM", + "SLOWEST", + "FASTEST", + "WITH_ERROR" + ], + "default": "EXAMPLE_TYPE_INVALID", + "description": "ExampleType is a type of query example selected for this query class in given period of time." + }, + "v1beta1MetricsBucket": { + "type": "object", + "properties": { + "queryid": { + "type": "string", + "description": "md5 of digest_text/fingerprint." + }, + "explain_fingerprint": { + "type": "string", + "description": "contains fingerprint prepared by sql parser, which can be different than fingerprint." + }, + "placeholders_count": { + "type": "integer", + "format": "int64", + "description": "ammount of variables in query." + }, + "fingerprint": { + "type": "string", + "description": "digest_text - query signature. Query without values.\n\nDimension Group." + }, + "service_name": { + "type": "string", + "description": "Service Name (can be several Services on one Node)." + }, + "database": { + "type": "string", + "description": "MongoDB or PostgreSQL database.\nSeveral databases can't be combined in a single declarative query." + }, + "schema": { + "type": "string", + "description": "MySQL database or PostgreSQL schema.\nSeveral schemas can be combined in a single declarative query." + }, + "tables": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tables or Collections list." + }, + "username": { + "type": "string", + "description": "client user name." + }, + "client_host": { + "type": "string", + "description": "client IP or hostname.\n\nUnified Labels Group." + }, + "node_id": { + "type": "string", + "title": "Node identifier" + }, + "node_name": { + "type": "string", + "title": "Node name" + }, + "node_type": { + "type": "string", + "title": "Node type" + }, + "machine_id": { + "type": "string", + "title": "Machine identifier" + }, + "container_id": { + "type": "string", + "title": "Container identifier" + }, + "container_name": { + "type": "string", + "title": "Container name" + }, + "node_model": { + "type": "string", + "title": "Node model" + }, + "region": { + "type": "string", + "title": "Region name" + }, + "az": { + "type": "string", + "title": "Availability zone" + }, + "service_id": { + "type": "string", + "title": "Service identifier" + }, + "service_type": { + "type": "string", + "title": "Type of service" + }, + "environment": { + "type": "string", + "title": "Environment name" + }, + "cluster": { + "type": "string", + "title": "Cluster name" + }, + "replication_set": { + "type": "string", + "title": "Name of replication set" + }, + "agent_id": { + "type": "string", + "description": "Identifier of agent that collect and send metrics." + }, + "agent_type": { + "$ref": "#/definitions/inventoryAgentType", + "description": "Metrics source." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels names:values.\n\nPeriod and Query Example Group." + }, + "period_start_unix_secs": { + "type": "integer", + "format": "int64", + "description": "Time when collection of bucket started." + }, + "period_length_secs": { + "type": "integer", + "format": "int64", + "description": "Duration of bucket." + }, + "example": { + "type": "string", + "description": "One of query example from set found in bucket." + }, + "example_format": { + "$ref": "#/definitions/v1beta1ExampleFormat", + "description": "Deprecated: should not be used, should be removed." + }, + "is_truncated": { + "type": "boolean", + "description": "Indicates if the query example is truncated." + }, + "example_type": { + "$ref": "#/definitions/v1beta1ExampleType" + }, + "example_metrics": { + "type": "string", + "description": "Metrics of query example in JSON format.\n\nMetrics." + }, + "num_queries_with_warnings": { + "type": "number", + "format": "float", + "description": "How many queries was with warnings in bucket." + }, + "warnings": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uint64" + }, + "description": "List of warnings: {code: count}." + }, + "num_queries_with_errors": { + "type": "number", + "format": "float", + "description": "How many queries was with error in bucket." + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uint64" + }, + "description": "List of errors: {code: count}." + }, + "num_queries": { + "type": "number", + "format": "float", + "description": "Amount queries in this bucket." + }, + "m_query_time_cnt": { + "type": "number", + "format": "float", + "description": "How many times query_time was found." + }, + "m_query_time_sum": { + "type": "number", + "format": "float", + "description": "The statement execution time in seconds." + }, + "m_query_time_min": { + "type": "number", + "format": "float", + "description": "Smallest value of query_time in bucket." + }, + "m_query_time_max": { + "type": "number", + "format": "float", + "description": "Biggest value of query_time in bucket." + }, + "m_query_time_p99": { + "type": "number", + "format": "float", + "description": "99 percentile of value of query_time in bucket." + }, + "m_lock_time_cnt": { + "type": "number", + "format": "float" + }, + "m_lock_time_sum": { + "type": "number", + "format": "float", + "description": "The time to acquire locks in seconds." + }, + "m_lock_time_min": { + "type": "number", + "format": "float" + }, + "m_lock_time_max": { + "type": "number", + "format": "float" + }, + "m_lock_time_p99": { + "type": "number", + "format": "float" + }, + "m_rows_sent_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_sent_sum": { + "type": "number", + "format": "float", + "description": "The number of rows sent to the client." + }, + "m_rows_sent_min": { + "type": "number", + "format": "float" + }, + "m_rows_sent_max": { + "type": "number", + "format": "float" + }, + "m_rows_sent_p99": { + "type": "number", + "format": "float" + }, + "m_rows_examined_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_examined_sum": { + "type": "number", + "format": "float", + "description": "Number of rows scanned - SELECT." + }, + "m_rows_examined_min": { + "type": "number", + "format": "float" + }, + "m_rows_examined_max": { + "type": "number", + "format": "float" + }, + "m_rows_examined_p99": { + "type": "number", + "format": "float" + }, + "m_rows_affected_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_affected_sum": { + "type": "number", + "format": "float", + "description": "Number of rows changed - UPDATE, DELETE, INSERT." + }, + "m_rows_affected_min": { + "type": "number", + "format": "float" + }, + "m_rows_affected_max": { + "type": "number", + "format": "float" + }, + "m_rows_affected_p99": { + "type": "number", + "format": "float" + }, + "m_rows_read_cnt": { + "type": "number", + "format": "float" + }, + "m_rows_read_sum": { + "type": "number", + "format": "float", + "description": "The number of rows read from tables." + }, + "m_rows_read_min": { + "type": "number", + "format": "float" + }, + "m_rows_read_max": { + "type": "number", + "format": "float" + }, + "m_rows_read_p99": { + "type": "number", + "format": "float" + }, + "m_merge_passes_cnt": { + "type": "number", + "format": "float" + }, + "m_merge_passes_sum": { + "type": "number", + "format": "float", + "description": "The number of merge passes that the sort algorithm has had to do." + }, + "m_merge_passes_min": { + "type": "number", + "format": "float" + }, + "m_merge_passes_max": { + "type": "number", + "format": "float" + }, + "m_merge_passes_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_sum": { + "type": "number", + "format": "float", + "description": "Counts the number of page read operations scheduled." + }, + "m_innodb_io_r_ops_min": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_max": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_ops_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_sum": { + "type": "number", + "format": "float", + "description": "Similar to innodb_IO_r_ops, but the unit is bytes." + }, + "m_innodb_io_r_bytes_min": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_max": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_bytes_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_sum": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." + }, + "m_innodb_io_r_wait_min": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_max": { + "type": "number", + "format": "float" + }, + "m_innodb_io_r_wait_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_sum": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query waited for row locks." + }, + "m_innodb_rec_lock_wait_min": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_max": { + "type": "number", + "format": "float" + }, + "m_innodb_rec_lock_wait_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_sum": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." + }, + "m_innodb_queue_wait_min": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_max": { + "type": "number", + "format": "float" + }, + "m_innodb_queue_wait_p99": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_cnt": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_sum": { + "type": "number", + "format": "float", + "description": "Counts approximately the number of unique pages the query accessed." + }, + "m_innodb_pages_distinct_min": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_max": { + "type": "number", + "format": "float" + }, + "m_innodb_pages_distinct_p99": { + "type": "number", + "format": "float" + }, + "m_query_length_cnt": { + "type": "number", + "format": "float" + }, + "m_query_length_sum": { + "type": "number", + "format": "float", + "description": "Shows how long the query is." + }, + "m_query_length_min": { + "type": "number", + "format": "float" + }, + "m_query_length_max": { + "type": "number", + "format": "float" + }, + "m_query_length_p99": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_cnt": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_sum": { + "type": "number", + "format": "float", + "description": "The number of bytes sent to all clients." + }, + "m_bytes_sent_min": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_max": { + "type": "number", + "format": "float" + }, + "m_bytes_sent_p99": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_sum": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on memory for the query." + }, + "m_tmp_tables_min": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_max": { + "type": "number", + "format": "float" + }, + "m_tmp_tables_p99": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_sum": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on disk for the query." + }, + "m_tmp_disk_tables_min": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_max": { + "type": "number", + "format": "float" + }, + "m_tmp_disk_tables_p99": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_sum": { + "type": "number", + "format": "float", + "description": "Total Size in bytes for all temporary tables used in the query." + }, + "m_tmp_table_sizes_min": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_max": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sizes_p99": { + "type": "number", + "format": "float" + }, + "m_qc_hit_cnt": { + "type": "number", + "format": "float", + "description": "Boolean metrics:\n- *_cnt - how many times this matric was met.\n- *_sum - how many times this matric was true." + }, + "m_qc_hit_sum": { + "type": "number", + "format": "float", + "description": "Query Cache hits." + }, + "m_full_scan_cnt": { + "type": "number", + "format": "float" + }, + "m_full_scan_sum": { + "type": "number", + "format": "float", + "description": "The query performed a full table scan." + }, + "m_full_join_cnt": { + "type": "number", + "format": "float" + }, + "m_full_join_sum": { + "type": "number", + "format": "float", + "description": "The query performed a full join (a join without indexes)." + }, + "m_tmp_table_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_table_sum": { + "type": "number", + "format": "float", + "description": "The query created an implicit internal temporary table." + }, + "m_tmp_table_on_disk_cnt": { + "type": "number", + "format": "float" + }, + "m_tmp_table_on_disk_sum": { + "type": "number", + "format": "float", + "description": "The querys temporary table was stored on disk." + }, + "m_filesort_cnt": { + "type": "number", + "format": "float" + }, + "m_filesort_sum": { + "type": "number", + "format": "float", + "description": "The query used a filesort." + }, + "m_filesort_on_disk_cnt": { + "type": "number", + "format": "float" + }, + "m_filesort_on_disk_sum": { + "type": "number", + "format": "float", + "description": "The filesort was performed on disk." + }, + "m_select_full_range_join_cnt": { + "type": "number", + "format": "float" + }, + "m_select_full_range_join_sum": { + "type": "number", + "format": "float", + "description": "The number of joins that used a range search on a reference table." + }, + "m_select_range_cnt": { + "type": "number", + "format": "float" + }, + "m_select_range_sum": { + "type": "number", + "format": "float", + "description": "The number of joins that used ranges on the first table." + }, + "m_select_range_check_cnt": { + "type": "number", + "format": "float" + }, + "m_select_range_check_sum": { + "type": "number", + "format": "float", + "description": "The number of joins without keys that check for key usage after each row." + }, + "m_sort_range_cnt": { + "type": "number", + "format": "float" + }, + "m_sort_range_sum": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done using ranges." + }, + "m_sort_rows_cnt": { + "type": "number", + "format": "float" + }, + "m_sort_rows_sum": { + "type": "number", + "format": "float", + "description": "The number of sorted rows." + }, + "m_sort_scan_cnt": { + "type": "number", + "format": "float" + }, + "m_sort_scan_sum": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done by scanning the table." + }, + "m_no_index_used_cnt": { + "type": "number", + "format": "float" + }, + "m_no_index_used_sum": { + "type": "number", + "format": "float", + "description": "The number of queries without index." + }, + "m_no_good_index_used_cnt": { + "type": "number", + "format": "float" + }, + "m_no_good_index_used_sum": { + "type": "number", + "format": "float", + "description": "The number of queries without good index.\n\nMongoDB metrics." + }, + "m_docs_returned_cnt": { + "type": "number", + "format": "float" + }, + "m_docs_returned_sum": { + "type": "number", + "format": "float", + "description": "The number of returned documents." + }, + "m_docs_returned_min": { + "type": "number", + "format": "float" + }, + "m_docs_returned_max": { + "type": "number", + "format": "float" + }, + "m_docs_returned_p99": { + "type": "number", + "format": "float" + }, + "m_response_length_cnt": { + "type": "number", + "format": "float" + }, + "m_response_length_sum": { + "type": "number", + "format": "float", + "description": "The response length of the query result in bytes." + }, + "m_response_length_min": { + "type": "number", + "format": "float" + }, + "m_response_length_max": { + "type": "number", + "format": "float" + }, + "m_response_length_p99": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_cnt": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_sum": { + "type": "number", + "format": "float", + "description": "The number of scanned documents." + }, + "m_docs_scanned_min": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_max": { + "type": "number", + "format": "float" + }, + "m_docs_scanned_p99": { + "type": "number", + "format": "float", + "description": "PostgreSQL metrics." + }, + "m_shared_blks_hit_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_hit_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared block cache hits by the statement." + }, + "m_shared_blks_read_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_read_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks read by the statement." + }, + "m_shared_blks_dirtied_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_dirtied_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks dirtied by the statement." + }, + "m_shared_blks_written_cnt": { + "type": "number", + "format": "float" + }, + "m_shared_blks_written_sum": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks written by the statement." + }, + "m_local_blks_hit_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_hit_sum": { + "type": "number", + "format": "float", + "description": "Total number of local block cache hits by the statement." + }, + "m_local_blks_read_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_read_sum": { + "type": "number", + "format": "float", + "description": "Total number of local blocks read by the statement." + }, + "m_local_blks_dirtied_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_dirtied_sum": { + "type": "number", + "format": "float", + "description": "Total number of local blocks dirtied by the statement." + }, + "m_local_blks_written_cnt": { + "type": "number", + "format": "float" + }, + "m_local_blks_written_sum": { + "type": "number", + "format": "float", + "description": "Total number of local blocks written by the statement." + }, + "m_temp_blks_read_cnt": { + "type": "number", + "format": "float" + }, + "m_temp_blks_read_sum": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks read by the statement." + }, + "m_temp_blks_written_cnt": { + "type": "number", + "format": "float" + }, + "m_temp_blks_written_sum": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks written by the statement." + }, + "m_blk_read_time_cnt": { + "type": "number", + "format": "float" + }, + "m_blk_read_time_sum": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_blk_write_time_cnt": { + "type": "number", + "format": "float" + }, + "m_blk_write_time_sum": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_cpu_user_time_cnt": { + "type": "number", + "format": "float" + }, + "m_cpu_user_time_sum": { + "type": "number", + "format": "float", + "description": "Total time user spent in query." + }, + "m_cpu_sys_time_cnt": { + "type": "number", + "format": "float" + }, + "m_cpu_sys_time_sum": { + "type": "number", + "format": "float", + "description": "Total time system spent in query." + }, + "cmd_type": { + "type": "string", + "description": "Type of SQL command." + }, + "m_plans_calls_sum": { + "type": "number", + "format": "float", + "description": "Total number of planned calls.", + "title": "pg_stat_monitor 0.9 metrics" + }, + "m_plans_calls_cnt": { + "type": "number", + "format": "float" + }, + "m_wal_records_sum": { + "type": "number", + "format": "float", + "description": "Total number of WAL (Write-ahead logging) records." + }, + "m_wal_records_cnt": { + "type": "number", + "format": "float" + }, + "m_wal_fpi_sum": { + "type": "number", + "format": "float", + "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." + }, + "m_wal_fpi_cnt": { + "type": "number", + "format": "float" + }, + "m_wal_bytes_sum": { + "type": "number", + "format": "float", + "description": "Total bytes of WAL (Write-ahead logging) records." + }, + "m_wal_bytes_cnt": { + "type": "number", + "format": "float" + }, + "m_plan_time_sum": { + "type": "number", + "format": "float", + "description": "Sum, count, min, max of plan time." + }, + "m_plan_time_cnt": { + "type": "number", + "format": "float" + }, + "m_plan_time_min": { + "type": "number", + "format": "float" + }, + "m_plan_time_max": { + "type": "number", + "format": "float" + }, + "top_queryid": { + "type": "string", + "title": "Metrics skipped due to different bucket_time in pg_stat_monitor (1min in PMM, 5min in pg_stat_monitor):\nmin_time, max_time, mean_time\nplan_mean_time\nstddev_time\nOther metrics skipped (empty values, codes):\ncmd_type_text, elevel, sqlcode, message, state_code, state" + }, + "top_query": { + "type": "string" + }, + "application_name": { + "type": "string" + }, + "planid": { + "type": "string" + }, + "query_plan": { + "type": "string" + }, + "histogram_items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "MetricsBucket is aggregated message created by pmm-agent.\nContains information about one query selected in defined way from query class in specific period of time." + } + } +} diff --git a/api/qanpb/collector_grpc.pb.go b/api/qanpb/collector_grpc.pb.go index b1a42e7636..b3c75004f1 100644 --- a/api/qanpb/collector_grpc.pb.go +++ b/api/qanpb/collector_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type CollectorServer interface { } // UnimplementedCollectorServer must be embedded to have forward compatible implementations. -type UnimplementedCollectorServer struct{} +type UnimplementedCollectorServer struct { +} func (UnimplementedCollectorServer) Collect(context.Context, *CollectRequest) (*CollectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Collect not implemented") diff --git a/api/qanpb/filters.pb.go b/api/qanpb/filters.pb.go index 290ea68b52..642b4ce72f 100644 --- a/api/qanpb/filters.pb.go +++ b/api/qanpb/filters.pb.go @@ -7,13 +7,12 @@ package qanv1beta1 import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -335,19 +334,16 @@ func file_qanpb_filters_proto_rawDescGZIP() []byte { return file_qanpb_filters_proto_rawDescData } -var ( - file_qanpb_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_qanpb_filters_proto_goTypes = []interface{}{ - (*FiltersRequest)(nil), // 0: qan.v1beta1.FiltersRequest - (*FiltersReply)(nil), // 1: qan.v1beta1.FiltersReply - (*ListLabels)(nil), // 2: qan.v1beta1.ListLabels - (*Values)(nil), // 3: qan.v1beta1.Values - nil, // 4: qan.v1beta1.FiltersReply.LabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 6: qan.v1beta1.MapFieldEntry - } -) - +var file_qanpb_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_qanpb_filters_proto_goTypes = []interface{}{ + (*FiltersRequest)(nil), // 0: qan.v1beta1.FiltersRequest + (*FiltersReply)(nil), // 1: qan.v1beta1.FiltersReply + (*ListLabels)(nil), // 2: qan.v1beta1.ListLabels + (*Values)(nil), // 3: qan.v1beta1.Values + nil, // 4: qan.v1beta1.FiltersReply.LabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 6: qan.v1beta1.MapFieldEntry +} var file_qanpb_filters_proto_depIdxs = []int32{ 5, // 0: qan.v1beta1.FiltersRequest.period_start_from:type_name -> google.protobuf.Timestamp 5, // 1: qan.v1beta1.FiltersRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qanpb/filters.pb.gw.go b/api/qanpb/filters.pb.gw.go index 74cec79c58..5fa71e0b11 100644 --- a/api/qanpb/filters.pb.gw.go +++ b/api/qanpb/filters.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshaler, client FiltersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq FiltersRequest @@ -47,6 +45,7 @@ func request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshaler, server FiltersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshale msg, err := server.Get(ctx, &protoReq) return msg, metadata, err + } // RegisterFiltersHandlerServer registers the http handlers for service Filters to "mux". @@ -70,6 +70,7 @@ func local_request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshale // 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 RegisterFiltersHandlerFromEndpoint instead. func RegisterFiltersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FiltersServer) error { + mux.Handle("POST", pattern_Filters_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterFiltersHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Filters_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterFiltersHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "FiltersClient" to call the correct interceptors. func RegisterFiltersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FiltersClient) error { + mux.Handle("POST", pattern_Filters_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterFiltersHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Filters_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_Filters_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v0", "qan", "Filters", "Get"}, "")) +var ( + pattern_Filters_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v0", "qan", "Filters", "Get"}, "")) +) -var forward_Filters_Get_0 = runtime.ForwardResponseMessage +var ( + forward_Filters_Get_0 = runtime.ForwardResponseMessage +) diff --git a/api/qanpb/filters.swagger.json b/api/qanpb/filters.swagger.json new file mode 100644 index 0000000000..7178f77d08 --- /dev/null +++ b/api/qanpb/filters.swagger.json @@ -0,0 +1,165 @@ +{ + "swagger": "2.0", + "info": { + "title": "qanpb/filters.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Filters" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v0/qan/Filters/Get": { + "post": { + "summary": "Get gets map of metrics names.", + "operationId": "Get", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1FiltersReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "FiltersRequest contains period for which we need filters.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1FiltersRequest" + } + } + ], + "tags": [ + "Filters" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1FiltersReply": { + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1beta1ListLabels" + } + } + }, + "description": "FiltersReply is map of labels for given period by key.\nKey is label's name and value is label's value and how many times it occur." + }, + "v1beta1FiltersRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "main_metric_name": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1MapFieldEntry" + } + } + }, + "description": "FiltersRequest contains period for which we need filters." + }, + "v1beta1ListLabels": { + "type": "object", + "properties": { + "name": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Values" + } + } + }, + "description": "ListLabels is list of label's values: duplicates are impossible." + }, + "v1beta1MapFieldEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}." + }, + "v1beta1Values": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "main_metric_percent": { + "type": "number", + "format": "float" + }, + "main_metric_per_sec": { + "type": "number", + "format": "float" + } + }, + "description": "Values is label values and main metric percent and per second." + } + } +} diff --git a/api/qanpb/filters_grpc.pb.go b/api/qanpb/filters_grpc.pb.go index a68ca5847e..bd01706358 100644 --- a/api/qanpb/filters_grpc.pb.go +++ b/api/qanpb/filters_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type FiltersServer interface { } // UnimplementedFiltersServer must be embedded to have forward compatible implementations. -type UnimplementedFiltersServer struct{} +type UnimplementedFiltersServer struct { +} func (UnimplementedFiltersServer) Get(context.Context, *FiltersRequest) (*FiltersReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") diff --git a/api/qanpb/json/client/filters/get_parameters.go b/api/qanpb/json/client/filters/get_parameters.go index 7f2a7635c0..30080f93a1 100644 --- a/api/qanpb/json/client/filters/get_parameters.go +++ b/api/qanpb/json/client/filters/get_parameters.go @@ -60,6 +60,7 @@ GetParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetParams struct { + /* Body. FiltersRequest contains period for which we need filters. @@ -132,6 +133,7 @@ func (o *GetParams) SetBody(body GetBody) { // WriteToRequest writes these params to a swagger request func (o *GetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/filters/get_responses.go b/api/qanpb/json/client/filters/get_responses.go index cfcee19800..63f836cf5b 100644 --- a/api/qanpb/json/client/filters/get_responses.go +++ b/api/qanpb/json/client/filters/get_responses.go @@ -61,12 +61,12 @@ type GetOK struct { func (o *GetOK) Error() string { return fmt.Sprintf("[POST /v0/qan/Filters/Get][%d] getOk %+v", 200, o.Payload) } - func (o *GetOK) GetPayload() *GetOKBody { return o.Payload } func (o *GetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetDefault) Code() int { func (o *GetDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/Filters/Get][%d] Get default %+v", o._statusCode, o.Payload) } - func (o *GetDefault) GetPayload() *GetDefaultBody { return o.Payload } func (o *GetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetDefaultBody) // response payload @@ -124,6 +124,7 @@ GetBody FiltersRequest contains period for which we need filters. swagger:model GetBody */ type GetBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -226,7 +227,9 @@ func (o *GetBody) ContextValidate(ctx context.Context, formats strfmt.Registry) } func (o *GetBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +240,7 @@ func (o *GetBody) contextValidateLabels(ctx context.Context, formats strfmt.Regi return err } } + } return nil @@ -265,6 +269,7 @@ GetDefaultBody get default body swagger:model GetDefaultBody */ type GetDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -330,7 +335,9 @@ func (o *GetDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -341,6 +348,7 @@ func (o *GetDefaultBody) contextValidateDetails(ctx context.Context, formats str return err } } + } return nil @@ -369,6 +377,7 @@ GetDefaultBodyDetailsItems0 get default body details items0 swagger:model GetDefaultBodyDetailsItems0 */ type GetDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -407,6 +416,7 @@ GetOKBody FiltersReply is map of labels for given period by key. swagger:model GetOKBody */ type GetOKBody struct { + // labels Labels map[string]GetOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -466,12 +476,15 @@ func (o *GetOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry } func (o *GetOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Labels { + if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil @@ -500,6 +513,7 @@ GetOKBodyLabelsAnon ListLabels is list of label's values: duplicates are impossi swagger:model GetOKBodyLabelsAnon */ type GetOKBodyLabelsAnon struct { + // name Name []*GetOKBodyLabelsAnonNameItems0 `json:"name"` } @@ -559,7 +573,9 @@ func (o *GetOKBodyLabelsAnon) ContextValidate(ctx context.Context, formats strfm } func (o *GetOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Name); i++ { + if o.Name[i] != nil { if err := o.Name[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -570,6 +586,7 @@ func (o *GetOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats s return err } } + } return nil @@ -598,6 +615,7 @@ GetOKBodyLabelsAnonNameItems0 Values is label values and main metric percent and swagger:model GetOKBodyLabelsAnonNameItems0 */ type GetOKBodyLabelsAnonNameItems0 struct { + // value Value string `json:"value,omitempty"` @@ -641,6 +659,7 @@ GetParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions in form swagger:model GetParamsBodyLabelsItems0 */ type GetParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go b/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go index a054ed1588..9ace427d25 100644 --- a/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go +++ b/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go @@ -60,6 +60,7 @@ GetMetricsNamesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsNamesParams struct { + /* Body. MetricsNamesRequest is emty. @@ -132,6 +133,7 @@ func (o *GetMetricsNamesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go b/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go index 1902721a45..ef925ae3cf 100644 --- a/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go +++ b/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go @@ -60,12 +60,12 @@ type GetMetricsNamesOK struct { func (o *GetMetricsNamesOK) Error() string { return fmt.Sprintf("[POST /v0/qan/GetMetricsNames][%d] getMetricsNamesOk %+v", 200, o.Payload) } - func (o *GetMetricsNamesOK) GetPayload() *GetMetricsNamesOKBody { return o.Payload } func (o *GetMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsNamesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetMetricsNamesDefault) Code() int { func (o *GetMetricsNamesDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/GetMetricsNames][%d] GetMetricsNames default %+v", o._statusCode, o.Payload) } - func (o *GetMetricsNamesDefault) GetPayload() *GetMetricsNamesDefaultBody { return o.Payload } func (o *GetMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsNamesDefaultBody) // response payload @@ -123,6 +123,7 @@ GetMetricsNamesDefaultBody get metrics names default body swagger:model GetMetricsNamesDefaultBody */ type GetMetricsNamesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *GetMetricsNamesDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -227,6 +231,7 @@ GetMetricsNamesDefaultBodyDetailsItems0 get metrics names default body details i swagger:model GetMetricsNamesDefaultBodyDetailsItems0 */ type GetMetricsNamesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -266,6 +271,7 @@ GetMetricsNamesOKBody MetricsNamesReply is map of stored metrics: swagger:model GetMetricsNamesOKBody */ type GetMetricsNamesOKBody struct { + // data Data map[string]string `json:"data,omitempty"` } diff --git a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go index dfee8a0488..3a2c80aa3c 100644 --- a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go +++ b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go @@ -60,6 +60,7 @@ ExplainFingerprintByQueryIDParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ExplainFingerprintByQueryIDParams struct { + /* Body. ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID. @@ -132,6 +133,7 @@ func (o *ExplainFingerprintByQueryIDParams) SetBody(body ExplainFingerprintByQue // WriteToRequest writes these params to a swagger request func (o *ExplainFingerprintByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go index b84de69c8c..515a0efa01 100644 --- a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go +++ b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go @@ -60,12 +60,12 @@ type ExplainFingerprintByQueryIDOK struct { func (o *ExplainFingerprintByQueryIDOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/ExplainFingerprintByQueryID][%d] explainFingerprintByQueryIdOk %+v", 200, o.Payload) } - func (o *ExplainFingerprintByQueryIDOK) GetPayload() *ExplainFingerprintByQueryIDOKBody { return o.Payload } func (o *ExplainFingerprintByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ExplainFingerprintByQueryIDOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ExplainFingerprintByQueryIDDefault) Code() int { func (o *ExplainFingerprintByQueryIDDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/ExplainFingerprintByQueryID][%d] ExplainFingerprintByQueryID default %+v", o._statusCode, o.Payload) } - func (o *ExplainFingerprintByQueryIDDefault) GetPayload() *ExplainFingerprintByQueryIDDefaultBody { return o.Payload } func (o *ExplainFingerprintByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ExplainFingerprintByQueryIDDefaultBody) // response payload @@ -123,6 +123,7 @@ ExplainFingerprintByQueryIDBody ExplainFingerprintByQueryIDRequest get explain f swagger:model ExplainFingerprintByQueryIDBody */ type ExplainFingerprintByQueryIDBody struct { + // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -163,6 +164,7 @@ ExplainFingerprintByQueryIDDefaultBody explain fingerprint by query ID default b swagger:model ExplainFingerprintByQueryIDDefaultBody */ type ExplainFingerprintByQueryIDDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) ContextValidate(ctx context.Con } func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx cont return err } } + } return nil @@ -267,6 +272,7 @@ ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 explain fingerprint by query swagger:model ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 */ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ ExplainFingerprintByQueryIDOKBody ExplainFingerprintByQueryIDReply is explain fi swagger:model ExplainFingerprintByQueryIDOKBody */ type ExplainFingerprintByQueryIDOKBody struct { + // explain fingerprint ExplainFingerprint string `json:"explain_fingerprint,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_histogram_parameters.go b/api/qanpb/json/client/object_details/get_histogram_parameters.go index ac3be7715b..92d9df13fd 100644 --- a/api/qanpb/json/client/object_details/get_histogram_parameters.go +++ b/api/qanpb/json/client/object_details/get_histogram_parameters.go @@ -60,6 +60,7 @@ GetHistogramParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetHistogramParams struct { + /* Body. HistogramRequest defines filtering by time range, labels and queryid. @@ -132,6 +133,7 @@ func (o *GetHistogramParams) SetBody(body GetHistogramBody) { // WriteToRequest writes these params to a swagger request func (o *GetHistogramParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_histogram_responses.go b/api/qanpb/json/client/object_details/get_histogram_responses.go index 22441d3d85..b6a8491e46 100644 --- a/api/qanpb/json/client/object_details/get_histogram_responses.go +++ b/api/qanpb/json/client/object_details/get_histogram_responses.go @@ -61,12 +61,12 @@ type GetHistogramOK struct { func (o *GetHistogramOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetHistogram][%d] getHistogramOk %+v", 200, o.Payload) } - func (o *GetHistogramOK) GetPayload() *GetHistogramOKBody { return o.Payload } func (o *GetHistogramOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetHistogramOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetHistogramDefault) Code() int { func (o *GetHistogramDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetHistogram][%d] GetHistogram default %+v", o._statusCode, o.Payload) } - func (o *GetHistogramDefault) GetPayload() *GetHistogramDefaultBody { return o.Payload } func (o *GetHistogramDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetHistogramDefaultBody) // response payload @@ -124,6 +124,7 @@ GetHistogramBody HistogramRequest defines filtering by time range, labels and qu swagger:model GetHistogramBody */ type GetHistogramBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -226,7 +227,9 @@ func (o *GetHistogramBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +240,7 @@ func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats st return err } } + } return nil @@ -265,6 +269,7 @@ GetHistogramDefaultBody get histogram default body swagger:model GetHistogramDefaultBody */ type GetHistogramDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -330,7 +335,9 @@ func (o *GetHistogramDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -341,6 +348,7 @@ func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -369,6 +377,7 @@ GetHistogramDefaultBodyDetailsItems0 get histogram default body details items0 swagger:model GetHistogramDefaultBodyDetailsItems0 */ type GetHistogramDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -406,6 +415,7 @@ GetHistogramOKBody HistogramReply is histogram items as a list. swagger:model GetHistogramOKBody */ type GetHistogramOKBody struct { + // histogram items HistogramItems []*GetHistogramOKBodyHistogramItemsItems0 `json:"histogram_items"` } @@ -465,7 +475,9 @@ func (o *GetHistogramOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.HistogramItems); i++ { + if o.HistogramItems[i] != nil { if err := o.HistogramItems[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -476,6 +488,7 @@ func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, return err } } + } return nil @@ -504,6 +517,7 @@ GetHistogramOKBodyHistogramItemsItems0 HistogramItem represents one item in hist swagger:model GetHistogramOKBodyHistogramItemsItems0 */ type GetHistogramOKBodyHistogramItemsItems0 struct { + // range Range string `json:"range,omitempty"` @@ -544,6 +558,7 @@ GetHistogramParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimension swagger:model GetHistogramParamsBodyLabelsItems0 */ type GetHistogramParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_labels_parameters.go b/api/qanpb/json/client/object_details/get_labels_parameters.go index 27cd5acdc7..b706dec152 100644 --- a/api/qanpb/json/client/object_details/get_labels_parameters.go +++ b/api/qanpb/json/client/object_details/get_labels_parameters.go @@ -60,6 +60,7 @@ GetLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLabelsParams struct { + /* Body. ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of @@ -133,6 +134,7 @@ func (o *GetLabelsParams) SetBody(body GetLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_labels_responses.go b/api/qanpb/json/client/object_details/get_labels_responses.go index 5022d06873..21194dcbc9 100644 --- a/api/qanpb/json/client/object_details/get_labels_responses.go +++ b/api/qanpb/json/client/object_details/get_labels_responses.go @@ -61,12 +61,12 @@ type GetLabelsOK struct { func (o *GetLabelsOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetLabels][%d] getLabelsOk %+v", 200, o.Payload) } - func (o *GetLabelsOK) GetPayload() *GetLabelsOKBody { return o.Payload } func (o *GetLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLabelsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetLabelsDefault) Code() int { func (o *GetLabelsDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetLabels][%d] GetLabels default %+v", o._statusCode, o.Payload) } - func (o *GetLabelsDefault) GetPayload() *GetLabelsDefaultBody { return o.Payload } func (o *GetLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLabelsDefaultBody) // response payload @@ -125,6 +125,7 @@ GetLabelsBody ObjectDetailsLabelsRequest defines filtering of object detail's la swagger:model GetLabelsBody */ type GetLabelsBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -210,6 +211,7 @@ GetLabelsDefaultBody get labels default body swagger:model GetLabelsDefaultBody */ type GetLabelsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -275,7 +277,9 @@ func (o *GetLabelsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -286,6 +290,7 @@ func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -314,6 +319,7 @@ GetLabelsDefaultBodyDetailsItems0 get labels default body details items0 swagger:model GetLabelsDefaultBodyDetailsItems0 */ type GetLabelsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -351,6 +357,7 @@ GetLabelsOKBody ObjectDetailsLabelsReply is a map of labels names as keys and la swagger:model GetLabelsOKBody */ type GetLabelsOKBody struct { + // labels Labels map[string]GetLabelsOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -410,12 +417,15 @@ func (o *GetLabelsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetLabelsOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Labels { + if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil @@ -444,6 +454,7 @@ GetLabelsOKBodyLabelsAnon ListLabelValues is list of label's values. swagger:model GetLabelsOKBodyLabelsAnon */ type GetLabelsOKBodyLabelsAnon struct { + // values Values []string `json:"values"` } diff --git a/api/qanpb/json/client/object_details/get_metrics_parameters.go b/api/qanpb/json/client/object_details/get_metrics_parameters.go index f5d2589a16..ff8ab9f35f 100644 --- a/api/qanpb/json/client/object_details/get_metrics_parameters.go +++ b/api/qanpb/json/client/object_details/get_metrics_parameters.go @@ -60,6 +60,7 @@ GetMetricsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsParams struct { + /* Body. MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972. @@ -132,6 +133,7 @@ func (o *GetMetricsParams) SetBody(body GetMetricsBody) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_metrics_responses.go b/api/qanpb/json/client/object_details/get_metrics_responses.go index 23bcd854fc..8128588c7d 100644 --- a/api/qanpb/json/client/object_details/get_metrics_responses.go +++ b/api/qanpb/json/client/object_details/get_metrics_responses.go @@ -61,12 +61,12 @@ type GetMetricsOK struct { func (o *GetMetricsOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetMetrics][%d] getMetricsOk %+v", 200, o.Payload) } - func (o *GetMetricsOK) GetPayload() *GetMetricsOKBody { return o.Payload } func (o *GetMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetMetricsDefault) Code() int { func (o *GetMetricsDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetMetrics][%d] GetMetrics default %+v", o._statusCode, o.Payload) } - func (o *GetMetricsDefault) GetPayload() *GetMetricsDefaultBody { return o.Payload } func (o *GetMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsDefaultBody) // response payload @@ -124,6 +124,7 @@ GetMetricsBody MetricsRequest defines filtering of metrics for specific value of swagger:model GetMetricsBody */ type GetMetricsBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -235,7 +236,9 @@ func (o *GetMetricsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -246,6 +249,7 @@ func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strf return err } } + } return nil @@ -274,6 +278,7 @@ GetMetricsDefaultBody get metrics default body swagger:model GetMetricsDefaultBody */ type GetMetricsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -339,7 +344,9 @@ func (o *GetMetricsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -350,6 +357,7 @@ func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -378,6 +386,7 @@ GetMetricsDefaultBodyDetailsItems0 get metrics default body details items0 swagger:model GetMetricsDefaultBodyDetailsItems0 */ type GetMetricsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -415,6 +424,7 @@ GetMetricsOKBody MetricsReply defines metrics for specific value of dimension (e swagger:model GetMetricsOKBody */ type GetMetricsOKBody struct { + // metrics Metrics map[string]GetMetricsOKBodyMetricsAnon `json:"metrics,omitempty"` @@ -584,19 +594,24 @@ func (o *GetMetricsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetMetricsOKBody) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Metrics { + if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sparkline); i++ { + if o.Sparkline[i] != nil { if err := o.Sparkline[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -607,24 +622,29 @@ func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Totals { + if val, ok := o.Totals[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + if o.Metadata != nil { if err := o.Metadata.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -662,6 +682,7 @@ GetMetricsOKBodyMetadata GetSlecetedQueryMetadataReply consists selected query m swagger:model GetMetricsOKBodyMetadata */ type GetMetricsOKBodyMetadata struct { + // service name ServiceName string `json:"service_name,omitempty"` @@ -732,6 +753,7 @@ GetMetricsOKBodyMetricsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyMetricsAnon */ type GetMetricsOKBodyMetricsAnon struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -791,6 +813,7 @@ GetMetricsOKBodySparklineItems0 Point contains values that represents abscissa ( swagger:model GetMetricsOKBodySparklineItems0 */ type GetMetricsOKBodySparklineItems0 struct { + // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1020,6 +1043,7 @@ GetMetricsOKBodyTotalsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyTotalsAnon */ type GetMetricsOKBodyTotalsAnon struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -1078,6 +1102,7 @@ GetMetricsParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions swagger:model GetMetricsParamsBodyLabelsItems0 */ type GetMetricsParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_query_example_parameters.go b/api/qanpb/json/client/object_details/get_query_example_parameters.go index bccae86cac..a697cb319b 100644 --- a/api/qanpb/json/client/object_details/get_query_example_parameters.go +++ b/api/qanpb/json/client/object_details/get_query_example_parameters.go @@ -60,6 +60,7 @@ GetQueryExampleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryExampleParams struct { + /* Body. QueryExampleRequest defines filtering of query examples for specific value of @@ -133,6 +134,7 @@ func (o *GetQueryExampleParams) SetBody(body GetQueryExampleBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryExampleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_query_example_responses.go b/api/qanpb/json/client/object_details/get_query_example_responses.go index fee949c15c..8606240a40 100644 --- a/api/qanpb/json/client/object_details/get_query_example_responses.go +++ b/api/qanpb/json/client/object_details/get_query_example_responses.go @@ -62,12 +62,12 @@ type GetQueryExampleOK struct { func (o *GetQueryExampleOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryExample][%d] getQueryExampleOk %+v", 200, o.Payload) } - func (o *GetQueryExampleOK) GetPayload() *GetQueryExampleOKBody { return o.Payload } func (o *GetQueryExampleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryExampleOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetQueryExampleDefault) Code() int { func (o *GetQueryExampleDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryExample][%d] GetQueryExample default %+v", o._statusCode, o.Payload) } - func (o *GetQueryExampleDefault) GetPayload() *GetQueryExampleDefaultBody { return o.Payload } func (o *GetQueryExampleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryExampleDefaultBody) // response payload @@ -126,6 +126,7 @@ GetQueryExampleBody QueryExampleRequest defines filtering of query examples for swagger:model GetQueryExampleBody */ type GetQueryExampleBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -234,7 +235,9 @@ func (o *GetQueryExampleBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,6 +248,7 @@ func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats return err } } + } return nil @@ -273,6 +277,7 @@ GetQueryExampleDefaultBody get query example default body swagger:model GetQueryExampleDefaultBody */ type GetQueryExampleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -338,7 +343,9 @@ func (o *GetQueryExampleDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -349,6 +356,7 @@ func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -377,6 +385,7 @@ GetQueryExampleDefaultBodyDetailsItems0 get query example default body details i swagger:model GetQueryExampleDefaultBodyDetailsItems0 */ type GetQueryExampleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -414,6 +423,7 @@ GetQueryExampleOKBody QueryExampleReply list of query examples. swagger:model GetQueryExampleOKBody */ type GetQueryExampleOKBody struct { + // query examples QueryExamples []*GetQueryExampleOKBodyQueryExamplesItems0 `json:"query_examples"` } @@ -473,7 +483,9 @@ func (o *GetQueryExampleOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QueryExamples); i++ { + if o.QueryExamples[i] != nil { if err := o.QueryExamples[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -484,6 +496,7 @@ func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context return err } } + } return nil @@ -512,6 +525,7 @@ GetQueryExampleOKBodyQueryExamplesItems0 QueryExample shows query examples and t swagger:model GetQueryExampleOKBodyQueryExamplesItems0 */ type GetQueryExampleOKBodyQueryExamplesItems0 struct { + // example Example string `json:"example,omitempty"` @@ -695,6 +709,7 @@ GetQueryExampleParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimens swagger:model GetQueryExampleParamsBodyLabelsItems0 */ type GetQueryExampleParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_query_plan_parameters.go b/api/qanpb/json/client/object_details/get_query_plan_parameters.go index 951332f0db..ec863f68f8 100644 --- a/api/qanpb/json/client/object_details/get_query_plan_parameters.go +++ b/api/qanpb/json/client/object_details/get_query_plan_parameters.go @@ -60,6 +60,7 @@ GetQueryPlanParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryPlanParams struct { + /* Body. QueryPlanRequest defines filtering by queryid. @@ -132,6 +133,7 @@ func (o *GetQueryPlanParams) SetBody(body GetQueryPlanBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_query_plan_responses.go b/api/qanpb/json/client/object_details/get_query_plan_responses.go index c0e5daf471..4d562c717c 100644 --- a/api/qanpb/json/client/object_details/get_query_plan_responses.go +++ b/api/qanpb/json/client/object_details/get_query_plan_responses.go @@ -60,12 +60,12 @@ type GetQueryPlanOK struct { func (o *GetQueryPlanOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryPlan][%d] getQueryPlanOk %+v", 200, o.Payload) } - func (o *GetQueryPlanOK) GetPayload() *GetQueryPlanOKBody { return o.Payload } func (o *GetQueryPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryPlanOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetQueryPlanDefault) Code() int { func (o *GetQueryPlanDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryPlan][%d] GetQueryPlan default %+v", o._statusCode, o.Payload) } - func (o *GetQueryPlanDefault) GetPayload() *GetQueryPlanDefaultBody { return o.Payload } func (o *GetQueryPlanDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryPlanDefaultBody) // response payload @@ -123,6 +123,7 @@ GetQueryPlanBody QueryPlanRequest defines filtering by queryid. swagger:model GetQueryPlanBody */ type GetQueryPlanBody struct { + // queryid Queryid string `json:"queryid,omitempty"` } @@ -160,6 +161,7 @@ GetQueryPlanDefaultBody get query plan default body swagger:model GetQueryPlanDefaultBody */ type GetQueryPlanDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -225,7 +227,9 @@ func (o *GetQueryPlanDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -236,6 +240,7 @@ func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -264,6 +269,7 @@ GetQueryPlanDefaultBodyDetailsItems0 get query plan default body details items0 swagger:model GetQueryPlanDefaultBodyDetailsItems0 */ type GetQueryPlanDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -301,6 +307,7 @@ GetQueryPlanOKBody QueryPlanReply contains planid and query_plan. swagger:model GetQueryPlanOKBody */ type GetQueryPlanOKBody struct { + // planid Planid string `json:"planid,omitempty"` diff --git a/api/qanpb/json/client/object_details/query_exists_parameters.go b/api/qanpb/json/client/object_details/query_exists_parameters.go index 3147a7c93c..ec330d052a 100644 --- a/api/qanpb/json/client/object_details/query_exists_parameters.go +++ b/api/qanpb/json/client/object_details/query_exists_parameters.go @@ -60,6 +60,7 @@ QueryExistsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type QueryExistsParams struct { + /* Body. QueryExistsRequest check if provided query exists or not. @@ -132,6 +133,7 @@ func (o *QueryExistsParams) SetBody(body QueryExistsBody) { // WriteToRequest writes these params to a swagger request func (o *QueryExistsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/query_exists_responses.go b/api/qanpb/json/client/object_details/query_exists_responses.go index 4e05278cb4..ac5541a701 100644 --- a/api/qanpb/json/client/object_details/query_exists_responses.go +++ b/api/qanpb/json/client/object_details/query_exists_responses.go @@ -60,12 +60,12 @@ type QueryExistsOK struct { func (o *QueryExistsOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/QueryExists][%d] queryExistsOk %+v", 200, o.Payload) } - func (o *QueryExistsOK) GetPayload() bool { return o.Payload } func (o *QueryExistsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *QueryExistsDefault) Code() int { func (o *QueryExistsDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/QueryExists][%d] QueryExists default %+v", o._statusCode, o.Payload) } - func (o *QueryExistsDefault) GetPayload() *QueryExistsDefaultBody { return o.Payload } func (o *QueryExistsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(QueryExistsDefaultBody) // response payload @@ -121,6 +121,7 @@ QueryExistsBody QueryExistsRequest check if provided query exists or not. swagger:model QueryExistsBody */ type QueryExistsBody struct { + // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -161,6 +162,7 @@ QueryExistsDefaultBody query exists default body swagger:model QueryExistsDefaultBody */ type QueryExistsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -226,7 +228,9 @@ func (o *QueryExistsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -237,6 +241,7 @@ func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -265,6 +270,7 @@ QueryExistsDefaultBodyDetailsItems0 query exists default body details items0 swagger:model QueryExistsDefaultBodyDetailsItems0 */ type QueryExistsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go b/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go index 71b0ad19b2..05a40e6f21 100644 --- a/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go +++ b/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go @@ -60,6 +60,7 @@ SchemaByQueryIDParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SchemaByQueryIDParams struct { + /* Body. SchemaByQueryIDRequest returns schema for given query ID and service ID. @@ -132,6 +133,7 @@ func (o *SchemaByQueryIDParams) SetBody(body SchemaByQueryIDBody) { // WriteToRequest writes these params to a swagger request func (o *SchemaByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/schema_by_query_id_responses.go b/api/qanpb/json/client/object_details/schema_by_query_id_responses.go index d0df17bfdc..c9fa6f3107 100644 --- a/api/qanpb/json/client/object_details/schema_by_query_id_responses.go +++ b/api/qanpb/json/client/object_details/schema_by_query_id_responses.go @@ -60,12 +60,12 @@ type SchemaByQueryIDOK struct { func (o *SchemaByQueryIDOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/SchemaByQueryID][%d] schemaByQueryIdOk %+v", 200, o.Payload) } - func (o *SchemaByQueryIDOK) GetPayload() *SchemaByQueryIDOKBody { return o.Payload } func (o *SchemaByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SchemaByQueryIDOKBody) // response payload @@ -102,12 +102,12 @@ func (o *SchemaByQueryIDDefault) Code() int { func (o *SchemaByQueryIDDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/SchemaByQueryID][%d] SchemaByQueryID default %+v", o._statusCode, o.Payload) } - func (o *SchemaByQueryIDDefault) GetPayload() *SchemaByQueryIDDefaultBody { return o.Payload } func (o *SchemaByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SchemaByQueryIDDefaultBody) // response payload @@ -123,6 +123,7 @@ SchemaByQueryIDBody SchemaByQueryIDRequest returns schema for given query ID and swagger:model SchemaByQueryIDBody */ type SchemaByQueryIDBody struct { + // service id ServiceID string `json:"service_id,omitempty"` @@ -163,6 +164,7 @@ SchemaByQueryIDDefaultBody schema by query ID default body swagger:model SchemaByQueryIDDefaultBody */ type SchemaByQueryIDDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *SchemaByQueryIDDefaultBody) ContextValidate(ctx context.Context, format } func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -267,6 +272,7 @@ SchemaByQueryIDDefaultBodyDetailsItems0 schema by query ID default body details swagger:model SchemaByQueryIDDefaultBodyDetailsItems0 */ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ SchemaByQueryIDOKBody SchemaByQueryIDReply is schema for given query ID and serv swagger:model SchemaByQueryIDOKBody */ type SchemaByQueryIDOKBody struct { + // schema Schema string `json:"schema,omitempty"` } diff --git a/api/qanpb/json/client/profile/get_report_parameters.go b/api/qanpb/json/client/profile/get_report_parameters.go index 154ce458c2..adea6a5299 100644 --- a/api/qanpb/json/client/profile/get_report_parameters.go +++ b/api/qanpb/json/client/profile/get_report_parameters.go @@ -60,6 +60,7 @@ GetReportParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetReportParams struct { + /* Body. ReportRequest defines filtering of metrics report for db server or other dimentions. @@ -132,6 +133,7 @@ func (o *GetReportParams) SetBody(body GetReportBody) { // WriteToRequest writes these params to a swagger request func (o *GetReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/profile/get_report_responses.go b/api/qanpb/json/client/profile/get_report_responses.go index d72cc8a69f..0835051be4 100644 --- a/api/qanpb/json/client/profile/get_report_responses.go +++ b/api/qanpb/json/client/profile/get_report_responses.go @@ -61,12 +61,12 @@ type GetReportOK struct { func (o *GetReportOK) Error() string { return fmt.Sprintf("[POST /v0/qan/GetReport][%d] getReportOk %+v", 200, o.Payload) } - func (o *GetReportOK) GetPayload() *GetReportOKBody { return o.Payload } func (o *GetReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReportOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetReportDefault) Code() int { func (o *GetReportDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/GetReport][%d] GetReport default %+v", o._statusCode, o.Payload) } - func (o *GetReportDefault) GetPayload() *GetReportDefaultBody { return o.Payload } func (o *GetReportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReportDefaultBody) // response payload @@ -124,6 +124,7 @@ GetReportBody ReportRequest defines filtering of metrics report for db server or swagger:model GetReportBody */ type GetReportBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -244,7 +245,9 @@ func (o *GetReportBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -255,6 +258,7 @@ func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfm return err } } + } return nil @@ -283,6 +287,7 @@ GetReportDefaultBody get report default body swagger:model GetReportDefaultBody */ type GetReportDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -348,7 +353,9 @@ func (o *GetReportDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -359,6 +366,7 @@ func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -387,6 +395,7 @@ GetReportDefaultBodyDetailsItems0 get report default body details items0 swagger:model GetReportDefaultBodyDetailsItems0 */ type GetReportDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -424,6 +433,7 @@ GetReportOKBody ReportReply is list of reports per quieryids, hosts etc. swagger:model GetReportOKBody */ type GetReportOKBody struct { + // total rows TotalRows int64 `json:"total_rows,omitempty"` @@ -492,7 +502,9 @@ func (o *GetReportOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Rows); i++ { + if o.Rows[i] != nil { if err := o.Rows[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -503,6 +515,7 @@ func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfm return err } } + } return nil @@ -531,6 +544,7 @@ GetReportOKBodyRowsItems0 Row define metrics for selected dimention. swagger:model GetReportOKBodyRowsItems0 */ type GetReportOKBodyRowsItems0 struct { + // rank Rank int64 `json:"rank,omitempty"` @@ -648,19 +662,24 @@ func (o *GetReportOKBodyRowsItems0) ContextValidate(ctx context.Context, formats } func (o *GetReportOKBodyRowsItems0) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Metrics { + if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sparkline); i++ { + if o.Sparkline[i] != nil { if err := o.Sparkline[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -671,6 +690,7 @@ func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context return err } } + } return nil @@ -699,6 +719,7 @@ GetReportOKBodyRowsItems0MetricsAnon Metric cell. swagger:model GetReportOKBodyRowsItems0MetricsAnon */ type GetReportOKBodyRowsItems0MetricsAnon struct { + // stats Stats *GetReportOKBodyRowsItems0MetricsAnonStats `json:"stats,omitempty"` } @@ -751,6 +772,7 @@ func (o *GetReportOKBodyRowsItems0MetricsAnon) ContextValidate(ctx context.Conte } func (o *GetReportOKBodyRowsItems0MetricsAnon) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { + if o.Stats != nil { if err := o.Stats.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -788,6 +810,7 @@ GetReportOKBodyRowsItems0MetricsAnonStats Stat is statistics of specific metric. swagger:model GetReportOKBodyRowsItems0MetricsAnonStats */ type GetReportOKBodyRowsItems0MetricsAnonStats struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -847,6 +870,7 @@ GetReportOKBodyRowsItems0SparklineItems0 Point contains values that represents a swagger:model GetReportOKBodyRowsItems0SparklineItems0 */ type GetReportOKBodyRowsItems0SparklineItems0 struct { + // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1076,6 +1100,7 @@ GetReportParamsBodyLabelsItems0 ReportMapFieldEntry allows to pass labels/diment swagger:model GetReportParamsBodyLabelsItems0 */ type GetReportParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/metrics_names.pb.go b/api/qanpb/metrics_names.pb.go index ed632783fe..1bd08a5d1e 100644 --- a/api/qanpb/metrics_names.pb.go +++ b/api/qanpb/metrics_names.pb.go @@ -7,12 +7,11 @@ package qanv1beta1 import ( - reflect "reflect" - sync "sync" - _ "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 ( @@ -162,15 +161,12 @@ func file_qanpb_metrics_names_proto_rawDescGZIP() []byte { return file_qanpb_metrics_names_proto_rawDescData } -var ( - file_qanpb_metrics_names_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_qanpb_metrics_names_proto_goTypes = []interface{}{ - (*MetricsNamesRequest)(nil), // 0: qan.v1beta1.MetricsNamesRequest - (*MetricsNamesReply)(nil), // 1: qan.v1beta1.MetricsNamesReply - nil, // 2: qan.v1beta1.MetricsNamesReply.DataEntry - } -) - +var file_qanpb_metrics_names_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_qanpb_metrics_names_proto_goTypes = []interface{}{ + (*MetricsNamesRequest)(nil), // 0: qan.v1beta1.MetricsNamesRequest + (*MetricsNamesReply)(nil), // 1: qan.v1beta1.MetricsNamesReply + nil, // 2: qan.v1beta1.MetricsNamesReply.DataEntry +} var file_qanpb_metrics_names_proto_depIdxs = []int32{ 2, // 0: qan.v1beta1.MetricsNamesReply.data:type_name -> qan.v1beta1.MetricsNamesReply.DataEntry 0, // 1: qan.v1beta1.MetricsNames.GetMetricsNames:input_type -> qan.v1beta1.MetricsNamesRequest diff --git a/api/qanpb/metrics_names.pb.gw.go b/api/qanpb/metrics_names.pb.gw.go index fbe185c590..0d68d488b3 100644 --- a/api/qanpb/metrics_names.pb.gw.go +++ b/api/qanpb/metrics_names.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, client MetricsNamesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MetricsNamesRequest @@ -47,6 +45,7 @@ func request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler runti msg, err := client.GetMetricsNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, server MetricsNamesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler msg, err := server.GetMetricsNames(ctx, &protoReq) return msg, metadata, err + } // RegisterMetricsNamesHandlerServer registers the http handlers for service MetricsNames to "mux". @@ -70,6 +70,7 @@ func local_request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler // 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 RegisterMetricsNamesHandlerFromEndpoint instead. func RegisterMetricsNamesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsNamesServer) error { + mux.Handle("POST", pattern_MetricsNames_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterMetricsNamesHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_MetricsNames_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterMetricsNamesHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MetricsNamesClient" to call the correct interceptors. func RegisterMetricsNamesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsNamesClient) error { + mux.Handle("POST", pattern_MetricsNames_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterMetricsNamesHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_MetricsNames_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_MetricsNames_GetMetricsNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetMetricsNames"}, "")) +var ( + pattern_MetricsNames_GetMetricsNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetMetricsNames"}, "")) +) -var forward_MetricsNames_GetMetricsNames_0 = runtime.ForwardResponseMessage +var ( + forward_MetricsNames_GetMetricsNames_0 = runtime.ForwardResponseMessage +) diff --git a/api/qanpb/metrics_names.swagger.json b/api/qanpb/metrics_names.swagger.json new file mode 100644 index 0000000000..2c611a3b50 --- /dev/null +++ b/api/qanpb/metrics_names.swagger.json @@ -0,0 +1,100 @@ +{ + "swagger": "2.0", + "info": { + "title": "qanpb/metrics_names.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "MetricsNames" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v0/qan/GetMetricsNames": { + "post": { + "summary": "GetMetricsNames gets map of metrics names.", + "operationId": "GetMetricsNames", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1MetricsNamesReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "MetricsNamesRequest is emty.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1MetricsNamesRequest" + } + } + ], + "tags": [ + "MetricsNames" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1MetricsNamesReply": { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "description": "MetricsNamesReply is map of stored metrics:\nkey is root of metric name in db (Ex:. [m_]query_time[_sum]);\nvalue - Human readable name of metrics." + }, + "v1beta1MetricsNamesRequest": { + "type": "object", + "description": "MetricsNamesRequest is emty." + } + } +} diff --git a/api/qanpb/metrics_names_grpc.pb.go b/api/qanpb/metrics_names_grpc.pb.go index 33a91a24dc..164528b0f1 100644 --- a/api/qanpb/metrics_names_grpc.pb.go +++ b/api/qanpb/metrics_names_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type MetricsNamesServer interface { } // UnimplementedMetricsNamesServer must be embedded to have forward compatible implementations. -type UnimplementedMetricsNamesServer struct{} +type UnimplementedMetricsNamesServer struct { +} func (UnimplementedMetricsNamesServer) GetMetricsNames(context.Context, *MetricsNamesRequest) (*MetricsNamesReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetricsNames not implemented") diff --git a/api/qanpb/object_details.pb.go b/api/qanpb/object_details.pb.go index 782db83254..a702119145 100644 --- a/api/qanpb/object_details.pb.go +++ b/api/qanpb/object_details.pb.go @@ -7,14 +7,13 @@ package qanv1beta1 import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) const ( @@ -1849,43 +1848,40 @@ func file_qanpb_object_details_proto_rawDescGZIP() []byte { return file_qanpb_object_details_proto_rawDescData } -var ( - file_qanpb_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 25) - file_qanpb_object_details_proto_goTypes = []interface{}{ - (*MetricsRequest)(nil), // 0: qan.v1beta1.MetricsRequest - (*MetricsReply)(nil), // 1: qan.v1beta1.MetricsReply - (*MetricValues)(nil), // 2: qan.v1beta1.MetricValues - (*Labels)(nil), // 3: qan.v1beta1.Labels - (*QueryExampleRequest)(nil), // 4: qan.v1beta1.QueryExampleRequest - (*QueryExampleReply)(nil), // 5: qan.v1beta1.QueryExampleReply - (*QueryExample)(nil), // 6: qan.v1beta1.QueryExample - (*ObjectDetailsLabelsRequest)(nil), // 7: qan.v1beta1.ObjectDetailsLabelsRequest - (*ObjectDetailsLabelsReply)(nil), // 8: qan.v1beta1.ObjectDetailsLabelsReply - (*ListLabelValues)(nil), // 9: qan.v1beta1.ListLabelValues - (*QueryPlanRequest)(nil), // 10: qan.v1beta1.QueryPlanRequest - (*QueryPlanReply)(nil), // 11: qan.v1beta1.QueryPlanReply - (*HistogramRequest)(nil), // 12: qan.v1beta1.HistogramRequest - (*HistogramReply)(nil), // 13: qan.v1beta1.HistogramReply - (*HistogramItem)(nil), // 14: qan.v1beta1.HistogramItem - (*QueryExistsRequest)(nil), // 15: qan.v1beta1.QueryExistsRequest - (*SchemaByQueryIDRequest)(nil), // 16: qan.v1beta1.SchemaByQueryIDRequest - (*SchemaByQueryIDReply)(nil), // 17: qan.v1beta1.SchemaByQueryIDReply - (*ExplainFingerprintByQueryIDRequest)(nil), // 18: qan.v1beta1.ExplainFingerprintByQueryIDRequest - (*ExplainFingerprintByQueryIDReply)(nil), // 19: qan.v1beta1.ExplainFingerprintByQueryIDReply - (*GetSelectedQueryMetadataReply)(nil), // 20: qan.v1beta1.GetSelectedQueryMetadataReply - nil, // 21: qan.v1beta1.MetricsReply.MetricsEntry - nil, // 22: qan.v1beta1.MetricsReply.TextMetricsEntry - nil, // 23: qan.v1beta1.MetricsReply.TotalsEntry - nil, // 24: qan.v1beta1.ObjectDetailsLabelsReply.LabelsEntry - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 26: qan.v1beta1.MapFieldEntry - (*Point)(nil), // 27: qan.v1beta1.Point - (ExampleFormat)(0), // 28: qan.v1beta1.ExampleFormat - (ExampleType)(0), // 29: qan.v1beta1.ExampleType - (*wrapperspb.BoolValue)(nil), // 30: google.protobuf.BoolValue - } -) - +var file_qanpb_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_qanpb_object_details_proto_goTypes = []interface{}{ + (*MetricsRequest)(nil), // 0: qan.v1beta1.MetricsRequest + (*MetricsReply)(nil), // 1: qan.v1beta1.MetricsReply + (*MetricValues)(nil), // 2: qan.v1beta1.MetricValues + (*Labels)(nil), // 3: qan.v1beta1.Labels + (*QueryExampleRequest)(nil), // 4: qan.v1beta1.QueryExampleRequest + (*QueryExampleReply)(nil), // 5: qan.v1beta1.QueryExampleReply + (*QueryExample)(nil), // 6: qan.v1beta1.QueryExample + (*ObjectDetailsLabelsRequest)(nil), // 7: qan.v1beta1.ObjectDetailsLabelsRequest + (*ObjectDetailsLabelsReply)(nil), // 8: qan.v1beta1.ObjectDetailsLabelsReply + (*ListLabelValues)(nil), // 9: qan.v1beta1.ListLabelValues + (*QueryPlanRequest)(nil), // 10: qan.v1beta1.QueryPlanRequest + (*QueryPlanReply)(nil), // 11: qan.v1beta1.QueryPlanReply + (*HistogramRequest)(nil), // 12: qan.v1beta1.HistogramRequest + (*HistogramReply)(nil), // 13: qan.v1beta1.HistogramReply + (*HistogramItem)(nil), // 14: qan.v1beta1.HistogramItem + (*QueryExistsRequest)(nil), // 15: qan.v1beta1.QueryExistsRequest + (*SchemaByQueryIDRequest)(nil), // 16: qan.v1beta1.SchemaByQueryIDRequest + (*SchemaByQueryIDReply)(nil), // 17: qan.v1beta1.SchemaByQueryIDReply + (*ExplainFingerprintByQueryIDRequest)(nil), // 18: qan.v1beta1.ExplainFingerprintByQueryIDRequest + (*ExplainFingerprintByQueryIDReply)(nil), // 19: qan.v1beta1.ExplainFingerprintByQueryIDReply + (*GetSelectedQueryMetadataReply)(nil), // 20: qan.v1beta1.GetSelectedQueryMetadataReply + nil, // 21: qan.v1beta1.MetricsReply.MetricsEntry + nil, // 22: qan.v1beta1.MetricsReply.TextMetricsEntry + nil, // 23: qan.v1beta1.MetricsReply.TotalsEntry + nil, // 24: qan.v1beta1.ObjectDetailsLabelsReply.LabelsEntry + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 26: qan.v1beta1.MapFieldEntry + (*Point)(nil), // 27: qan.v1beta1.Point + (ExampleFormat)(0), // 28: qan.v1beta1.ExampleFormat + (ExampleType)(0), // 29: qan.v1beta1.ExampleType + (*wrapperspb.BoolValue)(nil), // 30: google.protobuf.BoolValue +} var file_qanpb_object_details_proto_depIdxs = []int32{ 25, // 0: qan.v1beta1.MetricsRequest.period_start_from:type_name -> google.protobuf.Timestamp 25, // 1: qan.v1beta1.MetricsRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qanpb/object_details.pb.gw.go b/api/qanpb/object_details.pb.gw.go index 08f454da3e..6502d7d596 100644 --- a/api/qanpb/object_details.pb.gw.go +++ b/api/qanpb/object_details.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MetricsRequest @@ -47,6 +45,7 @@ func request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler runtime.M msg, err := client.GetMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler run msg, err := server.GetMetrics(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +79,7 @@ func request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshaler runt msg, err := client.GetQueryExample(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +96,7 @@ func local_request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshale msg, err := server.GetQueryExample(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +113,7 @@ func request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +130,7 @@ func local_request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runt msg, err := server.GetLabels(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +147,7 @@ func request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler runtime msg, err := client.GetQueryPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +164,7 @@ func local_request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler r msg, err := server.GetQueryPlan(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +181,7 @@ func request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler runtime msg, err := client.GetHistogram(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +198,7 @@ func local_request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler r msg, err := server.GetHistogram(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler runtime. msg, err := client.QueryExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +232,7 @@ func local_request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler ru msg, err := server.QueryExists(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +249,7 @@ func request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Context, ma msg, err := client.ExplainFingerprintByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +266,7 @@ func local_request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Conte msg, err := server.ExplainFingerprintByQueryID(ctx, &protoReq) return msg, metadata, err + } func request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +283,7 @@ func request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshaler runt msg, err := client.SchemaByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +300,7 @@ func local_request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshale msg, err := server.SchemaByQueryID(ctx, &protoReq) return msg, metadata, err + } // RegisterObjectDetailsHandlerServer registers the http handlers for service ObjectDetails to "mux". @@ -294,6 +308,7 @@ func local_request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshale // 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 RegisterObjectDetailsHandlerFromEndpoint instead. func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ObjectDetailsServer) error { + mux.Handle("POST", pattern_ObjectDetails_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -316,6 +331,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -340,6 +356,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -364,6 +381,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -388,6 +406,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -412,6 +431,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,6 +456,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -460,6 +481,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -484,6 +506,7 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -526,6 +549,7 @@ func RegisterObjectDetailsHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ObjectDetailsClient" to call the correct interceptors. func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ObjectDetailsClient) error { + mux.Handle("POST", pattern_ObjectDetails_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -545,6 +569,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -566,6 +591,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -587,6 +613,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -608,6 +635,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -629,6 +657,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -650,6 +679,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -671,6 +701,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ObjectDetails_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -692,6 +723,7 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/qanpb/object_details.swagger.json b/api/qanpb/object_details.swagger.json new file mode 100644 index 0000000000..d978f5837b --- /dev/null +++ b/api/qanpb/object_details.swagger.json @@ -0,0 +1,1100 @@ +{ + "swagger": "2.0", + "info": { + "title": "qanpb/object_details.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ObjectDetails" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v0/qan/ObjectDetails/ExplainFingerprintByQueryID": { + "post": { + "summary": "ExplainFingerprintByQueryID get explain fingerprint for given query ID.", + "operationId": "ExplainFingerprintByQueryID", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ExplainFingerprintByQueryIDReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ExplainFingerprintByQueryIDRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/GetHistogram": { + "post": { + "summary": "GetHistogram gets histogram items for specific filtering.", + "operationId": "GetHistogram", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1HistogramReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "HistogramRequest defines filtering by time range, labels and queryid.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1HistogramRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/GetLabels": { + "post": { + "summary": "GetLabels gets list of labels for object details.", + "operationId": "GetLabels", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ObjectDetailsLabelsReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ObjectDetailsLabelsRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/GetMetrics": { + "post": { + "summary": "GetMetrics gets map of metrics for specific filtering.", + "operationId": "GetMetrics", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1MetricsReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1MetricsRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/GetQueryExample": { + "post": { + "summary": "GetQueryExample gets list of query examples.", + "operationId": "GetQueryExample", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1QueryExampleReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "QueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1QueryExampleRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/GetQueryPlan": { + "post": { + "summary": "GetQueryPlan gets query plan and plan id for specific filtering.", + "operationId": "GetQueryPlan", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1QueryPlanReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "QueryPlanRequest defines filtering by queryid.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1QueryPlanRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/QueryExists": { + "post": { + "summary": "QueryExists check if query exists in clickhouse.", + "operationId": "QueryExists", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "QueryExistsRequest check if provided query exists or not.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1QueryExistsRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + }, + "/v0/qan/ObjectDetails/SchemaByQueryID": { + "post": { + "summary": "SchemaByQueryID returns schema for given queryID and serviceID.", + "operationId": "SchemaByQueryID", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1SchemaByQueryIDReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "SchemaByQueryIDRequest returns schema for given query ID and service ID.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1SchemaByQueryIDRequest" + } + } + ], + "tags": [ + "ObjectDetails" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1ExampleFormat": { + "type": "string", + "enum": [ + "EXAMPLE_FORMAT_INVALID", + "EXAMPLE", + "FINGERPRINT" + ], + "default": "EXAMPLE_FORMAT_INVALID", + "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed." + }, + "v1beta1ExampleType": { + "type": "string", + "enum": [ + "EXAMPLE_TYPE_INVALID", + "RANDOM", + "SLOWEST", + "FASTEST", + "WITH_ERROR" + ], + "default": "EXAMPLE_TYPE_INVALID", + "description": "ExampleType is a type of query example selected for this query class in given period of time." + }, + "v1beta1ExplainFingerprintByQueryIDReply": { + "type": "object", + "properties": { + "explain_fingerprint": { + "type": "string" + }, + "placeholders_count": { + "type": "integer", + "format": "int64" + } + }, + "description": "ExplainFingerprintByQueryIDReply is explain fingerprint and placeholders count for given query ID." + }, + "v1beta1ExplainFingerprintByQueryIDRequest": { + "type": "object", + "properties": { + "serviceid": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID." + }, + "v1beta1GetSelectedQueryMetadataReply": { + "type": "object", + "properties": { + "service_name": { + "type": "string" + }, + "database": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "username": { + "type": "string" + }, + "replication_set": { + "type": "string" + }, + "cluster": { + "type": "string" + }, + "service_type": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "node_name": { + "type": "string" + }, + "node_type": { + "type": "string" + } + }, + "description": "GetSlecetedQueryMetadataReply consists selected query metadata to show in details for given query ID." + }, + "v1beta1HistogramItem": { + "type": "object", + "properties": { + "range": { + "type": "string" + }, + "frequency": { + "type": "integer", + "format": "int64" + } + }, + "description": "HistogramItem represents one item in histogram." + }, + "v1beta1HistogramReply": { + "type": "object", + "properties": { + "histogram_items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1HistogramItem" + } + } + }, + "description": "HistogramReply is histogram items as a list." + }, + "v1beta1HistogramRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1MapFieldEntry" + } + }, + "queryid": { + "type": "string" + } + }, + "description": "HistogramRequest defines filtering by time range, labels and queryid." + }, + "v1beta1ListLabelValues": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "ListLabelValues is list of label's values." + }, + "v1beta1MapFieldEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}." + }, + "v1beta1MetricValues": { + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "float" + }, + "cnt": { + "type": "number", + "format": "float" + }, + "sum": { + "type": "number", + "format": "float" + }, + "min": { + "type": "number", + "format": "float" + }, + "max": { + "type": "number", + "format": "float" + }, + "avg": { + "type": "number", + "format": "float" + }, + "p99": { + "type": "number", + "format": "float" + }, + "percent_of_total": { + "type": "number", + "format": "float" + } + }, + "description": "MetricValues is statistics of specific metric." + }, + "v1beta1MetricsReply": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1beta1MetricValues" + } + }, + "text_metrics": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sparkline": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Point" + } + }, + "totals": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1beta1MetricValues" + } + }, + "fingerprint": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1beta1GetSelectedQueryMetadataReply" + } + }, + "description": "MetricsReply defines metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1beta1MetricsRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "filter_by": { + "type": "string", + "description": "dimension value: ex: queryid - 1D410B4BE5060972." + }, + "group_by": { + "type": "string", + "description": "one of dimension: queryid | host ..." + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1MapFieldEntry" + } + }, + "include_only_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "totals": { + "type": "boolean", + "title": "retrieve only values for totals, excluding N/A values" + } + }, + "description": "MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1beta1ObjectDetailsLabelsReply": { + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1beta1ListLabelValues" + } + } + }, + "description": "ObjectDetailsLabelsReply is a map of labels names as keys and labels values as a list." + }, + "v1beta1ObjectDetailsLabelsRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "filter_by": { + "type": "string", + "description": "dimension value: ex: queryid - 1D410B4BE5060972." + }, + "group_by": { + "type": "string", + "description": "one of dimension: queryid | host ..." + } + }, + "description": "ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1beta1Point": { + "type": "object", + "properties": { + "point": { + "type": "integer", + "format": "int64", + "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range." + }, + "time_frame": { + "type": "integer", + "format": "int64", + "description": "Duration beetween two points." + }, + "timestamp": { + "type": "string", + "description": "Time of point in format RFC3339." + }, + "load": { + "type": "number", + "format": "float", + "description": "load is query_time / time_range." + }, + "num_queries_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries in bucket." + }, + "num_queries_with_errors_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries with errors." + }, + "num_queries_with_warnings_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries with warnings." + }, + "m_query_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The statement execution time in seconds." + }, + "m_lock_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The time to acquire locks in seconds." + }, + "m_rows_sent_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of rows sent to the client." + }, + "m_rows_examined_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of rows scanned - SELECT." + }, + "m_rows_affected_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of rows changed - UPDATE, DELETE, INSERT." + }, + "m_rows_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of rows read from tables." + }, + "m_merge_passes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of merge passes that the sort algorithm has had to do." + }, + "m_innodb_io_r_ops_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Counts the number of page read operations scheduled." + }, + "m_innodb_io_r_bytes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Similar to innodb_IO_r_ops, but the unit is bytes." + }, + "m_innodb_io_r_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." + }, + "m_innodb_rec_lock_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query waited for row locks." + }, + "m_innodb_queue_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." + }, + "m_innodb_pages_distinct_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Counts approximately the number of unique pages the query accessed." + }, + "m_query_length_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long the query is." + }, + "m_bytes_sent_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of bytes sent to all clients." + }, + "m_tmp_tables_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on memory for the query." + }, + "m_tmp_disk_tables_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on disk for the query." + }, + "m_tmp_table_sizes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total Size in bytes for all temporary tables used in the query." + }, + "m_qc_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Boolean metrics:\n- *_sum_per_sec - how many times this matric was true.\n\nQuery Cache hits." + }, + "m_full_scan_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query performed a full table scan." + }, + "m_full_join_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query performed a full join (a join without indexes)." + }, + "m_tmp_table_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query created an implicit internal temporary table." + }, + "m_tmp_table_on_disk_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The querys temporary table was stored on disk." + }, + "m_filesort_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query used a filesort." + }, + "m_filesort_on_disk_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The filesort was performed on disk." + }, + "m_select_full_range_join_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins that used a range search on a reference table." + }, + "m_select_range_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins that used ranges on the first table." + }, + "m_select_range_check_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins without keys that check for key usage after each row." + }, + "m_sort_range_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done using ranges." + }, + "m_sort_rows_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorted rows." + }, + "m_sort_scan_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done by scanning the table." + }, + "m_no_index_used_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of queries without index." + }, + "m_no_good_index_used_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of queries without good index." + }, + "m_docs_returned_sum_per_sec": { + "type": "number", + "format": "float", + "description": "MongoDB metrics.\n\nThe number of returned documents." + }, + "m_response_length_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The response length of the query result in bytes." + }, + "m_docs_scanned_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of scanned documents." + }, + "m_shared_blks_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "PostgreSQL metrics.\n\nTotal number of shared block cache hits by the statement." + }, + "m_shared_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks read by the statement." + }, + "m_shared_blks_dirtied_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks dirtied by the statement." + }, + "m_shared_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks written by the statement." + }, + "m_local_blks_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local block cache hits by the statement." + }, + "m_local_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks read by the statement." + }, + "m_local_blks_dirtied_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks dirtied by the statement." + }, + "m_local_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks written by the statement." + }, + "m_temp_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks read by the statement." + }, + "m_temp_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks written by the statement." + }, + "m_blk_read_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_blk_write_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_cpu_user_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time user spent in query." + }, + "m_cpu_sys_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time system spent in query." + }, + "m_plans_calls_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of planned calls.", + "title": "pg_stat_monitor 0.9 metrics" + }, + "m_wal_records_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of WAL (Write-ahead logging) records." + }, + "m_wal_fpi_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." + }, + "m_wal_bytes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total bytes of WAL (Write-ahead logging) records." + }, + "m_plan_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Plan time in per seconds." + } + }, + "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines." + }, + "v1beta1QueryExample": { + "type": "object", + "properties": { + "example": { + "type": "string" + }, + "example_format": { + "$ref": "#/definitions/v1beta1ExampleFormat", + "description": "Deprecated: should not be used, should be removed." + }, + "example_type": { + "$ref": "#/definitions/v1beta1ExampleType" + }, + "is_truncated": { + "type": "integer", + "format": "int64" + }, + "placeholders_count": { + "type": "integer", + "format": "int64" + }, + "explain_fingerprint": { + "type": "string" + }, + "query_id": { + "type": "string" + }, + "example_metrics": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "service_type": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "tables": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "QueryExample shows query examples and their metrics." + }, + "v1beta1QueryExampleReply": { + "type": "object", + "properties": { + "query_examples": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1QueryExample" + } + } + }, + "description": "QueryExampleReply list of query examples." + }, + "v1beta1QueryExampleRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "filter_by": { + "type": "string", + "description": "dimension value: ex: queryid - 1D410B4BE5060972." + }, + "group_by": { + "type": "string", + "description": "one of dimension: queryid | host ..." + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1MapFieldEntry" + } + }, + "limit": { + "type": "integer", + "format": "int64" + } + }, + "description": "QueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1beta1QueryExistsRequest": { + "type": "object", + "properties": { + "serviceid": { + "type": "string" + }, + "query": { + "type": "string" + } + }, + "description": "QueryExistsRequest check if provided query exists or not." + }, + "v1beta1QueryPlanReply": { + "type": "object", + "properties": { + "planid": { + "type": "string" + }, + "query_plan": { + "type": "string" + } + }, + "description": "QueryPlanReply contains planid and query_plan." + }, + "v1beta1QueryPlanRequest": { + "type": "object", + "properties": { + "queryid": { + "type": "string" + } + }, + "description": "QueryPlanRequest defines filtering by queryid." + }, + "v1beta1SchemaByQueryIDReply": { + "type": "object", + "properties": { + "schema": { + "type": "string" + } + }, + "description": "SchemaByQueryIDReply is schema for given query ID and service ID." + }, + "v1beta1SchemaByQueryIDRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + "description": "SchemaByQueryIDRequest returns schema for given query ID and service ID." + } + } +} diff --git a/api/qanpb/object_details_grpc.pb.go b/api/qanpb/object_details_grpc.pb.go index 26a2bbc5c2..477bf53b25 100644 --- a/api/qanpb/object_details_grpc.pb.go +++ b/api/qanpb/object_details_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -157,36 +156,30 @@ type ObjectDetailsServer interface { } // UnimplementedObjectDetailsServer must be embedded to have forward compatible implementations. -type UnimplementedObjectDetailsServer struct{} +type UnimplementedObjectDetailsServer struct { +} func (UnimplementedObjectDetailsServer) GetMetrics(context.Context, *MetricsRequest) (*MetricsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") } - func (UnimplementedObjectDetailsServer) GetQueryExample(context.Context, *QueryExampleRequest) (*QueryExampleReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryExample not implemented") } - func (UnimplementedObjectDetailsServer) GetLabels(context.Context, *ObjectDetailsLabelsRequest) (*ObjectDetailsLabelsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented") } - func (UnimplementedObjectDetailsServer) GetQueryPlan(context.Context, *QueryPlanRequest) (*QueryPlanReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryPlan not implemented") } - func (UnimplementedObjectDetailsServer) GetHistogram(context.Context, *HistogramRequest) (*HistogramReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetHistogram not implemented") } - func (UnimplementedObjectDetailsServer) QueryExists(context.Context, *QueryExistsRequest) (*wrapperspb.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryExists not implemented") } - func (UnimplementedObjectDetailsServer) ExplainFingerprintByQueryID(context.Context, *ExplainFingerprintByQueryIDRequest) (*ExplainFingerprintByQueryIDReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ExplainFingerprintByQueryID not implemented") } - func (UnimplementedObjectDetailsServer) SchemaByQueryID(context.Context, *SchemaByQueryIDRequest) (*SchemaByQueryIDReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SchemaByQueryID not implemented") } diff --git a/api/qanpb/profile.pb.go b/api/qanpb/profile.pb.go index 7dd2187f5d..036a2a6376 100644 --- a/api/qanpb/profile.pb.go +++ b/api/qanpb/profile.pb.go @@ -7,13 +7,12 @@ package qanv1beta1 import ( - reflect "reflect" - sync "sync" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -651,21 +650,18 @@ func file_qanpb_profile_proto_rawDescGZIP() []byte { return file_qanpb_profile_proto_rawDescData } -var ( - file_qanpb_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_qanpb_profile_proto_goTypes = []interface{}{ - (*ReportRequest)(nil), // 0: qan.v1beta1.ReportRequest - (*ReportMapFieldEntry)(nil), // 1: qan.v1beta1.ReportMapFieldEntry - (*ReportReply)(nil), // 2: qan.v1beta1.ReportReply - (*Row)(nil), // 3: qan.v1beta1.Row - (*Metric)(nil), // 4: qan.v1beta1.Metric - (*Stat)(nil), // 5: qan.v1beta1.Stat - nil, // 6: qan.v1beta1.Row.MetricsEntry - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*Point)(nil), // 8: qan.v1beta1.Point - } -) - +var file_qanpb_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_qanpb_profile_proto_goTypes = []interface{}{ + (*ReportRequest)(nil), // 0: qan.v1beta1.ReportRequest + (*ReportMapFieldEntry)(nil), // 1: qan.v1beta1.ReportMapFieldEntry + (*ReportReply)(nil), // 2: qan.v1beta1.ReportReply + (*Row)(nil), // 3: qan.v1beta1.Row + (*Metric)(nil), // 4: qan.v1beta1.Metric + (*Stat)(nil), // 5: qan.v1beta1.Stat + nil, // 6: qan.v1beta1.Row.MetricsEntry + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*Point)(nil), // 8: qan.v1beta1.Point +} var file_qanpb_profile_proto_depIdxs = []int32{ 7, // 0: qan.v1beta1.ReportRequest.period_start_from:type_name -> google.protobuf.Timestamp 7, // 1: qan.v1beta1.ReportRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qanpb/profile.pb.gw.go b/api/qanpb/profile.pb.gw.go index ae55db87db..77dc8b1ae1 100644 --- a/api/qanpb/profile.pb.gw.go +++ b/api/qanpb/profile.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ReportRequest @@ -47,6 +45,7 @@ func request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.GetReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Ma msg, err := server.GetReport(ctx, &protoReq) return msg, metadata, err + } // RegisterProfileHandlerServer registers the http handlers for service Profile to "mux". @@ -70,6 +70,7 @@ func local_request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Ma // 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 RegisterProfileHandlerFromEndpoint instead. func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServer) error { + mux.Handle("POST", pattern_Profile_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Profile_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterProfileHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ProfileClient" to call the correct interceptors. func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileClient) error { + mux.Handle("POST", pattern_Profile_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Profile_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_Profile_GetReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetReport"}, "")) +var ( + pattern_Profile_GetReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetReport"}, "")) +) -var forward_Profile_GetReport_0 = runtime.ForwardResponseMessage +var ( + forward_Profile_GetReport_0 = runtime.ForwardResponseMessage +) diff --git a/api/qanpb/profile.swagger.json b/api/qanpb/profile.swagger.json new file mode 100644 index 0000000000..3086720961 --- /dev/null +++ b/api/qanpb/profile.swagger.json @@ -0,0 +1,578 @@ +{ + "swagger": "2.0", + "info": { + "title": "qanpb/profile.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Profile" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v0/qan/GetReport": { + "post": { + "summary": "GetReport returns list of metrics group by queryid or other dimentions.", + "operationId": "GetReport", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ReportReply" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "ReportRequest defines filtering of metrics report for db server or other dimentions.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1ReportRequest" + } + } + ], + "tags": [ + "Profile" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1Metric": { + "type": "object", + "properties": { + "stats": { + "$ref": "#/definitions/v1beta1Stat" + } + }, + "description": "Metric cell." + }, + "v1beta1Point": { + "type": "object", + "properties": { + "point": { + "type": "integer", + "format": "int64", + "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range." + }, + "time_frame": { + "type": "integer", + "format": "int64", + "description": "Duration beetween two points." + }, + "timestamp": { + "type": "string", + "description": "Time of point in format RFC3339." + }, + "load": { + "type": "number", + "format": "float", + "description": "load is query_time / time_range." + }, + "num_queries_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries in bucket." + }, + "num_queries_with_errors_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries with errors." + }, + "num_queries_with_warnings_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries with warnings." + }, + "m_query_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The statement execution time in seconds." + }, + "m_lock_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The time to acquire locks in seconds." + }, + "m_rows_sent_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of rows sent to the client." + }, + "m_rows_examined_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of rows scanned - SELECT." + }, + "m_rows_affected_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of rows changed - UPDATE, DELETE, INSERT." + }, + "m_rows_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of rows read from tables." + }, + "m_merge_passes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of merge passes that the sort algorithm has had to do." + }, + "m_innodb_io_r_ops_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Counts the number of page read operations scheduled." + }, + "m_innodb_io_r_bytes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Similar to innodb_IO_r_ops, but the unit is bytes." + }, + "m_innodb_io_r_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." + }, + "m_innodb_rec_lock_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query waited for row locks." + }, + "m_innodb_queue_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." + }, + "m_innodb_pages_distinct_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Counts approximately the number of unique pages the query accessed." + }, + "m_query_length_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long the query is." + }, + "m_bytes_sent_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of bytes sent to all clients." + }, + "m_tmp_tables_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on memory for the query." + }, + "m_tmp_disk_tables_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on disk for the query." + }, + "m_tmp_table_sizes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total Size in bytes for all temporary tables used in the query." + }, + "m_qc_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Boolean metrics:\n- *_sum_per_sec - how many times this matric was true.\n\nQuery Cache hits." + }, + "m_full_scan_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query performed a full table scan." + }, + "m_full_join_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query performed a full join (a join without indexes)." + }, + "m_tmp_table_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query created an implicit internal temporary table." + }, + "m_tmp_table_on_disk_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The querys temporary table was stored on disk." + }, + "m_filesort_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query used a filesort." + }, + "m_filesort_on_disk_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The filesort was performed on disk." + }, + "m_select_full_range_join_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins that used a range search on a reference table." + }, + "m_select_range_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins that used ranges on the first table." + }, + "m_select_range_check_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins without keys that check for key usage after each row." + }, + "m_sort_range_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done using ranges." + }, + "m_sort_rows_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorted rows." + }, + "m_sort_scan_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done by scanning the table." + }, + "m_no_index_used_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of queries without index." + }, + "m_no_good_index_used_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of queries without good index." + }, + "m_docs_returned_sum_per_sec": { + "type": "number", + "format": "float", + "description": "MongoDB metrics.\n\nThe number of returned documents." + }, + "m_response_length_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The response length of the query result in bytes." + }, + "m_docs_scanned_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of scanned documents." + }, + "m_shared_blks_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "PostgreSQL metrics.\n\nTotal number of shared block cache hits by the statement." + }, + "m_shared_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks read by the statement." + }, + "m_shared_blks_dirtied_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks dirtied by the statement." + }, + "m_shared_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks written by the statement." + }, + "m_local_blks_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local block cache hits by the statement." + }, + "m_local_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks read by the statement." + }, + "m_local_blks_dirtied_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks dirtied by the statement." + }, + "m_local_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks written by the statement." + }, + "m_temp_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks read by the statement." + }, + "m_temp_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks written by the statement." + }, + "m_blk_read_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_blk_write_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_cpu_user_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time user spent in query." + }, + "m_cpu_sys_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time system spent in query." + }, + "m_plans_calls_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of planned calls.", + "title": "pg_stat_monitor 0.9 metrics" + }, + "m_wal_records_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of WAL (Write-ahead logging) records." + }, + "m_wal_fpi_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." + }, + "m_wal_bytes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total bytes of WAL (Write-ahead logging) records." + }, + "m_plan_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Plan time in per seconds." + } + }, + "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines." + }, + "v1beta1ReportMapFieldEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "ReportMapFieldEntry allows to pass labels/dimentions in form like {\"server\": [\"db1\", \"db2\"...]}." + }, + "v1beta1ReportReply": { + "type": "object", + "properties": { + "total_rows": { + "type": "integer", + "format": "int64" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "rows": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Row" + } + } + }, + "description": "ReportReply is list of reports per quieryids, hosts etc." + }, + "v1beta1ReportRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "group_by": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1ReportMapFieldEntry" + } + }, + "columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "order_by": { + "type": "string" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "main_metric": { + "type": "string" + }, + "search": { + "type": "string" + } + }, + "description": "ReportRequest defines filtering of metrics report for db server or other dimentions." + }, + "v1beta1Row": { + "type": "object", + "properties": { + "rank": { + "type": "integer", + "format": "int64" + }, + "dimension": { + "type": "string" + }, + "database": { + "type": "string" + }, + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1beta1Metric" + } + }, + "sparkline": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Point" + } + }, + "fingerprint": { + "type": "string" + }, + "num_queries": { + "type": "integer", + "format": "int64" + }, + "qps": { + "type": "number", + "format": "float" + }, + "load": { + "type": "number", + "format": "float" + } + }, + "description": "Row define metrics for selected dimention." + }, + "v1beta1Stat": { + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "float" + }, + "cnt": { + "type": "number", + "format": "float" + }, + "sum": { + "type": "number", + "format": "float" + }, + "min": { + "type": "number", + "format": "float" + }, + "max": { + "type": "number", + "format": "float" + }, + "p99": { + "type": "number", + "format": "float" + }, + "avg": { + "type": "number", + "format": "float" + }, + "sum_per_sec": { + "type": "number", + "format": "float" + } + }, + "description": "Stat is statistics of specific metric." + } + } +} diff --git a/api/qanpb/profile_grpc.pb.go b/api/qanpb/profile_grpc.pb.go index bcabfb75b5..f0d7a3c7fd 100644 --- a/api/qanpb/profile_grpc.pb.go +++ b/api/qanpb/profile_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type ProfileServer interface { } // UnimplementedProfileServer must be embedded to have forward compatible implementations. -type UnimplementedProfileServer struct{} +type UnimplementedProfileServer struct { +} func (UnimplementedProfileServer) GetReport(context.Context, *ReportRequest) (*ReportReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetReport not implemented") diff --git a/api/qanpb/qan.pb.go b/api/qanpb/qan.pb.go index 6e1c222061..a633f3578d 100644 --- a/api/qanpb/qan.pb.go +++ b/api/qanpb/qan.pb.go @@ -7,11 +7,10 @@ package qanv1beta1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -1069,17 +1068,14 @@ func file_qanpb_qan_proto_rawDescGZIP() []byte { return file_qanpb_qan_proto_rawDescData } -var ( - file_qanpb_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_qanpb_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_qanpb_qan_proto_goTypes = []interface{}{ - (ExampleFormat)(0), // 0: qan.v1beta1.ExampleFormat - (ExampleType)(0), // 1: qan.v1beta1.ExampleType - (*Point)(nil), // 2: qan.v1beta1.Point - (*MapFieldEntry)(nil), // 3: qan.v1beta1.MapFieldEntry - } -) - +var file_qanpb_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_qanpb_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_qanpb_qan_proto_goTypes = []interface{}{ + (ExampleFormat)(0), // 0: qan.v1beta1.ExampleFormat + (ExampleType)(0), // 1: qan.v1beta1.ExampleType + (*Point)(nil), // 2: qan.v1beta1.Point + (*MapFieldEntry)(nil), // 3: qan.v1beta1.MapFieldEntry +} var file_qanpb_qan_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/qanpb/qan.swagger.json b/api/qanpb/qan.swagger.json new file mode 100644 index 0000000000..8fb0639b0c --- /dev/null +++ b/api/qanpb/qan.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "qanpb/qan.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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/serverpb/httperror.pb.go b/api/serverpb/httperror.pb.go index 1493004782..4de4e86868 100644 --- a/api/serverpb/httperror.pb.go +++ b/api/serverpb/httperror.pb.go @@ -7,12 +7,11 @@ package serverpb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" ) const ( @@ -135,14 +134,11 @@ func file_serverpb_httperror_proto_rawDescGZIP() []byte { return file_serverpb_httperror_proto_rawDescData } -var ( - file_serverpb_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_serverpb_httperror_proto_goTypes = []interface{}{ - (*HttpError)(nil), // 0: server.HttpError - (*anypb.Any)(nil), // 1: google.protobuf.Any - } -) - +var file_serverpb_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_serverpb_httperror_proto_goTypes = []interface{}{ + (*HttpError)(nil), // 0: server.HttpError + (*anypb.Any)(nil), // 1: google.protobuf.Any +} var file_serverpb_httperror_proto_depIdxs = []int32{ 1, // 0: server.HttpError.details:type_name -> google.protobuf.Any 1, // [1:1] is the sub-list for method output_type diff --git a/api/serverpb/httperror.swagger.json b/api/serverpb/httperror.swagger.json new file mode 100644 index 0000000000..704f3f310f --- /dev/null +++ b/api/serverpb/httperror.swagger.json @@ -0,0 +1,46 @@ +{ + "swagger": "2.0", + "info": { + "title": "serverpb/httperror.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/serverpb/json/client/server/aws_instance_check_parameters.go b/api/serverpb/json/client/server/aws_instance_check_parameters.go index 07381b0506..5dc132624f 100644 --- a/api/serverpb/json/client/server/aws_instance_check_parameters.go +++ b/api/serverpb/json/client/server/aws_instance_check_parameters.go @@ -60,6 +60,7 @@ AWSInstanceCheckParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AWSInstanceCheckParams struct { + // Body. Body AWSInstanceCheckBody @@ -129,6 +130,7 @@ func (o *AWSInstanceCheckParams) SetBody(body AWSInstanceCheckBody) { // WriteToRequest writes these params to a swagger request func (o *AWSInstanceCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/aws_instance_check_responses.go b/api/serverpb/json/client/server/aws_instance_check_responses.go index 84b4d576b0..5e2cd9d040 100644 --- a/api/serverpb/json/client/server/aws_instance_check_responses.go +++ b/api/serverpb/json/client/server/aws_instance_check_responses.go @@ -60,12 +60,12 @@ type AWSInstanceCheckOK struct { func (o *AWSInstanceCheckOK) Error() string { return fmt.Sprintf("[POST /v1/AWSInstanceCheck][%d] awsInstanceCheckOk %+v", 200, o.Payload) } - func (o *AWSInstanceCheckOK) GetPayload() interface{} { return o.Payload } func (o *AWSInstanceCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AWSInstanceCheckDefault) Code() int { func (o *AWSInstanceCheckDefault) Error() string { return fmt.Sprintf("[POST /v1/AWSInstanceCheck][%d] AWSInstanceCheck default %+v", o._statusCode, o.Payload) } - func (o *AWSInstanceCheckDefault) GetPayload() *AWSInstanceCheckDefaultBody { return o.Payload } func (o *AWSInstanceCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AWSInstanceCheckDefaultBody) // response payload @@ -121,6 +121,7 @@ AWSInstanceCheckBody AWS instance check body swagger:model AWSInstanceCheckBody */ type AWSInstanceCheckBody struct { + // AWS EC2 instance ID (i-1234567890abcdef0). InstanceID string `json:"instance_id,omitempty"` } @@ -158,6 +159,7 @@ AWSInstanceCheckDefaultBody AWS instance check default body swagger:model AWSInstanceCheckDefaultBody */ type AWSInstanceCheckDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -223,7 +225,9 @@ func (o *AWSInstanceCheckDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AWSInstanceCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -234,6 +238,7 @@ func (o *AWSInstanceCheckDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -346,6 +351,7 @@ AWSInstanceCheckDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized swagger:model AWSInstanceCheckDefaultBodyDetailsItems0 */ type AWSInstanceCheckDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/serverpb/json/client/server/change_settings_parameters.go b/api/serverpb/json/client/server/change_settings_parameters.go index eb5dc182f6..ea84b96ead 100644 --- a/api/serverpb/json/client/server/change_settings_parameters.go +++ b/api/serverpb/json/client/server/change_settings_parameters.go @@ -60,6 +60,7 @@ ChangeSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeSettingsParams struct { + // Body. Body ChangeSettingsBody @@ -129,6 +130,7 @@ func (o *ChangeSettingsParams) SetBody(body ChangeSettingsBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/change_settings_responses.go b/api/serverpb/json/client/server/change_settings_responses.go index 2b8002e621..9083bf25be 100644 --- a/api/serverpb/json/client/server/change_settings_responses.go +++ b/api/serverpb/json/client/server/change_settings_responses.go @@ -60,12 +60,12 @@ type ChangeSettingsOK struct { func (o *ChangeSettingsOK) Error() string { return fmt.Sprintf("[POST /v1/Settings/Change][%d] changeSettingsOk %+v", 200, o.Payload) } - func (o *ChangeSettingsOK) GetPayload() *ChangeSettingsOKBody { return o.Payload } func (o *ChangeSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSettingsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ChangeSettingsDefault) Code() int { func (o *ChangeSettingsDefault) Error() string { return fmt.Sprintf("[POST /v1/Settings/Change][%d] ChangeSettings default %+v", o._statusCode, o.Payload) } - func (o *ChangeSettingsDefault) GetPayload() *ChangeSettingsDefaultBody { return o.Payload } func (o *ChangeSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSettingsDefaultBody) // response payload @@ -123,6 +123,7 @@ ChangeSettingsBody change settings body swagger:model ChangeSettingsBody */ type ChangeSettingsBody struct { + // enable updates EnableUpdates bool `json:"enable_updates,omitempty"` @@ -343,6 +344,7 @@ func (o *ChangeSettingsBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeSettingsBody) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -358,6 +360,7 @@ func (o *ChangeSettingsBody) contextValidateEmailAlertingSettings(ctx context.Co } func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -373,6 +376,7 @@ func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Conte } func (o *ChangeSettingsBody) contextValidateSlackAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.SlackAlertingSettings != nil { if err := o.SlackAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -388,6 +392,7 @@ func (o *ChangeSettingsBody) contextValidateSlackAlertingSettings(ctx context.Co } func (o *ChangeSettingsBody) contextValidateSttCheckIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.SttCheckIntervals != nil { if err := o.SttCheckIntervals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,6 +430,7 @@ ChangeSettingsDefaultBody change settings default body swagger:model ChangeSettingsDefaultBody */ type ChangeSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -490,7 +496,9 @@ func (o *ChangeSettingsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -501,6 +509,7 @@ func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -613,6 +622,7 @@ ChangeSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ChangeSettingsDefaultBodyDetailsItems0 */ type ChangeSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -676,6 +686,7 @@ ChangeSettingsOKBody change settings OK body swagger:model ChangeSettingsOKBody */ type ChangeSettingsOKBody struct { + // settings Settings *ChangeSettingsOKBodySettings `json:"settings,omitempty"` } @@ -728,6 +739,7 @@ func (o *ChangeSettingsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ChangeSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if err := o.Settings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -765,6 +777,7 @@ ChangeSettingsOKBodySettings Settings represents PMM Server settings. swagger:model ChangeSettingsOKBodySettings */ type ChangeSettingsOKBodySettings struct { + // True if updates are disabled. UpdatesDisabled bool `json:"updates_disabled,omitempty"` @@ -961,6 +974,7 @@ func (o *ChangeSettingsOKBodySettings) ContextValidate(ctx context.Context, form } func (o *ChangeSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -976,6 +990,7 @@ func (o *ChangeSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx } func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -991,6 +1006,7 @@ func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx con } func (o *ChangeSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.SlackAlertingSettings != nil { if err := o.SlackAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1006,6 +1022,7 @@ func (o *ChangeSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx } func (o *ChangeSettingsOKBodySettings) contextValidateSttCheckIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.SttCheckIntervals != nil { if err := o.SttCheckIntervals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1043,6 +1060,7 @@ ChangeSettingsOKBodySettingsEmailAlertingSettings EmailAlertingSettings represen swagger:model ChangeSettingsOKBodySettingsEmailAlertingSettings */ type ChangeSettingsOKBodySettingsEmailAlertingSettings struct { + // SMTP From header field. From string `json:"from,omitempty"` @@ -1101,6 +1119,7 @@ ChangeSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeSettingsOKBodySettingsMetricsResolutions */ type ChangeSettingsOKBodySettingsMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1144,6 +1163,7 @@ ChangeSettingsOKBodySettingsSlackAlertingSettings SlackAlertingSettings represen swagger:model ChangeSettingsOKBodySettingsSlackAlertingSettings */ type ChangeSettingsOKBodySettingsSlackAlertingSettings struct { + // Slack API (webhook) URL. URL string `json:"url,omitempty"` } @@ -1181,6 +1201,7 @@ ChangeSettingsOKBodySettingsSttCheckIntervals STTCheckIntervals represents inter swagger:model ChangeSettingsOKBodySettingsSttCheckIntervals */ type ChangeSettingsOKBodySettingsSttCheckIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1224,6 +1245,7 @@ ChangeSettingsParamsBodyEmailAlertingSettings EmailAlertingSettings represents e swagger:model ChangeSettingsParamsBodyEmailAlertingSettings */ type ChangeSettingsParamsBodyEmailAlertingSettings struct { + // SMTP From header field. From string `json:"from,omitempty"` @@ -1282,6 +1304,7 @@ ChangeSettingsParamsBodyMetricsResolutions MetricsResolutions represents Prometh swagger:model ChangeSettingsParamsBodyMetricsResolutions */ type ChangeSettingsParamsBodyMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1325,6 +1348,7 @@ ChangeSettingsParamsBodySlackAlertingSettings SlackAlertingSettings represents S swagger:model ChangeSettingsParamsBodySlackAlertingSettings */ type ChangeSettingsParamsBodySlackAlertingSettings struct { + // Slack API (webhook) URL. URL string `json:"url,omitempty"` } @@ -1362,6 +1386,7 @@ ChangeSettingsParamsBodySttCheckIntervals STTCheckIntervals represents intervals swagger:model ChangeSettingsParamsBodySttCheckIntervals */ type ChangeSettingsParamsBodySttCheckIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` diff --git a/api/serverpb/json/client/server/check_updates_parameters.go b/api/serverpb/json/client/server/check_updates_parameters.go index 41df75a538..71a36c3c14 100644 --- a/api/serverpb/json/client/server/check_updates_parameters.go +++ b/api/serverpb/json/client/server/check_updates_parameters.go @@ -60,6 +60,7 @@ CheckUpdatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CheckUpdatesParams struct { + // Body. Body CheckUpdatesBody @@ -129,6 +130,7 @@ func (o *CheckUpdatesParams) SetBody(body CheckUpdatesBody) { // WriteToRequest writes these params to a swagger request func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/check_updates_responses.go b/api/serverpb/json/client/server/check_updates_responses.go index cec3a2d77a..faf384871f 100644 --- a/api/serverpb/json/client/server/check_updates_responses.go +++ b/api/serverpb/json/client/server/check_updates_responses.go @@ -61,12 +61,12 @@ type CheckUpdatesOK struct { func (o *CheckUpdatesOK) Error() string { return fmt.Sprintf("[POST /v1/Updates/Check][%d] checkUpdatesOk %+v", 200, o.Payload) } - func (o *CheckUpdatesOK) GetPayload() *CheckUpdatesOKBody { return o.Payload } func (o *CheckUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CheckUpdatesOKBody) // response payload @@ -103,12 +103,12 @@ func (o *CheckUpdatesDefault) Code() int { func (o *CheckUpdatesDefault) Error() string { return fmt.Sprintf("[POST /v1/Updates/Check][%d] CheckUpdates default %+v", o._statusCode, o.Payload) } - func (o *CheckUpdatesDefault) GetPayload() *CheckUpdatesDefaultBody { return o.Payload } func (o *CheckUpdatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CheckUpdatesDefaultBody) // response payload @@ -124,6 +124,7 @@ CheckUpdatesBody check updates body swagger:model CheckUpdatesBody */ type CheckUpdatesBody struct { + // If false, cached information may be returned. Force bool `json:"force,omitempty"` @@ -164,6 +165,7 @@ CheckUpdatesDefaultBody check updates default body swagger:model CheckUpdatesDefaultBody */ type CheckUpdatesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -229,7 +231,9 @@ func (o *CheckUpdatesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,6 +244,7 @@ func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -352,6 +357,7 @@ CheckUpdatesDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model CheckUpdatesDefaultBodyDetailsItems0 */ type CheckUpdatesDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -415,6 +421,7 @@ CheckUpdatesOKBody check updates OK body swagger:model CheckUpdatesOKBody */ type CheckUpdatesOKBody struct { + // True if there is a PMM Server update available. UpdateAvailable bool `json:"update_available,omitempty"` @@ -523,6 +530,7 @@ func (o *CheckUpdatesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, formats strfmt.Registry) error { + if o.Installed != nil { if err := o.Installed.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -538,6 +546,7 @@ func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, forma } func (o *CheckUpdatesOKBody) contextValidateLatest(ctx context.Context, formats strfmt.Registry) error { + if o.Latest != nil { if err := o.Latest.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -575,6 +584,7 @@ CheckUpdatesOKBodyInstalled VersionInfo describes component version, or PMM Serv swagger:model CheckUpdatesOKBodyInstalled */ type CheckUpdatesOKBodyInstalled struct { + // User-visible version. Version string `json:"version,omitempty"` @@ -640,6 +650,7 @@ CheckUpdatesOKBodyLatest VersionInfo describes component version, or PMM Server swagger:model CheckUpdatesOKBodyLatest */ type CheckUpdatesOKBodyLatest struct { + // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/serverpb/json/client/server/get_settings_parameters.go b/api/serverpb/json/client/server/get_settings_parameters.go index 286fc45f4d..e7bf706e9d 100644 --- a/api/serverpb/json/client/server/get_settings_parameters.go +++ b/api/serverpb/json/client/server/get_settings_parameters.go @@ -60,6 +60,7 @@ GetSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetSettingsParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *GetSettingsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/get_settings_responses.go b/api/serverpb/json/client/server/get_settings_responses.go index 3d40aa6583..b1902525c8 100644 --- a/api/serverpb/json/client/server/get_settings_responses.go +++ b/api/serverpb/json/client/server/get_settings_responses.go @@ -60,12 +60,12 @@ type GetSettingsOK struct { func (o *GetSettingsOK) Error() string { return fmt.Sprintf("[POST /v1/Settings/Get][%d] getSettingsOk %+v", 200, o.Payload) } - func (o *GetSettingsOK) GetPayload() *GetSettingsOKBody { return o.Payload } func (o *GetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSettingsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetSettingsDefault) Code() int { func (o *GetSettingsDefault) Error() string { return fmt.Sprintf("[POST /v1/Settings/Get][%d] GetSettings default %+v", o._statusCode, o.Payload) } - func (o *GetSettingsDefault) GetPayload() *GetSettingsDefaultBody { return o.Payload } func (o *GetSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSettingsDefaultBody) // response payload @@ -123,6 +123,7 @@ GetSettingsDefaultBody get settings default body swagger:model GetSettingsDefaultBody */ type GetSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *GetSettingsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -311,6 +315,7 @@ GetSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model GetSettingsDefaultBodyDetailsItems0 */ type GetSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -374,6 +379,7 @@ GetSettingsOKBody get settings OK body swagger:model GetSettingsOKBody */ type GetSettingsOKBody struct { + // settings Settings *GetSettingsOKBodySettings `json:"settings,omitempty"` } @@ -426,6 +432,7 @@ func (o *GetSettingsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if err := o.Settings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -463,6 +470,7 @@ GetSettingsOKBodySettings Settings represents PMM Server settings. swagger:model GetSettingsOKBodySettings */ type GetSettingsOKBodySettings struct { + // True if updates are disabled. UpdatesDisabled bool `json:"updates_disabled,omitempty"` @@ -659,6 +667,7 @@ func (o *GetSettingsOKBodySettings) ContextValidate(ctx context.Context, formats } func (o *GetSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -674,6 +683,7 @@ func (o *GetSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx con } func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -689,6 +699,7 @@ func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx contex } func (o *GetSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.SlackAlertingSettings != nil { if err := o.SlackAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -704,6 +715,7 @@ func (o *GetSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx con } func (o *GetSettingsOKBodySettings) contextValidateSttCheckIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.SttCheckIntervals != nil { if err := o.SttCheckIntervals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -741,6 +753,7 @@ GetSettingsOKBodySettingsEmailAlertingSettings EmailAlertingSettings represents swagger:model GetSettingsOKBodySettingsEmailAlertingSettings */ type GetSettingsOKBodySettingsEmailAlertingSettings struct { + // SMTP From header field. From string `json:"from,omitempty"` @@ -799,6 +812,7 @@ GetSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Promet swagger:model GetSettingsOKBodySettingsMetricsResolutions */ type GetSettingsOKBodySettingsMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -842,6 +856,7 @@ GetSettingsOKBodySettingsSlackAlertingSettings SlackAlertingSettings represents swagger:model GetSettingsOKBodySettingsSlackAlertingSettings */ type GetSettingsOKBodySettingsSlackAlertingSettings struct { + // Slack API (webhook) URL. URL string `json:"url,omitempty"` } @@ -879,6 +894,7 @@ GetSettingsOKBodySettingsSttCheckIntervals STTCheckIntervals represents interval swagger:model GetSettingsOKBodySettingsSttCheckIntervals */ type GetSettingsOKBodySettingsSttCheckIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` diff --git a/api/serverpb/json/client/server/logs_parameters.go b/api/serverpb/json/client/server/logs_parameters.go index 2463907eae..787e34ced5 100644 --- a/api/serverpb/json/client/server/logs_parameters.go +++ b/api/serverpb/json/client/server/logs_parameters.go @@ -61,6 +61,7 @@ LogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type LogsParams struct { + /* Pprof. Include performance profiling data, @@ -133,6 +134,7 @@ func (o *LogsParams) SetPprof(pprof *bool) { // WriteToRequest writes these params to a swagger request func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -148,6 +150,7 @@ func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry } qPprof := swag.FormatBool(qrPprof) if qPprof != "" { + if err := r.SetQueryParam("pprof", qPprof); err != nil { return err } diff --git a/api/serverpb/json/client/server/logs_responses.go b/api/serverpb/json/client/server/logs_responses.go index ef66827e2e..b3c3261f74 100644 --- a/api/serverpb/json/client/server/logs_responses.go +++ b/api/serverpb/json/client/server/logs_responses.go @@ -45,6 +45,7 @@ func (o *LogsReader) ReadResponse(response runtime.ClientResponse, consumer runt // NewLogsOK creates a LogsOK with default headers values func NewLogsOK(writer io.Writer) *LogsOK { return &LogsOK{ + Payload: writer, } } @@ -61,12 +62,12 @@ type LogsOK struct { func (o *LogsOK) Error() string { return fmt.Sprintf("[GET /logs.zip][%d] logsOk %+v", 200, o.Payload) } - func (o *LogsOK) GetPayload() io.Writer { return o.Payload } func (o *LogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err @@ -101,12 +102,12 @@ func (o *LogsDefault) Code() int { func (o *LogsDefault) Error() string { return fmt.Sprintf("[GET /logs.zip][%d] Logs default %+v", o._statusCode, o.Payload) } - func (o *LogsDefault) GetPayload() *LogsDefaultBody { return o.Payload } func (o *LogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(LogsDefaultBody) // response payload @@ -122,6 +123,7 @@ LogsDefaultBody ErrorResponse is a message returned on HTTP error. swagger:model LogsDefaultBody */ type LogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` diff --git a/api/serverpb/json/client/server/readiness_parameters.go b/api/serverpb/json/client/server/readiness_parameters.go index 0389af80fe..3ea1fa1a59 100644 --- a/api/serverpb/json/client/server/readiness_parameters.go +++ b/api/serverpb/json/client/server/readiness_parameters.go @@ -115,6 +115,7 @@ func (o *ReadinessParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ReadinessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/readiness_responses.go b/api/serverpb/json/client/server/readiness_responses.go index 9920833a8a..afac1b172c 100644 --- a/api/serverpb/json/client/server/readiness_responses.go +++ b/api/serverpb/json/client/server/readiness_responses.go @@ -60,12 +60,12 @@ type ReadinessOK struct { func (o *ReadinessOK) Error() string { return fmt.Sprintf("[GET /v1/readyz][%d] readinessOk %+v", 200, o.Payload) } - func (o *ReadinessOK) GetPayload() interface{} { return o.Payload } func (o *ReadinessOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ReadinessDefault) Code() int { func (o *ReadinessDefault) Error() string { return fmt.Sprintf("[GET /v1/readyz][%d] Readiness default %+v", o._statusCode, o.Payload) } - func (o *ReadinessDefault) GetPayload() *ReadinessDefaultBody { return o.Payload } func (o *ReadinessDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ReadinessDefaultBody) // response payload @@ -121,6 +121,7 @@ ReadinessDefaultBody readiness default body swagger:model ReadinessDefaultBody */ type ReadinessDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -186,7 +187,9 @@ func (o *ReadinessDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -197,6 +200,7 @@ func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -309,6 +313,7 @@ ReadinessDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protoco swagger:model ReadinessDefaultBodyDetailsItems0 */ type ReadinessDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/serverpb/json/client/server/start_update_parameters.go b/api/serverpb/json/client/server/start_update_parameters.go index 514a1b9d38..4b070636e0 100644 --- a/api/serverpb/json/client/server/start_update_parameters.go +++ b/api/serverpb/json/client/server/start_update_parameters.go @@ -60,6 +60,7 @@ StartUpdateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartUpdateParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *StartUpdateParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *StartUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/start_update_responses.go b/api/serverpb/json/client/server/start_update_responses.go index 81ea850bb2..3abb57bea6 100644 --- a/api/serverpb/json/client/server/start_update_responses.go +++ b/api/serverpb/json/client/server/start_update_responses.go @@ -60,12 +60,12 @@ type StartUpdateOK struct { func (o *StartUpdateOK) Error() string { return fmt.Sprintf("[POST /v1/Updates/Start][%d] startUpdateOk %+v", 200, o.Payload) } - func (o *StartUpdateOK) GetPayload() *StartUpdateOKBody { return o.Payload } func (o *StartUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartUpdateOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartUpdateDefault) Code() int { func (o *StartUpdateDefault) Error() string { return fmt.Sprintf("[POST /v1/Updates/Start][%d] StartUpdate default %+v", o._statusCode, o.Payload) } - func (o *StartUpdateDefault) GetPayload() *StartUpdateDefaultBody { return o.Payload } func (o *StartUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartUpdateDefaultBody) // response payload @@ -123,6 +123,7 @@ StartUpdateDefaultBody start update default body swagger:model StartUpdateDefaultBody */ type StartUpdateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *StartUpdateDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -311,6 +315,7 @@ StartUpdateDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model StartUpdateDefaultBodyDetailsItems0 */ type StartUpdateDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -374,6 +379,7 @@ StartUpdateOKBody start update OK body swagger:model StartUpdateOKBody */ type StartUpdateOKBody struct { + // Authentication token for getting update statuses. AuthToken string `json:"auth_token,omitempty"` diff --git a/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go b/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go index df14058507..fd9d46d8ff 100644 --- a/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go +++ b/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go @@ -60,6 +60,7 @@ TestEmailAlertingSettingsParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type TestEmailAlertingSettingsParams struct { + // Body. Body TestEmailAlertingSettingsBody @@ -129,6 +130,7 @@ func (o *TestEmailAlertingSettingsParams) SetBody(body TestEmailAlertingSettings // WriteToRequest writes these params to a swagger request func (o *TestEmailAlertingSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/test_email_alerting_settings_responses.go b/api/serverpb/json/client/server/test_email_alerting_settings_responses.go index d244764a80..8d54608ee6 100644 --- a/api/serverpb/json/client/server/test_email_alerting_settings_responses.go +++ b/api/serverpb/json/client/server/test_email_alerting_settings_responses.go @@ -60,12 +60,12 @@ type TestEmailAlertingSettingsOK struct { func (o *TestEmailAlertingSettingsOK) Error() string { return fmt.Sprintf("[POST /v1/Settings/TestEmailAlertingSettings][%d] testEmailAlertingSettingsOk %+v", 200, o.Payload) } - func (o *TestEmailAlertingSettingsOK) GetPayload() interface{} { return o.Payload } func (o *TestEmailAlertingSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *TestEmailAlertingSettingsDefault) Code() int { func (o *TestEmailAlertingSettingsDefault) Error() string { return fmt.Sprintf("[POST /v1/Settings/TestEmailAlertingSettings][%d] TestEmailAlertingSettings default %+v", o._statusCode, o.Payload) } - func (o *TestEmailAlertingSettingsDefault) GetPayload() *TestEmailAlertingSettingsDefaultBody { return o.Payload } func (o *TestEmailAlertingSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(TestEmailAlertingSettingsDefaultBody) // response payload @@ -121,6 +121,7 @@ TestEmailAlertingSettingsBody test email alerting settings body swagger:model TestEmailAlertingSettingsBody */ type TestEmailAlertingSettingsBody struct { + // Target email address to send the email to. EmailTo string `json:"email_to,omitempty"` @@ -176,6 +177,7 @@ func (o *TestEmailAlertingSettingsBody) ContextValidate(ctx context.Context, for } func (o *TestEmailAlertingSettingsBody) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { + if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -213,6 +215,7 @@ TestEmailAlertingSettingsDefaultBody test email alerting settings default body swagger:model TestEmailAlertingSettingsDefaultBody */ type TestEmailAlertingSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -278,7 +281,9 @@ func (o *TestEmailAlertingSettingsDefaultBody) ContextValidate(ctx context.Conte } func (o *TestEmailAlertingSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -289,6 +294,7 @@ func (o *TestEmailAlertingSettingsDefaultBody) contextValidateDetails(ctx contex return err } } + } return nil @@ -401,6 +407,7 @@ TestEmailAlertingSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary se swagger:model TestEmailAlertingSettingsDefaultBodyDetailsItems0 */ type TestEmailAlertingSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -464,6 +471,7 @@ TestEmailAlertingSettingsParamsBodyEmailAlertingSettings EmailAlertingSettings r swagger:model TestEmailAlertingSettingsParamsBodyEmailAlertingSettings */ type TestEmailAlertingSettingsParamsBodyEmailAlertingSettings struct { + // SMTP From header field. From string `json:"from,omitempty"` diff --git a/api/serverpb/json/client/server/update_status_parameters.go b/api/serverpb/json/client/server/update_status_parameters.go index c2b50ad2f8..2b035d56e0 100644 --- a/api/serverpb/json/client/server/update_status_parameters.go +++ b/api/serverpb/json/client/server/update_status_parameters.go @@ -60,6 +60,7 @@ UpdateStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateStatusParams struct { + // Body. Body UpdateStatusBody @@ -129,6 +130,7 @@ func (o *UpdateStatusParams) SetBody(body UpdateStatusBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/update_status_responses.go b/api/serverpb/json/client/server/update_status_responses.go index 15a084ac3f..dfafb1ab3b 100644 --- a/api/serverpb/json/client/server/update_status_responses.go +++ b/api/serverpb/json/client/server/update_status_responses.go @@ -60,12 +60,12 @@ type UpdateStatusOK struct { func (o *UpdateStatusOK) Error() string { return fmt.Sprintf("[POST /v1/Updates/Status][%d] updateStatusOk %+v", 200, o.Payload) } - func (o *UpdateStatusOK) GetPayload() *UpdateStatusOKBody { return o.Payload } func (o *UpdateStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateStatusOKBody) // response payload @@ -102,12 +102,12 @@ func (o *UpdateStatusDefault) Code() int { func (o *UpdateStatusDefault) Error() string { return fmt.Sprintf("[POST /v1/Updates/Status][%d] UpdateStatus default %+v", o._statusCode, o.Payload) } - func (o *UpdateStatusDefault) GetPayload() *UpdateStatusDefaultBody { return o.Payload } func (o *UpdateStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateStatusDefaultBody) // response payload @@ -123,6 +123,7 @@ UpdateStatusBody update status body swagger:model UpdateStatusBody */ type UpdateStatusBody struct { + // Authentication token. AuthToken string `json:"auth_token,omitempty"` @@ -163,6 +164,7 @@ UpdateStatusDefaultBody update status default body swagger:model UpdateStatusDefaultBody */ type UpdateStatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *UpdateStatusDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -351,6 +356,7 @@ UpdateStatusDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model UpdateStatusDefaultBodyDetailsItems0 */ type UpdateStatusDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -414,6 +420,7 @@ UpdateStatusOKBody update status OK body swagger:model UpdateStatusOKBody */ type UpdateStatusOKBody struct { + // Progress log lines. LogLines []string `json:"log_lines"` diff --git a/api/serverpb/json/client/server/version_parameters.go b/api/serverpb/json/client/server/version_parameters.go index 6e1ac5601f..221207560e 100644 --- a/api/serverpb/json/client/server/version_parameters.go +++ b/api/serverpb/json/client/server/version_parameters.go @@ -60,6 +60,7 @@ VersionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type VersionParams struct { + /* Dummy. Dummy parameter for internal testing. Do not use. @@ -132,6 +133,7 @@ func (o *VersionParams) SetDummy(dummy *string) { // WriteToRequest writes these params to a swagger request func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -147,6 +149,7 @@ func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qDummy := qrDummy if qDummy != "" { + if err := r.SetQueryParam("dummy", qDummy); err != nil { return err } diff --git a/api/serverpb/json/client/server/version_responses.go b/api/serverpb/json/client/server/version_responses.go index 6b84e5a583..37b89be7aa 100644 --- a/api/serverpb/json/client/server/version_responses.go +++ b/api/serverpb/json/client/server/version_responses.go @@ -62,12 +62,12 @@ type VersionOK struct { func (o *VersionOK) Error() string { return fmt.Sprintf("[GET /v1/version][%d] versionOk %+v", 200, o.Payload) } - func (o *VersionOK) GetPayload() *VersionOKBody { return o.Payload } func (o *VersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(VersionOKBody) // response payload @@ -104,12 +104,12 @@ func (o *VersionDefault) Code() int { func (o *VersionDefault) Error() string { return fmt.Sprintf("[GET /v1/version][%d] Version default %+v", o._statusCode, o.Payload) } - func (o *VersionDefault) GetPayload() *VersionDefaultBody { return o.Payload } func (o *VersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(VersionDefaultBody) // response payload @@ -125,6 +125,7 @@ VersionDefaultBody version default body swagger:model VersionDefaultBody */ type VersionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -190,7 +191,9 @@ func (o *VersionDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -201,6 +204,7 @@ func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -313,6 +317,7 @@ VersionDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol swagger:model VersionDefaultBodyDetailsItems0 */ type VersionDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -376,6 +381,7 @@ VersionOKBody version OK body swagger:model VersionOKBody */ type VersionOKBody struct { + // PMM Server version. Version string `json:"version,omitempty"` @@ -523,6 +529,7 @@ func (o *VersionOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strfmt.Registry) error { + if o.Managed != nil { if err := o.Managed.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -538,6 +545,7 @@ func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strf } func (o *VersionOKBody) contextValidateServer(ctx context.Context, formats strfmt.Registry) error { + if o.Server != nil { if err := o.Server.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -575,6 +583,7 @@ VersionOKBodyManaged VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyManaged */ type VersionOKBodyManaged struct { + // User-visible version. Version string `json:"version,omitempty"` @@ -640,6 +649,7 @@ VersionOKBodyServer VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyServer */ type VersionOKBodyServer struct { + // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/serverpb/server.pb.go b/api/serverpb/server.pb.go index 996fda1cab..65d25561fc 100644 --- a/api/serverpb/server.pb.go +++ b/api/serverpb/server.pb.go @@ -7,9 +7,6 @@ package serverpb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -17,6 +14,8 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -2290,40 +2289,37 @@ func file_serverpb_server_proto_rawDescGZIP() []byte { return file_serverpb_server_proto_rawDescData } -var ( - file_serverpb_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_serverpb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 24) - file_serverpb_server_proto_goTypes = []interface{}{ - (DistributionMethod)(0), // 0: server.DistributionMethod - (*VersionInfo)(nil), // 1: server.VersionInfo - (*VersionRequest)(nil), // 2: server.VersionRequest - (*VersionResponse)(nil), // 3: server.VersionResponse - (*ReadinessRequest)(nil), // 4: server.ReadinessRequest - (*ReadinessResponse)(nil), // 5: server.ReadinessResponse - (*CheckUpdatesRequest)(nil), // 6: server.CheckUpdatesRequest - (*CheckUpdatesResponse)(nil), // 7: server.CheckUpdatesResponse - (*StartUpdateRequest)(nil), // 8: server.StartUpdateRequest - (*StartUpdateResponse)(nil), // 9: server.StartUpdateResponse - (*UpdateStatusRequest)(nil), // 10: server.UpdateStatusRequest - (*UpdateStatusResponse)(nil), // 11: server.UpdateStatusResponse - (*MetricsResolutions)(nil), // 12: server.MetricsResolutions - (*EmailAlertingSettings)(nil), // 13: server.EmailAlertingSettings - (*SlackAlertingSettings)(nil), // 14: server.SlackAlertingSettings - (*STTCheckIntervals)(nil), // 15: server.STTCheckIntervals - (*Settings)(nil), // 16: server.Settings - (*GetSettingsRequest)(nil), // 17: server.GetSettingsRequest - (*GetSettingsResponse)(nil), // 18: server.GetSettingsResponse - (*ChangeSettingsRequest)(nil), // 19: server.ChangeSettingsRequest - (*ChangeSettingsResponse)(nil), // 20: server.ChangeSettingsResponse - (*TestEmailAlertingSettingsRequest)(nil), // 21: server.TestEmailAlertingSettingsRequest - (*TestEmailAlertingSettingsResponse)(nil), // 22: server.TestEmailAlertingSettingsResponse - (*AWSInstanceCheckRequest)(nil), // 23: server.AWSInstanceCheckRequest - (*AWSInstanceCheckResponse)(nil), // 24: server.AWSInstanceCheckResponse - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 26: google.protobuf.Duration - } -) - +var file_serverpb_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_serverpb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_serverpb_server_proto_goTypes = []interface{}{ + (DistributionMethod)(0), // 0: server.DistributionMethod + (*VersionInfo)(nil), // 1: server.VersionInfo + (*VersionRequest)(nil), // 2: server.VersionRequest + (*VersionResponse)(nil), // 3: server.VersionResponse + (*ReadinessRequest)(nil), // 4: server.ReadinessRequest + (*ReadinessResponse)(nil), // 5: server.ReadinessResponse + (*CheckUpdatesRequest)(nil), // 6: server.CheckUpdatesRequest + (*CheckUpdatesResponse)(nil), // 7: server.CheckUpdatesResponse + (*StartUpdateRequest)(nil), // 8: server.StartUpdateRequest + (*StartUpdateResponse)(nil), // 9: server.StartUpdateResponse + (*UpdateStatusRequest)(nil), // 10: server.UpdateStatusRequest + (*UpdateStatusResponse)(nil), // 11: server.UpdateStatusResponse + (*MetricsResolutions)(nil), // 12: server.MetricsResolutions + (*EmailAlertingSettings)(nil), // 13: server.EmailAlertingSettings + (*SlackAlertingSettings)(nil), // 14: server.SlackAlertingSettings + (*STTCheckIntervals)(nil), // 15: server.STTCheckIntervals + (*Settings)(nil), // 16: server.Settings + (*GetSettingsRequest)(nil), // 17: server.GetSettingsRequest + (*GetSettingsResponse)(nil), // 18: server.GetSettingsResponse + (*ChangeSettingsRequest)(nil), // 19: server.ChangeSettingsRequest + (*ChangeSettingsResponse)(nil), // 20: server.ChangeSettingsResponse + (*TestEmailAlertingSettingsRequest)(nil), // 21: server.TestEmailAlertingSettingsRequest + (*TestEmailAlertingSettingsResponse)(nil), // 22: server.TestEmailAlertingSettingsResponse + (*AWSInstanceCheckRequest)(nil), // 23: server.AWSInstanceCheckRequest + (*AWSInstanceCheckResponse)(nil), // 24: server.AWSInstanceCheckResponse + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 26: google.protobuf.Duration +} var file_serverpb_server_proto_depIdxs = []int32{ 25, // 0: server.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 1: server.VersionResponse.server:type_name -> server.VersionInfo diff --git a/api/serverpb/server.pb.gw.go b/api/serverpb/server.pb.gw.go index 6b7c5f0f11..f1f01bc951 100644 --- a/api/serverpb/server.pb.gw.go +++ b/api/serverpb/server.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join + filter_Server_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -var filter_Server_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - func request_Server_Version_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VersionRequest var metadata runtime.ServerMetadata @@ -48,6 +48,7 @@ func request_Server_Version_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_Version_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +64,7 @@ func local_request_Server_Version_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.Version(ctx, &protoReq) return msg, metadata, err + } func request_Server_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -71,6 +73,7 @@ func request_Server_Readiness_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.Readiness(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +82,7 @@ func local_request_Server_Readiness_0(ctx context.Context, marshaler runtime.Mar msg, err := server.Readiness(ctx, &protoReq) return msg, metadata, err + } func request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +99,7 @@ func request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.CheckUpdates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +116,7 @@ func local_request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime. msg, err := server.CheckUpdates(ctx, &protoReq) return msg, metadata, err + } func request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +133,7 @@ func request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.StartUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +150,7 @@ func local_request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.M msg, err := server.StartUpdate(ctx, &protoReq) return msg, metadata, err + } func request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +167,7 @@ func request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.UpdateStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +184,7 @@ func local_request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime. msg, err := server.UpdateStatus(ctx, &protoReq) return msg, metadata, err + } func request_Server_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +201,7 @@ func request_Server_GetSettings_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.GetSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +218,7 @@ func local_request_Server_GetSettings_0(ctx context.Context, marshaler runtime.M msg, err := server.GetSettings(ctx, &protoReq) return msg, metadata, err + } func request_Server_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -223,6 +235,7 @@ func request_Server_ChangeSettings_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ChangeSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -239,6 +252,7 @@ func local_request_Server_ChangeSettings_0(ctx context.Context, marshaler runtim msg, err := server.ChangeSettings(ctx, &protoReq) return msg, metadata, err + } func request_Server_TestEmailAlertingSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -255,6 +269,7 @@ func request_Server_TestEmailAlertingSettings_0(ctx context.Context, marshaler r msg, err := client.TestEmailAlertingSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_TestEmailAlertingSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -271,6 +286,7 @@ func local_request_Server_TestEmailAlertingSettings_0(ctx context.Context, marsh msg, err := server.TestEmailAlertingSettings(ctx, &protoReq) return msg, metadata, err + } func request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +303,7 @@ func request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Ma msg, err := client.AWSInstanceCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -303,6 +320,7 @@ func local_request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runt msg, err := server.AWSInstanceCheck(ctx, &protoReq) return msg, metadata, err + } // RegisterServerHandlerServer registers the http handlers for service Server to "mux". @@ -310,6 +328,7 @@ func local_request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runt // 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 RegisterServerHandlerFromEndpoint instead. func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerServer) error { + mux.Handle("GET", pattern_Server_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -332,6 +351,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Server_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,6 +376,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -380,6 +401,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -404,6 +426,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -428,6 +451,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -452,6 +476,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -476,6 +501,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_TestEmailAlertingSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -500,6 +526,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_TestEmailAlertingSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_AWSInstanceCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -524,6 +551,7 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_AWSInstanceCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -566,6 +594,7 @@ func RegisterServerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServerClient" to call the correct interceptors. func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerClient) error { + mux.Handle("GET", pattern_Server_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -585,6 +614,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Server_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -606,6 +636,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -627,6 +658,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -648,6 +680,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -669,6 +702,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -690,6 +724,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -711,6 +746,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_TestEmailAlertingSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -732,6 +768,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_TestEmailAlertingSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_Server_AWSInstanceCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -753,6 +790,7 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_AWSInstanceCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/serverpb/server.swagger.json b/api/serverpb/server.swagger.json new file mode 100644 index 0000000000..9cca1bc946 --- /dev/null +++ b/api/serverpb/server.swagger.json @@ -0,0 +1,835 @@ +{ + "swagger": "2.0", + "info": { + "title": "serverpb/server.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Server" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/AWSInstanceCheck": { + "post": { + "summary": "AWS instance check", + "description": "Checks AWS EC2 instance ID.", + "operationId": "AWSInstanceCheck", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverAWSInstanceCheckResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverAWSInstanceCheckRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/Settings/Change": { + "post": { + "summary": "Change settings", + "description": "Changes PMM Server settings.", + "operationId": "ChangeSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverChangeSettingsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverChangeSettingsRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/Settings/Get": { + "post": { + "summary": "Get settings", + "description": "Returns current PMM Server settings.", + "operationId": "GetSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverGetSettingsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverGetSettingsRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/Settings/TestEmailAlertingSettings": { + "post": { + "summary": "Test email alerting", + "description": "Sends test email to check current SMTP settings for email alerting.", + "operationId": "TestEmailAlertingSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverTestEmailAlertingSettingsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverTestEmailAlertingSettingsRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/Updates/Check": { + "post": { + "summary": "Check updates", + "description": "Checks for available PMM Server updates.", + "operationId": "CheckUpdates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverCheckUpdatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverCheckUpdatesRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/Updates/Start": { + "post": { + "summary": "Start update", + "description": "Starts PMM Server update.", + "operationId": "StartUpdate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverStartUpdateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverStartUpdateRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/Updates/Status": { + "post": { + "summary": "Update status", + "description": "Returns PMM Server update status.", + "operationId": "UpdateStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverUpdateStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/serverUpdateStatusRequest" + } + } + ], + "tags": [ + "Server" + ] + } + }, + "/v1/readyz": { + "get": { + "summary": "Check server readiness", + "description": "Returns an error when Server components being restarted are not ready yet. Use this API for checking the health of Docker containers and for probing Kubernetes readiness.", + "operationId": "Readiness", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverReadinessResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Server" + ] + } + }, + "/v1/version": { + "get": { + "summary": "Version", + "description": "Returns PMM Server versions.", + "operationId": "Version", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serverVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "dummy", + "description": "Dummy parameter for internal testing. Do not use.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Server" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "serverAWSInstanceCheckRequest": { + "type": "object", + "properties": { + "instance_id": { + "type": "string", + "description": "AWS EC2 instance ID (i-1234567890abcdef0)." + } + } + }, + "serverAWSInstanceCheckResponse": { + "type": "object" + }, + "serverChangeSettingsRequest": { + "type": "object", + "properties": { + "enable_updates": { + "type": "boolean" + }, + "disable_updates": { + "type": "boolean" + }, + "enable_telemetry": { + "type": "boolean" + }, + "disable_telemetry": { + "type": "boolean" + }, + "metrics_resolutions": { + "$ref": "#/definitions/serverMetricsResolutions" + }, + "data_retention": { + "type": "string", + "description": "A number of full days for Prometheus and QAN data retention. Should have a suffix in JSON: 2592000s, 43200m, 720h." + }, + "ssh_key": { + "type": "string" + }, + "aws_partitions": { + "type": "array", + "items": { + "type": "string" + } + }, + "alert_manager_url": { + "type": "string", + "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path)." + }, + "remove_alert_manager_url": { + "type": "boolean", + "description": "Remove external AlertManager URL.\n\nalert_manager_rules and remove_alert_manager_rules field names are incorrect\n (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons." + }, + "alert_manager_rules": { + "type": "string", + "description": "Custom alerting or recording rules." + }, + "remove_alert_manager_rules": { + "type": "boolean", + "description": "Remove custom alerting or recording rules." + }, + "enable_stt": { + "type": "boolean", + "description": "Enable Security Threat Tool." + }, + "disable_stt": { + "type": "boolean", + "description": "Disable Security Threat Tool." + }, + "enable_alerting": { + "type": "boolean", + "description": "Enable Alerting." + }, + "disable_alerting": { + "type": "boolean", + "description": "Disable Alerting." + }, + "email_alerting_settings": { + "$ref": "#/definitions/serverEmailAlertingSettings", + "description": "Change Alerting email (SMTP) settings, if set." + }, + "remove_email_alerting_settings": { + "type": "boolean", + "description": "If true, removes Alerting email (SMTP) settings." + }, + "slack_alerting_settings": { + "$ref": "#/definitions/serverSlackAlertingSettings", + "description": "Change Alerting Slack settings, if set." + }, + "remove_slack_alerting_settings": { + "type": "boolean", + "description": "If true, removes Alerting Slack settings." + }, + "pmm_public_address": { + "type": "string", + "description": "PMM Server public address." + }, + "remove_pmm_public_address": { + "type": "boolean" + }, + "stt_check_intervals": { + "$ref": "#/definitions/serverSTTCheckIntervals", + "description": "Intervals between STT check runs." + }, + "enable_azurediscover": { + "type": "boolean", + "description": "Enable Azure Discover." + }, + "disable_azurediscover": { + "type": "boolean", + "description": "Disable Azure Discover." + }, + "enable_backup_management": { + "type": "boolean", + "description": "Enable Backup Management." + }, + "disable_backup_management": { + "type": "boolean", + "description": "Disable Backup Management." + }, + "enable_access_control": { + "type": "boolean", + "title": "Enable Access Control" + }, + "disable_access_control": { + "type": "boolean", + "title": "Disable Access Control" + } + } + }, + "serverChangeSettingsResponse": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/definitions/serverSettings" + } + } + }, + "serverCheckUpdatesRequest": { + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "If false, cached information may be returned." + }, + "only_installed_version": { + "type": "boolean", + "description": "If true, only installed version will be in response." + } + } + }, + "serverCheckUpdatesResponse": { + "type": "object", + "properties": { + "installed": { + "$ref": "#/definitions/serverVersionInfo", + "description": "Currently installed PMM Server version." + }, + "latest": { + "$ref": "#/definitions/serverVersionInfo", + "description": "Latest available PMM Server version." + }, + "update_available": { + "type": "boolean", + "description": "True if there is a PMM Server update available." + }, + "latest_news_url": { + "type": "string", + "description": "Latest available PMM Server release announcement URL." + }, + "last_check": { + "type": "string", + "format": "date-time", + "description": "Last check time." + } + } + }, + "serverDistributionMethod": { + "type": "string", + "enum": [ + "DISTRIBUTION_METHOD_INVALID", + "DOCKER", + "OVF", + "AMI", + "AZURE", + "DO" + ], + "default": "DISTRIBUTION_METHOD_INVALID", + "description": "DistributionMethod defines PMM Server distribution method: Docker image, OVF/OVA, or AMI." + }, + "serverEmailAlertingSettings": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "SMTP From header field." + }, + "smarthost": { + "type": "string", + "description": "SMTP host and port." + }, + "hello": { + "type": "string", + "description": "Hostname to identify to the SMTP server." + }, + "username": { + "type": "string", + "description": "Auth using CRAM-MD5, LOGIN and PLAIN." + }, + "password": { + "type": "string", + "description": "Auth using LOGIN and PLAIN." + }, + "identity": { + "type": "string", + "description": "Auth using PLAIN." + }, + "secret": { + "type": "string", + "description": "Auth using CRAM-MD5." + }, + "require_tls": { + "type": "boolean", + "description": "Require TLS." + } + }, + "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting." + }, + "serverGetSettingsRequest": { + "type": "object" + }, + "serverGetSettingsResponse": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/definitions/serverSettings" + } + } + }, + "serverMetricsResolutions": { + "type": "object", + "properties": { + "hr": { + "type": "string", + "description": "High resolution. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "mr": { + "type": "string", + "description": "Medium resolution. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "lr": { + "type": "string", + "description": "Low resolution. Should have a suffix in JSON: 1s, 1m, 1h." + } + }, + "description": "MetricsResolutions represents Prometheus exporters metrics resolutions." + }, + "serverReadinessResponse": { + "type": "object", + "description": "This probe is available without authentication, so it should not contain any data." + }, + "serverSTTCheckIntervals": { + "type": "object", + "properties": { + "standard_interval": { + "type": "string", + "description": "Standard check interval." + }, + "rare_interval": { + "type": "string", + "description": "Interval for rare check runs." + }, + "frequent_interval": { + "type": "string", + "description": "Interval for frequent check runs." + } + }, + "description": "STTCheckIntervals represents intervals between STT checks." + }, + "serverSettings": { + "type": "object", + "properties": { + "updates_disabled": { + "type": "boolean", + "description": "True if updates are disabled." + }, + "telemetry_enabled": { + "type": "boolean", + "description": "True if telemetry is enabled." + }, + "metrics_resolutions": { + "$ref": "#/definitions/serverMetricsResolutions" + }, + "data_retention": { + "type": "string" + }, + "ssh_key": { + "type": "string" + }, + "aws_partitions": { + "type": "array", + "items": { + "type": "string" + } + }, + "alert_manager_url": { + "type": "string", + "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons." + }, + "alert_manager_rules": { + "type": "string", + "description": "Custom alerting or recording rules." + }, + "stt_enabled": { + "type": "boolean", + "description": "True if Security Threat Tool is enabled." + }, + "platform_email": { + "type": "string", + "description": "Percona Platform user's email, if this PMM instance is linked to the Platform." + }, + "alerting_enabled": { + "type": "boolean", + "description": "True if Alerting is enabled." + }, + "email_alerting_settings": { + "$ref": "#/definitions/serverEmailAlertingSettings", + "description": "Alerting email (SMTP) settings." + }, + "slack_alerting_settings": { + "$ref": "#/definitions/serverSlackAlertingSettings", + "description": "Alerting Slack settings." + }, + "pmm_public_address": { + "type": "string", + "description": "PMM Server public address." + }, + "stt_check_intervals": { + "$ref": "#/definitions/serverSTTCheckIntervals", + "description": "Intervals between STT check runs." + }, + "backup_management_enabled": { + "type": "boolean", + "description": "True if Backup Management is enabled." + }, + "azurediscover_enabled": { + "type": "boolean", + "description": "True if Azure Discover is enabled." + }, + "connected_to_platform": { + "type": "boolean", + "title": "True if the PMM instance is connected to Platform" + }, + "telemetry_summaries": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Includes list of collected telemetry" + }, + "enable_access_control": { + "type": "boolean", + "description": "True if Access Control is enabled." + }, + "default_role_id": { + "type": "integer", + "format": "int64", + "description": "Default Access Control role ID for new users." + } + }, + "description": "Settings represents PMM Server settings." + }, + "serverSlackAlertingSettings": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Slack API (webhook) URL." + } + }, + "description": "SlackAlertingSettings represents Slack configuration for Alerting." + }, + "serverStartUpdateRequest": { + "type": "object" + }, + "serverStartUpdateResponse": { + "type": "object", + "properties": { + "auth_token": { + "type": "string", + "description": "Authentication token for getting update statuses." + }, + "log_offset": { + "type": "integer", + "format": "int64", + "description": "Progress log offset." + } + } + }, + "serverTestEmailAlertingSettingsRequest": { + "type": "object", + "properties": { + "email_alerting_settings": { + "$ref": "#/definitions/serverEmailAlertingSettings", + "description": "Alerting email (SMTP) settings." + }, + "email_to": { + "type": "string", + "description": "Target email address to send the email to." + } + } + }, + "serverTestEmailAlertingSettingsResponse": { + "type": "object" + }, + "serverUpdateStatusRequest": { + "type": "object", + "properties": { + "auth_token": { + "type": "string", + "description": "Authentication token." + }, + "log_offset": { + "type": "integer", + "format": "int64", + "description": "Progress log offset." + } + } + }, + "serverUpdateStatusResponse": { + "type": "object", + "properties": { + "log_lines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Progress log lines." + }, + "log_offset": { + "type": "integer", + "format": "int64", + "description": "Progress log offset for the next request." + }, + "done": { + "type": "boolean", + "description": "True when update is done." + } + } + }, + "serverVersionInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "User-visible version." + }, + "full_version": { + "type": "string", + "description": "Full version for debugging." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Build or release date." + } + }, + "description": "VersionInfo describes component version, or PMM Server as a whole." + }, + "serverVersionResponse": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "PMM Server version." + }, + "server": { + "$ref": "#/definitions/serverVersionInfo", + "description": "Detailed PMM Server version information." + }, + "managed": { + "$ref": "#/definitions/serverVersionInfo", + "description": "pmm-managed version information for debugging." + }, + "distribution_method": { + "$ref": "#/definitions/serverDistributionMethod", + "description": "PMM Server distribution method.\n\nTODO Versions and statuses of Grafana, Prometheus, PostgreSQL, qan-api2, ClickHouse, pmm-agent, etc." + } + } + } + } +} diff --git a/api/serverpb/server_grpc.pb.go b/api/serverpb/server_grpc.pb.go index 63197e8537..38b9fbc58f 100644 --- a/api/serverpb/server_grpc.pb.go +++ b/api/serverpb/server_grpc.pb.go @@ -8,7 +8,6 @@ package serverpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -172,40 +171,33 @@ type ServerServer interface { } // UnimplementedServerServer must be embedded to have forward compatible implementations. -type UnimplementedServerServer struct{} +type UnimplementedServerServer struct { +} func (UnimplementedServerServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") } - func (UnimplementedServerServer) Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Readiness not implemented") } - func (UnimplementedServerServer) CheckUpdates(context.Context, *CheckUpdatesRequest) (*CheckUpdatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckUpdates not implemented") } - func (UnimplementedServerServer) StartUpdate(context.Context, *StartUpdateRequest) (*StartUpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartUpdate not implemented") } - func (UnimplementedServerServer) UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented") } - func (UnimplementedServerServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") } - func (UnimplementedServerServer) ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSettings not implemented") } - func (UnimplementedServerServer) TestEmailAlertingSettings(context.Context, *TestEmailAlertingSettingsRequest) (*TestEmailAlertingSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestEmailAlertingSettings not implemented") } - func (UnimplementedServerServer) AWSInstanceCheck(context.Context, *AWSInstanceCheckRequest) (*AWSInstanceCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AWSInstanceCheck not implemented") } diff --git a/api/uieventspb/server.pb.go b/api/uieventspb/server.pb.go index d8c2f13853..4aa330dfcb 100644 --- a/api/uieventspb/server.pb.go +++ b/api/uieventspb/server.pb.go @@ -7,9 +7,6 @@ package uieventspb import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -17,6 +14,8 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -546,19 +545,16 @@ func file_uieventspb_server_proto_rawDescGZIP() []byte { return file_uieventspb_server_proto_rawDescData } -var ( - file_uieventspb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_uieventspb_server_proto_goTypes = []interface{}{ - (*NotificationEvent)(nil), // 0: uievents.NotificationEvent - (*FetchingEvent)(nil), // 1: uievents.FetchingEvent - (*DashboardUsageEvent)(nil), // 2: uievents.DashboardUsageEvent - (*UserFlowEvent)(nil), // 3: uievents.UserFlowEvent - (*StoreRequest)(nil), // 4: uievents.StoreRequest - (*StoreResponse)(nil), // 5: uievents.StoreResponse - nil, // 6: uievents.UserFlowEvent.ParamsEntry - } -) - +var file_uieventspb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_uieventspb_server_proto_goTypes = []interface{}{ + (*NotificationEvent)(nil), // 0: uievents.NotificationEvent + (*FetchingEvent)(nil), // 1: uievents.FetchingEvent + (*DashboardUsageEvent)(nil), // 2: uievents.DashboardUsageEvent + (*UserFlowEvent)(nil), // 3: uievents.UserFlowEvent + (*StoreRequest)(nil), // 4: uievents.StoreRequest + (*StoreResponse)(nil), // 5: uievents.StoreResponse + nil, // 6: uievents.UserFlowEvent.ParamsEntry +} var file_uieventspb_server_proto_depIdxs = []int32{ 6, // 0: uievents.UserFlowEvent.params:type_name -> uievents.UserFlowEvent.ParamsEntry 0, // 1: uievents.StoreRequest.notifications:type_name -> uievents.NotificationEvent diff --git a/api/uieventspb/server.pb.gw.go b/api/uieventspb/server.pb.gw.go index 44705a12f0..61d3b07297 100644 --- a/api/uieventspb/server.pb.gw.go +++ b/api/uieventspb/server.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marshaler, client UIEventsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StoreRequest @@ -47,6 +45,7 @@ func request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Store(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marshaler, server UIEventsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +62,7 @@ func local_request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.Store(ctx, &protoReq) return msg, metadata, err + } // RegisterUIEventsHandlerServer registers the http handlers for service UIEvents to "mux". @@ -70,6 +70,7 @@ func local_request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marsh // 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 RegisterUIEventsHandlerFromEndpoint instead. func RegisterUIEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UIEventsServer) error { + mux.Handle("POST", pattern_UIEvents_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -92,6 +93,7 @@ func RegisterUIEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_UIEvents_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -134,6 +136,7 @@ func RegisterUIEventsHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UIEventsClient" to call the correct interceptors. func RegisterUIEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UIEventsClient) error { + mux.Handle("POST", pattern_UIEvents_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -153,11 +156,16 @@ func RegisterUIEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_UIEvents_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_UIEvents_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) +var ( + pattern_UIEvents_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) +) -var forward_UIEvents_Store_0 = runtime.ForwardResponseMessage +var ( + forward_UIEvents_Store_0 = runtime.ForwardResponseMessage +) diff --git a/api/uieventspb/server.swagger.json b/api/uieventspb/server.swagger.json new file mode 100644 index 0000000000..c9ede6ea80 --- /dev/null +++ b/api/uieventspb/server.swagger.json @@ -0,0 +1,202 @@ +{ + "swagger": "2.0", + "info": { + "title": "uieventspb/server.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "UIEvents" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/ui-events/Store": { + "post": { + "summary": "Persist UI events", + "description": "Persists received UI events for further processing.", + "operationId": "Store", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/uieventsStoreResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/uieventsStoreRequest" + } + } + ], + "tags": [ + "UIEvents" + ] + } + } + }, + "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": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "uieventsDashboardUsageEvent": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "title": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "load_time": { + "type": "integer", + "format": "int32" + }, + "location": { + "type": "string" + }, + "location_params": { + "type": "string" + } + } + }, + "uieventsFetchingEvent": { + "type": "object", + "properties": { + "component": { + "type": "string" + }, + "load_time": { + "type": "integer", + "format": "int32" + }, + "location": { + "type": "string" + }, + "location_params": { + "type": "string" + } + } + }, + "uieventsNotificationEvent": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + }, + "location": { + "type": "string" + }, + "location_params": { + "type": "string" + } + } + }, + "uieventsStoreRequest": { + "type": "object", + "properties": { + "notifications": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/uieventsNotificationEvent" + } + }, + "fetching": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/uieventsFetchingEvent" + } + }, + "dashboard_usage": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/uieventsDashboardUsageEvent" + } + }, + "user_flow_events": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/uieventsUserFlowEvent" + } + } + } + }, + "uieventsStoreResponse": { + "type": "object" + }, + "uieventsUserFlowEvent": { + "type": "object", + "properties": { + "flow_id": { + "type": "string" + }, + "story_id": { + "type": "string" + }, + "event": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } +} diff --git a/api/uieventspb/server_grpc.pb.go b/api/uieventspb/server_grpc.pb.go index 2a167dccb0..dbca87a87a 100644 --- a/api/uieventspb/server_grpc.pb.go +++ b/api/uieventspb/server_grpc.pb.go @@ -8,7 +8,6 @@ package uieventspb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -58,7 +57,8 @@ type UIEventsServer interface { } // UnimplementedUIEventsServer must be embedded to have forward compatible implementations. -type UnimplementedUIEventsServer struct{} +type UnimplementedUIEventsServer struct { +} func (UnimplementedUIEventsServer) Store(context.Context, *StoreRequest) (*StoreResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Store not implemented") diff --git a/api/userpb/json/client/user/get_user_parameters.go b/api/userpb/json/client/user/get_user_parameters.go index ce903ed286..31920e417d 100644 --- a/api/userpb/json/client/user/get_user_parameters.go +++ b/api/userpb/json/client/user/get_user_parameters.go @@ -115,6 +115,7 @@ func (o *GetUserParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/userpb/json/client/user/get_user_responses.go b/api/userpb/json/client/user/get_user_responses.go index 8597bee46d..7f221bce81 100644 --- a/api/userpb/json/client/user/get_user_responses.go +++ b/api/userpb/json/client/user/get_user_responses.go @@ -60,12 +60,12 @@ type GetUserOK struct { func (o *GetUserOK) Error() string { return fmt.Sprintf("[GET /v1/user][%d] getUserOk %+v", 200, o.Payload) } - func (o *GetUserOK) GetPayload() *GetUserOKBody { return o.Payload } func (o *GetUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetUserOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetUserDefault) Code() int { func (o *GetUserDefault) Error() string { return fmt.Sprintf("[GET /v1/user][%d] GetUser default %+v", o._statusCode, o.Payload) } - func (o *GetUserDefault) GetPayload() *GetUserDefaultBody { return o.Payload } func (o *GetUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetUserDefaultBody) // response payload @@ -123,6 +123,7 @@ GetUserDefaultBody get user default body swagger:model GetUserDefaultBody */ type GetUserDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *GetUserDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -227,6 +231,7 @@ GetUserDefaultBodyDetailsItems0 get user default body details items0 swagger:model GetUserDefaultBodyDetailsItems0 */ type GetUserDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ GetUserOKBody get user OK body swagger:model GetUserOKBody */ type GetUserOKBody struct { + // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/userpb/json/client/user/list_users_parameters.go b/api/userpb/json/client/user/list_users_parameters.go index 60ad9f5a75..9976e3b7d1 100644 --- a/api/userpb/json/client/user/list_users_parameters.go +++ b/api/userpb/json/client/user/list_users_parameters.go @@ -115,6 +115,7 @@ func (o *ListUsersParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/userpb/json/client/user/list_users_responses.go b/api/userpb/json/client/user/list_users_responses.go index ae13f610f0..310cf02b9f 100644 --- a/api/userpb/json/client/user/list_users_responses.go +++ b/api/userpb/json/client/user/list_users_responses.go @@ -60,12 +60,12 @@ type ListUsersOK struct { func (o *ListUsersOK) Error() string { return fmt.Sprintf("[POST /v1/user/list][%d] listUsersOk %+v", 200, o.Payload) } - func (o *ListUsersOK) GetPayload() *ListUsersOKBody { return o.Payload } func (o *ListUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListUsersOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListUsersDefault) Code() int { func (o *ListUsersDefault) Error() string { return fmt.Sprintf("[POST /v1/user/list][%d] ListUsers default %+v", o._statusCode, o.Payload) } - func (o *ListUsersDefault) GetPayload() *ListUsersDefaultBody { return o.Payload } func (o *ListUsersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListUsersDefaultBody) // response payload @@ -123,6 +123,7 @@ ListUsersDefaultBody list users default body swagger:model ListUsersDefaultBody */ type ListUsersDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -188,7 +189,9 @@ func (o *ListUsersDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -199,6 +202,7 @@ func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -227,6 +231,7 @@ ListUsersDefaultBodyDetailsItems0 list users default body details items0 swagger:model ListUsersDefaultBodyDetailsItems0 */ type ListUsersDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -264,6 +269,7 @@ ListUsersOKBody list users OK body swagger:model ListUsersOKBody */ type ListUsersOKBody struct { + // users Users []*ListUsersOKBodyUsersItems0 `json:"users"` } @@ -323,7 +329,9 @@ func (o *ListUsersOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Users); i++ { + if o.Users[i] != nil { if err := o.Users[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -334,6 +342,7 @@ func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strf return err } } + } return nil @@ -362,6 +371,7 @@ ListUsersOKBodyUsersItems0 list users OK body users items0 swagger:model ListUsersOKBodyUsersItems0 */ type ListUsersOKBodyUsersItems0 struct { + // user id UserID int64 `json:"user_id,omitempty"` diff --git a/api/userpb/json/client/user/update_user_parameters.go b/api/userpb/json/client/user/update_user_parameters.go index b42c6ce1a8..07ac34de23 100644 --- a/api/userpb/json/client/user/update_user_parameters.go +++ b/api/userpb/json/client/user/update_user_parameters.go @@ -60,6 +60,7 @@ UpdateUserParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateUserParams struct { + // Body. Body UpdateUserBody @@ -129,6 +130,7 @@ func (o *UpdateUserParams) SetBody(body UpdateUserBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/userpb/json/client/user/update_user_responses.go b/api/userpb/json/client/user/update_user_responses.go index ffedede7cf..f4d3701dc9 100644 --- a/api/userpb/json/client/user/update_user_responses.go +++ b/api/userpb/json/client/user/update_user_responses.go @@ -60,12 +60,12 @@ type UpdateUserOK struct { func (o *UpdateUserOK) Error() string { return fmt.Sprintf("[PUT /v1/user][%d] updateUserOk %+v", 200, o.Payload) } - func (o *UpdateUserOK) GetPayload() *UpdateUserOKBody { return o.Payload } func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateUserOKBody) // response payload @@ -102,12 +102,12 @@ func (o *UpdateUserDefault) Code() int { func (o *UpdateUserDefault) Error() string { return fmt.Sprintf("[PUT /v1/user][%d] UpdateUser default %+v", o._statusCode, o.Payload) } - func (o *UpdateUserDefault) GetPayload() *UpdateUserDefaultBody { return o.Payload } func (o *UpdateUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateUserDefaultBody) // response payload @@ -123,6 +123,7 @@ UpdateUserBody update user body swagger:model UpdateUserBody */ type UpdateUserBody struct { + // Product Tour ProductTourCompleted bool `json:"product_tour_completed,omitempty"` @@ -163,6 +164,7 @@ UpdateUserDefaultBody update user default body swagger:model UpdateUserDefaultBody */ type UpdateUserDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -228,7 +230,9 @@ func (o *UpdateUserDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -239,6 +243,7 @@ func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -267,6 +272,7 @@ UpdateUserDefaultBodyDetailsItems0 update user default body details items0 swagger:model UpdateUserDefaultBodyDetailsItems0 */ type UpdateUserDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -304,6 +310,7 @@ UpdateUserOKBody update user OK body swagger:model UpdateUserOKBody */ type UpdateUserOKBody struct { + // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/userpb/user.pb.go b/api/userpb/user.pb.go index 6e8cfecf80..8552ec0dc7 100644 --- a/api/userpb/user.pb.go +++ b/api/userpb/user.pb.go @@ -7,15 +7,14 @@ package userpb import ( - reflect "reflect" - sync "sync" - _ "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" _ "google.golang.org/protobuf/types/known/timestamppb" _ "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) const ( @@ -422,18 +421,15 @@ func file_userpb_user_proto_rawDescGZIP() []byte { return file_userpb_user_proto_rawDescData } -var ( - file_userpb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_userpb_user_proto_goTypes = []interface{}{ - (*UserDetailsRequest)(nil), // 0: user.UserDetailsRequest - (*UserDetailsResponse)(nil), // 1: user.UserDetailsResponse - (*UserUpdateRequest)(nil), // 2: user.UserUpdateRequest - (*ListUsersRequest)(nil), // 3: user.ListUsersRequest - (*ListUsersResponse)(nil), // 4: user.ListUsersResponse - (*ListUsersResponse_UserDetail)(nil), // 5: user.ListUsersResponse.UserDetail - } -) - +var file_userpb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_userpb_user_proto_goTypes = []interface{}{ + (*UserDetailsRequest)(nil), // 0: user.UserDetailsRequest + (*UserDetailsResponse)(nil), // 1: user.UserDetailsResponse + (*UserUpdateRequest)(nil), // 2: user.UserUpdateRequest + (*ListUsersRequest)(nil), // 3: user.ListUsersRequest + (*ListUsersResponse)(nil), // 4: user.ListUsersResponse + (*ListUsersResponse_UserDetail)(nil), // 5: user.ListUsersResponse.UserDetail +} var file_userpb_user_proto_depIdxs = []int32{ 5, // 0: user.ListUsersResponse.users:type_name -> user.ListUsersResponse.UserDetail 0, // 1: user.User.GetUser:input_type -> user.UserDetailsRequest diff --git a/api/userpb/user.pb.gw.go b/api/userpb/user.pb.gw.go index 1355ff4a7f..683d6d4fb9 100644 --- a/api/userpb/user.pb.gw.go +++ b/api/userpb/user.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UserDetailsRequest @@ -39,6 +37,7 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -47,6 +46,7 @@ func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshal msg, err := server.GetUser(ctx, &protoReq) return msg, metadata, err + } func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +63,7 @@ func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +80,7 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars msg, err := server.UpdateUser(ctx, &protoReq) return msg, metadata, err + } func request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +89,7 @@ func request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +98,7 @@ func local_request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.ListUsers(ctx, &protoReq) return msg, metadata, err + } // RegisterUserHandlerServer registers the http handlers for service User to "mux". @@ -102,6 +106,7 @@ func local_request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marsh // 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 RegisterUserHandlerFromEndpoint instead. func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error { + mux.Handle("GET", pattern_User_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -124,6 +129,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_User_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -148,6 +154,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_User_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_User_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -172,6 +179,7 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_User_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -214,6 +222,7 @@ func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UserClient" to call the correct interceptors. func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error { + mux.Handle("GET", pattern_User_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -233,6 +242,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_User_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -254,6 +264,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_User_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_User_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -275,6 +286,7 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_User_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/userpb/user.swagger.json b/api/userpb/user.swagger.json new file mode 100644 index 0000000000..a290877941 --- /dev/null +++ b/api/userpb/user.swagger.json @@ -0,0 +1,190 @@ +{ + "swagger": "2.0", + "info": { + "title": "User API", + "version": "version not set" + }, + "tags": [ + { + "name": "User" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/user": { + "get": { + "summary": "Get user details", + "description": "Retrieve user details from PMM server", + "operationId": "GetUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/userUserDetailsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "User" + ] + }, + "put": { + "summary": "Update user", + "description": "Update details of given user in PMM server", + "operationId": "UpdateUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/userUserDetailsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/userUserUpdateRequest" + } + } + ], + "tags": [ + "User" + ] + } + }, + "/v1/user/list": { + "post": { + "summary": "List all users with details", + "description": "Retrieve user details for all users from PMM server", + "operationId": "ListUsers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/userListUsersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "User" + ] + } + } + }, + "definitions": { + "ListUsersResponseUserDetail": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "format": "int64" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of role IDs assigned to the user." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "userListUsersResponse": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ListUsersResponseUserDetail" + } + } + } + }, + "userUserDetailsResponse": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "format": "int64", + "title": "User ID" + }, + "product_tour_completed": { + "type": "boolean", + "title": "Product Tour" + }, + "alerting_tour_completed": { + "type": "boolean", + "title": "Alerting Tour" + } + } + }, + "userUserUpdateRequest": { + "type": "object", + "properties": { + "product_tour_completed": { + "type": "boolean", + "title": "Product Tour" + }, + "alerting_tour_completed": { + "type": "boolean", + "title": "Alerting Tour" + } + } + } + } +} diff --git a/api/userpb/user_grpc.pb.go b/api/userpb/user_grpc.pb.go index 3db7168728..e4247b4dbb 100644 --- a/api/userpb/user_grpc.pb.go +++ b/api/userpb/user_grpc.pb.go @@ -8,7 +8,6 @@ package userpb import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -80,16 +79,15 @@ type UserServer interface { } // UnimplementedUserServer must be embedded to have forward compatible implementations. -type UnimplementedUserServer struct{} +type UnimplementedUserServer struct { +} func (UnimplementedUserServer) GetUser(context.Context, *UserDetailsRequest) (*UserDetailsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } - func (UnimplementedUserServer) UpdateUser(context.Context, *UserUpdateRequest) (*UserDetailsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } - func (UnimplementedUserServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } diff --git a/build/docker/server/README.md b/build/docker/server/README.md index 9806ab0513..179c2e26f8 100644 --- a/build/docker/server/README.md +++ b/build/docker/server/README.md @@ -36,7 +36,6 @@ You can use these environment variables (-e VAR) when running the Docker image. | ENABLE_ALERTING | Enable integrated alerting | | ENABLE_AZUREDISCOVER | Enable support for discovery of Azure databases | | ENABLE_BACKUP_MANAGEMENT | Enable integrated backup tools | -| ENABLE_DBAAS | Enable DBaaS features | | PMM_PUBLIC_ADDRESS | External IP address or the DNS name on which PMM server is running. | | PMM_DEBUG | Enables a more verbose log level | | PMM_TRACE | Enables a more verbose log level including traceback information | diff --git a/build/packages/rpm/server/SPECS/dbaas-controller.spec b/build/packages/rpm/server/SPECS/dbaas-controller.spec deleted file mode 100644 index 8ad16ffe4f..0000000000 --- a/build/packages/rpm/server/SPECS/dbaas-controller.spec +++ /dev/null @@ -1,59 +0,0 @@ -%undefine _missing_build_ids_terminate_build -%global _dwz_low_mem_die_limit 0 - -# do not strip debug symbols -%global debug_package %{nil} - -# The commit hash gets sed'ed by build-server-rpm script to set a correct version -# see: https://github.com/percona/pmm/blob/main/build/scripts/build-server-rpm#L58 -%global commit 0000000000000000000000000000000000000000 -%define full_pmm_version 2.0.0 - -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%define build_timestamp %(date -u +"%y%m%d%H%M") -%define release 1 -%define rpm_release %{release}.%{build_timestamp}.%{shortcommit}%{?dist} - -Name: dbaas-controller -# the line below is sed'ed by build-server-rpm script to set a correct version -# see: https://github.com/Percona-Lab/pmm-submodules/blob/PMM-2.0/build/bin/build-server-rpm -Version: %{version} -Release: %{rpm_release} -Summary: Simplified API for managing Percona Kubernetes Operators - -License: AGPLv3 -URL: https://github.com/percona-platform/dbaas-controller -Source0: https://github.com/percona-platform/dbaas-controller/archive/%{commit}/dbaas-controller-%{shortcommit}.tar.gz - -%description -dbaas-controller exposes a simplified API for managing Percona Kubernetes Operators -See the PMM docs for more information. - - -%prep -%setup -q -n dbaas-controller-%{commit} - - -%build -export COMPONENT_VERSION=%{full_pmm_version} -export PMM_RELEASE_VERSION=%{full_pmm_version} -export PMM_RELEASE_FULLCOMMIT=%{commit} -export PMM_RELEASE_BRANCH="" - -make release - -%install -install -d -p %{buildroot}%{_bindir} -install -d -p %{buildroot}%{_sbindir} -install -p -m 0755 bin/dbaas-controller %{buildroot}%{_sbindir}/dbaas-controller - - -%files -%license LICENSE -%doc README.md -%{_sbindir}/dbaas-controller - - -%changelog -* Tue Aug 4 2020 Mykyta Solomko - 2.10.0-1 -- init version diff --git a/build/scripts/build-server-rpm-all b/build/scripts/build-server-rpm-all index d9cb1a59a2..ab21a205ee 100755 --- a/build/scripts/build-server-rpm-all +++ b/build/scripts/build-server-rpm-all @@ -9,8 +9,6 @@ ${bin_dir}/build-server-rpm percona-dashboards grafana-dashboards ${bin_dir}/build-server-rpm pmm-managed pmm ${bin_dir}/build-server-rpm percona-qan-api2 pmm ${bin_dir}/build-server-rpm pmm-update pmm -${bin_dir}/build-server-rpm dbaas-controller -${bin_dir}/build-server-rpm dbaas-tools ${bin_dir}/build-server-rpm pmm-dump ${bin_dir}/build-server-rpm grafana-db-migrator ${bin_dir}/build-server-rpm vmproxy pmm diff --git a/docker-compose.yml b/docker-compose.yml index d516be2235..296649d5f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,18 +17,11 @@ services: environment: - PMM_RELEASE_PATH=/root/go/bin - REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN} - - ENABLE_DBAAS=${ENABLE_DBAAS:-0} - AWS_ACCESS_KEY=${AWS_ACCESS_KEY} - AWS_SECRET_KEY=${AWS_SECRET_KEY} - ENABLE_RBAC=${ENABLE_RBAC:-0} - LESS_LOG_NOISE=1 - PERCONA_TEST_VERSION_SERVICE_URL=${PERCONA_TEST_VERSION_SERVICE_URL} - - DBAAS_VM_OP_CHANNEL=${DBAAS_VM_OP_CHANNEL} - - DBAAS_PXC_OP_CHANNEL=${DBAAS_PXC_OP_CHANNEL} - - DBAAS_PSMDB_OP_CHANNEL=${DBAAS_PSMDB_OP_CHANNEL} - - DBAAS_DBAAS_OP_CHANNEL=${DBAAS_DBAAS_OP_CHANNEL} - - DBAAS_ALLOW_UNSUPPORTED_OPERATORS=${DBAAS_ALLOW_UNSUPPORTED_OPERATORS:-0} - - PERCONA_TEST_DBAAS_PMM_CLIENT=${PERCONA_TEST_DBAAS_PMM_CLIENT} # - PERCONA_TEST_PLATFORM_ADDRESS=https://check.localhost # - PERCONA_TEST_PLATFORM_INSECURE=1 # - PERCONA_TEST_PLATFORM_PUBLIC_KEY= @@ -122,7 +115,6 @@ services: environment: - PMM_RELEASE_PATH=/root/go/bin - REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN} - - ENABLE_DBAAS=${ENABLE_DBAAS:-0} - AWS_ACCESS_KEY=${AWS_ACCESS_KEY} - AWS_SECRET_KEY=${AWS_SECRET_KEY} - ENABLE_BACKUP_MANAGEMENT=1 @@ -137,7 +129,6 @@ services: - PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000 - PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2 # - PMM_DEBUG=1 - - PERCONA_TEST_DBAAS_PMM_CLIENT=perconalab/pmm-client:dev-latest extra_hosts: - host.docker.internal:host-gateway @@ -191,15 +182,15 @@ services: ports: - ${POSTGRES_PORT:-5432}:5432 command: | - postgres - -c shared_preload_libraries=pg_stat_statements - -c pg_stat_statements.max=10000 - -c pg_stat_statements.track=all - -c pg_stat_statements.save=off - -c fsync=off - -c ssl=on - -c ssl_ca_file=/certs/root.crt - -c ssl_cert_file=/certs/server.crt + postgres + -c shared_preload_libraries=pg_stat_statements + -c pg_stat_statements.max=10000 + -c pg_stat_statements.track=all + -c pg_stat_statements.save=off + -c fsync=off + -c ssl=on + -c ssl_ca_file=/certs/root.crt + -c ssl_cert_file=/certs/server.crt -c ssl_key_file=/certs/server.key -c hba_file=/conf/pg_hba.conf networks: diff --git a/docs/dbaas/olm.md b/docs/dbaas/olm.md deleted file mode 100644 index b13a27f121..0000000000 --- a/docs/dbaas/olm.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -slug: 'dbaas' ---- - -## How OLM (Operator Lifecycle Manager) works. - -DBaaS leverages the installation and upgrade of operators on OLM. -You must create an operator group and a subscription to install an operator. -The official documentation with detailed examples can be found [here](https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/). - -DBaaS installs the following operators by default: -- OLM -- DBaaS -- PSMDB -- PXC - -You can manually list the subscriptions using kubectl: -``` -kubectl get subscriptions -NAME PACKAGE SOURCE CHANNEL -my-percona-server-mongodb-operator percona-server-mongodb-operator operatorhubio-catalog stable -my-percona-xtradb-cluster-operator percona-xtradb-cluster-operator operatorhubio-catalog stable -``` - -### Known issue -When two or more operators are pending installation approval, OLM creates a second subscription that includes both operators. -will have both operators. Listing the install plans could be confusing. For example: -``` -kubectl get installplans -NAME CSV APPROVAL APPROVED -install-9rxvz percona-server-mongodb-operator.v1.13.1 Manual false -install-mghbh percona-server-mongodb-operator.v1.13.1 Manual false -``` -Although both install plans seem to be for PSMDB, it's worth examining each separately: - -**First install plan** - -``` -kubectl get installplan install-9rxvz -oyaml -apiVersion: operators.coreos.com/v1alpha1 -kind: InstallPlan -metadata: - creationTimestamp: "2023-03-07T12:36:28Z" - generateName: install- - generation: 1 - labels: - operators.coreos.com/percona-server-mongodb-operator.default: "" - name: install-9rxvz - namespace: default - ownerReferences: - - apiVersion: operators.coreos.com/v1alpha1 - blockOwnerDeletion: false - controller: false - kind: Subscription - name: my-percona-server-mongodb-operator - uid: 2581b852-36b3-41e3-92f0-02a4f2ebb05d - resourceVersion: "1037" - uid: d02807a7-3b24-49eb-b12b-63bc1ef817d6 -spec: - approval: Manual - approved: false - clusterServiceVersionNames: - - percona-server-mongodb-operator.v1.13.1 - generation: 1 -``` - -**Second install plan** - -``` -kubectl get installplan install-mghbh -oyaml -apiVersion: operators.coreos.com/v1alpha1 -kind: InstallPlan -metadata: - creationTimestamp: "2023-03-07T12:41:46Z" - generateName: install- - generation: 1 - labels: - operators.coreos.com/percona-xtradb-cluster-operator.default: "" - name: install-mghbh - namespace: default - ownerReferences: - - apiVersion: operators.coreos.com/v1alpha1 - blockOwnerDeletion: false - controller: false - kind: Subscription - name: my-percona-server-mongodb-operator - uid: 2581b852-36b3-41e3-92f0-02a4f2ebb05d - - apiVersion: operators.coreos.com/v1alpha1 - blockOwnerDeletion: false - controller: false - kind: Subscription - name: my-percona-xtradb-cluster-operator - uid: 6796d009-9a29-49b4-af9b-6af09a895317 - resourceVersion: "1314" - uid: f6a87327-1f60-4cae-8b7a-d881c8c522c2 -spec: - approval: Manual - approved: false - clusterServiceVersionNames: - - percona-server-mongodb-operator.v1.13.1 - - percona-xtradb-cluster-operator.v1.12.0 - generation: 2 -``` -Spec section of the second install plan indicates it will handle the installation of both operators: -``` -spec: - approval: Manual - approved: false - clusterServiceVersionNames: - - percona-server-mongodb-operator.v1.13.1 - - percona-xtradb-cluster-operator.v1.12.0 -``` -We can only determine the operators being handled by an install plan if we receive the details in YAML or JSON format.``` - -## Conclusion -The short version `kubectl get installplans` will show only the first operator in the list and this can be confusing and misleading but it is not -a consequence of DBaaS. - diff --git a/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml b/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml index 7c5080cfa9..409e831670 100644 --- a/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml @@ -83,10 +83,6 @@ ignore_errors: true # FIXME: we have a race condition here. We generate grafana supervisor config in pmm-managed and it doesn't exist at this stage - - name: Remove old DBaaS dashboard (Before provisioning times) - command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'DBaaS' AND slug = 'dbaas';" - changed_when: true - - name: Remove old PMM Inventory (Before provisioning times) command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'PMM Inventory' AND slug = 'pmm-inventory';" changed_when: true diff --git a/update/ansible/playbook/tasks/update.yml b/update/ansible/playbook/tasks/update.yml index df4cd7b7c2..6c54773cbe 100644 --- a/update/ansible/playbook/tasks/update.yml +++ b/update/ansible/playbook/tasks/update.yml @@ -15,8 +15,6 @@ - percona-alertmanager - pmm-managed - pmm-update - - dbaas-controller - - dbaas-tools - pmm2-client - pmm-dump - vmproxy From 9268882211b83ae51e29b29389b61bab5ef6c73e Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 14:05:47 +0600 Subject: [PATCH 03/11] EVEREST-287 Drop k8s --- managed/models/kubernetes_helpers.go | 141 --------------- managed/models/kubernetes_helpers_test.go | 202 ---------------------- 2 files changed, 343 deletions(-) delete mode 100644 managed/models/kubernetes_helpers.go delete mode 100644 managed/models/kubernetes_helpers_test.go diff --git a/managed/models/kubernetes_helpers.go b/managed/models/kubernetes_helpers.go deleted file mode 100644 index 7c2a2d9447..0000000000 --- a/managed/models/kubernetes_helpers.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package models - -import ( - "github.com/google/uuid" - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" -) - -func checkUniqueKubernetesClusterID(q *reform.Querier, id string) error { - if id == "" { - return status.Error(codes.InvalidArgument, "empty Kubernetes Cluster ID") - } - - cluster := &KubernetesCluster{ID: id} - err := q.Reload(cluster) - if err != nil { - if errors.Is(err, reform.ErrNoRows) { - return nil - } - return errors.WithStack(err) - } - - return status.Errorf(codes.AlreadyExists, "Kubernetes Cluster with ID %q already exists.", id) -} - -func checkUniqueKubernetesClusterName(q *reform.Querier, name string) error { - if name == "" { - return status.Error(codes.InvalidArgument, "empty Kubernetes Cluster Name.") - } - - _, err := q.FindOneFrom(KubernetesClusterTable, "kubernetes_cluster_name", name) - if err != nil { - if errors.Is(err, reform.ErrNoRows) { - return nil - } - return errors.WithStack(err) - } - - return status.Errorf(codes.AlreadyExists, "Kubernetes Cluster with Name %q already exists.", name) -} - -// FindAllKubernetesClusters returns all Kubernetes clusters. -func FindAllKubernetesClusters(q *reform.Querier) ([]*KubernetesCluster, error) { - structs, err := q.SelectAllFrom(KubernetesClusterTable, "ORDER BY id") - if err != nil { - return nil, errors.WithStack(err) - } - - clusters := make([]*KubernetesCluster, len(structs)) - for i, s := range structs { - clusters[i] = s.(*KubernetesCluster) //nolint:forcetypeassert - } - - return clusters, nil -} - -// FindKubernetesClusterByName finds a Kubernetes cluster with provided name. -func FindKubernetesClusterByName(q *reform.Querier, name string) (*KubernetesCluster, error) { - if name == "" { - return nil, status.Error(codes.InvalidArgument, "Empty Kubernetes Cluster Name.") - } - - cluster, err := q.FindOneFrom(KubernetesClusterTable, "kubernetes_cluster_name", name) - if err != nil { - if errors.Is(err, reform.ErrNoRows) { - return nil, status.Errorf(codes.NotFound, "Kubernetes Cluster with name %q not found.", name) - } - return nil, errors.WithStack(err) - } - - return cluster.(*KubernetesCluster), nil //nolint:forcetypeassert -} - -// CreateKubernetesClusterParams contains all params required to create Kubernetes cluster. -type CreateKubernetesClusterParams struct { - KubernetesClusterName string - KubeConfig string -} - -// CreateKubernetesCluster creates Kubernetes cluster with provided params. -func CreateKubernetesCluster(q *reform.Querier, params *CreateKubernetesClusterParams) (*KubernetesCluster, error) { - id := "/kubernetes_cluster_id/" + uuid.New().String() - if err := checkUniqueKubernetesClusterID(q, id); err != nil { - return nil, err - } - if err := checkUniqueKubernetesClusterName(q, params.KubernetesClusterName); err != nil { - return nil, err - } - - row := &KubernetesCluster{ - ID: id, - KubernetesClusterName: params.KubernetesClusterName, - KubeConfig: params.KubeConfig, - IsReady: false, - } - if err := q.Insert(row); err != nil { - return nil, errors.WithStack(err) - } - - return row, nil -} - -// ChangeKubernetesClusterToReady changes k8s cluster to ready state once provisioning is finished -func ChangeKubernetesClusterToReady(q *reform.Querier, name string) error { - c, err := FindKubernetesClusterByName(q, name) - if err != nil { - return err - } - c.IsReady = true - if err = q.Update(c); err != nil { - return errors.WithStack(err) - } - return nil -} - -// RemoveKubernetesCluster removes Kubernetes cluster with provided name. -func RemoveKubernetesCluster(q *reform.Querier, name string) error { - c, err := FindKubernetesClusterByName(q, name) - if err != nil { - return err - } - - return errors.Wrap(q.Delete(c), "failed to delete Kubernetes Cluster") -} diff --git a/managed/models/kubernetes_helpers_test.go b/managed/models/kubernetes_helpers_test.go deleted file mode 100644 index 1b8eb72600..0000000000 --- a/managed/models/kubernetes_helpers_test.go +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (C) 2017 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package models_test - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gopkg.in/reform.v1" - "gopkg.in/reform.v1/dialects/postgresql" - - "github.com/percona/pmm/managed/models" - "github.com/percona/pmm/managed/utils/testdb" - "github.com/percona/pmm/managed/utils/tests" -) - -func TestKubernetesHelpers(t *testing.T) { - now, origNowF := models.Now(), models.Now - models.Now = func() time.Time { - return now - } - sqlDB := testdb.Open(t, models.SetupFixtures, nil) - defer func() { - models.Now = origNowF - }() - t.Cleanup(func() { - require.NoError(t, sqlDB.Close()) - }) - - setup := func(t *testing.T) (q *reform.Querier, teardown func(t *testing.T)) { - t.Helper() - db := reform.NewDB(sqlDB, postgresql.Dialect, reform.NewPrintfLogger(t.Logf)) - tx, err := db.Begin() - require.NoError(t, err) - q = tx.Querier - - for _, str := range []reform.Struct{ - &models.KubernetesCluster{ - ID: "KC1", - KubernetesClusterName: "Kubernetes Cluster 1", - KubeConfig: `{"kind": "Config", "apiVersion": "v1"}`, - PXC: &models.Component{ - DisabledVersions: []string{"8.0.0"}, - DefaultVersion: "8.0.1-20", - }, - ProxySQL: &models.Component{ - DisabledVersions: []string{"8.0.0"}, - DefaultVersion: "8.0.1-19", - }, - HAProxy: &models.Component{ - DisabledVersions: []string{"2.0.0"}, - DefaultVersion: "2.1.7", - }, - Mongod: &models.Component{ - DisabledVersions: []string{"3.4.0", "3.6.0"}, - DefaultVersion: "4.4.3-8", - }, - }, - &models.KubernetesCluster{ - ID: "KC2", - KubernetesClusterName: "Kubernetes Cluster 2", - KubeConfig: `{}`, - }, - } { - require.NoError(t, q.Insert(str), "failed to INSERT %+v", str) - } - - teardown = func(t *testing.T) { - t.Helper() - require.NoError(t, tx.Rollback()) - } - return - } - - t.Run("FindAllKubernetesClusters", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - - expected := []*models.KubernetesCluster{ - { - ID: "KC1", - KubernetesClusterName: "Kubernetes Cluster 1", - KubeConfig: `{"kind": "Config", "apiVersion": "v1"}`, - PXC: &models.Component{ - DisabledVersions: []string{"8.0.0"}, - DefaultVersion: "8.0.1-20", - }, - ProxySQL: &models.Component{ - DisabledVersions: []string{"8.0.0"}, - DefaultVersion: "8.0.1-19", - }, - HAProxy: &models.Component{ - DisabledVersions: []string{"2.0.0"}, - DefaultVersion: "2.1.7", - }, - Mongod: &models.Component{ - DisabledVersions: []string{"3.4.0", "3.6.0"}, - DefaultVersion: "4.4.3-8", - }, - CreatedAt: now, - UpdatedAt: now, - }, - { - ID: "KC2", - KubernetesClusterName: "Kubernetes Cluster 2", - KubeConfig: `{}`, - CreatedAt: now, - UpdatedAt: now, - }, - } - - clusters, err := models.FindAllKubernetesClusters(q) - require.NoError(t, err) - require.Equal(t, expected, clusters) - }) - - t.Run("CreateKubernetesCluster", func(t *testing.T) { - t.Run("Basic", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - cluster, err := models.CreateKubernetesCluster(q, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: "Kubernetes Cluster 3", - KubeConfig: "{}", - }) - require.NoError(t, err) - expected := &models.KubernetesCluster{ - ID: cluster.ID, - KubernetesClusterName: "Kubernetes Cluster 3", - KubeConfig: "{}", - CreatedAt: now, - UpdatedAt: now, - } - require.Equal(t, expected, cluster) - }) - - t.Run("EmptyKubernetesClusterName", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - cluster, err := models.CreateKubernetesCluster(q, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: "", - KubeConfig: "{}", - }) - tests.AssertGRPCError(t, status.New(codes.InvalidArgument, "empty Kubernetes Cluster Name."), err) - require.Nil(t, cluster) - }) - - t.Run("EmptyKubeConfig", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - cluster, err := models.CreateKubernetesCluster(q, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: "Kubernetes Cluster without config", - KubeConfig: "", - }) - require.EqualError(t, err, `pq: new row for relation "kubernetes_clusters" violates check constraint "kubernetes_clusters_kube_config_check"`) - require.Nil(t, cluster) - }) - - t.Run("AlreadyExist", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - cluster, err := models.CreateKubernetesCluster(q, &models.CreateKubernetesClusterParams{ - KubernetesClusterName: "Kubernetes Cluster 1", - KubeConfig: `{}`, - }) - - tests.AssertGRPCError(t, status.New(codes.AlreadyExists, "Kubernetes Cluster with Name \"Kubernetes Cluster 1\" already exists."), err) - require.Nil(t, cluster) - }) - }) - - t.Run("RemoveKubernetesCluster", func(t *testing.T) { - t.Run("Basic", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - err := models.RemoveKubernetesCluster(q, "Kubernetes Cluster 1") - assert.NoError(t, err) - }) - t.Run("NonExistCluster", func(t *testing.T) { - q, teardown := setup(t) - defer teardown(t) - err := models.RemoveKubernetesCluster(q, "test-cluster") - tests.AssertGRPCError(t, status.New(codes.NotFound, `Kubernetes Cluster with name "test-cluster" not found.`), err) - }) - }) -} From a56be105586da1d9f646a9cefe33f34b5f07fd6c Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 19:46:07 +0600 Subject: [PATCH 04/11] EVEREST-287 fix build --- managed/cmd/pmm-managed/main.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index 198311970c..c8186b7ba6 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -658,9 +658,6 @@ func main() { //nolint:cyclop,maintidx grafanaAddrF := kingpin.Flag("grafana-addr", "Grafana HTTP API address").Default("127.0.0.1:3000").String() qanAPIAddrF := kingpin.Flag("qan-api-addr", "QAN API gRPC API address").Default("127.0.0.1:9911").String() - versionServiceAPIURLF := kingpin.Flag("version-service-api-url", "Version Service API URL"). - Default("https://check.percona.com/versions/v1").Envar("PERCONA_TEST_VERSION_SERVICE_URL").String() - postgresAddrF := kingpin.Flag("postgres-addr", "PostgreSQL address"). Default(models.DefaultPostgreSQLAddr). Envar("PERCONA_TEST_POSTGRES_ADDR"). @@ -1072,7 +1069,6 @@ func main() { //nolint:cyclop,maintidx templatesService: templatesService, rulesService: rulesService, jobsService: jobsService, - versionServiceClient: versionService, schedulerService: schedulerService, backupService: backupService, compatibilityService: compatibilityService, @@ -1082,9 +1078,7 @@ func main() { //nolint:cyclop,maintidx versionCache: versionCache, supervisord: supervisord, config: &cfg.Config, - componentsService: componentsService, agentService: agentService, - kubeStorage: kubeStorage, uieventsService: uieventsService, vmClient: &vmClient, }) From 6b921d38b92dc1142a6728cceac85b5f6240035f Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 19:57:54 +0600 Subject: [PATCH 05/11] EVEREST-287 Fixed build --- managed/services/supervisord/supervisord_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/managed/services/supervisord/supervisord_test.go b/managed/services/supervisord/supervisord_test.go index 0bdf2ab1f3..04bcc5a425 100644 --- a/managed/services/supervisord/supervisord_test.go +++ b/managed/services/supervisord/supervisord_test.go @@ -44,8 +44,6 @@ func TestConfig(t *testing.T) { settings.VictoriaMetrics.CacheEnabled = false for _, tmpl := range templates.Templates() { - n := tmpl.Name() - tmpl := tmpl t.Run(tmpl.Name(), func(t *testing.T) { t.Parallel() From 86c12094548b57c3a9428874db5ca184e4389198 Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 20:01:02 +0600 Subject: [PATCH 06/11] EVEREST-287 Gen files --- api/agentlocalpb/agentlocal.pb.go | 35 +- api/agentlocalpb/agentlocal.pb.gw.go | 32 +- api/agentlocalpb/agentlocal.swagger.json | 289 -- api/agentlocalpb/agentlocal_grpc.pb.go | 5 +- .../client/agent_local/reload_parameters.go | 2 - .../client/agent_local/reload_responses.go | 9 +- .../client/agent_local/status2_parameters.go | 3 - .../client/agent_local/status2_responses.go | 16 +- .../client/agent_local/status_parameters.go | 2 - .../client/agent_local/status_responses.go | 17 +- api/agentpb/agent.pb.go | 223 +- api/agentpb/agent.pb.validate.go | 3 +- api/agentpb/agent.swagger.json | 2478 ------------ api/agentpb/agent_grpc.pb.go | 4 +- api/agentpb/collector.pb.go | 41 +- api/agentpb/collector.swagger.json | 50 - api/inventorypb/agent_status.pb.go | 16 +- api/inventorypb/agent_status.swagger.json | 44 - api/inventorypb/agents.pb.go | 236 +- api/inventorypb/agents.pb.gw.go | 140 +- api/inventorypb/agents.swagger.json | 3567 ----------------- api/inventorypb/agents_grpc.pb.go | 34 +- .../add_azure_database_exporter_parameters.go | 2 - .../add_azure_database_exporter_responses.go | 13 +- .../add_external_exporter_parameters.go | 2 - .../agents/add_external_exporter_responses.go | 13 +- .../add_mongo_db_exporter_parameters.go | 2 - .../agents/add_mongo_db_exporter_responses.go | 13 +- .../add_my_s_q_ld_exporter_parameters.go | 2 - .../add_my_s_q_ld_exporter_responses.go | 13 +- .../agents/add_node_exporter_parameters.go | 2 - .../agents/add_node_exporter_responses.go | 13 +- .../client/agents/add_pmm_agent_parameters.go | 2 - .../client/agents/add_pmm_agent_responses.go | 13 +- .../add_postgres_exporter_parameters.go | 2 - .../agents/add_postgres_exporter_responses.go | 13 +- .../add_proxy_sql_exporter_parameters.go | 2 - .../add_proxy_sql_exporter_responses.go | 13 +- ..._qan_mongo_db_profiler_agent_parameters.go | 2 - ...d_qan_mongo_db_profiler_agent_responses.go | 13 +- ...qan_my_sql_perf_schema_agent_parameters.go | 2 - ..._qan_my_sql_perf_schema_agent_responses.go | 13 +- ...add_qan_my_sql_slowlog_agent_parameters.go | 2 - .../add_qan_my_sql_slowlog_agent_responses.go | 13 +- ...re_sql_pg_stat_monitor_agent_parameters.go | 2 - ...gre_sql_pg_stat_monitor_agent_responses.go | 13 +- ...tgre_sql_pg_statements_agent_parameters.go | 2 - ...stgre_sql_pg_statements_agent_responses.go | 13 +- .../agents/add_rds_exporter_parameters.go | 2 - .../agents/add_rds_exporter_responses.go | 13 +- ...ange_azure_database_exporter_parameters.go | 2 - ...hange_azure_database_exporter_responses.go | 15 +- .../change_external_exporter_parameters.go | 2 - .../change_external_exporter_responses.go | 15 +- .../change_mongo_db_exporter_parameters.go | 2 - .../change_mongo_db_exporter_responses.go | 15 +- .../change_my_s_q_ld_exporter_parameters.go | 2 - .../change_my_s_q_ld_exporter_responses.go | 15 +- .../agents/change_node_exporter_parameters.go | 2 - .../agents/change_node_exporter_responses.go | 15 +- .../change_postgres_exporter_parameters.go | 2 - .../change_postgres_exporter_responses.go | 15 +- .../change_proxy_sql_exporter_parameters.go | 2 - .../change_proxy_sql_exporter_responses.go | 15 +- ..._qan_mongo_db_profiler_agent_parameters.go | 2 - ...e_qan_mongo_db_profiler_agent_responses.go | 15 +- ...qan_my_sql_perf_schema_agent_parameters.go | 2 - ..._qan_my_sql_perf_schema_agent_responses.go | 15 +- ...nge_qan_my_sql_slowlog_agent_parameters.go | 2 - ...ange_qan_my_sql_slowlog_agent_responses.go | 15 +- ...re_sql_pg_stat_monitor_agent_parameters.go | 2 - ...gre_sql_pg_stat_monitor_agent_responses.go | 15 +- ...tgre_sql_pg_statements_agent_parameters.go | 2 - ...stgre_sql_pg_statements_agent_responses.go | 15 +- .../agents/change_rds_exporter_parameters.go | 2 - .../agents/change_rds_exporter_responses.go | 15 +- .../agents/get_agent_logs_parameters.go | 2 - .../client/agents/get_agent_logs_responses.go | 11 +- .../client/agents/get_agent_parameters.go | 2 - .../json/client/agents/get_agent_responses.go | 41 +- .../client/agents/list_agents_parameters.go | 2 - .../client/agents/list_agents_responses.go | 71 +- .../client/agents/remove_agent_parameters.go | 2 - .../client/agents/remove_agent_responses.go | 10 +- .../nodes/add_container_node_parameters.go | 2 - .../nodes/add_container_node_responses.go | 13 +- .../nodes/add_generic_node_parameters.go | 2 - .../nodes/add_generic_node_responses.go | 13 +- ...d_remote_azure_database_node_parameters.go | 2 - ...dd_remote_azure_database_node_responses.go | 13 +- .../nodes/add_remote_node_parameters.go | 2 - .../client/nodes/add_remote_node_responses.go | 13 +- .../nodes/add_remote_rds_node_parameters.go | 2 - .../nodes/add_remote_rds_node_responses.go | 13 +- .../json/client/nodes/get_node_parameters.go | 2 - .../json/client/nodes/get_node_responses.go | 21 +- .../client/nodes/list_nodes_parameters.go | 2 - .../json/client/nodes/list_nodes_responses.go | 31 +- .../client/nodes/remove_node_parameters.go | 2 - .../client/nodes/remove_node_responses.go | 10 +- .../services/add_custom_labels_parameters.go | 2 - .../services/add_custom_labels_responses.go | 10 +- .../add_external_service_parameters.go | 2 - .../add_external_service_responses.go | 13 +- .../add_ha_proxy_service_parameters.go | 2 - .../add_ha_proxy_service_responses.go | 13 +- .../add_mongo_db_service_parameters.go | 2 - .../add_mongo_db_service_responses.go | 13 +- .../services/add_my_sql_service_parameters.go | 2 - .../services/add_my_sql_service_responses.go | 13 +- .../add_postgre_sql_service_parameters.go | 2 - .../add_postgre_sql_service_responses.go | 13 +- .../add_proxy_sql_service_parameters.go | 2 - .../add_proxy_sql_service_responses.go | 13 +- .../client/services/get_service_parameters.go | 2 - .../client/services/get_service_responses.go | 23 +- .../list_active_service_types_parameters.go | 2 - .../list_active_service_types_responses.go | 10 +- .../services/list_services_parameters.go | 2 - .../services/list_services_responses.go | 35 +- .../remove_custom_labels_parameters.go | 2 - .../remove_custom_labels_responses.go | 10 +- .../services/remove_service_parameters.go | 2 - .../services/remove_service_responses.go | 10 +- api/inventorypb/log_level.pb.go | 16 +- api/inventorypb/log_level.swagger.json | 44 - api/inventorypb/nodes.pb.go | 80 +- api/inventorypb/nodes.pb.gw.go | 48 +- api/inventorypb/nodes.swagger.json | 854 ---- api/inventorypb/nodes_grpc.pb.go | 11 +- api/inventorypb/services.pb.go | 104 +- api/inventorypb/services.pb.gw.go | 64 +- api/inventorypb/services.swagger.json | 1214 ------ api/inventorypb/services_grpc.pb.go | 15 +- api/managementpb/actions.pb.go | 78 +- api/managementpb/actions.pb.gw.go | 76 +- api/managementpb/actions.swagger.json | 1051 ----- api/managementpb/actions_grpc.pb.go | 18 +- api/managementpb/agent/agent.pb.go | 32 +- api/managementpb/agent/agent.pb.gw.go | 28 +- api/managementpb/agent/agent.swagger.json | 386 -- api/managementpb/agent/agent_grpc.pb.go | 4 +- .../client/agent/list_agents_parameters.go | 2 - .../client/agent/list_agents_responses.go | 23 +- api/managementpb/alerting/alerting.pb.go | 79 +- api/managementpb/alerting/alerting.pb.gw.go | 36 +- .../alerting/alerting.swagger.json | 632 --- api/managementpb/alerting/alerting_grpc.pb.go | 8 +- .../client/alerting/create_rule_parameters.go | 2 - .../client/alerting/create_rule_responses.go | 18 +- .../alerting/create_template_parameters.go | 2 - .../alerting/create_template_responses.go | 10 +- .../alerting/delete_template_parameters.go | 2 - .../alerting/delete_template_responses.go | 10 +- .../alerting/list_templates_parameters.go | 2 - .../alerting/list_templates_responses.go | 29 +- .../alerting/update_template_parameters.go | 2 - .../alerting/update_template_responses.go | 10 +- api/managementpb/alerting/params.pb.go | 18 +- api/managementpb/alerting/params.swagger.json | 44 - api/managementpb/annotation.pb.go | 18 +- api/managementpb/annotation.pb.gw.go | 28 +- api/managementpb/annotation.swagger.json | 116 - api/managementpb/annotation_grpc.pb.go | 4 +- api/managementpb/azure/azure.pb.go | 30 +- api/managementpb/azure/azure.pb.gw.go | 24 +- api/managementpb/azure/azure.swagger.json | 321 -- api/managementpb/azure/azure_grpc.pb.go | 5 +- .../add_azure_database_parameters.go | 2 - .../add_azure_database_responses.go | 10 +- .../discover_azure_database_parameters.go | 2 - .../discover_azure_database_responses.go | 15 +- api/managementpb/backup/artifacts.pb.go | 42 +- api/managementpb/backup/artifacts.pb.gw.go | 28 +- .../backup/artifacts.swagger.json | 364 -- api/managementpb/backup/artifacts_grpc.pb.go | 6 +- api/managementpb/backup/backups.pb.go | 71 +- api/managementpb/backup/backups.pb.gw.go | 48 +- api/managementpb/backup/backups.swagger.json | 812 ---- api/managementpb/backup/backups_grpc.pb.go | 11 +- api/managementpb/backup/common.pb.go | 28 +- api/managementpb/backup/common.swagger.json | 44 - api/managementpb/backup/errors.pb.go | 20 +- api/managementpb/backup/errors.swagger.json | 44 - .../artifacts/delete_artifact_parameters.go | 2 - .../artifacts/delete_artifact_responses.go | 10 +- .../artifacts/list_artifacts_parameters.go | 2 - .../artifacts/list_artifacts_responses.go | 24 +- .../list_pitr_timeranges_parameters.go | 2 - .../list_pitr_timeranges_responses.go | 15 +- .../change_scheduled_backup_parameters.go | 2 - .../change_scheduled_backup_responses.go | 10 +- .../client/backups/get_logs_parameters.go | 2 - .../json/client/backups/get_logs_responses.go | 15 +- ...artifact_compatible_services_parameters.go | 2 - ..._artifact_compatible_services_responses.go | 19 +- .../list_scheduled_backups_parameters.go | 2 - .../list_scheduled_backups_responses.go | 14 +- .../remove_scheduled_backup_parameters.go | 2 - .../remove_scheduled_backup_responses.go | 10 +- .../backups/restore_backup_parameters.go | 2 - .../backups/restore_backup_responses.go | 11 +- .../backups/schedule_backup_parameters.go | 2 - .../backups/schedule_backup_responses.go | 11 +- .../client/backups/start_backup_parameters.go | 2 - .../client/backups/start_backup_responses.go | 11 +- .../locations/add_location_parameters.go | 2 - .../locations/add_location_responses.go | 15 +- .../locations/change_location_parameters.go | 2 - .../locations/change_location_responses.go | 14 +- .../locations/list_locations_parameters.go | 2 - .../locations/list_locations_responses.go | 18 +- .../locations/remove_location_parameters.go | 2 - .../locations/remove_location_responses.go | 10 +- .../test_location_config_parameters.go | 2 - .../test_location_config_responses.go | 14 +- .../list_restore_history_parameters.go | 2 - .../list_restore_history_responses.go | 14 +- api/managementpb/backup/locations.pb.go | 40 +- api/managementpb/backup/locations.pb.gw.go | 36 +- .../backup/locations.swagger.json | 369 -- api/managementpb/backup/locations_grpc.pb.go | 8 +- api/managementpb/backup/restores.pb.go | 28 +- api/managementpb/backup/restores.pb.gw.go | 28 +- api/managementpb/backup/restores.swagger.json | 180 - api/managementpb/backup/restores_grpc.pb.go | 4 +- api/managementpb/boolean_flag.pb.go | 16 +- api/managementpb/boolean_flag.swagger.json | 44 - api/managementpb/checks.pb.go | 74 +- api/managementpb/checks.pb.gw.go | 48 +- api/managementpb/checks.swagger.json | 732 ---- api/managementpb/checks_grpc.pb.go | 11 +- api/managementpb/external.pb.go | 31 +- api/managementpb/external.pb.gw.go | 28 +- api/managementpb/external.swagger.json | 343 -- api/managementpb/external_grpc.pb.go | 4 +- api/managementpb/haproxy.pb.go | 31 +- api/managementpb/haproxy.pb.gw.go | 28 +- api/managementpb/haproxy.swagger.json | 331 -- api/managementpb/haproxy_grpc.pb.go | 4 +- api/managementpb/ia/alerts.pb.go | 43 +- api/managementpb/ia/alerts.pb.gw.go | 24 +- api/managementpb/ia/alerts.swagger.json | 716 ---- api/managementpb/ia/alerts_grpc.pb.go | 5 +- api/managementpb/ia/channels.pb.go | 53 +- api/managementpb/ia/channels.pb.gw.go | 32 +- api/managementpb/ia/channels.swagger.json | 497 --- api/managementpb/ia/channels_grpc.pb.go | 7 +- .../client/alerts/list_alerts_parameters.go | 2 - .../client/alerts/list_alerts_responses.go | 57 +- .../client/alerts/toggle_alerts_parameters.go | 2 - .../client/alerts/toggle_alerts_responses.go | 10 +- .../client/channels/add_channel_parameters.go | 2 - .../client/channels/add_channel_responses.go | 25 +- .../channels/change_channel_parameters.go | 2 - .../channels/change_channel_responses.go | 24 +- .../channels/list_channels_parameters.go | 2 - .../channels/list_channels_responses.go | 33 +- .../channels/remove_channel_parameters.go | 2 - .../channels/remove_channel_responses.go | 10 +- .../rules/create_alert_rule_parameters.go | 2 - .../rules/create_alert_rule_responses.go | 19 +- .../rules/delete_alert_rule_parameters.go | 2 - .../rules/delete_alert_rule_responses.go | 10 +- .../rules/list_alert_rules_parameters.go | 2 - .../rules/list_alert_rules_responses.go | 55 +- .../rules/toggle_alert_rule_parameters.go | 2 - .../rules/toggle_alert_rule_responses.go | 10 +- .../rules/update_alert_rule_parameters.go | 2 - .../rules/update_alert_rule_responses.go | 18 +- api/managementpb/ia/rules.pb.go | 77 +- api/managementpb/ia/rules.pb.gw.go | 36 +- api/managementpb/ia/rules.pb.validate.go | 3 +- api/managementpb/ia/rules.swagger.json | 897 ----- api/managementpb/ia/rules_grpc.pb.go | 8 +- api/managementpb/ia/status.pb.go | 16 +- api/managementpb/ia/status.swagger.json | 44 - .../actions/cancel_action_parameters.go | 2 - .../client/actions/cancel_action_responses.go | 10 +- .../client/actions/get_action_parameters.go | 2 - .../client/actions/get_action_responses.go | 11 +- ...tart_mongo_db_explain_action_parameters.go | 2 - ...start_mongo_db_explain_action_responses.go | 11 +- .../start_my_sql_explain_action_parameters.go | 2 - .../start_my_sql_explain_action_responses.go | 11 +- ...t_my_sql_explain_json_action_parameters.go | 2 - ...rt_my_sql_explain_json_action_responses.go | 11 +- ...lain_traditional_json_action_parameters.go | 2 - ...plain_traditional_json_action_responses.go | 11 +- ...sql_show_create_table_action_parameters.go | 2 - ..._sql_show_create_table_action_responses.go | 11 +- ...art_my_sql_show_index_action_parameters.go | 2 - ...tart_my_sql_show_index_action_responses.go | 11 +- ...sql_show_table_status_action_parameters.go | 2 - ..._sql_show_table_status_action_responses.go | 11 +- ...sql_show_create_table_action_parameters.go | 2 - ..._sql_show_create_table_action_responses.go | 11 +- ...ostgre_sql_show_index_action_parameters.go | 2 - ...postgre_sql_show_index_action_responses.go | 11 +- ...t_pt_mongo_db_summary_action_parameters.go | 2 - ...rt_pt_mongo_db_summary_action_responses.go | 11 +- ...art_pt_my_sql_summary_action_parameters.go | 2 - ...tart_pt_my_sql_summary_action_responses.go | 11 +- .../start_pt_pg_summary_action_parameters.go | 2 - .../start_pt_pg_summary_action_responses.go | 11 +- .../start_pt_summary_action_parameters.go | 2 - .../start_pt_summary_action_responses.go | 11 +- .../annotation/add_annotation_parameters.go | 2 - .../annotation/add_annotation_responses.go | 10 +- .../external/add_external_parameters.go | 2 - .../client/external/add_external_responses.go | 17 +- .../ha_proxy/add_ha_proxy_parameters.go | 2 - .../client/ha_proxy/add_ha_proxy_responses.go | 17 +- .../mongo_db/add_mongo_db_parameters.go | 2 - .../client/mongo_db/add_mongo_db_responses.go | 19 +- .../client/my_sql/add_my_sql_parameters.go | 2 - .../client/my_sql/add_my_sql_responses.go | 21 +- .../client/node/register_node_parameters.go | 2 - .../client/node/register_node_responses.go | 17 +- .../postgre_sql/add_postgre_sql_parameters.go | 2 - .../postgre_sql/add_postgre_sql_responses.go | 21 +- .../proxy_sql/add_proxy_sql_parameters.go | 2 - .../proxy_sql/add_proxy_sql_responses.go | 17 +- .../json/client/rds/add_rds_parameters.go | 2 - .../json/client/rds/add_rds_responses.go | 27 +- .../client/rds/discover_rds_parameters.go | 2 - .../json/client/rds/discover_rds_responses.go | 15 +- .../change_security_checks_parameters.go | 2 - .../change_security_checks_responses.go | 14 +- .../get_failed_checks_parameters.go | 2 - .../get_failed_checks_responses.go | 19 +- .../get_security_check_results_parameters.go | 2 - .../get_security_check_results_responses.go | 14 +- .../list_advisors_parameters.go | 2 - .../list_advisors_responses.go | 18 +- .../list_failed_services_parameters.go | 2 - .../list_failed_services_responses.go | 14 +- .../list_security_checks_parameters.go | 2 - .../list_security_checks_responses.go | 14 +- .../start_security_checks_parameters.go | 2 - .../start_security_checks_responses.go | 10 +- .../toggle_check_alert_parameters.go | 2 - .../toggle_check_alert_responses.go | 10 +- .../service/remove_service_parameters.go | 2 - .../service/remove_service_responses.go | 10 +- api/managementpb/metrics.pb.go | 16 +- api/managementpb/metrics.swagger.json | 44 - api/managementpb/mongodb.pb.go | 35 +- api/managementpb/mongodb.pb.gw.go | 28 +- api/managementpb/mongodb.swagger.json | 531 --- api/managementpb/mongodb_grpc.pb.go | 4 +- api/managementpb/mysql.pb.go | 37 +- api/managementpb/mysql.pb.gw.go | 28 +- api/managementpb/mysql.swagger.json | 645 --- api/managementpb/mysql_grpc.pb.go | 4 +- api/managementpb/node.pb.go | 33 +- api/managementpb/node.pb.gw.go | 28 +- api/managementpb/node.swagger.json | 319 -- .../client/mgmt_node/get_node_parameters.go | 2 - .../client/mgmt_node/get_node_responses.go | 21 +- .../client/mgmt_node/list_nodes_parameters.go | 2 - .../client/mgmt_node/list_nodes_responses.go | 23 +- api/managementpb/node/node.pb.go | 43 +- api/managementpb/node/node.pb.gw.go | 24 +- api/managementpb/node/node.swagger.json | 305 -- api/managementpb/node/node_grpc.pb.go | 5 +- api/managementpb/node_grpc.pb.go | 4 +- api/managementpb/pagination.pb.go | 18 +- api/managementpb/pagination.swagger.json | 44 - api/managementpb/postgresql.pb.go | 37 +- api/managementpb/postgresql.pb.gw.go | 28 +- api/managementpb/postgresql.swagger.json | 584 --- api/managementpb/postgresql_grpc.pb.go | 4 +- api/managementpb/proxysql.pb.go | 33 +- api/managementpb/proxysql.pb.gw.go | 28 +- api/managementpb/proxysql.swagger.json | 409 -- api/managementpb/proxysql_grpc.pb.go | 4 +- api/managementpb/rds.pb.go | 51 +- api/managementpb/rds.pb.gw.go | 24 +- api/managementpb/rds.swagger.json | 895 ----- api/managementpb/rds_grpc.pb.go | 5 +- .../client/role/assign_roles_parameters.go | 2 - .../client/role/assign_roles_responses.go | 10 +- .../client/role/create_role_parameters.go | 2 - .../json/client/role/create_role_responses.go | 11 +- .../client/role/delete_role_parameters.go | 2 - .../json/client/role/delete_role_responses.go | 10 +- .../json/client/role/get_role_parameters.go | 2 - .../json/client/role/get_role_responses.go | 11 +- .../json/client/role/list_roles_parameters.go | 2 - .../json/client/role/list_roles_responses.go | 14 +- .../role/set_default_role_parameters.go | 2 - .../client/role/set_default_role_responses.go | 10 +- .../client/role/update_role_parameters.go | 2 - .../json/client/role/update_role_responses.go | 10 +- api/managementpb/role/role.pb.go | 44 +- api/managementpb/role/role.pb.gw.go | 44 +- api/managementpb/role/role.swagger.json | 440 -- api/managementpb/role/role_grpc.pb.go | 10 +- api/managementpb/service.pb.go | 29 +- api/managementpb/service.pb.gw.go | 28 +- api/managementpb/service.swagger.json | 118 - .../mgmt_service/list_services_parameters.go | 2 - .../mgmt_service/list_services_responses.go | 27 +- api/managementpb/service/service.pb.go | 37 +- api/managementpb/service/service.pb.gw.go | 28 +- api/managementpb/service/service.swagger.json | 500 --- api/managementpb/service/service_grpc.pb.go | 4 +- api/managementpb/service_grpc.pb.go | 4 +- api/managementpb/severity.pb.go | 16 +- api/managementpb/severity.swagger.json | 44 - .../client/platform/connect_parameters.go | 2 - .../json/client/platform/connect_responses.go | 10 +- .../client/platform/disconnect_parameters.go | 2 - .../client/platform/disconnect_responses.go | 10 +- .../get_contact_information_parameters.go | 2 - .../get_contact_information_responses.go | 12 +- ...ch_organization_entitlements_parameters.go | 2 - ...rch_organization_entitlements_responses.go | 16 +- .../search_organization_tickets_parameters.go | 2 - .../search_organization_tickets_responses.go | 14 +- .../client/platform/server_info_parameters.go | 2 - .../client/platform/server_info_responses.go | 10 +- .../client/platform/user_status_parameters.go | 2 - .../client/platform/user_status_responses.go | 10 +- api/platformpb/platform.pb.go | 56 +- api/platformpb/platform.pb.gw.go | 44 +- api/platformpb/platform.swagger.json | 525 --- api/platformpb/platform_grpc.pb.go | 10 +- api/qanpb/collector.pb.go | 35 +- api/qanpb/collector.swagger.json | 1066 ----- api/qanpb/collector_grpc.pb.go | 4 +- api/qanpb/filters.pb.go | 28 +- api/qanpb/filters.pb.gw.go | 28 +- api/qanpb/filters.swagger.json | 165 - api/qanpb/filters_grpc.pb.go | 4 +- .../json/client/filters/get_parameters.go | 2 - .../json/client/filters/get_responses.go | 23 +- .../get_metrics_names_parameters.go | 2 - .../get_metrics_names_responses.go | 10 +- ...lain_fingerprint_by_query_id_parameters.go | 2 - ...plain_fingerprint_by_query_id_responses.go | 11 +- .../get_histogram_parameters.go | 2 - .../object_details/get_histogram_responses.go | 19 +- .../object_details/get_labels_parameters.go | 2 - .../object_details/get_labels_responses.go | 15 +- .../object_details/get_metrics_parameters.go | 2 - .../object_details/get_metrics_responses.go | 29 +- .../get_query_example_parameters.go | 2 - .../get_query_example_responses.go | 19 +- .../get_query_plan_parameters.go | 2 - .../get_query_plan_responses.go | 11 +- .../object_details/query_exists_parameters.go | 2 - .../object_details/query_exists_responses.go | 10 +- .../schema_by_query_id_parameters.go | 2 - .../schema_by_query_id_responses.go | 11 +- .../client/profile/get_report_parameters.go | 2 - .../client/profile/get_report_responses.go | 29 +- api/qanpb/metrics_names.pb.go | 20 +- api/qanpb/metrics_names.pb.gw.go | 28 +- api/qanpb/metrics_names.swagger.json | 100 - api/qanpb/metrics_names_grpc.pb.go | 4 +- api/qanpb/object_details.pb.go | 76 +- api/qanpb/object_details.pb.gw.go | 48 +- api/qanpb/object_details.swagger.json | 1100 ----- api/qanpb/object_details_grpc.pb.go | 11 +- api/qanpb/profile.pb.go | 32 +- api/qanpb/profile.pb.gw.go | 28 +- api/qanpb/profile.swagger.json | 578 --- api/qanpb/profile_grpc.pb.go | 4 +- api/qanpb/qan.pb.go | 24 +- api/qanpb/qan.swagger.json | 44 - api/serverpb/httperror.pb.go | 18 +- api/serverpb/httperror.swagger.json | 46 - .../server/aws_instance_check_parameters.go | 2 - .../server/aws_instance_check_responses.go | 10 +- .../server/change_settings_parameters.go | 2 - .../server/change_settings_responses.go | 29 +- .../client/server/check_updates_parameters.go | 2 - .../client/server/check_updates_responses.go | 15 +- .../client/server/get_settings_parameters.go | 2 - .../client/server/get_settings_responses.go | 20 +- .../json/client/server/logs_parameters.go | 3 - .../json/client/server/logs_responses.go | 6 +- .../client/server/readiness_parameters.go | 1 - .../json/client/server/readiness_responses.go | 9 +- .../client/server/start_update_parameters.go | 2 - .../client/server/start_update_responses.go | 10 +- ...test_email_alerting_settings_parameters.go | 2 - .../test_email_alerting_settings_responses.go | 12 +- .../client/server/update_status_parameters.go | 2 - .../client/server/update_status_responses.go | 11 +- .../json/client/server/version_parameters.go | 3 - .../json/client/server/version_responses.go | 14 +- api/serverpb/server.pb.go | 70 +- api/serverpb/server.pb.gw.go | 54 +- api/serverpb/server.swagger.json | 835 ---- api/serverpb/server_grpc.pb.go | 12 +- api/uieventspb/server.pb.go | 28 +- api/uieventspb/server.pb.gw.go | 28 +- api/uieventspb/server.swagger.json | 202 - api/uieventspb/server_grpc.pb.go | 4 +- .../json/client/user/get_user_parameters.go | 1 - .../json/client/user/get_user_responses.go | 10 +- .../json/client/user/list_users_parameters.go | 1 - .../json/client/user/list_users_responses.go | 14 +- .../client/user/update_user_parameters.go | 2 - .../json/client/user/update_user_responses.go | 11 +- api/userpb/user.pb.go | 26 +- api/userpb/user.pb.gw.go | 28 +- api/userpb/user.swagger.json | 190 - api/userpb/user_grpc.pb.go | 6 +- 512 files changed, 2189 insertions(+), 31011 deletions(-) delete mode 100644 api/agentlocalpb/agentlocal.swagger.json delete mode 100644 api/agentpb/agent.swagger.json delete mode 100644 api/agentpb/collector.swagger.json delete mode 100644 api/inventorypb/agent_status.swagger.json delete mode 100644 api/inventorypb/agents.swagger.json delete mode 100644 api/inventorypb/log_level.swagger.json delete mode 100644 api/inventorypb/nodes.swagger.json delete mode 100644 api/inventorypb/services.swagger.json delete mode 100644 api/managementpb/actions.swagger.json delete mode 100644 api/managementpb/agent/agent.swagger.json delete mode 100644 api/managementpb/alerting/alerting.swagger.json delete mode 100644 api/managementpb/alerting/params.swagger.json delete mode 100644 api/managementpb/annotation.swagger.json delete mode 100644 api/managementpb/azure/azure.swagger.json delete mode 100644 api/managementpb/backup/artifacts.swagger.json delete mode 100644 api/managementpb/backup/backups.swagger.json delete mode 100644 api/managementpb/backup/common.swagger.json delete mode 100644 api/managementpb/backup/errors.swagger.json delete mode 100644 api/managementpb/backup/locations.swagger.json delete mode 100644 api/managementpb/backup/restores.swagger.json delete mode 100644 api/managementpb/boolean_flag.swagger.json delete mode 100644 api/managementpb/checks.swagger.json delete mode 100644 api/managementpb/external.swagger.json delete mode 100644 api/managementpb/haproxy.swagger.json delete mode 100644 api/managementpb/ia/alerts.swagger.json delete mode 100644 api/managementpb/ia/channels.swagger.json delete mode 100644 api/managementpb/ia/rules.swagger.json delete mode 100644 api/managementpb/ia/status.swagger.json delete mode 100644 api/managementpb/metrics.swagger.json delete mode 100644 api/managementpb/mongodb.swagger.json delete mode 100644 api/managementpb/mysql.swagger.json delete mode 100644 api/managementpb/node.swagger.json delete mode 100644 api/managementpb/node/node.swagger.json delete mode 100644 api/managementpb/pagination.swagger.json delete mode 100644 api/managementpb/postgresql.swagger.json delete mode 100644 api/managementpb/proxysql.swagger.json delete mode 100644 api/managementpb/rds.swagger.json delete mode 100644 api/managementpb/role/role.swagger.json delete mode 100644 api/managementpb/service.swagger.json delete mode 100644 api/managementpb/service/service.swagger.json delete mode 100644 api/managementpb/severity.swagger.json delete mode 100644 api/platformpb/platform.swagger.json delete mode 100644 api/qanpb/collector.swagger.json delete mode 100644 api/qanpb/filters.swagger.json delete mode 100644 api/qanpb/metrics_names.swagger.json delete mode 100644 api/qanpb/object_details.swagger.json delete mode 100644 api/qanpb/profile.swagger.json delete mode 100644 api/qanpb/qan.swagger.json delete mode 100644 api/serverpb/httperror.swagger.json delete mode 100644 api/serverpb/server.swagger.json delete mode 100644 api/uieventspb/server.swagger.json delete mode 100644 api/userpb/user.swagger.json diff --git a/api/agentlocalpb/agentlocal.pb.go b/api/agentlocalpb/agentlocal.pb.go index ec8ab262ef..1e3c06fd6f 100644 --- a/api/agentlocalpb/agentlocal.pb.go +++ b/api/agentlocalpb/agentlocal.pb.go @@ -7,13 +7,15 @@ package agentlocalpb import ( - inventorypb "github.com/percona/pmm/api/inventorypb" + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -537,18 +539,21 @@ func file_agentlocalpb_agentlocal_proto_rawDescGZIP() []byte { return file_agentlocalpb_agentlocal_proto_rawDescData } -var file_agentlocalpb_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_agentlocalpb_agentlocal_proto_goTypes = []interface{}{ - (*ServerInfo)(nil), // 0: agentlocal.ServerInfo - (*AgentInfo)(nil), // 1: agentlocal.AgentInfo - (*StatusRequest)(nil), // 2: agentlocal.StatusRequest - (*StatusResponse)(nil), // 3: agentlocal.StatusResponse - (*ReloadRequest)(nil), // 4: agentlocal.ReloadRequest - (*ReloadResponse)(nil), // 5: agentlocal.ReloadResponse - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (inventorypb.AgentType)(0), // 7: inventory.AgentType - (inventorypb.AgentStatus)(0), // 8: inventory.AgentStatus -} +var ( + file_agentlocalpb_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_agentlocalpb_agentlocal_proto_goTypes = []interface{}{ + (*ServerInfo)(nil), // 0: agentlocal.ServerInfo + (*AgentInfo)(nil), // 1: agentlocal.AgentInfo + (*StatusRequest)(nil), // 2: agentlocal.StatusRequest + (*StatusResponse)(nil), // 3: agentlocal.StatusResponse + (*ReloadRequest)(nil), // 4: agentlocal.ReloadRequest + (*ReloadResponse)(nil), // 5: agentlocal.ReloadResponse + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (inventorypb.AgentType)(0), // 7: inventory.AgentType + (inventorypb.AgentStatus)(0), // 8: inventory.AgentStatus + } +) + var file_agentlocalpb_agentlocal_proto_depIdxs = []int32{ 6, // 0: agentlocal.ServerInfo.latency:type_name -> google.protobuf.Duration 6, // 1: agentlocal.ServerInfo.clock_drift:type_name -> google.protobuf.Duration diff --git a/api/agentlocalpb/agentlocal.pb.gw.go b/api/agentlocalpb/agentlocal.pb.gw.go index 4ba7d81cb0..b21fe20e57 100644 --- a/api/agentlocalpb/agentlocal.pb.gw.go +++ b/api/agentlocalpb/agentlocal.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -45,7 +47,6 @@ func request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,12 +63,9 @@ func local_request_AgentLocal_Status_0(ctx context.Context, marshaler runtime.Ma msg, err := server.Status(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AgentLocal_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_AgentLocal_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -82,7 +80,6 @@ func request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Marshale msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -98,7 +95,6 @@ func local_request_AgentLocal_Status_1(ctx context.Context, marshaler runtime.Ma msg, err := server.Status(ctx, &protoReq) return msg, metadata, err - } func request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -115,7 +111,6 @@ func request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.Reload(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -132,7 +127,6 @@ func local_request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Ma msg, err := server.Reload(ctx, &protoReq) return msg, metadata, err - } // RegisterAgentLocalHandlerServer registers the http handlers for service AgentLocal to "mux". @@ -140,7 +134,6 @@ func local_request_AgentLocal_Reload_0(ctx context.Context, marshaler runtime.Ma // 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 RegisterAgentLocalHandlerFromEndpoint instead. func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServer) error { - mux.Handle("POST", pattern_AgentLocal_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -163,7 +156,6 @@ func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentLocal_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -188,7 +180,6 @@ func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AgentLocal_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -213,7 +204,6 @@ func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -256,7 +246,6 @@ func RegisterAgentLocalHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentLocalClient" to call the correct interceptors. func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalClient) error { - mux.Handle("POST", pattern_AgentLocal_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -276,7 +265,6 @@ func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentLocal_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -298,7 +286,6 @@ func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AgentLocal_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -320,7 +307,6 @@ func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_AgentLocal_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/agentlocalpb/agentlocal.swagger.json b/api/agentlocalpb/agentlocal.swagger.json deleted file mode 100644 index c74d3fab94..0000000000 --- a/api/agentlocalpb/agentlocal.swagger.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "agentlocalpb/agentlocal.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "AgentLocal" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/local/Reload": { - "post": { - "summary": "Reload reloads pmm-agent configuration.", - "operationId": "Reload", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/agentlocalReloadResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/agentlocalReloadRequest" - } - } - ], - "tags": [ - "AgentLocal" - ] - } - }, - "/local/Status": { - "get": { - "summary": "Status returns current pmm-agent status.", - "operationId": "Status2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/agentlocalStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "get_network_info", - "description": "Returns network info (latency and clock_drift) if true.", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "AgentLocal" - ] - }, - "post": { - "summary": "Status returns current pmm-agent status.", - "operationId": "Status", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/agentlocalStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/agentlocalStatusRequest" - } - } - ], - "tags": [ - "AgentLocal" - ] - } - } - }, - "definitions": { - "agentlocalAgentInfo": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "agent_type": { - "$ref": "#/definitions/inventoryAgentType" - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus" - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "The current listen port of this Agent (exporter or vmagent).\nZero for other Agent types, or if unknown or not yet supported." - }, - "process_exec_path": { - "type": "string" - } - }, - "description": "AgentInfo contains information about Agent managed by pmm-agent." - }, - "agentlocalReloadRequest": { - "type": "object" - }, - "agentlocalReloadResponse": { - "type": "object", - "description": "ReloadRequest may not be received by the client due to pmm-agent restart." - }, - "agentlocalServerInfo": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "PMM Server URL in a form https://HOST:PORT/." - }, - "insecure_tls": { - "type": "boolean", - "description": "PMM Server's TLS certificate validation should be skipped if true." - }, - "connected": { - "type": "boolean", - "description": "True if pmm-agent is currently connected to the server." - }, - "version": { - "type": "string", - "description": "PMM Server version (if agent is connected)." - }, - "latency": { - "type": "string", - "description": "Ping time from pmm-agent to pmm-managed (if agent is connected)." - }, - "clock_drift": { - "type": "string", - "description": "Clock drift from PMM Server (if agent is connected)." - } - }, - "description": "ServerInfo contains information about the PMM Server." - }, - "agentlocalStatusRequest": { - "type": "object", - "properties": { - "get_network_info": { - "type": "boolean", - "description": "Returns network info (latency and clock_drift) if true." - } - } - }, - "agentlocalStatusResponse": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "runs_on_node_id": { - "type": "string" - }, - "server_info": { - "$ref": "#/definitions/agentlocalServerInfo" - }, - "agents_info": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/agentlocalAgentInfo" - } - }, - "config_filepath": { - "type": "string", - "description": "Config file path if pmm-agent was started with one." - }, - "agent_version": { - "type": "string", - "description": "PMM Agent version." - }, - "node_name": { - "type": "string" - }, - "connection_uptime": { - "type": "number", - "format": "float", - "title": "Shows connection uptime in percentage between agent and server" - } - } - }, - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryAgentType": { - "type": "string", - "enum": [ - "AGENT_TYPE_INVALID", - "PMM_AGENT", - "VM_AGENT", - "NODE_EXPORTER", - "MYSQLD_EXPORTER", - "MONGODB_EXPORTER", - "POSTGRES_EXPORTER", - "PROXYSQL_EXPORTER", - "QAN_MYSQL_PERFSCHEMA_AGENT", - "QAN_MYSQL_SLOWLOG_AGENT", - "QAN_MONGODB_PROFILER_AGENT", - "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", - "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", - "RDS_EXPORTER", - "EXTERNAL_EXPORTER", - "AZURE_DATABASE_EXPORTER" - ], - "default": "AGENT_TYPE_INVALID", - "description": "AgentType describes supported Agent types." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/agentlocalpb/agentlocal_grpc.pb.go b/api/agentlocalpb/agentlocal_grpc.pb.go index e87fe9cd5c..1eeb25c672 100644 --- a/api/agentlocalpb/agentlocal_grpc.pb.go +++ b/api/agentlocalpb/agentlocal_grpc.pb.go @@ -8,6 +8,7 @@ package agentlocalpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -71,12 +72,12 @@ type AgentLocalServer interface { } // UnimplementedAgentLocalServer must be embedded to have forward compatible implementations. -type UnimplementedAgentLocalServer struct { -} +type UnimplementedAgentLocalServer struct{} func (UnimplementedAgentLocalServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } + func (UnimplementedAgentLocalServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Reload not implemented") } diff --git a/api/agentlocalpb/json/client/agent_local/reload_parameters.go b/api/agentlocalpb/json/client/agent_local/reload_parameters.go index 2b88f1c563..99cb61bfaf 100644 --- a/api/agentlocalpb/json/client/agent_local/reload_parameters.go +++ b/api/agentlocalpb/json/client/agent_local/reload_parameters.go @@ -60,7 +60,6 @@ ReloadParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ReloadParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ReloadParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ReloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocalpb/json/client/agent_local/reload_responses.go b/api/agentlocalpb/json/client/agent_local/reload_responses.go index 7913d61dd4..ce4fcb8c03 100644 --- a/api/agentlocalpb/json/client/agent_local/reload_responses.go +++ b/api/agentlocalpb/json/client/agent_local/reload_responses.go @@ -60,12 +60,12 @@ type ReloadOK struct { func (o *ReloadOK) Error() string { return fmt.Sprintf("[POST /local/Reload][%d] reloadOk %+v", 200, o.Payload) } + func (o *ReloadOK) GetPayload() interface{} { return o.Payload } func (o *ReloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ReloadDefault) Code() int { func (o *ReloadDefault) Error() string { return fmt.Sprintf("[POST /local/Reload][%d] Reload default %+v", o._statusCode, o.Payload) } + func (o *ReloadDefault) GetPayload() *ReloadDefaultBody { return o.Payload } func (o *ReloadDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ReloadDefaultBody) // response payload @@ -121,7 +121,6 @@ ReloadDefaultBody reload default body swagger:model ReloadDefaultBody */ type ReloadDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -187,9 +186,7 @@ func (o *ReloadDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -200,7 +197,6 @@ func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -229,7 +225,6 @@ ReloadDefaultBodyDetailsItems0 reload default body details items0 swagger:model ReloadDefaultBodyDetailsItems0 */ type ReloadDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agentlocalpb/json/client/agent_local/status2_parameters.go b/api/agentlocalpb/json/client/agent_local/status2_parameters.go index c60f9ca220..75d8c38d16 100644 --- a/api/agentlocalpb/json/client/agent_local/status2_parameters.go +++ b/api/agentlocalpb/json/client/agent_local/status2_parameters.go @@ -61,7 +61,6 @@ Status2Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type Status2Params struct { - /* GetNetworkInfo. Returns network info (latency and clock_drift) if true. @@ -134,7 +133,6 @@ func (o *Status2Params) SetGetNetworkInfo(getNetworkInfo *bool) { // WriteToRequest writes these params to a swagger request func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -150,7 +148,6 @@ func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qGetNetworkInfo := swag.FormatBool(qrGetNetworkInfo) if qGetNetworkInfo != "" { - if err := r.SetQueryParam("get_network_info", qGetNetworkInfo); err != nil { return err } diff --git a/api/agentlocalpb/json/client/agent_local/status2_responses.go b/api/agentlocalpb/json/client/agent_local/status2_responses.go index 0b3dd3f133..e4b3cec66a 100644 --- a/api/agentlocalpb/json/client/agent_local/status2_responses.go +++ b/api/agentlocalpb/json/client/agent_local/status2_responses.go @@ -62,12 +62,12 @@ type Status2OK struct { func (o *Status2OK) Error() string { return fmt.Sprintf("[GET /local/Status][%d] status2Ok %+v", 200, o.Payload) } + func (o *Status2OK) GetPayload() *Status2OKBody { return o.Payload } func (o *Status2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(Status2OKBody) // response payload @@ -104,12 +104,12 @@ func (o *Status2Default) Code() int { func (o *Status2Default) Error() string { return fmt.Sprintf("[GET /local/Status][%d] Status2 default %+v", o._statusCode, o.Payload) } + func (o *Status2Default) GetPayload() *Status2DefaultBody { return o.Payload } func (o *Status2Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(Status2DefaultBody) // response payload @@ -125,7 +125,6 @@ Status2DefaultBody status2 default body swagger:model Status2DefaultBody */ type Status2DefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *Status2DefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -233,7 +229,6 @@ Status2DefaultBodyDetailsItems0 status2 default body details items0 swagger:model Status2DefaultBodyDetailsItems0 */ type Status2DefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ Status2OKBody status2 OK body swagger:model Status2OKBody */ type Status2OKBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -379,9 +373,7 @@ func (o *Status2OKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AgentsInfo); i++ { - if o.AgentsInfo[i] != nil { if err := o.AgentsInfo[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -392,14 +384,12 @@ func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats s return err } } - } return nil } func (o *Status2OKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { - if o.ServerInfo != nil { if err := o.ServerInfo.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -437,7 +427,6 @@ Status2OKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model Status2OKBodyAgentsInfoItems0 */ type Status2OKBodyAgentsInfoItems0 struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -651,7 +640,6 @@ Status2OKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model Status2OKBodyServerInfo */ type Status2OKBodyServerInfo struct { - // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentlocalpb/json/client/agent_local/status_parameters.go b/api/agentlocalpb/json/client/agent_local/status_parameters.go index df5607cccf..bcd6f41c92 100644 --- a/api/agentlocalpb/json/client/agent_local/status_parameters.go +++ b/api/agentlocalpb/json/client/agent_local/status_parameters.go @@ -60,7 +60,6 @@ StatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StatusParams struct { - // Body. Body StatusBody @@ -130,7 +129,6 @@ func (o *StatusParams) SetBody(body StatusBody) { // WriteToRequest writes these params to a swagger request func (o *StatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocalpb/json/client/agent_local/status_responses.go b/api/agentlocalpb/json/client/agent_local/status_responses.go index e9bf238296..fa69048f34 100644 --- a/api/agentlocalpb/json/client/agent_local/status_responses.go +++ b/api/agentlocalpb/json/client/agent_local/status_responses.go @@ -62,12 +62,12 @@ type StatusOK struct { func (o *StatusOK) Error() string { return fmt.Sprintf("[POST /local/Status][%d] statusOk %+v", 200, o.Payload) } + func (o *StatusOK) GetPayload() *StatusOKBody { return o.Payload } func (o *StatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StatusOKBody) // response payload @@ -104,12 +104,12 @@ func (o *StatusDefault) Code() int { func (o *StatusDefault) Error() string { return fmt.Sprintf("[POST /local/Status][%d] Status default %+v", o._statusCode, o.Payload) } + func (o *StatusDefault) GetPayload() *StatusDefaultBody { return o.Payload } func (o *StatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StatusDefaultBody) // response payload @@ -125,7 +125,6 @@ StatusBody status body swagger:model StatusBody */ type StatusBody struct { - // Returns network info (latency and clock_drift) if true. GetNetworkInfo bool `json:"get_network_info,omitempty"` } @@ -163,7 +162,6 @@ StatusDefaultBody status default body swagger:model StatusDefaultBody */ type StatusDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -229,9 +227,7 @@ func (o *StatusDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -242,7 +238,6 @@ func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -271,7 +266,6 @@ StatusDefaultBodyDetailsItems0 status default body details items0 swagger:model StatusDefaultBodyDetailsItems0 */ type StatusDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -309,7 +303,6 @@ StatusOKBody status OK body swagger:model StatusOKBody */ type StatusOKBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -417,9 +410,7 @@ func (o *StatusOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AgentsInfo); i++ { - if o.AgentsInfo[i] != nil { if err := o.AgentsInfo[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -430,14 +421,12 @@ func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats st return err } } - } return nil } func (o *StatusOKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { - if o.ServerInfo != nil { if err := o.ServerInfo.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -475,7 +464,6 @@ StatusOKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model StatusOKBodyAgentsInfoItems0 */ type StatusOKBodyAgentsInfoItems0 struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -689,7 +677,6 @@ StatusOKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model StatusOKBodyServerInfo */ type StatusOKBodyServerInfo struct { - // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentpb/agent.pb.go b/api/agentpb/agent.pb.go index 87e12b2407..81d6fde6bb 100644 --- a/api/agentpb/agent.pb.go +++ b/api/agentpb/agent.pb.go @@ -7,15 +7,17 @@ package agentpb import ( - inventorypb "github.com/percona/pmm/api/inventorypb" - backup "github.com/percona/pmm/api/managementpb/backup" + reflect "reflect" + sync "sync" + status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + inventorypb "github.com/percona/pmm/api/inventorypb" + backup "github.com/percona/pmm/api/managementpb/backup" ) const ( @@ -7570,111 +7572,114 @@ func file_agentpb_agent_proto_rawDescGZIP() []byte { return file_agentpb_agent_proto_rawDescData } -var file_agentpb_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_agentpb_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 89) -var file_agentpb_agent_proto_goTypes = []interface{}{ - (MysqlExplainOutputFormat)(0), // 0: agent.MysqlExplainOutputFormat - (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.StartActionRequest.RestartSystemServiceParams.SystemService - (*TextFiles)(nil), // 2: agent.TextFiles - (*Ping)(nil), // 3: agent.Ping - (*Pong)(nil), // 4: agent.Pong - (*QANCollectRequest)(nil), // 5: agent.QANCollectRequest - (*QANCollectResponse)(nil), // 6: agent.QANCollectResponse - (*StateChangedRequest)(nil), // 7: agent.StateChangedRequest - (*StateChangedResponse)(nil), // 8: agent.StateChangedResponse - (*SetStateRequest)(nil), // 9: agent.SetStateRequest - (*SetStateResponse)(nil), // 10: agent.SetStateResponse - (*QueryActionValue)(nil), // 11: agent.QueryActionValue - (*QueryActionSlice)(nil), // 12: agent.QueryActionSlice - (*QueryActionMap)(nil), // 13: agent.QueryActionMap - (*QueryActionBinary)(nil), // 14: agent.QueryActionBinary - (*QueryActionResult)(nil), // 15: agent.QueryActionResult - (*StartActionRequest)(nil), // 16: agent.StartActionRequest - (*StartActionResponse)(nil), // 17: agent.StartActionResponse - (*StopActionRequest)(nil), // 18: agent.StopActionRequest - (*StopActionResponse)(nil), // 19: agent.StopActionResponse - (*ActionResultRequest)(nil), // 20: agent.ActionResultRequest - (*ActionResultResponse)(nil), // 21: agent.ActionResultResponse - (*PBMSwitchPITRRequest)(nil), // 22: agent.PBMSwitchPITRRequest - (*PBMSwitchPITRResponse)(nil), // 23: agent.PBMSwitchPITRResponse - (*AgentLogsRequest)(nil), // 24: agent.AgentLogsRequest - (*AgentLogsResponse)(nil), // 25: agent.AgentLogsResponse - (*CheckConnectionRequest)(nil), // 26: agent.CheckConnectionRequest - (*CheckConnectionResponse)(nil), // 27: agent.CheckConnectionResponse - (*JobStatusRequest)(nil), // 28: agent.JobStatusRequest - (*JobStatusResponse)(nil), // 29: agent.JobStatusResponse - (*S3LocationConfig)(nil), // 30: agent.S3LocationConfig - (*FilesystemLocationConfig)(nil), // 31: agent.FilesystemLocationConfig - (*StartJobRequest)(nil), // 32: agent.StartJobRequest - (*StartJobResponse)(nil), // 33: agent.StartJobResponse - (*StopJobRequest)(nil), // 34: agent.StopJobRequest - (*StopJobResponse)(nil), // 35: agent.StopJobResponse - (*JobResult)(nil), // 36: agent.JobResult - (*JobProgress)(nil), // 37: agent.JobProgress - (*GetVersionsRequest)(nil), // 38: agent.GetVersionsRequest - (*GetVersionsResponse)(nil), // 39: agent.GetVersionsResponse - (*AgentMessage)(nil), // 40: agent.AgentMessage - (*ServerMessage)(nil), // 41: agent.ServerMessage - nil, // 42: agent.TextFiles.FilesEntry - (*SetStateRequest_AgentProcess)(nil), // 43: agent.SetStateRequest.AgentProcess - nil, // 44: agent.SetStateRequest.AgentProcessesEntry - (*SetStateRequest_BuiltinAgent)(nil), // 45: agent.SetStateRequest.BuiltinAgent - nil, // 46: agent.SetStateRequest.BuiltinAgentsEntry - nil, // 47: agent.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 48: agent.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 49: agent.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 50: agent.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 51: agent.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 52: agent.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 53: agent.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 54: agent.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 55: agent.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 56: agent.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTPgSummaryParams)(nil), // 57: agent.StartActionRequest.PTPgSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 58: agent.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_PTMySQLSummaryParams)(nil), // 59: agent.StartActionRequest.PTMySQLSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 60: agent.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 61: agent.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 62: agent.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 63: agent.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 64: agent.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 65: agent.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 66: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 67: agent.StartActionRequest.MongoDBQueryReplSetGetStatusParams - (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 68: agent.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - (*StartActionRequest_RestartSystemServiceParams)(nil), // 69: agent.StartActionRequest.RestartSystemServiceParams - (*CheckConnectionResponse_Stats)(nil), // 70: agent.CheckConnectionResponse.Stats - (*StartJobRequest_MySQLBackup)(nil), // 71: agent.StartJobRequest.MySQLBackup - (*StartJobRequest_MySQLRestoreBackup)(nil), // 72: agent.StartJobRequest.MySQLRestoreBackup - (*StartJobRequest_MongoDBBackup)(nil), // 73: agent.StartJobRequest.MongoDBBackup - (*StartJobRequest_MongoDBRestoreBackup)(nil), // 74: agent.StartJobRequest.MongoDBRestoreBackup - (*JobResult_Error)(nil), // 75: agent.JobResult.Error - (*JobResult_MongoDBBackup)(nil), // 76: agent.JobResult.MongoDBBackup - (*JobResult_MySQLBackup)(nil), // 77: agent.JobResult.MySQLBackup - (*JobResult_MySQLRestoreBackup)(nil), // 78: agent.JobResult.MySQLRestoreBackup - (*JobResult_MongoDBRestoreBackup)(nil), // 79: agent.JobResult.MongoDBRestoreBackup - (*JobProgress_MySQLBackup)(nil), // 80: agent.JobProgress.MySQLBackup - (*JobProgress_MySQLRestoreBackup)(nil), // 81: agent.JobProgress.MySQLRestoreBackup - (*JobProgress_Logs)(nil), // 82: agent.JobProgress.Logs - (*GetVersionsRequest_MySQLd)(nil), // 83: agent.GetVersionsRequest.MySQLd - (*GetVersionsRequest_Xtrabackup)(nil), // 84: agent.GetVersionsRequest.Xtrabackup - (*GetVersionsRequest_Xbcloud)(nil), // 85: agent.GetVersionsRequest.Xbcloud - (*GetVersionsRequest_Qpress)(nil), // 86: agent.GetVersionsRequest.Qpress - (*GetVersionsRequest_MongoDB)(nil), // 87: agent.GetVersionsRequest.MongoDB - (*GetVersionsRequest_PBM)(nil), // 88: agent.GetVersionsRequest.PBM - (*GetVersionsRequest_Software)(nil), // 89: agent.GetVersionsRequest.Software - (*GetVersionsResponse_Version)(nil), // 90: agent.GetVersionsResponse.Version - (*timestamppb.Timestamp)(nil), // 91: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 92: agent.MetricsBucket - (inventorypb.AgentStatus)(0), // 93: inventory.AgentStatus - (*durationpb.Duration)(nil), // 94: google.protobuf.Duration - (inventorypb.ServiceType)(0), // 95: inventory.ServiceType - (*status.Status)(nil), // 96: google.rpc.Status - (inventorypb.AgentType)(0), // 97: inventory.AgentType - (backup.DataModel)(0), // 98: backup.v1.DataModel - (*backup.PbmMetadata)(nil), // 99: backup.v1.PbmMetadata - (*backup.Metadata)(nil), // 100: backup.v1.Metadata -} +var ( + file_agentpb_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_agentpb_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 89) + file_agentpb_agent_proto_goTypes = []interface{}{ + (MysqlExplainOutputFormat)(0), // 0: agent.MysqlExplainOutputFormat + (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.StartActionRequest.RestartSystemServiceParams.SystemService + (*TextFiles)(nil), // 2: agent.TextFiles + (*Ping)(nil), // 3: agent.Ping + (*Pong)(nil), // 4: agent.Pong + (*QANCollectRequest)(nil), // 5: agent.QANCollectRequest + (*QANCollectResponse)(nil), // 6: agent.QANCollectResponse + (*StateChangedRequest)(nil), // 7: agent.StateChangedRequest + (*StateChangedResponse)(nil), // 8: agent.StateChangedResponse + (*SetStateRequest)(nil), // 9: agent.SetStateRequest + (*SetStateResponse)(nil), // 10: agent.SetStateResponse + (*QueryActionValue)(nil), // 11: agent.QueryActionValue + (*QueryActionSlice)(nil), // 12: agent.QueryActionSlice + (*QueryActionMap)(nil), // 13: agent.QueryActionMap + (*QueryActionBinary)(nil), // 14: agent.QueryActionBinary + (*QueryActionResult)(nil), // 15: agent.QueryActionResult + (*StartActionRequest)(nil), // 16: agent.StartActionRequest + (*StartActionResponse)(nil), // 17: agent.StartActionResponse + (*StopActionRequest)(nil), // 18: agent.StopActionRequest + (*StopActionResponse)(nil), // 19: agent.StopActionResponse + (*ActionResultRequest)(nil), // 20: agent.ActionResultRequest + (*ActionResultResponse)(nil), // 21: agent.ActionResultResponse + (*PBMSwitchPITRRequest)(nil), // 22: agent.PBMSwitchPITRRequest + (*PBMSwitchPITRResponse)(nil), // 23: agent.PBMSwitchPITRResponse + (*AgentLogsRequest)(nil), // 24: agent.AgentLogsRequest + (*AgentLogsResponse)(nil), // 25: agent.AgentLogsResponse + (*CheckConnectionRequest)(nil), // 26: agent.CheckConnectionRequest + (*CheckConnectionResponse)(nil), // 27: agent.CheckConnectionResponse + (*JobStatusRequest)(nil), // 28: agent.JobStatusRequest + (*JobStatusResponse)(nil), // 29: agent.JobStatusResponse + (*S3LocationConfig)(nil), // 30: agent.S3LocationConfig + (*FilesystemLocationConfig)(nil), // 31: agent.FilesystemLocationConfig + (*StartJobRequest)(nil), // 32: agent.StartJobRequest + (*StartJobResponse)(nil), // 33: agent.StartJobResponse + (*StopJobRequest)(nil), // 34: agent.StopJobRequest + (*StopJobResponse)(nil), // 35: agent.StopJobResponse + (*JobResult)(nil), // 36: agent.JobResult + (*JobProgress)(nil), // 37: agent.JobProgress + (*GetVersionsRequest)(nil), // 38: agent.GetVersionsRequest + (*GetVersionsResponse)(nil), // 39: agent.GetVersionsResponse + (*AgentMessage)(nil), // 40: agent.AgentMessage + (*ServerMessage)(nil), // 41: agent.ServerMessage + nil, // 42: agent.TextFiles.FilesEntry + (*SetStateRequest_AgentProcess)(nil), // 43: agent.SetStateRequest.AgentProcess + nil, // 44: agent.SetStateRequest.AgentProcessesEntry + (*SetStateRequest_BuiltinAgent)(nil), // 45: agent.SetStateRequest.BuiltinAgent + nil, // 46: agent.SetStateRequest.BuiltinAgentsEntry + nil, // 47: agent.SetStateRequest.AgentProcess.TextFilesEntry + nil, // 48: agent.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 49: agent.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 50: agent.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 51: agent.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 52: agent.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 53: agent.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 54: agent.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 55: agent.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 56: agent.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTPgSummaryParams)(nil), // 57: agent.StartActionRequest.PTPgSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 58: agent.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_PTMySQLSummaryParams)(nil), // 59: agent.StartActionRequest.PTMySQLSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 60: agent.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 61: agent.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 62: agent.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 63: agent.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 64: agent.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 65: agent.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 66: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 67: agent.StartActionRequest.MongoDBQueryReplSetGetStatusParams + (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 68: agent.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + (*StartActionRequest_RestartSystemServiceParams)(nil), // 69: agent.StartActionRequest.RestartSystemServiceParams + (*CheckConnectionResponse_Stats)(nil), // 70: agent.CheckConnectionResponse.Stats + (*StartJobRequest_MySQLBackup)(nil), // 71: agent.StartJobRequest.MySQLBackup + (*StartJobRequest_MySQLRestoreBackup)(nil), // 72: agent.StartJobRequest.MySQLRestoreBackup + (*StartJobRequest_MongoDBBackup)(nil), // 73: agent.StartJobRequest.MongoDBBackup + (*StartJobRequest_MongoDBRestoreBackup)(nil), // 74: agent.StartJobRequest.MongoDBRestoreBackup + (*JobResult_Error)(nil), // 75: agent.JobResult.Error + (*JobResult_MongoDBBackup)(nil), // 76: agent.JobResult.MongoDBBackup + (*JobResult_MySQLBackup)(nil), // 77: agent.JobResult.MySQLBackup + (*JobResult_MySQLRestoreBackup)(nil), // 78: agent.JobResult.MySQLRestoreBackup + (*JobResult_MongoDBRestoreBackup)(nil), // 79: agent.JobResult.MongoDBRestoreBackup + (*JobProgress_MySQLBackup)(nil), // 80: agent.JobProgress.MySQLBackup + (*JobProgress_MySQLRestoreBackup)(nil), // 81: agent.JobProgress.MySQLRestoreBackup + (*JobProgress_Logs)(nil), // 82: agent.JobProgress.Logs + (*GetVersionsRequest_MySQLd)(nil), // 83: agent.GetVersionsRequest.MySQLd + (*GetVersionsRequest_Xtrabackup)(nil), // 84: agent.GetVersionsRequest.Xtrabackup + (*GetVersionsRequest_Xbcloud)(nil), // 85: agent.GetVersionsRequest.Xbcloud + (*GetVersionsRequest_Qpress)(nil), // 86: agent.GetVersionsRequest.Qpress + (*GetVersionsRequest_MongoDB)(nil), // 87: agent.GetVersionsRequest.MongoDB + (*GetVersionsRequest_PBM)(nil), // 88: agent.GetVersionsRequest.PBM + (*GetVersionsRequest_Software)(nil), // 89: agent.GetVersionsRequest.Software + (*GetVersionsResponse_Version)(nil), // 90: agent.GetVersionsResponse.Version + (*timestamppb.Timestamp)(nil), // 91: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 92: agent.MetricsBucket + (inventorypb.AgentStatus)(0), // 93: inventory.AgentStatus + (*durationpb.Duration)(nil), // 94: google.protobuf.Duration + (inventorypb.ServiceType)(0), // 95: inventory.ServiceType + (*status.Status)(nil), // 96: google.rpc.Status + (inventorypb.AgentType)(0), // 97: inventory.AgentType + (backup.DataModel)(0), // 98: backup.v1.DataModel + (*backup.PbmMetadata)(nil), // 99: backup.v1.PbmMetadata + (*backup.Metadata)(nil), // 100: backup.v1.Metadata + } +) + var file_agentpb_agent_proto_depIdxs = []int32{ 42, // 0: agent.TextFiles.files:type_name -> agent.TextFiles.FilesEntry 91, // 1: agent.Pong.current_time:type_name -> google.protobuf.Timestamp diff --git a/api/agentpb/agent.pb.validate.go b/api/agentpb/agent.pb.validate.go index 732541f073..75971959e9 100644 --- a/api/agentpb/agent.pb.validate.go +++ b/api/agentpb/agent.pb.validate.go @@ -18,9 +18,8 @@ import ( "google.golang.org/protobuf/types/known/anypb" - backupv1 "github.com/percona/pmm/api/managementpb/backup" - inventorypb "github.com/percona/pmm/api/inventorypb" + backupv1 "github.com/percona/pmm/api/managementpb/backup" ) // ensure the imports are used diff --git a/api/agentpb/agent.swagger.json b/api/agentpb/agent.swagger.json deleted file mode 100644 index 36457a3ca2..0000000000 --- a/api/agentpb/agent.swagger.json +++ /dev/null @@ -1,2478 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "agentpb/agent.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Agent" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "CheckConnectionResponseStats": { - "type": "object", - "properties": { - "table_count": { - "type": "integer", - "format": "int32", - "description": "A number of tables, 0 if unknown." - } - }, - "description": "Stats contains various Service statistics." - }, - "GetVersionsRequestMySQLd": { - "type": "object", - "description": "MySQLd is used for mysqld binary version retrieving using `mysqld --version`." - }, - "GetVersionsRequestPBM": { - "type": "object", - "description": "PBM is used for pbm (Percona Backup for MongoDB) binary version retrieving." - }, - "GetVersionsRequestQpress": { - "type": "object", - "description": "Qpress is used for qpress binary version retrieving." - }, - "GetVersionsRequestSoftware": { - "type": "object", - "properties": { - "mysqld": { - "$ref": "#/definitions/GetVersionsRequestMySQLd" - }, - "xtrabackup": { - "$ref": "#/definitions/GetVersionsRequestXtrabackup" - }, - "xbcloud": { - "$ref": "#/definitions/GetVersionsRequestXbcloud" - }, - "qpress": { - "$ref": "#/definitions/GetVersionsRequestQpress" - }, - "mongod": { - "$ref": "#/definitions/agentGetVersionsRequestMongoDB" - }, - "pbm": { - "$ref": "#/definitions/GetVersionsRequestPBM" - } - }, - "description": "Software is used to select software for which retrieve version." - }, - "GetVersionsRequestXbcloud": { - "type": "object", - "description": "Xbcloud is used for xbcloud binary version retrieving." - }, - "GetVersionsRequestXtrabackup": { - "type": "object", - "description": "Xtrabackup is used for xtrabackup binary version retrieving." - }, - "GetVersionsResponseVersion": { - "type": "object", - "properties": { - "version": { - "type": "string" - }, - "error": { - "type": "string" - } - }, - "description": "Version contains the version field of the requested software and\nthe error field which is set in case of version retrieving error." - }, - "JobProgressLogs": { - "type": "object", - "properties": { - "chunk_id": { - "type": "integer", - "format": "int64" - }, - "data": { - "type": "string" - }, - "done": { - "type": "boolean" - } - }, - "description": "Logs contains generic logs from job." - }, - "JobResultError": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "description": "Error contains job error message." - }, - "MetricsBucketCommon": { - "type": "object", - "properties": { - "queryid": { - "type": "string", - "description": "md5 of digest_text/fingerprint." - }, - "explain_fingerprint": { - "type": "string", - "description": "contains fingerprint prepared by sql parser, which can be different than fingerprint." - }, - "placeholders_count": { - "type": "integer", - "format": "int64", - "description": "ammount of variables in query." - }, - "comments": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "List of keys and values of comments." - }, - "fingerprint": { - "type": "string", - "description": "digest_text - query signature. Query without values." - }, - "database": { - "type": "string", - "description": "Dimension Group.\n\nMongoDB or PostgreSQL database.\nSeveral databases can't be combined in a single declarative query." - }, - "schema": { - "type": "string", - "description": "MySQL database or PostgreSQL schema.\nSeveral schemas can be combined in a single declarative query." - }, - "tables": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tables or Collections list." - }, - "username": { - "type": "string", - "description": "client user name." - }, - "client_host": { - "type": "string", - "description": "client IP or hostname." - }, - "agent_id": { - "type": "string", - "description": "Identifier of agent that collect and send metrics." - }, - "agent_type": { - "$ref": "#/definitions/inventoryAgentType", - "description": "Metrics source.\n\nPeriod and Query Example Group." - }, - "period_start_unix_secs": { - "type": "integer", - "format": "int64", - "description": "Time when collection of bucket started." - }, - "period_length_secs": { - "type": "integer", - "format": "int64", - "description": "Duration of bucket." - }, - "example": { - "type": "string", - "description": "One of query example from set found in bucket." - }, - "example_format": { - "$ref": "#/definitions/agentExampleFormat", - "description": "Deprecated: should not be used, should be removed." - }, - "example_type": { - "$ref": "#/definitions/agentExampleType" - }, - "is_truncated": { - "type": "boolean", - "description": "Indicates if the query example is truncated.\n\nMetrics." - }, - "num_queries_with_warnings": { - "type": "number", - "format": "float", - "description": "How many queries was with warnings in bucket." - }, - "num_queries_with_errors": { - "type": "number", - "format": "float", - "description": "How many queries was with error in bucket." - }, - "errors": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "uint64" - }, - "description": "List of errors: {code: count}." - }, - "num_queries": { - "type": "number", - "format": "float", - "description": "Amount queries in this bucket." - }, - "m_query_time_cnt": { - "type": "number", - "format": "float", - "description": "How many times query_time was found." - }, - "m_query_time_sum": { - "type": "number", - "format": "float", - "description": "The statement execution time in seconds." - }, - "m_query_time_min": { - "type": "number", - "format": "float", - "description": "Smallest value of query_time in bucket." - }, - "m_query_time_max": { - "type": "number", - "format": "float", - "description": "Biggest value of query_time in bucket." - }, - "m_query_time_p99": { - "type": "number", - "format": "float", - "description": "99 percentile of value of query_time in bucket." - } - }, - "description": "Common contains common fields for all DBs." - }, - "MetricsBucketMySQL": { - "type": "object", - "properties": { - "m_lock_time_cnt": { - "type": "number", - "format": "float" - }, - "m_lock_time_sum": { - "type": "number", - "format": "float", - "description": "The time to acquire locks in seconds." - }, - "m_lock_time_min": { - "type": "number", - "format": "float" - }, - "m_lock_time_max": { - "type": "number", - "format": "float" - }, - "m_lock_time_p99": { - "type": "number", - "format": "float" - }, - "m_rows_sent_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_sent_sum": { - "type": "number", - "format": "float", - "description": "The number of rows sent to the client." - }, - "m_rows_sent_min": { - "type": "number", - "format": "float" - }, - "m_rows_sent_max": { - "type": "number", - "format": "float" - }, - "m_rows_sent_p99": { - "type": "number", - "format": "float" - }, - "m_rows_examined_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_examined_sum": { - "type": "number", - "format": "float", - "description": "Number of rows scanned - SELECT." - }, - "m_rows_examined_min": { - "type": "number", - "format": "float" - }, - "m_rows_examined_max": { - "type": "number", - "format": "float" - }, - "m_rows_examined_p99": { - "type": "number", - "format": "float" - }, - "m_rows_affected_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_affected_sum": { - "type": "number", - "format": "float", - "description": "Number of rows changed - UPDATE, DELETE, INSERT." - }, - "m_rows_affected_min": { - "type": "number", - "format": "float" - }, - "m_rows_affected_max": { - "type": "number", - "format": "float" - }, - "m_rows_affected_p99": { - "type": "number", - "format": "float" - }, - "m_rows_read_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_read_sum": { - "type": "number", - "format": "float", - "description": "The number of rows read from tables." - }, - "m_rows_read_min": { - "type": "number", - "format": "float" - }, - "m_rows_read_max": { - "type": "number", - "format": "float" - }, - "m_rows_read_p99": { - "type": "number", - "format": "float" - }, - "m_merge_passes_cnt": { - "type": "number", - "format": "float" - }, - "m_merge_passes_sum": { - "type": "number", - "format": "float", - "description": "The number of merge passes that the sort algorithm has had to do." - }, - "m_merge_passes_min": { - "type": "number", - "format": "float" - }, - "m_merge_passes_max": { - "type": "number", - "format": "float" - }, - "m_merge_passes_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_sum": { - "type": "number", - "format": "float", - "description": "Counts the number of page read operations scheduled." - }, - "m_innodb_io_r_ops_min": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_max": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_sum": { - "type": "number", - "format": "float", - "description": "Similar to innodb_IO_r_ops, but the unit is bytes." - }, - "m_innodb_io_r_bytes_min": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_max": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_sum": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." - }, - "m_innodb_io_r_wait_min": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_max": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_sum": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query waited for row locks." - }, - "m_innodb_rec_lock_wait_min": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_max": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_sum": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." - }, - "m_innodb_queue_wait_min": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_max": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_sum": { - "type": "number", - "format": "float", - "description": "Counts approximately the number of unique pages the query accessed." - }, - "m_innodb_pages_distinct_min": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_max": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_p99": { - "type": "number", - "format": "float" - }, - "m_query_length_cnt": { - "type": "number", - "format": "float" - }, - "m_query_length_sum": { - "type": "number", - "format": "float", - "description": "Shows how long the query is." - }, - "m_query_length_min": { - "type": "number", - "format": "float" - }, - "m_query_length_max": { - "type": "number", - "format": "float" - }, - "m_query_length_p99": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_cnt": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_sum": { - "type": "number", - "format": "float", - "description": "The number of bytes sent to all clients." - }, - "m_bytes_sent_min": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_max": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_p99": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_sum": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on memory for the query." - }, - "m_tmp_tables_min": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_max": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_p99": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_sum": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on disk for the query." - }, - "m_tmp_disk_tables_min": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_max": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_p99": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_sum": { - "type": "number", - "format": "float", - "description": "Total Size in bytes for all temporary tables used in the query." - }, - "m_tmp_table_sizes_min": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_max": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_p99": { - "type": "number", - "format": "float" - }, - "m_qc_hit_cnt": { - "type": "number", - "format": "float", - "description": "Boolean metrics:\n- *_cnt - how many times this metric was met.\n- *_sum - how many times this metric was true." - }, - "m_qc_hit_sum": { - "type": "number", - "format": "float", - "description": "Query Cache hits." - }, - "m_full_scan_cnt": { - "type": "number", - "format": "float" - }, - "m_full_scan_sum": { - "type": "number", - "format": "float", - "description": "The query performed a full table scan." - }, - "m_full_join_cnt": { - "type": "number", - "format": "float" - }, - "m_full_join_sum": { - "type": "number", - "format": "float", - "description": "The query performed a full join (a join without indexes)." - }, - "m_tmp_table_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sum": { - "type": "number", - "format": "float", - "description": "The query created an implicit internal temporary table." - }, - "m_tmp_table_on_disk_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_table_on_disk_sum": { - "type": "number", - "format": "float", - "description": "The querys temporary table was stored on disk." - }, - "m_filesort_cnt": { - "type": "number", - "format": "float" - }, - "m_filesort_sum": { - "type": "number", - "format": "float", - "description": "The query used a filesort." - }, - "m_filesort_on_disk_cnt": { - "type": "number", - "format": "float" - }, - "m_filesort_on_disk_sum": { - "type": "number", - "format": "float", - "description": "The filesort was performed on disk." - }, - "m_select_full_range_join_cnt": { - "type": "number", - "format": "float" - }, - "m_select_full_range_join_sum": { - "type": "number", - "format": "float", - "description": "The number of joins that used a range search on a reference table." - }, - "m_select_range_cnt": { - "type": "number", - "format": "float" - }, - "m_select_range_sum": { - "type": "number", - "format": "float", - "description": "The number of joins that used ranges on the first table." - }, - "m_select_range_check_cnt": { - "type": "number", - "format": "float" - }, - "m_select_range_check_sum": { - "type": "number", - "format": "float", - "description": "The number of joins without keys that check for key usage after each row." - }, - "m_sort_range_cnt": { - "type": "number", - "format": "float" - }, - "m_sort_range_sum": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done using ranges." - }, - "m_sort_rows_cnt": { - "type": "number", - "format": "float" - }, - "m_sort_rows_sum": { - "type": "number", - "format": "float", - "description": "The number of sorted rows." - }, - "m_sort_scan_cnt": { - "type": "number", - "format": "float" - }, - "m_sort_scan_sum": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done by scanning the table." - }, - "m_no_index_used_cnt": { - "type": "number", - "format": "float" - }, - "m_no_index_used_sum": { - "type": "number", - "format": "float", - "description": "The number of queries without index." - }, - "m_no_good_index_used_cnt": { - "type": "number", - "format": "float" - }, - "m_no_good_index_used_sum": { - "type": "number", - "format": "float", - "description": "The number of queries without good index." - } - }, - "description": "MySQL contains metrics for MySQL." - }, - "MetricsBucketPostgreSQL": { - "type": "object", - "properties": { - "m_rows_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_sum": { - "type": "number", - "format": "float", - "description": "The number of rows sent to the client." - }, - "m_shared_blks_hit_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_hit_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared block cache hits by the statement." - }, - "m_shared_blks_read_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_read_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks read by the statement." - }, - "m_shared_blks_dirtied_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_dirtied_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks dirtied by the statement." - }, - "m_shared_blks_written_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_written_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks written by the statement." - }, - "m_local_blks_hit_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_hit_sum": { - "type": "number", - "format": "float", - "description": "Total number of local block cache hits by the statement." - }, - "m_local_blks_read_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_read_sum": { - "type": "number", - "format": "float", - "description": "Total number of local blocks read by the statement." - }, - "m_local_blks_dirtied_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_dirtied_sum": { - "type": "number", - "format": "float", - "description": "Total number of local blocks dirtied by the statement." - }, - "m_local_blks_written_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_written_sum": { - "type": "number", - "format": "float", - "description": "Total number of local blocks written by the statement." - }, - "m_temp_blks_read_cnt": { - "type": "number", - "format": "float" - }, - "m_temp_blks_read_sum": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks read by the statement." - }, - "m_temp_blks_written_cnt": { - "type": "number", - "format": "float" - }, - "m_temp_blks_written_sum": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks written by the statement." - }, - "m_blk_read_time_cnt": { - "type": "number", - "format": "float" - }, - "m_blk_read_time_sum": { - "type": "number", - "format": "float", - "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_blk_write_time_cnt": { - "type": "number", - "format": "float" - }, - "m_blk_write_time_sum": { - "type": "number", - "format": "float", - "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_cpu_user_time_cnt": { - "type": "number", - "format": "float" - }, - "m_cpu_user_time_sum": { - "type": "number", - "format": "float", - "description": "Total time user spent in query." - }, - "m_cpu_sys_time_cnt": { - "type": "number", - "format": "float" - }, - "m_cpu_sys_time_sum": { - "type": "number", - "format": "float", - "description": "Total time system spent in query." - }, - "cmd_type": { - "type": "string", - "description": "Type of SQL command." - }, - "m_plans_calls_sum": { - "type": "number", - "format": "float", - "description": "Total number of planned calls.", - "title": "pg_stat_monitor 0.9 metrics" - }, - "m_plans_calls_cnt": { - "type": "number", - "format": "float" - }, - "m_wal_records_sum": { - "type": "number", - "format": "float", - "description": "Total number of WAL (Write-ahead logging) records." - }, - "m_wal_records_cnt": { - "type": "number", - "format": "float" - }, - "m_wal_fpi_sum": { - "type": "number", - "format": "float", - "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." - }, - "m_wal_fpi_cnt": { - "type": "number", - "format": "float" - }, - "m_wal_bytes_sum": { - "type": "number", - "format": "float", - "description": "Total bytes of WAL (Write-ahead logging) records." - }, - "m_wal_bytes_cnt": { - "type": "number", - "format": "float" - }, - "m_plan_time_sum": { - "type": "number", - "format": "float", - "description": "Sum, count, min, max of plan time." - }, - "m_plan_time_cnt": { - "type": "number", - "format": "float" - }, - "m_plan_time_min": { - "type": "number", - "format": "float" - }, - "m_plan_time_max": { - "type": "number", - "format": "float" - }, - "top_queryid": { - "type": "string", - "title": "Metrics skipped due to different bucket_time in pg_stat_monitor (1min in PMM, 5min in pg_stat_monitor):\nmin_time, max_time, mean_time\nplan_mean_time\nstddev_time\nOther metrics skipped (empty values, codes):\ncmd_type_text, elevel, sqlcode, message, state_code, state" - }, - "top_query": { - "type": "string" - }, - "application_name": { - "type": "string" - }, - "planid": { - "type": "string" - }, - "query_plan": { - "type": "string" - }, - "histogram_items": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/agentHistogramItem" - } - } - }, - "description": "PostgreSQL contains metrics for PostgreSQL." - }, - "RestartSystemServiceParamsSystemService": { - "type": "string", - "enum": [ - "SYSTEM_SERVICE_INVALID", - "MONGOD", - "PBM_AGENT" - ], - "default": "SYSTEM_SERVICE_INVALID", - "title": "SystemService is a systemctl service that can be restarted from PMM server" - }, - "SetStateRequestAgentProcess": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/inventoryAgentType" - }, - "template_left_delim": { - "type": "string" - }, - "template_right_delim": { - "type": "string" - }, - "args": { - "type": "array", - "items": { - "type": "string" - } - }, - "env": { - "type": "array", - "items": { - "type": "string" - } - }, - "text_files": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "redact_words": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "AgentProcess describes desired configuration of a single agent process started by pmm-agent." - }, - "SetStateRequestBuiltinAgent": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/inventoryAgentType" - }, - "dsn": { - "type": "string" - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disables query examples for QAN Agents if true." - }, - "max_query_log_size": { - "type": "string", - "format": "int64", - "description": "Instructs QAN Agents to rotate query log file or table at this size if \u003e 0." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls": { - "type": "boolean", - "description": "TLS in enabled if true." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "BuiltinAgent describes desired configuration of a single built-in agent for pmm-agent." - }, - "StartActionRequestMongoDBExplainParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "query": { - "type": "string" - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBExplainParams describes MongoDB EXPLAIN action parameters." - }, - "StartActionRequestMongoDBQueryBuildInfoParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBQueryBuildInfoParams describes MongoDB buildInfo query action parameters." - }, - "StartActionRequestMongoDBQueryGetCmdLineOptsParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBQueryGetCmdLineOptsParams describes MongoDB getCmdLineOpts query action parameters." - }, - "StartActionRequestMongoDBQueryGetDiagnosticDataParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBQueryGetDiagnosticDataParams describes MongoDB getDiagnosticData query action parameters." - }, - "StartActionRequestMongoDBQueryGetParameterParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBQueryGetParameterParams describes MongoDB getParameter query action parameters." - }, - "StartActionRequestMongoDBQueryReplSetGetStatusParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBQueryReplSetGetStatusParams describes MongoDB replSetGetStatus query action parameters." - }, - "StartActionRequestMySQLExplainParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "query": { - "type": "string" - }, - "values": { - "type": "array", - "items": { - "type": "string" - } - }, - "schema": { - "type": "string" - }, - "output_format": { - "$ref": "#/definitions/agentMysqlExplainOutputFormat" - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "MySQLExplainParams describes MySQL EXPLAIN action parameters." - }, - "StartActionRequestMySQLQuerySelectParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "query": { - "type": "string", - "description": "Query suffix (without leading SELECT)." - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "MySQLQuerySelectParams describes MySQL SELECT query action parameters." - }, - "StartActionRequestMySQLQueryShowParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "query": { - "type": "string", - "description": "Query suffix (without leading SHOW)." - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "MySQLQueryShowParams describes MySQL SHOW query action parameters." - }, - "StartActionRequestMySQLShowCreateTableParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "table": { - "type": "string" - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "MySQLShowCreateTableParams describes MySQL SHOW CREATE TABLE action parameters." - }, - "StartActionRequestMySQLShowIndexParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "table": { - "type": "string" - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "MySQLShowIndexParams describes MySQL SHOW INDEX action parameters." - }, - "StartActionRequestMySQLShowTableStatusParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "table": { - "type": "string" - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "MySQLShowTableStatusParams describes MySQL SHOW TABLE STATUS action parameters." - }, - "StartActionRequestPTMongoDBSummaryParams": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "format": "int64" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "description": "PTMongoDBSummaryParams describes parameters for PT MongoDB summary." - }, - "StartActionRequestPTMySQLSummaryParams": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "format": "int64" - }, - "socket": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "description": "PTMySQLSummaryParams describes parameters for PT MySQL summary." - }, - "StartActionRequestPTPgSummaryParams": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "integer", - "format": "int64" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "description": "PTPgSummaryParams describes parameters for PT PG summary." - }, - "StartActionRequestPTSummaryParams": { - "type": "object", - "description": "PTSummaryParams describes parameters for PT summary." - }, - "StartActionRequestPostgreSQLQuerySelectParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "query": { - "type": "string", - "description": "Query suffix (without leading SELECT)." - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "PostgreSQLQuerySelectParams describes PostgreSQL SELECT query action parameters." - }, - "StartActionRequestPostgreSQLQueryShowParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "PostgreSQLQueryShowParams describes PostgreSQL SHOW query action parameters." - }, - "StartActionRequestPostgreSQLShowCreateTableParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "table": { - "type": "string" - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "PostgreSQLShowCreateTableParams describes PostgreSQL SHOW CREATE TABLE action parameters." - }, - "StartActionRequestPostgreSQLShowIndexParams": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "table": { - "type": "string" - }, - "tls_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "PostgreSQLShowIndexParams describes PostgreSQL SHOW INDEX action parameters." - }, - "StartActionRequestRestartSystemServiceParams": { - "type": "object", - "properties": { - "system_service": { - "$ref": "#/definitions/RestartSystemServiceParamsSystemService" - } - }, - "description": "RestartSystemServiceParams describes an action request to restart a systemctl service on a node." - }, - "agentActionResultRequest": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique action ID." - }, - "output": { - "type": "string", - "format": "byte", - "description": "New chunk of action output." - }, - "done": { - "type": "boolean", - "description": "True if action is finished." - }, - "error": { - "type": "string", - "description": "Error message if action failed." - } - }, - "description": "ActionResultRequest is an AgentMessage containing action run status and new chunk of output." - }, - "agentActionResultResponse": { - "type": "object", - "description": "ActionResultResponse is an ServerMessage for ActionResultRequest acceptance." - }, - "agentAgentLogsRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "limit": { - "type": "integer", - "format": "int64" - } - }, - "description": "AgentLogsRequest is an ServerMessage asking logs by Agent ID." - }, - "agentAgentLogsResponse": { - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "type": "string" - } - }, - "agent_config_log_lines_count": { - "type": "integer", - "format": "int64" - } - }, - "description": "AgentLogsResponse is an AgentMessage containing logs by Agent ID." - }, - "agentCheckConnectionRequest": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/inventoryServiceType", - "description": "Service type." - }, - "dsn": { - "type": "string", - "description": "DSN for the service. May contain connection (dial) timeout." - }, - "timeout": { - "type": "string", - "description": "Timeout for the whole request." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "TLS certificate wont be verified." - } - }, - "description": "CheckConnectionRequest is a ServerMessage asking pmm-agent to check connection with Service." - }, - "agentCheckConnectionResponse": { - "type": "object", - "properties": { - "error": { - "type": "string", - "description": "Error message if connection check failed." - }, - "stats": { - "$ref": "#/definitions/CheckConnectionResponseStats" - } - }, - "description": "CheckConnectionResponse is an AgentMessage containing a result of connection check." - }, - "agentExampleFormat": { - "type": "string", - "enum": [ - "EXAMPLE_FORMAT_INVALID", - "EXAMPLE", - "FINGERPRINT" - ], - "default": "EXAMPLE_FORMAT_INVALID", - "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed." - }, - "agentExampleType": { - "type": "string", - "enum": [ - "EXAMPLE_TYPE_INVALID", - "RANDOM", - "SLOWEST", - "FASTEST", - "WITH_ERROR" - ], - "default": "EXAMPLE_TYPE_INVALID", - "description": "ExampleType is a type of query example selected for this query class in given period of time." - }, - "agentFilesystemLocationConfig": { - "type": "object", - "properties": { - "path": { - "type": "string" - } - }, - "description": "FilesystemLocationConfig represents path for storing backup artifacts locally." - }, - "agentGetVersionsRequest": { - "type": "object", - "properties": { - "softwares": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/GetVersionsRequestSoftware" - } - } - }, - "description": "GetVersionsRequest represents a request for version retrieving of different software." - }, - "agentGetVersionsRequestMongoDB": { - "type": "object", - "description": "MongoDB is used for mongod binary version retrieving." - }, - "agentGetVersionsResponse": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/GetVersionsResponseVersion" - } - } - }, - "description": "GetVersionsResponse represents a response containing versions of software in the same order as in the request." - }, - "agentHistogramItem": { - "type": "object", - "properties": { - "range": { - "type": "string" - }, - "frequency": { - "type": "integer", - "format": "int64" - } - }, - "description": "HistogramItem represents one item in histogram." - }, - "agentJobProgress": { - "type": "object", - "properties": { - "job_id": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "mysql_backup": { - "$ref": "#/definitions/agentJobProgressMySQLBackup" - }, - "mysql_restore_backup": { - "$ref": "#/definitions/agentJobProgressMySQLRestoreBackup" - }, - "logs": { - "$ref": "#/definitions/JobProgressLogs" - } - }, - "description": "JobProgress represents job progress messages like percentage of completion, status updates, etc." - }, - "agentJobProgressMySQLBackup": { - "type": "object", - "description": "MySQLBackup contains backup job status update." - }, - "agentJobProgressMySQLRestoreBackup": { - "type": "object", - "description": "MySQLRestoreBackup contains restore backup job status update." - }, - "agentJobResult": { - "type": "object", - "properties": { - "job_id": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "error": { - "$ref": "#/definitions/JobResultError" - }, - "mysql_backup": { - "$ref": "#/definitions/agentJobResultMySQLBackup" - }, - "mysql_restore_backup": { - "$ref": "#/definitions/agentJobResultMySQLRestoreBackup" - }, - "mongodb_backup": { - "$ref": "#/definitions/agentJobResultMongoDBBackup" - }, - "mongodb_restore_backup": { - "$ref": "#/definitions/agentJobResultMongoDBRestoreBackup" - } - }, - "description": "JobResult represents job result." - }, - "agentJobResultMongoDBBackup": { - "type": "object", - "properties": { - "is_sharded_cluster": { - "type": "boolean" - }, - "metadata": { - "$ref": "#/definitions/v1Metadata", - "description": "Contains additional data describing artifact." - } - }, - "description": "MongoDBBackup contains result for MongoDB backup job." - }, - "agentJobResultMongoDBRestoreBackup": { - "type": "object", - "description": "MongoDBRestoreBackup contains result for MongoDB restore backup job." - }, - "agentJobResultMySQLBackup": { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/definitions/v1Metadata", - "description": "Contains additional data describing artifact." - } - }, - "description": "MySQLBackup contains result for MySQL backup job." - }, - "agentJobResultMySQLRestoreBackup": { - "type": "object", - "description": "MySQLRestoreBackup contains result for MySQL restore backup job." - }, - "agentJobStatusRequest": { - "type": "object", - "properties": { - "job_id": { - "type": "string" - } - }, - "description": "JobStatusRequest is a ServerMessage asking pmm-agent for job status." - }, - "agentJobStatusResponse": { - "type": "object", - "properties": { - "alive": { - "type": "boolean" - } - }, - "description": "JobStatusResponse is an AgentMessage containing job status." - }, - "agentMetricsBucket": { - "type": "object", - "properties": { - "common": { - "$ref": "#/definitions/MetricsBucketCommon" - }, - "mysql": { - "$ref": "#/definitions/MetricsBucketMySQL" - }, - "mongodb": { - "$ref": "#/definitions/agentMetricsBucketMongoDB" - }, - "postgresql": { - "$ref": "#/definitions/MetricsBucketPostgreSQL" - } - }, - "description": "MetricsBucket is aggregated message created by pmm-agent.\nContains information about one query selected in defined way from query class in specific period of time." - }, - "agentMetricsBucketMongoDB": { - "type": "object", - "properties": { - "m_docs_returned_cnt": { - "type": "number", - "format": "float" - }, - "m_docs_returned_sum": { - "type": "number", - "format": "float", - "description": "The number of returned documents." - }, - "m_docs_returned_min": { - "type": "number", - "format": "float" - }, - "m_docs_returned_max": { - "type": "number", - "format": "float" - }, - "m_docs_returned_p99": { - "type": "number", - "format": "float" - }, - "m_response_length_cnt": { - "type": "number", - "format": "float" - }, - "m_response_length_sum": { - "type": "number", - "format": "float", - "description": "The response length of the query result in bytes." - }, - "m_response_length_min": { - "type": "number", - "format": "float" - }, - "m_response_length_max": { - "type": "number", - "format": "float" - }, - "m_response_length_p99": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_cnt": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_sum": { - "type": "number", - "format": "float", - "description": "The number of scanned documents." - }, - "m_docs_scanned_min": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_max": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_p99": { - "type": "number", - "format": "float" - } - }, - "description": "MongoDB contains metrics for Mongo DB." - }, - "agentMysqlExplainOutputFormat": { - "type": "string", - "enum": [ - "MYSQL_EXPLAIN_OUTPUT_FORMAT_INVALID", - "MYSQL_EXPLAIN_OUTPUT_FORMAT_DEFAULT", - "MYSQL_EXPLAIN_OUTPUT_FORMAT_JSON", - "MYSQL_EXPLAIN_OUTPUT_FORMAT_TRADITIONAL_JSON" - ], - "default": "MYSQL_EXPLAIN_OUTPUT_FORMAT_INVALID", - "description": "MysqlExplainOutputFormat output formats supported by MySQL Explain action.\n\n - MYSQL_EXPLAIN_OUTPUT_FORMAT_DEFAULT: EXPLAIN FORMAT=TRADITIONAL, returns result as text\n - MYSQL_EXPLAIN_OUTPUT_FORMAT_JSON: EXPLAIN FORMAT=JSON\n - MYSQL_EXPLAIN_OUTPUT_FORMAT_TRADITIONAL_JSON: EXPLAIN FORMAT=TRADITIONAL, returns result as JSON" - }, - "agentPBMSwitchPITRRequest": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "description": "DSN for the MongoDB service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - }, - "enabled": { - "type": "boolean", - "description": "Specifies if PITR should be enabled or disabled." - } - }, - "description": "PBMSwitchPITRRequest is a ServerMessage asking pmm-agent to switch PITR pbm feature." - }, - "agentPBMSwitchPITRResponse": { - "type": "object", - "properties": { - "error": { - "type": "string", - "description": "Error message." - } - }, - "description": "PBMSwitchPITRResponse is an AgentMessage for PBMSwitchPITRRequest success result." - }, - "agentPing": { - "type": "object", - "description": "Ping is a AgentMessage/ServerMessage for checking connectivity, latency and clock drift." - }, - "agentPong": { - "type": "object", - "properties": { - "current_time": { - "type": "string", - "format": "date-time" - } - }, - "description": "Pong is an AgentMessage/ServerMessage with current time for measuring clock drift." - }, - "agentQANCollectRequest": { - "type": "object", - "properties": { - "metrics_bucket": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/agentMetricsBucket" - } - } - }, - "description": "QANCollectRequest is an AgentMessage for sending QAN data for qan-api." - }, - "agentQANCollectResponse": { - "type": "object", - "description": "QANCollectResponse is a ServerMessage for QAN data acceptance." - }, - "agentS3LocationConfig": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "access_key": { - "type": "string" - }, - "secret_key": { - "type": "string" - }, - "bucket_name": { - "type": "string" - }, - "bucket_region": { - "type": "string" - } - }, - "description": "S3LocationConfig represents S3 bucket configuration." - }, - "agentServerMessage": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "status": { - "$ref": "#/definitions/rpcStatus", - "description": "The responder sets the status field in two situations:\n1. When it received a request with the payload field not set.\n That means that responded is older than the requester, and doesn't know about newer payload types.\n Status code UNIMPLEMENTED (12) is reserved for that case.\n2. When the payload is set, but the request can't be performed due to some error." - }, - "pong": { - "$ref": "#/definitions/agentPong", - "title": "responses from server" - }, - "state_changed": { - "$ref": "#/definitions/agentStateChangedResponse" - }, - "qan_collect": { - "$ref": "#/definitions/agentQANCollectResponse" - }, - "action_result": { - "$ref": "#/definitions/agentActionResultResponse" - }, - "ping": { - "$ref": "#/definitions/agentPing", - "title": "requests from server" - }, - "set_state": { - "$ref": "#/definitions/agentSetStateRequest" - }, - "start_action": { - "$ref": "#/definitions/agentStartActionRequest" - }, - "stop_action": { - "$ref": "#/definitions/agentStopActionRequest" - }, - "check_connection": { - "$ref": "#/definitions/agentCheckConnectionRequest" - }, - "start_job": { - "$ref": "#/definitions/agentStartJobRequest" - }, - "stop_job": { - "$ref": "#/definitions/agentStopJobRequest" - }, - "job_status": { - "$ref": "#/definitions/agentJobStatusRequest" - }, - "get_versions": { - "$ref": "#/definitions/agentGetVersionsRequest" - }, - "pbm_switch_pitr": { - "$ref": "#/definitions/agentPBMSwitchPITRRequest" - }, - "agent_logs": { - "$ref": "#/definitions/agentAgentLogsRequest" - } - }, - "title": "TODO https://jira.percona.com/browse/PMM-3449" - }, - "agentSetStateRequest": { - "type": "object", - "properties": { - "agent_processes": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/SetStateRequestAgentProcess" - } - }, - "builtin_agents": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/SetStateRequestBuiltinAgent" - } - } - }, - "description": "SetStateRequest is a ServerMessage asking pmm-agent to run agents according to desired state." - }, - "agentSetStateResponse": { - "type": "object", - "description": "SetStateResponse is an AgentMessage for SetStateRequest acceptance.\n\nTODO https://jira.percona.com/browse/PMM-4691" - }, - "agentStartActionRequest": { - "type": "object", - "properties": { - "action_id": { - "type": "string" - }, - "mysql_explain_params": { - "$ref": "#/definitions/StartActionRequestMySQLExplainParams" - }, - "mysql_show_create_table_params": { - "$ref": "#/definitions/StartActionRequestMySQLShowCreateTableParams" - }, - "mysql_show_table_status_params": { - "$ref": "#/definitions/StartActionRequestMySQLShowTableStatusParams" - }, - "mysql_show_index_params": { - "$ref": "#/definitions/StartActionRequestMySQLShowIndexParams" - }, - "postgresql_show_create_table_params": { - "$ref": "#/definitions/StartActionRequestPostgreSQLShowCreateTableParams" - }, - "postgresql_show_index_params": { - "$ref": "#/definitions/StartActionRequestPostgreSQLShowIndexParams" - }, - "mongodb_explain_params": { - "$ref": "#/definitions/StartActionRequestMongoDBExplainParams" - }, - "pt_summary_params": { - "$ref": "#/definitions/StartActionRequestPTSummaryParams" - }, - "pt_pg_summary_params": { - "$ref": "#/definitions/StartActionRequestPTPgSummaryParams" - }, - "pt_mongodb_summary_params": { - "$ref": "#/definitions/StartActionRequestPTMongoDBSummaryParams" - }, - "pt_mysql_summary_params": { - "$ref": "#/definitions/StartActionRequestPTMySQLSummaryParams" - }, - "mysql_query_show_params": { - "$ref": "#/definitions/StartActionRequestMySQLQueryShowParams" - }, - "mysql_query_select_params": { - "$ref": "#/definitions/StartActionRequestMySQLQuerySelectParams" - }, - "postgresql_query_show_params": { - "$ref": "#/definitions/StartActionRequestPostgreSQLQueryShowParams" - }, - "postgresql_query_select_params": { - "$ref": "#/definitions/StartActionRequestPostgreSQLQuerySelectParams" - }, - "mongodb_query_getparameter_params": { - "$ref": "#/definitions/StartActionRequestMongoDBQueryGetParameterParams" - }, - "mongodb_query_buildinfo_params": { - "$ref": "#/definitions/StartActionRequestMongoDBQueryBuildInfoParams" - }, - "mongodb_query_getcmdlineopts_params": { - "$ref": "#/definitions/StartActionRequestMongoDBQueryGetCmdLineOptsParams" - }, - "mongodb_query_replsetgetstatus_params": { - "$ref": "#/definitions/StartActionRequestMongoDBQueryReplSetGetStatusParams" - }, - "mongodb_query_getdiagnosticdata_params": { - "$ref": "#/definitions/StartActionRequestMongoDBQueryGetDiagnosticDataParams" - }, - "restart_sys_service_params": { - "$ref": "#/definitions/StartActionRequestRestartSystemServiceParams" - }, - "timeout": { - "type": "string", - "description": "Timeout for the whole action. If zero or absent, pmm-agent will pick one itself." - } - }, - "description": "StartActionRequest is a ServerMessage asking pmm-agent to start action." - }, - "agentStartActionResponse": { - "type": "object", - "description": "StartActionResponse is an AgentMessage for StartActionRequest acceptance." - }, - "agentStartJobRequest": { - "type": "object", - "properties": { - "job_id": { - "type": "string" - }, - "timeout": { - "type": "string", - "description": "Timeout for the job." - }, - "mysql_backup": { - "$ref": "#/definitions/agentStartJobRequestMySQLBackup" - }, - "mysql_restore_backup": { - "$ref": "#/definitions/agentStartJobRequestMySQLRestoreBackup" - }, - "mongodb_backup": { - "$ref": "#/definitions/agentStartJobRequestMongoDBBackup" - }, - "mongodb_restore_backup": { - "$ref": "#/definitions/agentStartJobRequestMongoDBRestoreBackup" - } - }, - "description": "StartJobRequest is a ServerMessage asking pmm-agent to start job." - }, - "agentStartJobRequestMongoDBBackup": { - "type": "object", - "properties": { - "user": { - "type": "string", - "title": "Database user;" - }, - "password": { - "type": "string", - "description": "Database password." - }, - "address": { - "type": "string", - "description": "Database address. Can't be specified with socket." - }, - "port": { - "type": "integer", - "format": "int32", - "description": "Database port. Can't be specified with socket." - }, - "socket": { - "type": "string", - "description": "Database unix socket. Can't be specified with address/port." - }, - "name": { - "type": "string", - "description": "Backup name." - }, - "enable_pitr": { - "type": "boolean", - "description": "Enable Point-in-Time recovery feature." - }, - "data_model": { - "$ref": "#/definitions/v1DataModel", - "description": "Backup data model (physical or logical)." - }, - "s3_config": { - "$ref": "#/definitions/agentS3LocationConfig" - }, - "filesystem_config": { - "$ref": "#/definitions/agentFilesystemLocationConfig" - }, - "folder": { - "type": "string", - "description": "Folder to store artifact on a storage." - }, - "dsn": { - "type": "string", - "description": "DSN for the MongoDB service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBBackup is job for backup MongoDB service." - }, - "agentStartJobRequestMongoDBRestoreBackup": { - "type": "object", - "properties": { - "user": { - "type": "string", - "title": "Database user;" - }, - "password": { - "type": "string", - "description": "Database password." - }, - "address": { - "type": "string", - "description": "Database address. Can't be specified with socket." - }, - "port": { - "type": "integer", - "format": "int32", - "description": "Database port. Can't be specified with socket." - }, - "socket": { - "type": "string", - "description": "Database unix socket. Can't be specified with address/port." - }, - "name": { - "type": "string", - "description": "Backup name." - }, - "pitr_timestamp": { - "type": "string", - "format": "date-time", - "description": "Point-in-Time recovery timestamp." - }, - "s3_config": { - "$ref": "#/definitions/agentS3LocationConfig" - }, - "filesystem_config": { - "$ref": "#/definitions/agentFilesystemLocationConfig" - }, - "folder": { - "type": "string", - "description": "Folder to store artifact on a storage." - }, - "pbm_metadata": { - "$ref": "#/definitions/v1PbmMetadata", - "description": "Extra data for backup tool." - }, - "dsn": { - "type": "string", - "description": "DSN for the MongoDB service. May contain connection (dial) timeout.\nMay contain placeholders for file paths in DSN." - }, - "text_files": { - "$ref": "#/definitions/agentTextFiles", - "description": "Contains files and their contents which can be used in DSN." - } - }, - "description": "MongoDBRestoreBackup is job for MongoDB restore backup service." - }, - "agentStartJobRequestMySQLBackup": { - "type": "object", - "properties": { - "user": { - "type": "string", - "title": "Database user;" - }, - "password": { - "type": "string", - "description": "Database password." - }, - "address": { - "type": "string", - "description": "Database address. Can't be specified with socket." - }, - "port": { - "type": "integer", - "format": "int32", - "description": "Database port. Can't be specified with socket." - }, - "socket": { - "type": "string", - "description": "Database unix socket. Can't be specified with address/port." - }, - "name": { - "type": "string", - "description": "Backup name." - }, - "s3_config": { - "$ref": "#/definitions/agentS3LocationConfig" - }, - "folder": { - "type": "string", - "description": "Folder to store artifact on a storage." - } - }, - "description": "MySQLBackup is job for backup MySQL service." - }, - "agentStartJobRequestMySQLRestoreBackup": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Service identifier where the backup should be restored." - }, - "name": { - "type": "string", - "description": "Backup name." - }, - "s3_config": { - "$ref": "#/definitions/agentS3LocationConfig" - }, - "folder": { - "type": "string", - "description": "Folder to store artifact on a storage." - } - }, - "description": "MySQLRestoreBackup is job for MySQL restore backup service." - }, - "agentStartJobResponse": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - }, - "description": "StartJobResponse is an AgentMessage for StartJobRequest acceptance." - }, - "agentStateChangedRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus" - }, - "listen_port": { - "type": "integer", - "format": "int64" - }, - "process_exec_path": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "description": "StateChangedRequest is an AgentMessage describing actual agent status." - }, - "agentStateChangedResponse": { - "type": "object", - "description": "StateChangedResponse is a ServerMessage for StateChangedRequest acceptance." - }, - "agentStopActionRequest": { - "type": "object", - "properties": { - "action_id": { - "type": "string" - } - }, - "description": "StopActionRequest is a ServerMessage asking pmm-agent to stop action." - }, - "agentStopActionResponse": { - "type": "object", - "description": "StopActionResponse is an AgentMessage for StopActionRequest acceptance." - }, - "agentStopJobRequest": { - "type": "object", - "properties": { - "job_id": { - "type": "string" - } - }, - "description": "StopJobRequest is a ServerMessage asking pmm-agent to stop job." - }, - "agentStopJobResponse": { - "type": "object", - "description": "StopJobResponse is an AgentMessage for StopJobRequest acceptance." - }, - "agentTextFiles": { - "type": "object", - "properties": { - "files": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "files contains files which can be used to connect to DB (certificates, keys and etc)." - }, - "template_left_delim": { - "type": "string", - "description": "template_left_delim is used to replace placeholders in templates (DSN and etc.) with paths to files." - }, - "template_right_delim": { - "type": "string", - "description": "template_right_delim is used to replace placeholders in templates (DSN and etc.) with paths to files." - } - }, - "description": "TextFiles contains files which can be used to connect to DB (certificates, keys and etc)." - }, - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryAgentType": { - "type": "string", - "enum": [ - "AGENT_TYPE_INVALID", - "PMM_AGENT", - "VM_AGENT", - "NODE_EXPORTER", - "MYSQLD_EXPORTER", - "MONGODB_EXPORTER", - "POSTGRES_EXPORTER", - "PROXYSQL_EXPORTER", - "QAN_MYSQL_PERFSCHEMA_AGENT", - "QAN_MYSQL_SLOWLOG_AGENT", - "QAN_MONGODB_PROFILER_AGENT", - "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", - "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", - "RDS_EXPORTER", - "EXTERNAL_EXPORTER", - "AZURE_DATABASE_EXPORTER" - ], - "default": "AGENT_TYPE_INVALID", - "description": "AgentType describes supported Agent types." - }, - "inventoryServiceType": { - "type": "string", - "enum": [ - "SERVICE_TYPE_INVALID", - "MYSQL_SERVICE", - "MONGODB_SERVICE", - "POSTGRESQL_SERVICE", - "PROXYSQL_SERVICE", - "HAPROXY_SERVICE", - "EXTERNAL_SERVICE" - ], - "default": "SERVICE_TYPE_INVALID", - "description": "ServiceType describes supported Service types." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - } - }, - "additionalProperties": {}, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - }, - "v1DataModel": { - "type": "string", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "default": "DATA_MODEL_INVALID", - "description": "DataModel is a model used for performing a backup." - }, - "v1File": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "is_directory": { - "type": "boolean" - } - }, - "description": "File represents file or folder on a storage." - }, - "v1Metadata": { - "type": "object", - "properties": { - "file_list": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1File" - }, - "description": "List of files backup consists of." - }, - "restore_to": { - "type": "string", - "format": "date-time", - "description": "Exact time DB can be restored to." - }, - "pbm_metadata": { - "$ref": "#/definitions/v1PbmMetadata" - } - }, - "description": "Metadata contains extra artifact data like files it consists of, tool specific data, etc." - }, - "v1PbmMetadata": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of backup in backup tool representation." - } - }, - "description": "PbmMetadata contains additional data for pbm cli tools." - } - } -} diff --git a/api/agentpb/agent_grpc.pb.go b/api/agentpb/agent_grpc.pb.go index 04847447fc..d828d8cc68 100644 --- a/api/agentpb/agent_grpc.pb.go +++ b/api/agentpb/agent_grpc.pb.go @@ -8,6 +8,7 @@ package agentpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -79,8 +80,7 @@ type AgentServer interface { } // UnimplementedAgentServer must be embedded to have forward compatible implementations. -type UnimplementedAgentServer struct { -} +type UnimplementedAgentServer struct{} func (UnimplementedAgentServer) Connect(Agent_ConnectServer) error { return status.Errorf(codes.Unimplemented, "method Connect not implemented") diff --git a/api/agentpb/collector.pb.go b/api/agentpb/collector.pb.go index 2af375ad29..6119d23c42 100644 --- a/api/agentpb/collector.pb.go +++ b/api/agentpb/collector.pb.go @@ -7,11 +7,13 @@ package agentpb import ( - inventorypb "github.com/percona/pmm/api/inventorypb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -2832,21 +2834,24 @@ func file_agentpb_collector_proto_rawDescGZIP() []byte { return file_agentpb_collector_proto_rawDescData } -var file_agentpb_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_agentpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_agentpb_collector_proto_goTypes = []interface{}{ - (ExampleFormat)(0), // 0: agent.ExampleFormat - (ExampleType)(0), // 1: agent.ExampleType - (*MetricsBucket)(nil), // 2: agent.MetricsBucket - (*HistogramItem)(nil), // 3: agent.HistogramItem - (*MetricsBucket_Common)(nil), // 4: agent.MetricsBucket.Common - (*MetricsBucket_MySQL)(nil), // 5: agent.MetricsBucket.MySQL - (*MetricsBucket_MongoDB)(nil), // 6: agent.MetricsBucket.MongoDB - (*MetricsBucket_PostgreSQL)(nil), // 7: agent.MetricsBucket.PostgreSQL - nil, // 8: agent.MetricsBucket.Common.CommentsEntry - nil, // 9: agent.MetricsBucket.Common.ErrorsEntry - (inventorypb.AgentType)(0), // 10: inventory.AgentType -} +var ( + file_agentpb_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_agentpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_agentpb_collector_proto_goTypes = []interface{}{ + (ExampleFormat)(0), // 0: agent.ExampleFormat + (ExampleType)(0), // 1: agent.ExampleType + (*MetricsBucket)(nil), // 2: agent.MetricsBucket + (*HistogramItem)(nil), // 3: agent.HistogramItem + (*MetricsBucket_Common)(nil), // 4: agent.MetricsBucket.Common + (*MetricsBucket_MySQL)(nil), // 5: agent.MetricsBucket.MySQL + (*MetricsBucket_MongoDB)(nil), // 6: agent.MetricsBucket.MongoDB + (*MetricsBucket_PostgreSQL)(nil), // 7: agent.MetricsBucket.PostgreSQL + nil, // 8: agent.MetricsBucket.Common.CommentsEntry + nil, // 9: agent.MetricsBucket.Common.ErrorsEntry + (inventorypb.AgentType)(0), // 10: inventory.AgentType + } +) + var file_agentpb_collector_proto_depIdxs = []int32{ 4, // 0: agent.MetricsBucket.common:type_name -> agent.MetricsBucket.Common 5, // 1: agent.MetricsBucket.mysql:type_name -> agent.MetricsBucket.MySQL diff --git a/api/agentpb/collector.swagger.json b/api/agentpb/collector.swagger.json deleted file mode 100644 index 10864eeb2e..0000000000 --- a/api/agentpb/collector.swagger.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "agentpb/collector.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - } - }, - "additionalProperties": {}, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - } - } -} diff --git a/api/inventorypb/agent_status.pb.go b/api/inventorypb/agent_status.pb.go index 995d77db00..58238ccfd7 100644 --- a/api/inventorypb/agent_status.pb.go +++ b/api/inventorypb/agent_status.pb.go @@ -7,10 +7,11 @@ package inventorypb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -125,10 +126,13 @@ func file_inventorypb_agent_status_proto_rawDescGZIP() []byte { return file_inventorypb_agent_status_proto_rawDescData } -var file_inventorypb_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventorypb_agent_status_proto_goTypes = []interface{}{ - (AgentStatus)(0), // 0: inventory.AgentStatus -} +var ( + file_inventorypb_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventorypb_agent_status_proto_goTypes = []interface{}{ + (AgentStatus)(0), // 0: inventory.AgentStatus + } +) + var file_inventorypb_agent_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventorypb/agent_status.swagger.json b/api/inventorypb/agent_status.swagger.json deleted file mode 100644 index 16fe27e7de..0000000000 --- a/api/inventorypb/agent_status.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "inventorypb/agent_status.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/inventorypb/agents.pb.go b/api/inventorypb/agents.pb.go index 087361214f..50afddd4c8 100644 --- a/api/inventorypb/agents.pb.go +++ b/api/inventorypb/agents.pb.go @@ -7,13 +7,14 @@ package inventorypb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -9622,120 +9623,123 @@ func file_inventorypb_agents_proto_rawDescGZIP() []byte { return file_inventorypb_agents_proto_rawDescData } -var file_inventorypb_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventorypb_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 107) -var file_inventorypb_agents_proto_goTypes = []interface{}{ - (AgentType)(0), // 0: inventory.AgentType - (*PMMAgent)(nil), // 1: inventory.PMMAgent - (*VMAgent)(nil), // 2: inventory.VMAgent - (*NodeExporter)(nil), // 3: inventory.NodeExporter - (*MySQLdExporter)(nil), // 4: inventory.MySQLdExporter - (*MongoDBExporter)(nil), // 5: inventory.MongoDBExporter - (*PostgresExporter)(nil), // 6: inventory.PostgresExporter - (*ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter - (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent - (*QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent - (*QANMongoDBProfilerAgent)(nil), // 10: inventory.QANMongoDBProfilerAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 13: inventory.RDSExporter - (*ExternalExporter)(nil), // 14: inventory.ExternalExporter - (*AzureDatabaseExporter)(nil), // 15: inventory.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 16: inventory.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 17: inventory.ListAgentsRequest - (*ListAgentsResponse)(nil), // 18: inventory.ListAgentsResponse - (*GetAgentRequest)(nil), // 19: inventory.GetAgentRequest - (*GetAgentResponse)(nil), // 20: inventory.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 21: inventory.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 22: inventory.GetAgentLogsResponse - (*AddPMMAgentRequest)(nil), // 23: inventory.AddPMMAgentRequest - (*AddPMMAgentResponse)(nil), // 24: inventory.AddPMMAgentResponse - (*AddNodeExporterRequest)(nil), // 25: inventory.AddNodeExporterRequest - (*AddNodeExporterResponse)(nil), // 26: inventory.AddNodeExporterResponse - (*ChangeNodeExporterRequest)(nil), // 27: inventory.ChangeNodeExporterRequest - (*ChangeNodeExporterResponse)(nil), // 28: inventory.ChangeNodeExporterResponse - (*AddMySQLdExporterRequest)(nil), // 29: inventory.AddMySQLdExporterRequest - (*AddMySQLdExporterResponse)(nil), // 30: inventory.AddMySQLdExporterResponse - (*ChangeMySQLdExporterRequest)(nil), // 31: inventory.ChangeMySQLdExporterRequest - (*ChangeMySQLdExporterResponse)(nil), // 32: inventory.ChangeMySQLdExporterResponse - (*AddMongoDBExporterRequest)(nil), // 33: inventory.AddMongoDBExporterRequest - (*AddMongoDBExporterResponse)(nil), // 34: inventory.AddMongoDBExporterResponse - (*ChangeMongoDBExporterRequest)(nil), // 35: inventory.ChangeMongoDBExporterRequest - (*ChangeMongoDBExporterResponse)(nil), // 36: inventory.ChangeMongoDBExporterResponse - (*AddPostgresExporterRequest)(nil), // 37: inventory.AddPostgresExporterRequest - (*AddPostgresExporterResponse)(nil), // 38: inventory.AddPostgresExporterResponse - (*ChangePostgresExporterRequest)(nil), // 39: inventory.ChangePostgresExporterRequest - (*ChangePostgresExporterResponse)(nil), // 40: inventory.ChangePostgresExporterResponse - (*AddProxySQLExporterRequest)(nil), // 41: inventory.AddProxySQLExporterRequest - (*AddProxySQLExporterResponse)(nil), // 42: inventory.AddProxySQLExporterResponse - (*ChangeProxySQLExporterRequest)(nil), // 43: inventory.ChangeProxySQLExporterRequest - (*ChangeProxySQLExporterResponse)(nil), // 44: inventory.ChangeProxySQLExporterResponse - (*AddQANMySQLPerfSchemaAgentRequest)(nil), // 45: inventory.AddQANMySQLPerfSchemaAgentRequest - (*AddQANMySQLPerfSchemaAgentResponse)(nil), // 46: inventory.AddQANMySQLPerfSchemaAgentResponse - (*ChangeQANMySQLPerfSchemaAgentRequest)(nil), // 47: inventory.ChangeQANMySQLPerfSchemaAgentRequest - (*ChangeQANMySQLPerfSchemaAgentResponse)(nil), // 48: inventory.ChangeQANMySQLPerfSchemaAgentResponse - (*AddQANMySQLSlowlogAgentRequest)(nil), // 49: inventory.AddQANMySQLSlowlogAgentRequest - (*AddQANMySQLSlowlogAgentResponse)(nil), // 50: inventory.AddQANMySQLSlowlogAgentResponse - (*ChangeQANMySQLSlowlogAgentRequest)(nil), // 51: inventory.ChangeQANMySQLSlowlogAgentRequest - (*ChangeQANMySQLSlowlogAgentResponse)(nil), // 52: inventory.ChangeQANMySQLSlowlogAgentResponse - (*AddQANMongoDBProfilerAgentRequest)(nil), // 53: inventory.AddQANMongoDBProfilerAgentRequest - (*AddQANMongoDBProfilerAgentResponse)(nil), // 54: inventory.AddQANMongoDBProfilerAgentResponse - (*ChangeQANMongoDBProfilerAgentRequest)(nil), // 55: inventory.ChangeQANMongoDBProfilerAgentRequest - (*ChangeQANMongoDBProfilerAgentResponse)(nil), // 56: inventory.ChangeQANMongoDBProfilerAgentResponse - (*AddQANPostgreSQLPgStatementsAgentRequest)(nil), // 57: inventory.AddQANPostgreSQLPgStatementsAgentRequest - (*AddQANPostgreSQLPgStatementsAgentResponse)(nil), // 58: inventory.AddQANPostgreSQLPgStatementsAgentResponse - (*ChangeQANPostgreSQLPgStatementsAgentRequest)(nil), // 59: inventory.ChangeQANPostgreSQLPgStatementsAgentRequest - (*ChangeQANPostgreSQLPgStatementsAgentResponse)(nil), // 60: inventory.ChangeQANPostgreSQLPgStatementsAgentResponse - (*AddQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 61: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest - (*AddQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 62: inventory.AddQANPostgreSQLPgStatMonitorAgentResponse - (*ChangeQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 63: inventory.ChangeQANPostgreSQLPgStatMonitorAgentRequest - (*ChangeQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 64: inventory.ChangeQANPostgreSQLPgStatMonitorAgentResponse - (*AddRDSExporterRequest)(nil), // 65: inventory.AddRDSExporterRequest - (*AddRDSExporterResponse)(nil), // 66: inventory.AddRDSExporterResponse - (*ChangeRDSExporterRequest)(nil), // 67: inventory.ChangeRDSExporterRequest - (*ChangeRDSExporterResponse)(nil), // 68: inventory.ChangeRDSExporterResponse - (*AddExternalExporterRequest)(nil), // 69: inventory.AddExternalExporterRequest - (*AddExternalExporterResponse)(nil), // 70: inventory.AddExternalExporterResponse - (*ChangeExternalExporterRequest)(nil), // 71: inventory.ChangeExternalExporterRequest - (*ChangeExternalExporterResponse)(nil), // 72: inventory.ChangeExternalExporterResponse - (*AddAzureDatabaseExporterRequest)(nil), // 73: inventory.AddAzureDatabaseExporterRequest - (*AddAzureDatabaseExporterResponse)(nil), // 74: inventory.AddAzureDatabaseExporterResponse - (*ChangeAzureDatabaseExporterRequest)(nil), // 75: inventory.ChangeAzureDatabaseExporterRequest - (*ChangeAzureDatabaseExporterResponse)(nil), // 76: inventory.ChangeAzureDatabaseExporterResponse - (*RemoveAgentRequest)(nil), // 77: inventory.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 78: inventory.RemoveAgentResponse - nil, // 79: inventory.PMMAgent.CustomLabelsEntry - nil, // 80: inventory.NodeExporter.CustomLabelsEntry - nil, // 81: inventory.MySQLdExporter.CustomLabelsEntry - nil, // 82: inventory.MongoDBExporter.CustomLabelsEntry - nil, // 83: inventory.PostgresExporter.CustomLabelsEntry - nil, // 84: inventory.ProxySQLExporter.CustomLabelsEntry - nil, // 85: inventory.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 86: inventory.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 87: inventory.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 88: inventory.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 89: inventory.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 90: inventory.RDSExporter.CustomLabelsEntry - nil, // 91: inventory.ExternalExporter.CustomLabelsEntry - nil, // 92: inventory.AzureDatabaseExporter.CustomLabelsEntry - nil, // 93: inventory.ChangeCommonAgentParams.CustomLabelsEntry - nil, // 94: inventory.AddPMMAgentRequest.CustomLabelsEntry - nil, // 95: inventory.AddNodeExporterRequest.CustomLabelsEntry - nil, // 96: inventory.AddMySQLdExporterRequest.CustomLabelsEntry - nil, // 97: inventory.AddMongoDBExporterRequest.CustomLabelsEntry - nil, // 98: inventory.AddPostgresExporterRequest.CustomLabelsEntry - nil, // 99: inventory.AddProxySQLExporterRequest.CustomLabelsEntry - nil, // 100: inventory.AddQANMySQLPerfSchemaAgentRequest.CustomLabelsEntry - nil, // 101: inventory.AddQANMySQLSlowlogAgentRequest.CustomLabelsEntry - nil, // 102: inventory.AddQANMongoDBProfilerAgentRequest.CustomLabelsEntry - nil, // 103: inventory.AddQANPostgreSQLPgStatementsAgentRequest.CustomLabelsEntry - nil, // 104: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest.CustomLabelsEntry - nil, // 105: inventory.AddRDSExporterRequest.CustomLabelsEntry - nil, // 106: inventory.AddExternalExporterRequest.CustomLabelsEntry - nil, // 107: inventory.AddAzureDatabaseExporterRequest.CustomLabelsEntry - (AgentStatus)(0), // 108: inventory.AgentStatus - (LogLevel)(0), // 109: inventory.LogLevel -} +var ( + file_inventorypb_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventorypb_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 107) + file_inventorypb_agents_proto_goTypes = []interface{}{ + (AgentType)(0), // 0: inventory.AgentType + (*PMMAgent)(nil), // 1: inventory.PMMAgent + (*VMAgent)(nil), // 2: inventory.VMAgent + (*NodeExporter)(nil), // 3: inventory.NodeExporter + (*MySQLdExporter)(nil), // 4: inventory.MySQLdExporter + (*MongoDBExporter)(nil), // 5: inventory.MongoDBExporter + (*PostgresExporter)(nil), // 6: inventory.PostgresExporter + (*ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter + (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent + (*QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent + (*QANMongoDBProfilerAgent)(nil), // 10: inventory.QANMongoDBProfilerAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 13: inventory.RDSExporter + (*ExternalExporter)(nil), // 14: inventory.ExternalExporter + (*AzureDatabaseExporter)(nil), // 15: inventory.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 16: inventory.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 17: inventory.ListAgentsRequest + (*ListAgentsResponse)(nil), // 18: inventory.ListAgentsResponse + (*GetAgentRequest)(nil), // 19: inventory.GetAgentRequest + (*GetAgentResponse)(nil), // 20: inventory.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 21: inventory.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 22: inventory.GetAgentLogsResponse + (*AddPMMAgentRequest)(nil), // 23: inventory.AddPMMAgentRequest + (*AddPMMAgentResponse)(nil), // 24: inventory.AddPMMAgentResponse + (*AddNodeExporterRequest)(nil), // 25: inventory.AddNodeExporterRequest + (*AddNodeExporterResponse)(nil), // 26: inventory.AddNodeExporterResponse + (*ChangeNodeExporterRequest)(nil), // 27: inventory.ChangeNodeExporterRequest + (*ChangeNodeExporterResponse)(nil), // 28: inventory.ChangeNodeExporterResponse + (*AddMySQLdExporterRequest)(nil), // 29: inventory.AddMySQLdExporterRequest + (*AddMySQLdExporterResponse)(nil), // 30: inventory.AddMySQLdExporterResponse + (*ChangeMySQLdExporterRequest)(nil), // 31: inventory.ChangeMySQLdExporterRequest + (*ChangeMySQLdExporterResponse)(nil), // 32: inventory.ChangeMySQLdExporterResponse + (*AddMongoDBExporterRequest)(nil), // 33: inventory.AddMongoDBExporterRequest + (*AddMongoDBExporterResponse)(nil), // 34: inventory.AddMongoDBExporterResponse + (*ChangeMongoDBExporterRequest)(nil), // 35: inventory.ChangeMongoDBExporterRequest + (*ChangeMongoDBExporterResponse)(nil), // 36: inventory.ChangeMongoDBExporterResponse + (*AddPostgresExporterRequest)(nil), // 37: inventory.AddPostgresExporterRequest + (*AddPostgresExporterResponse)(nil), // 38: inventory.AddPostgresExporterResponse + (*ChangePostgresExporterRequest)(nil), // 39: inventory.ChangePostgresExporterRequest + (*ChangePostgresExporterResponse)(nil), // 40: inventory.ChangePostgresExporterResponse + (*AddProxySQLExporterRequest)(nil), // 41: inventory.AddProxySQLExporterRequest + (*AddProxySQLExporterResponse)(nil), // 42: inventory.AddProxySQLExporterResponse + (*ChangeProxySQLExporterRequest)(nil), // 43: inventory.ChangeProxySQLExporterRequest + (*ChangeProxySQLExporterResponse)(nil), // 44: inventory.ChangeProxySQLExporterResponse + (*AddQANMySQLPerfSchemaAgentRequest)(nil), // 45: inventory.AddQANMySQLPerfSchemaAgentRequest + (*AddQANMySQLPerfSchemaAgentResponse)(nil), // 46: inventory.AddQANMySQLPerfSchemaAgentResponse + (*ChangeQANMySQLPerfSchemaAgentRequest)(nil), // 47: inventory.ChangeQANMySQLPerfSchemaAgentRequest + (*ChangeQANMySQLPerfSchemaAgentResponse)(nil), // 48: inventory.ChangeQANMySQLPerfSchemaAgentResponse + (*AddQANMySQLSlowlogAgentRequest)(nil), // 49: inventory.AddQANMySQLSlowlogAgentRequest + (*AddQANMySQLSlowlogAgentResponse)(nil), // 50: inventory.AddQANMySQLSlowlogAgentResponse + (*ChangeQANMySQLSlowlogAgentRequest)(nil), // 51: inventory.ChangeQANMySQLSlowlogAgentRequest + (*ChangeQANMySQLSlowlogAgentResponse)(nil), // 52: inventory.ChangeQANMySQLSlowlogAgentResponse + (*AddQANMongoDBProfilerAgentRequest)(nil), // 53: inventory.AddQANMongoDBProfilerAgentRequest + (*AddQANMongoDBProfilerAgentResponse)(nil), // 54: inventory.AddQANMongoDBProfilerAgentResponse + (*ChangeQANMongoDBProfilerAgentRequest)(nil), // 55: inventory.ChangeQANMongoDBProfilerAgentRequest + (*ChangeQANMongoDBProfilerAgentResponse)(nil), // 56: inventory.ChangeQANMongoDBProfilerAgentResponse + (*AddQANPostgreSQLPgStatementsAgentRequest)(nil), // 57: inventory.AddQANPostgreSQLPgStatementsAgentRequest + (*AddQANPostgreSQLPgStatementsAgentResponse)(nil), // 58: inventory.AddQANPostgreSQLPgStatementsAgentResponse + (*ChangeQANPostgreSQLPgStatementsAgentRequest)(nil), // 59: inventory.ChangeQANPostgreSQLPgStatementsAgentRequest + (*ChangeQANPostgreSQLPgStatementsAgentResponse)(nil), // 60: inventory.ChangeQANPostgreSQLPgStatementsAgentResponse + (*AddQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 61: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest + (*AddQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 62: inventory.AddQANPostgreSQLPgStatMonitorAgentResponse + (*ChangeQANPostgreSQLPgStatMonitorAgentRequest)(nil), // 63: inventory.ChangeQANPostgreSQLPgStatMonitorAgentRequest + (*ChangeQANPostgreSQLPgStatMonitorAgentResponse)(nil), // 64: inventory.ChangeQANPostgreSQLPgStatMonitorAgentResponse + (*AddRDSExporterRequest)(nil), // 65: inventory.AddRDSExporterRequest + (*AddRDSExporterResponse)(nil), // 66: inventory.AddRDSExporterResponse + (*ChangeRDSExporterRequest)(nil), // 67: inventory.ChangeRDSExporterRequest + (*ChangeRDSExporterResponse)(nil), // 68: inventory.ChangeRDSExporterResponse + (*AddExternalExporterRequest)(nil), // 69: inventory.AddExternalExporterRequest + (*AddExternalExporterResponse)(nil), // 70: inventory.AddExternalExporterResponse + (*ChangeExternalExporterRequest)(nil), // 71: inventory.ChangeExternalExporterRequest + (*ChangeExternalExporterResponse)(nil), // 72: inventory.ChangeExternalExporterResponse + (*AddAzureDatabaseExporterRequest)(nil), // 73: inventory.AddAzureDatabaseExporterRequest + (*AddAzureDatabaseExporterResponse)(nil), // 74: inventory.AddAzureDatabaseExporterResponse + (*ChangeAzureDatabaseExporterRequest)(nil), // 75: inventory.ChangeAzureDatabaseExporterRequest + (*ChangeAzureDatabaseExporterResponse)(nil), // 76: inventory.ChangeAzureDatabaseExporterResponse + (*RemoveAgentRequest)(nil), // 77: inventory.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 78: inventory.RemoveAgentResponse + nil, // 79: inventory.PMMAgent.CustomLabelsEntry + nil, // 80: inventory.NodeExporter.CustomLabelsEntry + nil, // 81: inventory.MySQLdExporter.CustomLabelsEntry + nil, // 82: inventory.MongoDBExporter.CustomLabelsEntry + nil, // 83: inventory.PostgresExporter.CustomLabelsEntry + nil, // 84: inventory.ProxySQLExporter.CustomLabelsEntry + nil, // 85: inventory.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 86: inventory.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 87: inventory.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 88: inventory.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 89: inventory.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 90: inventory.RDSExporter.CustomLabelsEntry + nil, // 91: inventory.ExternalExporter.CustomLabelsEntry + nil, // 92: inventory.AzureDatabaseExporter.CustomLabelsEntry + nil, // 93: inventory.ChangeCommonAgentParams.CustomLabelsEntry + nil, // 94: inventory.AddPMMAgentRequest.CustomLabelsEntry + nil, // 95: inventory.AddNodeExporterRequest.CustomLabelsEntry + nil, // 96: inventory.AddMySQLdExporterRequest.CustomLabelsEntry + nil, // 97: inventory.AddMongoDBExporterRequest.CustomLabelsEntry + nil, // 98: inventory.AddPostgresExporterRequest.CustomLabelsEntry + nil, // 99: inventory.AddProxySQLExporterRequest.CustomLabelsEntry + nil, // 100: inventory.AddQANMySQLPerfSchemaAgentRequest.CustomLabelsEntry + nil, // 101: inventory.AddQANMySQLSlowlogAgentRequest.CustomLabelsEntry + nil, // 102: inventory.AddQANMongoDBProfilerAgentRequest.CustomLabelsEntry + nil, // 103: inventory.AddQANPostgreSQLPgStatementsAgentRequest.CustomLabelsEntry + nil, // 104: inventory.AddQANPostgreSQLPgStatMonitorAgentRequest.CustomLabelsEntry + nil, // 105: inventory.AddRDSExporterRequest.CustomLabelsEntry + nil, // 106: inventory.AddExternalExporterRequest.CustomLabelsEntry + nil, // 107: inventory.AddAzureDatabaseExporterRequest.CustomLabelsEntry + (AgentStatus)(0), // 108: inventory.AgentStatus + (LogLevel)(0), // 109: inventory.LogLevel + } +) + var file_inventorypb_agents_proto_depIdxs = []int32{ 79, // 0: inventory.PMMAgent.custom_labels:type_name -> inventory.PMMAgent.CustomLabelsEntry 108, // 1: inventory.VMAgent.status:type_name -> inventory.AgentStatus diff --git a/api/inventorypb/agents.pb.gw.go b/api/inventorypb/agents.pb.gw.go index 93146a4e51..1c45bf9c26 100644 --- a/api/inventorypb/agents.pb.gw.go +++ b/api/inventorypb/agents.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentsRequest @@ -45,7 +47,6 @@ func request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Agents_ListAgents_0(ctx context.Context, marshaler runtime.Ma msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err - } func request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.GetAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Agents_GetAgent_0(ctx context.Context, marshaler runtime.Mars msg, err := server.GetAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.GetAgentLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Agents_GetAgentLogs_0(ctx context.Context, marshaler runtime. msg, err := server.GetAgentLogs(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.AddPMMAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Agents_AddPMMAgent_0(ctx context.Context, marshaler runtime.M msg, err := server.AddPMMAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddNodeExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Agents_AddNodeExporter_0(ctx context.Context, marshaler runti msg, err := server.AddNodeExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler runtime. msg, err := client.ChangeNodeExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Agents_ChangeNodeExporter_0(ctx context.Context, marshaler ru msg, err := server.ChangeNodeExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler runtime.M msg, err := client.AddMySQLdExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Agents_AddMySQLdExporter_0(ctx context.Context, marshaler run msg, err := server.AddMySQLdExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler runtim msg, err := client.ChangeMySQLdExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_Agents_ChangeMySQLdExporter_0(ctx context.Context, marshaler msg, err := server.ChangeMySQLdExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -317,7 +303,6 @@ func request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler runtime. msg, err := client.AddMongoDBExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -334,7 +319,6 @@ func local_request_Agents_AddMongoDBExporter_0(ctx context.Context, marshaler ru msg, err := server.AddMongoDBExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -351,7 +335,6 @@ func request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler runti msg, err := client.ChangeMongoDBExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -368,7 +351,6 @@ func local_request_Agents_ChangeMongoDBExporter_0(ctx context.Context, marshaler msg, err := server.ChangeMongoDBExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -385,7 +367,6 @@ func request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler runtime msg, err := client.AddPostgresExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -402,7 +383,6 @@ func local_request_Agents_AddPostgresExporter_0(ctx context.Context, marshaler r msg, err := server.AddPostgresExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangePostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -419,7 +399,6 @@ func request_Agents_ChangePostgresExporter_0(ctx context.Context, marshaler runt msg, err := client.ChangePostgresExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangePostgresExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -436,7 +415,6 @@ func local_request_Agents_ChangePostgresExporter_0(ctx context.Context, marshale msg, err := server.ChangePostgresExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -453,7 +431,6 @@ func request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler runtime msg, err := client.AddProxySQLExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -470,7 +447,6 @@ func local_request_Agents_AddProxySQLExporter_0(ctx context.Context, marshaler r msg, err := server.AddProxySQLExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -487,7 +463,6 @@ func request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshaler runt msg, err := client.ChangeProxySQLExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -504,7 +479,6 @@ func local_request_Agents_ChangeProxySQLExporter_0(ctx context.Context, marshale msg, err := server.ChangeProxySQLExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -521,7 +495,6 @@ func request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler msg, err := client.AddQANMySQLPerfSchemaAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -538,7 +511,6 @@ func local_request_Agents_AddQANMySQLPerfSchemaAgent_0(ctx context.Context, mars msg, err := server.AddQANMySQLPerfSchemaAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -555,7 +527,6 @@ func request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, marshal msg, err := client.ChangeQANMySQLPerfSchemaAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -572,7 +543,6 @@ func local_request_Agents_ChangeQANMySQLPerfSchemaAgent_0(ctx context.Context, m msg, err := server.ChangeQANMySQLPerfSchemaAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -589,7 +559,6 @@ func request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshaler run msg, err := client.AddQANMySQLSlowlogAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -606,7 +575,6 @@ func local_request_Agents_AddQANMySQLSlowlogAgent_0(ctx context.Context, marshal msg, err := server.AddQANMySQLSlowlogAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -623,7 +591,6 @@ func request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, marshaler msg, err := client.ChangeQANMySQLSlowlogAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -640,7 +607,6 @@ func local_request_Agents_ChangeQANMySQLSlowlogAgent_0(ctx context.Context, mars msg, err := server.ChangeQANMySQLSlowlogAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -657,7 +623,6 @@ func request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, marshaler msg, err := client.AddQANMongoDBProfilerAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -674,7 +639,6 @@ func local_request_Agents_AddQANMongoDBProfilerAgent_0(ctx context.Context, mars msg, err := server.AddQANMongoDBProfilerAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -691,7 +655,6 @@ func request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, marshal msg, err := client.ChangeQANMongoDBProfilerAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -708,7 +671,6 @@ func local_request_Agents_ChangeQANMongoDBProfilerAgent_0(ctx context.Context, m msg, err := server.ChangeQANMongoDBProfilerAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -725,7 +687,6 @@ func request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Context, mar msg, err := client.AddQANPostgreSQLPgStatementsAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -742,7 +703,6 @@ func local_request_Agents_AddQANPostgreSQLPgStatementsAgent_0(ctx context.Contex msg, err := server.AddQANPostgreSQLPgStatementsAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -759,7 +719,6 @@ func request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Context, msg, err := client.ChangeQANPostgreSQLPgStatementsAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -776,7 +735,6 @@ func local_request_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(ctx context.Con msg, err := server.ChangeQANPostgreSQLPgStatementsAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -793,7 +751,6 @@ func request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, ma msg, err := client.AddQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -810,7 +767,6 @@ func local_request_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(ctx context.Conte msg, err := server.AddQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -827,7 +783,6 @@ func request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, msg, err := client.ChangeQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -844,7 +799,6 @@ func local_request_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(ctx context.Co msg, err := server.ChangeQANPostgreSQLPgStatMonitorAgent(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -861,7 +815,6 @@ func request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtime.Mars msg, err := client.AddRDSExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -878,7 +831,6 @@ func local_request_Agents_AddRDSExporter_0(ctx context.Context, marshaler runtim msg, err := server.AddRDSExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -895,7 +847,6 @@ func request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler runtime.M msg, err := client.ChangeRDSExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -912,7 +863,6 @@ func local_request_Agents_ChangeRDSExporter_0(ctx context.Context, marshaler run msg, err := server.ChangeRDSExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -929,7 +879,6 @@ func request_Agents_AddExternalExporter_0(ctx context.Context, marshaler runtime msg, err := client.AddExternalExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -946,7 +895,6 @@ func local_request_Agents_AddExternalExporter_0(ctx context.Context, marshaler r msg, err := server.AddExternalExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -963,7 +911,6 @@ func request_Agents_ChangeExternalExporter_0(ctx context.Context, marshaler runt msg, err := client.ChangeExternalExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeExternalExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -980,7 +927,6 @@ func local_request_Agents_ChangeExternalExporter_0(ctx context.Context, marshale msg, err := server.ChangeExternalExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -997,7 +943,6 @@ func request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marshaler ru msg, err := client.AddAzureDatabaseExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1014,7 +959,6 @@ func local_request_Agents_AddAzureDatabaseExporter_0(ctx context.Context, marsha msg, err := server.AddAzureDatabaseExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1031,7 +975,6 @@ func request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, marshaler msg, err := client.ChangeAzureDatabaseExporter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1048,7 +991,6 @@ func local_request_Agents_ChangeAzureDatabaseExporter_0(ctx context.Context, mar msg, err := server.ChangeAzureDatabaseExporter(ctx, &protoReq) return msg, metadata, err - } func request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1065,7 +1007,6 @@ func request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.RemoveAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -1082,7 +1023,6 @@ func local_request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.M msg, err := server.RemoveAgent(ctx, &protoReq) return msg, metadata, err - } // RegisterAgentsHandlerServer registers the http handlers for service Agents to "mux". @@ -1090,7 +1030,6 @@ func local_request_Agents_RemoveAgent_0(ctx context.Context, marshaler runtime.M // 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 RegisterAgentsHandlerFromEndpoint instead. func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentsServer) error { - mux.Handle("POST", pattern_Agents_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1113,7 +1052,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1138,7 +1076,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1163,7 +1100,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddPMMAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1188,7 +1124,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddPMMAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1213,7 +1148,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1238,7 +1172,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1263,7 +1196,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1288,7 +1220,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1313,7 +1244,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1338,7 +1268,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddPostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1363,7 +1292,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddPostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangePostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1388,7 +1316,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangePostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1413,7 +1340,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1438,7 +1364,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1463,7 +1388,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1488,7 +1412,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1513,7 +1436,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1538,7 +1460,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1563,7 +1484,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1588,7 +1508,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1613,7 +1532,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1638,7 +1556,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1663,7 +1580,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1688,7 +1604,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1713,7 +1628,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1738,7 +1652,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1763,7 +1676,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1788,7 +1700,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1813,7 +1724,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_AddAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1838,7 +1748,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_ChangeAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1863,7 +1772,6 @@ func RegisterAgentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Agents_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -1906,7 +1814,6 @@ func RegisterAgentsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentsClient" to call the correct interceptors. func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentsClient) error { - mux.Handle("POST", pattern_Agents_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1926,7 +1833,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1948,7 +1854,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1970,7 +1875,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddPMMAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1992,7 +1896,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddPMMAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2014,7 +1917,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeNodeExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2036,7 +1938,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeNodeExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2058,7 +1959,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeMySQLdExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2080,7 +1980,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeMySQLdExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2102,7 +2001,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeMongoDBExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2124,7 +2022,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeMongoDBExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddPostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2146,7 +2043,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddPostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangePostgresExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2168,7 +2064,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangePostgresExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2190,7 +2085,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeProxySQLExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2212,7 +2106,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeProxySQLExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2234,7 +2127,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLPerfSchemaAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2256,7 +2148,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANMySQLPerfSchemaAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2278,7 +2169,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANMySQLSlowlogAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2300,7 +2190,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANMySQLSlowlogAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2322,7 +2211,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANMongoDBProfilerAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2344,7 +2232,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANMongoDBProfilerAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2366,7 +2253,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatementsAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2388,7 +2274,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANPostgreSQLPgStatementsAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2410,7 +2295,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2432,7 +2316,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeQANPostgreSQLPgStatMonitorAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2454,7 +2337,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeRDSExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2476,7 +2358,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeRDSExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2498,7 +2379,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeExternalExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2520,7 +2400,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeExternalExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_AddAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2542,7 +2421,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_AddAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_ChangeAzureDatabaseExporter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2564,7 +2442,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_ChangeAzureDatabaseExporter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Agents_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -2586,7 +2463,6 @@ func RegisterAgentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Agents_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/inventorypb/agents.swagger.json b/api/inventorypb/agents.swagger.json deleted file mode 100644 index 0a1bc84c74..0000000000 --- a/api/inventorypb/agents.swagger.json +++ /dev/null @@ -1,3567 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "inventorypb/agents.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Agents" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/inventory/Agents/AddAzureDatabaseExporter": { - "post": { - "summary": "Add Azure Database Exporter", - "description": "Adds azure_database_exporter Agent.", - "operationId": "AddAzureDatabaseExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddAzureDatabaseExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddAzureDatabaseExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddExternalExporter": { - "post": { - "summary": "Add External Exporter", - "description": "Adds external_exporter Agent.", - "operationId": "AddExternalExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddExternalExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddExternalExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddMongoDBExporter": { - "post": { - "summary": "Add MongoDB Exporter", - "description": "Adds mongodb_exporter Agent.", - "operationId": "AddMongoDBExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddMongoDBExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddMongoDBExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddMySQLdExporter": { - "post": { - "summary": "Add mysqld Exporter", - "description": "Adds mysqld_exporter Agent.", - "operationId": "AddMySQLdExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddMySQLdExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddMySQLdExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddNodeExporter": { - "post": { - "summary": "Add Node Exporter", - "description": "Adds node_exporter Agent.", - "operationId": "AddNodeExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddNodeExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddNodeExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddPMMAgent": { - "post": { - "summary": "Add PMM Agent", - "description": "Adds PMM Agent.", - "operationId": "AddPMMAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddPMMAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddPMMAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddPostgresExporter": { - "post": { - "summary": "Add Postgres Exporter", - "description": "Adds postgres_exporter Agent.", - "operationId": "AddPostgresExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddPostgresExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddPostgresExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddProxySQLExporter": { - "post": { - "summary": "Add ProxySQL Exporter", - "description": "Adds proxysql_exporter Agent.", - "operationId": "AddProxySQLExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddProxySQLExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddProxySQLExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddQANMongoDBProfilerAgent": { - "post": { - "summary": "Add 'QAN MongoDB Profiler' Agent", - "description": "Adds 'Query Analytics MongoDB Profiler' Agent.", - "operationId": "AddQANMongoDBProfilerAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddQANMongoDBProfilerAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddQANMongoDBProfilerAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddQANMySQLPerfSchemaAgent": { - "post": { - "summary": "Add 'QAN MySQL PerfSchema' Agent", - "description": "Adds 'Query Analytics MySQL PerfSchema' Agent.", - "operationId": "AddQANMySQLPerfSchemaAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddQANMySQLPerfSchemaAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddQANMySQLPerfSchemaAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddQANMySQLSlowlogAgent": { - "post": { - "summary": "Add 'QAN MySQL Slowlog' Agent", - "description": "Adds 'Query Analytics MySQL Slowlog' Agent.", - "operationId": "AddQANMySQLSlowlogAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddQANMySQLSlowlogAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddQANMySQLSlowlogAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddQANPostgreSQLPgStatMonitorAgent": { - "post": { - "summary": "Add 'QAN PostgreSQL pg_stat_monitor' Agent", - "description": "Adds 'Query Analytics PostgreSQL pg_stat_monitor' Agent.", - "operationId": "AddQANPostgreSQLPgStatMonitorAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatMonitorAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatMonitorAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddQANPostgreSQLPgStatementsAgent": { - "post": { - "summary": "Add 'QAN PostgreSQL pg_stat_statements' Agent", - "description": "Adds 'Query Analytics PostgreSQL pg_stat_statements' Agent.", - "operationId": "AddQANPostgreSQLPgStatementsAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatementsAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddQANPostgreSQLPgStatementsAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/AddRDSExporter": { - "post": { - "summary": "Add RDS Exporter", - "description": "Adds rds_exporter Agent.", - "operationId": "AddRDSExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddRDSExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddRDSExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeAzureDatabaseExporter": { - "post": { - "summary": "Change Azure Database Exporter", - "description": "Changes azure_database_exporter Agent.", - "operationId": "ChangeAzureDatabaseExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeAzureDatabaseExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeAzureDatabaseExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeExternalExporter": { - "post": { - "summary": "Change External Exporter", - "description": "Changes external_exporter Agent.", - "operationId": "ChangeExternalExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeExternalExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeExternalExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeMongoDBExporter": { - "post": { - "summary": "Change MongoDB Exporter", - "description": "Changes mongodb_exporter Agent.", - "operationId": "ChangeMongoDBExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeMongoDBExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeMongoDBExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeMySQLdExporter": { - "post": { - "summary": "Change mysqld Exporter", - "description": "Changes mysqld_exporter Agent.", - "operationId": "ChangeMySQLdExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeMySQLdExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeMySQLdExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeNodeExporter": { - "post": { - "summary": "Change Node Exporter", - "description": "Changes node_exporter Agent.", - "operationId": "ChangeNodeExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeNodeExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeNodeExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangePostgresExporter": { - "post": { - "summary": "Change Postgres Exporter", - "description": "Changes postgres_exporter Agent.", - "operationId": "ChangePostgresExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangePostgresExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangePostgresExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeProxySQLExporter": { - "post": { - "summary": "Change ProxySQL Exporter", - "description": "Changes proxysql_exporter Agent.", - "operationId": "ChangeProxySQLExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeProxySQLExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeProxySQLExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeQANMongoDBProfilerAgent": { - "post": { - "summary": "Change 'QAN MongoDB Profiler' Agent", - "description": "Changes 'Query Analytics MongoDB Profiler' Agent.", - "operationId": "ChangeQANMongoDBProfilerAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeQANMongoDBProfilerAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeQANMongoDBProfilerAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeQANMySQLPerfSchemaAgent": { - "post": { - "summary": "Change 'QAN MySQL PerfSchema' Agent", - "description": "Changes 'Query Analytics MySQL PerfSchema' Agent.", - "operationId": "ChangeQANMySQLPerfSchemaAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeQANMySQLPerfSchemaAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeQANMySQLPerfSchemaAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeQANMySQLSlowlogAgent": { - "post": { - "summary": "Change 'QAN MySQL Slowlog' Agent", - "description": "Changes 'Query Analytics MySQL Slowlog' Agent.", - "operationId": "ChangeQANMySQLSlowlogAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeQANMySQLSlowlogAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeQANMySQLSlowlogAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeQANPostgreSQLPgStatMonitorAgent": { - "post": { - "summary": "Change 'QAN PostgreSQL pg_stat_monitor' Agent", - "description": "Changes 'Query Analytics PostgreSQL pg_stat_monitor' Agent.", - "operationId": "ChangeQANPostgreSQLPgStatMonitorAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatMonitorAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatMonitorAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeQANPostgreSQLPgStatementsAgent": { - "post": { - "summary": "Change 'QAN PostgreSQL pg_stat_statements' Agent", - "description": "Changes 'Query Analytics PostgreSQL pg_stat_statements' Agent.", - "operationId": "ChangeQANPostgreSQLPgStatementsAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatementsAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeQANPostgreSQLPgStatementsAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/ChangeRDSExporter": { - "post": { - "summary": "Change RDS Exporter", - "description": "Changes rds_exporter Agent.", - "operationId": "ChangeRDSExporter", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryChangeRDSExporterResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryChangeRDSExporterRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/Get": { - "post": { - "summary": "Get Agent", - "description": "Returns a single Agent by ID.", - "operationId": "GetAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryGetAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryGetAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/GetLogs": { - "post": { - "summary": "Get Agent logs", - "description": "Returns Agent logs by ID.", - "operationId": "GetAgentLogs", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryGetAgentLogsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryGetAgentLogsRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/List": { - "post": { - "summary": "List Agents", - "description": "Returns a list of all Agents.", - "operationId": "ListAgents", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryListAgentsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryListAgentsRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - }, - "/v1/inventory/Agents/Remove": { - "post": { - "summary": "Remove Agent", - "description": "Removes Agent.", - "operationId": "RemoveAgent", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryRemoveAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryRemoveAgentRequest" - } - } - ], - "tags": [ - "Agents" - ] - } - } - }, - "definitions": { - "inventoryAddAzureDatabaseExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "node_id": { - "type": "string", - "description": "Node identifier." - }, - "azure_client_id": { - "type": "string", - "title": "Azure client ID" - }, - "azure_client_secret": { - "type": "string", - "title": "Azure client secret" - }, - "azure_tenant_id": { - "type": "string", - "title": "Azure tanant ID" - }, - "azure_subscription_id": { - "type": "string", - "title": "Azure subscription ID" - }, - "azure_resource_group": { - "type": "string", - "description": "Azure resource group." - }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure resource type (mysql, maria, postgres)" - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddAzureDatabaseExporterResponse": { - "type": "object", - "properties": { - "azure_database_exporter": { - "$ref": "#/definitions/inventoryAzureDatabaseExporter" - } - } - }, - "inventoryAddExternalExporterRequest": { - "type": "object", - "properties": { - "runs_on_node_id": { - "type": "string", - "description": "The node identifier where this instance is run." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "password": { - "type": "string", - "description": "HTTP basic auth password for collecting metrics." - }, - "scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints(default: http)." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI(default: /metrics)." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - } - } - }, - "inventoryAddExternalExporterResponse": { - "type": "object", - "properties": { - "external_exporter": { - "$ref": "#/definitions/inventoryExternalExporter" - } - } - }, - "inventoryAddMongoDBExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MongoDB username for scraping metrics." - }, - "password": { - "type": "string", - "description": "MongoDB password for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_certificate_key": { - "type": "string", - "description": "Client certificate and key." - }, - "tls_certificate_key_file_password": { - "type": "string", - "description": "Password for decrypting tls_certificate_key." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "authentication_mechanism": { - "type": "string", - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." - }, - "authentication_database": { - "type": "string", - "description": "Authentication database." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "stats_collections": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of colletions to get stats from. Can use *" - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddMongoDBExporterResponse": { - "type": "object", - "properties": { - "mongodb_exporter": { - "$ref": "#/definitions/inventoryMongoDBExporter" - } - } - }, - "inventoryAddMySQLdExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for scraping metrics." - }, - "password": { - "type": "string", - "description": "MySQL password for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddMySQLdExporterResponse": { - "type": "object", - "properties": { - "mysqld_exporter": { - "$ref": "#/definitions/inventoryMySQLdExporter" - }, - "table_count": { - "type": "integer", - "format": "int32", - "description": "Actual table count at the moment of adding." - } - } - }, - "inventoryAddNodeExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddNodeExporterResponse": { - "type": "object", - "properties": { - "node_exporter": { - "$ref": "#/definitions/inventoryNodeExporter" - } - } - }, - "inventoryAddPMMAgentRequest": { - "type": "object", - "properties": { - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddPMMAgentResponse": { - "type": "object", - "properties": { - "pmm_agent": { - "$ref": "#/definitions/inventoryPMMAgent" - } - } - }, - "inventoryAddPostgresExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for scraping metrics." - }, - "password": { - "type": "string", - "description": "PostgreSQL password for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "tls_cert": { - "type": "string", - "description": "TLS Certifcate." - }, - "tls_key": { - "type": "string", - "description": "TLS Certificate Key." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddPostgresExporterResponse": { - "type": "object", - "properties": { - "postgres_exporter": { - "$ref": "#/definitions/inventoryPostgresExporter" - } - } - }, - "inventoryAddProxySQLExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "ProxySQL username for scraping metrics." - }, - "password": { - "type": "string", - "description": "ProxySQL password for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddProxySQLExporterResponse": { - "type": "object", - "properties": { - "proxysql_exporter": { - "$ref": "#/definitions/inventoryProxySQLExporter" - } - } - }, - "inventoryAddQANMongoDBProfilerAgentRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MongoDB username for getting profile data." - }, - "password": { - "type": "string", - "description": "MongoDB password for getting profile data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_certificate_key": { - "type": "string", - "description": "Client certificate and key." - }, - "tls_certificate_key_file_password": { - "type": "string", - "description": "Password for decrypting tls_certificate_key." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "authentication_mechanism": { - "type": "string", - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." - }, - "authentication_database": { - "type": "string", - "description": "Authentication database." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddQANMongoDBProfilerAgentResponse": { - "type": "object", - "properties": { - "qan_mongodb_profiler_agent": { - "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" - } - } - }, - "inventoryAddQANMySQLPerfSchemaAgentRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting performance data." - }, - "password": { - "type": "string", - "description": "MySQL password for getting performance data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)" - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddQANMySQLPerfSchemaAgentResponse": { - "type": "object", - "properties": { - "qan_mysql_perfschema_agent": { - "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" - } - } - }, - "inventoryAddQANMySQLSlowlogAgentRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting slowlog data." - }, - "password": { - "type": "string", - "description": "MySQL password for getting slowlog data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "max_slowlog_file_size": { - "type": "string", - "format": "int64", - "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddQANMySQLSlowlogAgentResponse": { - "type": "object", - "properties": { - "qan_mysql_slowlog_agent": { - "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" - } - } - }, - "inventoryAddQANPostgreSQLPgStatMonitorAgentRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat monitor data." - }, - "password": { - "type": "string", - "description": "PostgreSQL password for getting pg stat monitor data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "tls_cert": { - "type": "string", - "description": "TLS Certifcate." - }, - "tls_key": { - "type": "string", - "description": "TLS Certificate Key." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddQANPostgreSQLPgStatMonitorAgentResponse": { - "type": "object", - "properties": { - "qan_postgresql_pgstatmonitor_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" - } - } - }, - "inventoryAddQANPostgreSQLPgStatementsAgentRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat statements data." - }, - "password": { - "type": "string", - "description": "PostgreSQL password for getting pg stat statements data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "tls_cert": { - "type": "string", - "description": "TLS Certifcate." - }, - "tls_key": { - "type": "string", - "description": "TLS Certificate Key." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddQANPostgreSQLPgStatementsAgentResponse": { - "type": "object", - "properties": { - "qan_postgresql_pgstatements_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" - } - } - }, - "inventoryAddRDSExporterRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "node_id": { - "type": "string", - "description": "Node identifier." - }, - "aws_access_key": { - "type": "string", - "description": "AWS Access Key." - }, - "aws_secret_key": { - "type": "string", - "description": "AWS Secret Key." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_basic_metrics": { - "type": "boolean", - "description": "Disable basic metrics." - }, - "disable_enhanced_metrics": { - "type": "boolean", - "description": "Disable enhanced metrics." - }, - "push_metrics": { - "type": "boolean", - "description": "Enables push metrics mode for exporter." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - } - }, - "inventoryAddRDSExporterResponse": { - "type": "object", - "properties": { - "rds_exporter": { - "$ref": "#/definitions/inventoryRDSExporter" - } - } - }, - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryAgentType": { - "type": "string", - "enum": [ - "AGENT_TYPE_INVALID", - "PMM_AGENT", - "VM_AGENT", - "NODE_EXPORTER", - "MYSQLD_EXPORTER", - "MONGODB_EXPORTER", - "POSTGRES_EXPORTER", - "PROXYSQL_EXPORTER", - "QAN_MYSQL_PERFSCHEMA_AGENT", - "QAN_MYSQL_SLOWLOG_AGENT", - "QAN_MONGODB_PROFILER_AGENT", - "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", - "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", - "RDS_EXPORTER", - "EXTERNAL_EXPORTER", - "AZURE_DATABASE_EXPORTER" - ], - "default": "AGENT_TYPE_INVALID", - "description": "AgentType describes supported Agent types." - }, - "inventoryAzureDatabaseExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "node_id": { - "type": "string", - "description": "Node identifier." - }, - "azure_database_subscription_id": { - "type": "string", - "description": "Azure database subscription ID." - }, - "azure_database_resource_type": { - "type": "string", - "title": "Azure database resource type (mysql, maria, postgres)" - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status (the same for several configurations)." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics (the same for several configurations)." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if the exporter operates in push metrics mode." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics." - }, - "inventoryChangeAzureDatabaseExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeAzureDatabaseExporterResponse": { - "type": "object", - "properties": { - "azure_database_exporter": { - "$ref": "#/definitions/inventoryAzureDatabaseExporter" - } - } - }, - "inventoryChangeCommonAgentParams": { - "type": "object", - "properties": { - "enable": { - "type": "boolean", - "description": "Enable this Agent. Can't be used with disabled." - }, - "disable": { - "type": "boolean", - "description": "Disable this Agent. Can't be used with enabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Replace all custom user-assigned labels." - }, - "remove_custom_labels": { - "type": "boolean", - "description": "Remove all custom user-assigned labels." - }, - "enable_push_metrics": { - "type": "boolean", - "description": "Enables push metrics with vmagent, can't be used with disable_push_metrics.\nCan't be used with agent version lower then 2.12 and unsupported agents." - }, - "disable_push_metrics": { - "type": "boolean", - "description": "Disables push metrics, pmm-server starts to pull it, can't be used with enable_push_metrics." - } - }, - "description": "ChangeCommonAgentParams contains parameters that can be changed for all Agents." - }, - "inventoryChangeExternalExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeExternalExporterResponse": { - "type": "object", - "properties": { - "external_exporter": { - "$ref": "#/definitions/inventoryExternalExporter" - } - } - }, - "inventoryChangeMongoDBExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeMongoDBExporterResponse": { - "type": "object", - "properties": { - "mongodb_exporter": { - "$ref": "#/definitions/inventoryMongoDBExporter" - } - } - }, - "inventoryChangeMySQLdExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeMySQLdExporterResponse": { - "type": "object", - "properties": { - "mysqld_exporter": { - "$ref": "#/definitions/inventoryMySQLdExporter" - } - } - }, - "inventoryChangeNodeExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeNodeExporterResponse": { - "type": "object", - "properties": { - "node_exporter": { - "$ref": "#/definitions/inventoryNodeExporter" - } - } - }, - "inventoryChangePostgresExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangePostgresExporterResponse": { - "type": "object", - "properties": { - "postgres_exporter": { - "$ref": "#/definitions/inventoryPostgresExporter" - } - } - }, - "inventoryChangeProxySQLExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeProxySQLExporterResponse": { - "type": "object", - "properties": { - "proxysql_exporter": { - "$ref": "#/definitions/inventoryProxySQLExporter" - } - } - }, - "inventoryChangeQANMongoDBProfilerAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeQANMongoDBProfilerAgentResponse": { - "type": "object", - "properties": { - "qan_mongodb_profiler_agent": { - "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" - } - } - }, - "inventoryChangeQANMySQLPerfSchemaAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeQANMySQLPerfSchemaAgentResponse": { - "type": "object", - "properties": { - "qan_mysql_perfschema_agent": { - "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" - } - } - }, - "inventoryChangeQANMySQLSlowlogAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeQANMySQLSlowlogAgentResponse": { - "type": "object", - "properties": { - "qan_mysql_slowlog_agent": { - "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" - } - } - }, - "inventoryChangeQANPostgreSQLPgStatMonitorAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeQANPostgreSQLPgStatMonitorAgentResponse": { - "type": "object", - "properties": { - "qan_postgresql_pgstatmonitor_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" - } - } - }, - "inventoryChangeQANPostgreSQLPgStatementsAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeQANPostgreSQLPgStatementsAgentResponse": { - "type": "object", - "properties": { - "qan_postgresql_pgstatements_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" - } - } - }, - "inventoryChangeRDSExporterRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "common": { - "$ref": "#/definitions/inventoryChangeCommonAgentParams" - } - } - }, - "inventoryChangeRDSExporterResponse": { - "type": "object", - "properties": { - "rds_exporter": { - "$ref": "#/definitions/inventoryRDSExporter" - } - } - }, - "inventoryExternalExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "disabled": { - "type": "boolean", - "description": "If disabled, metrics from this exporter will not be collected." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - } - }, - "description": "ExternalExporter runs on any Node type, including Remote Node." - }, - "inventoryGetAgentLogsRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "limit": { - "type": "integer", - "format": "int64", - "title": "is less than this value. 0: no limit" - } - } - }, - "inventoryGetAgentLogsResponse": { - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "type": "string" - } - }, - "agent_config_log_lines_count": { - "type": "integer", - "format": "int64" - } - } - }, - "inventoryGetAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - } - } - }, - "inventoryGetAgentResponse": { - "type": "object", - "properties": { - "pmm_agent": { - "$ref": "#/definitions/inventoryPMMAgent" - }, - "vmagent": { - "$ref": "#/definitions/inventoryVMAgent" - }, - "node_exporter": { - "$ref": "#/definitions/inventoryNodeExporter" - }, - "mysqld_exporter": { - "$ref": "#/definitions/inventoryMySQLdExporter" - }, - "mongodb_exporter": { - "$ref": "#/definitions/inventoryMongoDBExporter" - }, - "postgres_exporter": { - "$ref": "#/definitions/inventoryPostgresExporter" - }, - "proxysql_exporter": { - "$ref": "#/definitions/inventoryProxySQLExporter" - }, - "qan_mysql_perfschema_agent": { - "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" - }, - "qan_mysql_slowlog_agent": { - "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" - }, - "qan_mongodb_profiler_agent": { - "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" - }, - "qan_postgresql_pgstatements_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" - }, - "qan_postgresql_pgstatmonitor_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" - }, - "rds_exporter": { - "$ref": "#/definitions/inventoryRDSExporter" - }, - "external_exporter": { - "$ref": "#/definitions/inventoryExternalExporter" - }, - "azure_database_exporter": { - "$ref": "#/definitions/inventoryAzureDatabaseExporter" - } - } - }, - "inventoryListAgentsRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id." - }, - "node_id": { - "type": "string", - "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id." - }, - "service_id": { - "type": "string", - "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id." - }, - "agent_type": { - "$ref": "#/definitions/inventoryAgentType", - "description": "Return only agents of a particular type." - } - } - }, - "inventoryListAgentsResponse": { - "type": "object", - "properties": { - "pmm_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryPMMAgent" - } - }, - "vm_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryVMAgent" - } - }, - "node_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryNodeExporter" - } - }, - "mysqld_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryMySQLdExporter" - } - }, - "mongodb_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryMongoDBExporter" - } - }, - "postgres_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryPostgresExporter" - } - }, - "proxysql_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryProxySQLExporter" - } - }, - "qan_mysql_perfschema_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" - } - }, - "qan_mysql_slowlog_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" - } - }, - "qan_mongodb_profiler_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" - } - }, - "qan_postgresql_pgstatements_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" - } - }, - "qan_postgresql_pgstatmonitor_agent": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" - } - }, - "rds_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryRDSExporter" - } - }, - "external_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryExternalExporter" - } - }, - "azure_database_exporter": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryAzureDatabaseExporter" - } - } - } - }, - "inventoryLogLevel": { - "type": "string", - "enum": [ - "auto", - "fatal", - "error", - "warn", - "info", - "debug" - ], - "default": "auto", - "title": "Log level for exporters" - }, - "inventoryMongoDBExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MongoDB username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "stats_collections": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of colletions to get stats from. Can use *" - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" - }, - "enable_all_collectors": { - "type": "boolean", - "description": "Enable All collectors." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics." - }, - "inventoryMySQLdExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "tablestats_group_disabled": { - "type": "boolean", - "description": "True if tablestats group collectors are currently disabled." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." - }, - "inventoryNodeExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "NodeExporter runs on Generic or Container Node and exposes its metrics." - }, - "inventoryPMMAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "connected": { - "type": "boolean", - "description": "True if Agent is running and connected to pmm-managed." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - } - }, - "description": "PMMAgent runs on Generic or Container Node." - }, - "inventoryPostgresExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." - }, - "inventoryProxySQLExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "ProxySQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics." - }, - "inventoryQANMongoDBProfilerAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MongoDB username for getting profiler data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit).\n\nTrue if query examples are disabled.\n bool query_examples_disabled = 8; TODO https://jira.percona.com/browse/PMM-4650" - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." - }, - "inventoryQANMySQLPerfSchemaAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting performance data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." - }, - "inventoryQANMySQLSlowlogAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting performance data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)" - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "max_slowlog_file_size": { - "type": "string", - "format": "int64", - "description": "Slowlog file is rotated at this size if \u003e 0." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "title": "mod tidy" - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." - }, - "inventoryQANPostgreSQLPgStatMonitorAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat monitor data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." - }, - "inventoryQANPostgreSQLPgStatementsAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat statements data." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." - }, - "inventoryRDSExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "node_id": { - "type": "string", - "description": "Node identifier." - }, - "aws_access_key": { - "type": "string", - "description": "AWS Access Key." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status (the same for several configurations)." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics (the same for several configurations).\n\nMetric collections flags below." - }, - "basic_metrics_disabled": { - "type": "boolean", - "description": "Basic metrics are disabled." - }, - "enhanced_metrics_disabled": { - "type": "boolean", - "description": "Enhanced metrics are disabled." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics." - }, - "inventoryRemoveAgentRequest": { - "type": "object", - "properties": { - "agent_id": { - "type": "string" - }, - "force": { - "type": "boolean", - "description": "Remove agent with all dependencies." - } - } - }, - "inventoryRemoveAgentResponse": { - "type": "object" - }, - "inventoryVMAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - } - }, - "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/inventorypb/agents_grpc.pb.go b/api/inventorypb/agents_grpc.pb.go index 3955bc6de5..09de340da9 100644 --- a/api/inventorypb/agents_grpc.pb.go +++ b/api/inventorypb/agents_grpc.pb.go @@ -8,6 +8,7 @@ package inventorypb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -477,99 +478,128 @@ type AgentsServer interface { } // UnimplementedAgentsServer must be embedded to have forward compatible implementations. -type UnimplementedAgentsServer struct { -} +type UnimplementedAgentsServer struct{} func (UnimplementedAgentsServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") } + func (UnimplementedAgentsServer) GetAgent(context.Context, *GetAgentRequest) (*GetAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgent not implemented") } + func (UnimplementedAgentsServer) GetAgentLogs(context.Context, *GetAgentLogsRequest) (*GetAgentLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgentLogs not implemented") } + func (UnimplementedAgentsServer) AddPMMAgent(context.Context, *AddPMMAgentRequest) (*AddPMMAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPMMAgent not implemented") } + func (UnimplementedAgentsServer) AddNodeExporter(context.Context, *AddNodeExporterRequest) (*AddNodeExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddNodeExporter not implemented") } + func (UnimplementedAgentsServer) ChangeNodeExporter(context.Context, *ChangeNodeExporterRequest) (*ChangeNodeExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeNodeExporter not implemented") } + func (UnimplementedAgentsServer) AddMySQLdExporter(context.Context, *AddMySQLdExporterRequest) (*AddMySQLdExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMySQLdExporter not implemented") } + func (UnimplementedAgentsServer) ChangeMySQLdExporter(context.Context, *ChangeMySQLdExporterRequest) (*ChangeMySQLdExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeMySQLdExporter not implemented") } + func (UnimplementedAgentsServer) AddMongoDBExporter(context.Context, *AddMongoDBExporterRequest) (*AddMongoDBExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMongoDBExporter not implemented") } + func (UnimplementedAgentsServer) ChangeMongoDBExporter(context.Context, *ChangeMongoDBExporterRequest) (*ChangeMongoDBExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeMongoDBExporter not implemented") } + func (UnimplementedAgentsServer) AddPostgresExporter(context.Context, *AddPostgresExporterRequest) (*AddPostgresExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPostgresExporter not implemented") } + func (UnimplementedAgentsServer) ChangePostgresExporter(context.Context, *ChangePostgresExporterRequest) (*ChangePostgresExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangePostgresExporter not implemented") } + func (UnimplementedAgentsServer) AddProxySQLExporter(context.Context, *AddProxySQLExporterRequest) (*AddProxySQLExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQLExporter not implemented") } + func (UnimplementedAgentsServer) ChangeProxySQLExporter(context.Context, *ChangeProxySQLExporterRequest) (*ChangeProxySQLExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeProxySQLExporter not implemented") } + func (UnimplementedAgentsServer) AddQANMySQLPerfSchemaAgent(context.Context, *AddQANMySQLPerfSchemaAgentRequest) (*AddQANMySQLPerfSchemaAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANMySQLPerfSchemaAgent not implemented") } + func (UnimplementedAgentsServer) ChangeQANMySQLPerfSchemaAgent(context.Context, *ChangeQANMySQLPerfSchemaAgentRequest) (*ChangeQANMySQLPerfSchemaAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANMySQLPerfSchemaAgent not implemented") } + func (UnimplementedAgentsServer) AddQANMySQLSlowlogAgent(context.Context, *AddQANMySQLSlowlogAgentRequest) (*AddQANMySQLSlowlogAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANMySQLSlowlogAgent not implemented") } + func (UnimplementedAgentsServer) ChangeQANMySQLSlowlogAgent(context.Context, *ChangeQANMySQLSlowlogAgentRequest) (*ChangeQANMySQLSlowlogAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANMySQLSlowlogAgent not implemented") } + func (UnimplementedAgentsServer) AddQANMongoDBProfilerAgent(context.Context, *AddQANMongoDBProfilerAgentRequest) (*AddQANMongoDBProfilerAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANMongoDBProfilerAgent not implemented") } + func (UnimplementedAgentsServer) ChangeQANMongoDBProfilerAgent(context.Context, *ChangeQANMongoDBProfilerAgentRequest) (*ChangeQANMongoDBProfilerAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANMongoDBProfilerAgent not implemented") } + func (UnimplementedAgentsServer) AddQANPostgreSQLPgStatementsAgent(context.Context, *AddQANPostgreSQLPgStatementsAgentRequest) (*AddQANPostgreSQLPgStatementsAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANPostgreSQLPgStatementsAgent not implemented") } + func (UnimplementedAgentsServer) ChangeQANPostgreSQLPgStatementsAgent(context.Context, *ChangeQANPostgreSQLPgStatementsAgentRequest) (*ChangeQANPostgreSQLPgStatementsAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANPostgreSQLPgStatementsAgent not implemented") } + func (UnimplementedAgentsServer) AddQANPostgreSQLPgStatMonitorAgent(context.Context, *AddQANPostgreSQLPgStatMonitorAgentRequest) (*AddQANPostgreSQLPgStatMonitorAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddQANPostgreSQLPgStatMonitorAgent not implemented") } + func (UnimplementedAgentsServer) ChangeQANPostgreSQLPgStatMonitorAgent(context.Context, *ChangeQANPostgreSQLPgStatMonitorAgentRequest) (*ChangeQANPostgreSQLPgStatMonitorAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeQANPostgreSQLPgStatMonitorAgent not implemented") } + func (UnimplementedAgentsServer) AddRDSExporter(context.Context, *AddRDSExporterRequest) (*AddRDSExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRDSExporter not implemented") } + func (UnimplementedAgentsServer) ChangeRDSExporter(context.Context, *ChangeRDSExporterRequest) (*ChangeRDSExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeRDSExporter not implemented") } + func (UnimplementedAgentsServer) AddExternalExporter(context.Context, *AddExternalExporterRequest) (*AddExternalExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternalExporter not implemented") } + func (UnimplementedAgentsServer) ChangeExternalExporter(context.Context, *ChangeExternalExporterRequest) (*ChangeExternalExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeExternalExporter not implemented") } + func (UnimplementedAgentsServer) AddAzureDatabaseExporter(context.Context, *AddAzureDatabaseExporterRequest) (*AddAzureDatabaseExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAzureDatabaseExporter not implemented") } + func (UnimplementedAgentsServer) ChangeAzureDatabaseExporter(context.Context, *ChangeAzureDatabaseExporterRequest) (*ChangeAzureDatabaseExporterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeAzureDatabaseExporter not implemented") } + func (UnimplementedAgentsServer) RemoveAgent(context.Context, *RemoveAgentRequest) (*RemoveAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveAgent not implemented") } diff --git a/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go b/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go index d583c6a51a..3db16b94a2 100644 --- a/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_azure_database_exporter_parameters.go @@ -60,7 +60,6 @@ AddAzureDatabaseExporterParams contains all the parameters to send to the API en Typically these are written to a http.Request. */ type AddAzureDatabaseExporterParams struct { - // Body. Body AddAzureDatabaseExporterBody @@ -130,7 +129,6 @@ func (o *AddAzureDatabaseExporterParams) SetBody(body AddAzureDatabaseExporterBo // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go b/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go index c502f53e8c..a131a16a3c 100644 --- a/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_azure_database_exporter_responses.go @@ -62,12 +62,12 @@ type AddAzureDatabaseExporterOK struct { func (o *AddAzureDatabaseExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddAzureDatabaseExporter][%d] addAzureDatabaseExporterOk %+v", 200, o.Payload) } + func (o *AddAzureDatabaseExporterOK) GetPayload() *AddAzureDatabaseExporterOKBody { return o.Payload } func (o *AddAzureDatabaseExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAzureDatabaseExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddAzureDatabaseExporterDefault) Code() int { func (o *AddAzureDatabaseExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddAzureDatabaseExporter][%d] AddAzureDatabaseExporter default %+v", o._statusCode, o.Payload) } + func (o *AddAzureDatabaseExporterDefault) GetPayload() *AddAzureDatabaseExporterDefaultBody { return o.Payload } func (o *AddAzureDatabaseExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAzureDatabaseExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddAzureDatabaseExporterBody add azure database exporter body swagger:model AddAzureDatabaseExporterBody */ type AddAzureDatabaseExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -260,7 +259,6 @@ AddAzureDatabaseExporterDefaultBody add azure database exporter default body swagger:model AddAzureDatabaseExporterDefaultBody */ type AddAzureDatabaseExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -326,9 +324,7 @@ func (o *AddAzureDatabaseExporterDefaultBody) ContextValidate(ctx context.Contex } func (o *AddAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -339,7 +335,6 @@ func (o *AddAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx context return err } } - } return nil @@ -368,7 +363,6 @@ AddAzureDatabaseExporterDefaultBodyDetailsItems0 add azure database exporter def swagger:model AddAzureDatabaseExporterDefaultBodyDetailsItems0 */ type AddAzureDatabaseExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -406,7 +400,6 @@ AddAzureDatabaseExporterOKBody add azure database exporter OK body swagger:model AddAzureDatabaseExporterOKBody */ type AddAzureDatabaseExporterOKBody struct { - // azure database exporter AzureDatabaseExporter *AddAzureDatabaseExporterOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` } @@ -459,7 +452,6 @@ func (o *AddAzureDatabaseExporterOKBody) ContextValidate(ctx context.Context, fo } func (o *AddAzureDatabaseExporterOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if err := o.AzureDatabaseExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -497,7 +489,6 @@ AddAzureDatabaseExporterOKBodyAzureDatabaseExporter AzureDatabaseExporter runs o swagger:model AddAzureDatabaseExporterOKBodyAzureDatabaseExporter */ type AddAzureDatabaseExporterOKBodyAzureDatabaseExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_external_exporter_parameters.go b/api/inventorypb/json/client/agents/add_external_exporter_parameters.go index 3672f81075..5a5ae9a946 100644 --- a/api/inventorypb/json/client/agents/add_external_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_external_exporter_parameters.go @@ -60,7 +60,6 @@ AddExternalExporterParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type AddExternalExporterParams struct { - // Body. Body AddExternalExporterBody @@ -130,7 +129,6 @@ func (o *AddExternalExporterParams) SetBody(body AddExternalExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddExternalExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_external_exporter_responses.go b/api/inventorypb/json/client/agents/add_external_exporter_responses.go index e6c53a045c..33a3d17e6e 100644 --- a/api/inventorypb/json/client/agents/add_external_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_external_exporter_responses.go @@ -60,12 +60,12 @@ type AddExternalExporterOK struct { func (o *AddExternalExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddExternalExporter][%d] addExternalExporterOk %+v", 200, o.Payload) } + func (o *AddExternalExporterOK) GetPayload() *AddExternalExporterOKBody { return o.Payload } func (o *AddExternalExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalExporterOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddExternalExporterDefault) Code() int { func (o *AddExternalExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddExternalExporter][%d] AddExternalExporter default %+v", o._statusCode, o.Payload) } + func (o *AddExternalExporterDefault) GetPayload() *AddExternalExporterDefaultBody { return o.Payload } func (o *AddExternalExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalExporterDefaultBody) // response payload @@ -123,7 +123,6 @@ AddExternalExporterBody add external exporter body swagger:model AddExternalExporterBody */ type AddExternalExporterBody struct { - // The node identifier where this instance is run. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -185,7 +184,6 @@ AddExternalExporterDefaultBody add external exporter default body swagger:model AddExternalExporterDefaultBody */ type AddExternalExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -251,9 +249,7 @@ func (o *AddExternalExporterDefaultBody) ContextValidate(ctx context.Context, fo } func (o *AddExternalExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -264,7 +260,6 @@ func (o *AddExternalExporterDefaultBody) contextValidateDetails(ctx context.Cont return err } } - } return nil @@ -293,7 +288,6 @@ AddExternalExporterDefaultBodyDetailsItems0 add external exporter default body d swagger:model AddExternalExporterDefaultBodyDetailsItems0 */ type AddExternalExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -331,7 +325,6 @@ AddExternalExporterOKBody add external exporter OK body swagger:model AddExternalExporterOKBody */ type AddExternalExporterOKBody struct { - // external exporter ExternalExporter *AddExternalExporterOKBodyExternalExporter `json:"external_exporter,omitempty"` } @@ -384,7 +377,6 @@ func (o *AddExternalExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddExternalExporterOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -422,7 +414,6 @@ AddExternalExporterOKBodyExternalExporter ExternalExporter runs on any Node type swagger:model AddExternalExporterOKBodyExternalExporter */ type AddExternalExporterOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go b/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go index dbab1c8589..d7083686bf 100644 --- a/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_mongo_db_exporter_parameters.go @@ -60,7 +60,6 @@ AddMongoDBExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMongoDBExporterParams struct { - // Body. Body AddMongoDBExporterBody @@ -130,7 +129,6 @@ func (o *AddMongoDBExporterParams) SetBody(body AddMongoDBExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddMongoDBExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go b/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go index 59fa4474b6..ba66e912c4 100644 --- a/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_mongo_db_exporter_responses.go @@ -62,12 +62,12 @@ type AddMongoDBExporterOK struct { func (o *AddMongoDBExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMongoDBExporter][%d] addMongoDbExporterOk %+v", 200, o.Payload) } + func (o *AddMongoDBExporterOK) GetPayload() *AddMongoDBExporterOKBody { return o.Payload } func (o *AddMongoDBExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMongoDBExporterDefault) Code() int { func (o *AddMongoDBExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMongoDBExporter][%d] AddMongoDBExporter default %+v", o._statusCode, o.Payload) } + func (o *AddMongoDBExporterDefault) GetPayload() *AddMongoDBExporterDefaultBody { return o.Payload } func (o *AddMongoDBExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddMongoDBExporterBody add mongo DB exporter body swagger:model AddMongoDBExporterBody */ type AddMongoDBExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -284,7 +283,6 @@ AddMongoDBExporterDefaultBody add mongo DB exporter default body swagger:model AddMongoDBExporterDefaultBody */ type AddMongoDBExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -350,9 +348,7 @@ func (o *AddMongoDBExporterDefaultBody) ContextValidate(ctx context.Context, for } func (o *AddMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -363,7 +359,6 @@ func (o *AddMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -392,7 +387,6 @@ AddMongoDBExporterDefaultBodyDetailsItems0 add mongo DB exporter default body de swagger:model AddMongoDBExporterDefaultBodyDetailsItems0 */ type AddMongoDBExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -430,7 +424,6 @@ AddMongoDBExporterOKBody add mongo DB exporter OK body swagger:model AddMongoDBExporterOKBody */ type AddMongoDBExporterOKBody struct { - // mongodb exporter MongodbExporter *AddMongoDBExporterOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` } @@ -483,7 +476,6 @@ func (o *AddMongoDBExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddMongoDBExporterOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -521,7 +513,6 @@ AddMongoDBExporterOKBodyMongodbExporter MongoDBExporter runs on Generic or Conta swagger:model AddMongoDBExporterOKBodyMongodbExporter */ type AddMongoDBExporterOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go index 8640aea896..155ca1d3ff 100644 --- a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_parameters.go @@ -60,7 +60,6 @@ AddMySQLdExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMySQLdExporterParams struct { - // Body. Body AddMySQLdExporterBody @@ -130,7 +129,6 @@ func (o *AddMySQLdExporterParams) SetBody(body AddMySQLdExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddMySQLdExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go index 9e6aa38fb7..e237740447 100644 --- a/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_my_s_q_ld_exporter_responses.go @@ -62,12 +62,12 @@ type AddMySQLdExporterOK struct { func (o *AddMySQLdExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMySQLdExporter][%d] addMySQLdExporterOk %+v", 200, o.Payload) } + func (o *AddMySQLdExporterOK) GetPayload() *AddMySQLdExporterOKBody { return o.Payload } func (o *AddMySQLdExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLdExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMySQLdExporterDefault) Code() int { func (o *AddMySQLdExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddMySQLdExporter][%d] AddMySQLdExporter default %+v", o._statusCode, o.Payload) } + func (o *AddMySQLdExporterDefault) GetPayload() *AddMySQLdExporterDefaultBody { return o.Payload } func (o *AddMySQLdExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLdExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddMySQLdExporterBody add my s q ld exporter body swagger:model AddMySQLdExporterBody */ type AddMySQLdExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -274,7 +273,6 @@ AddMySQLdExporterDefaultBody add my s q ld exporter default body swagger:model AddMySQLdExporterDefaultBody */ type AddMySQLdExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -340,9 +338,7 @@ func (o *AddMySQLdExporterDefaultBody) ContextValidate(ctx context.Context, form } func (o *AddMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -353,7 +349,6 @@ func (o *AddMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -382,7 +377,6 @@ AddMySQLdExporterDefaultBodyDetailsItems0 add my s q ld exporter default body de swagger:model AddMySQLdExporterDefaultBodyDetailsItems0 */ type AddMySQLdExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +414,6 @@ AddMySQLdExporterOKBody add my s q ld exporter OK body swagger:model AddMySQLdExporterOKBody */ type AddMySQLdExporterOKBody struct { - // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -476,7 +469,6 @@ func (o *AddMySQLdExporterOKBody) ContextValidate(ctx context.Context, formats s } func (o *AddMySQLdExporterOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -514,7 +506,6 @@ AddMySQLdExporterOKBodyMysqldExporter MySQLdExporter runs on Generic or Containe swagger:model AddMySQLdExporterOKBodyMysqldExporter */ type AddMySQLdExporterOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_node_exporter_parameters.go b/api/inventorypb/json/client/agents/add_node_exporter_parameters.go index 825eda1184..534c79bbf6 100644 --- a/api/inventorypb/json/client/agents/add_node_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_node_exporter_parameters.go @@ -60,7 +60,6 @@ AddNodeExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddNodeExporterParams struct { - // Body. Body AddNodeExporterBody @@ -130,7 +129,6 @@ func (o *AddNodeExporterParams) SetBody(body AddNodeExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddNodeExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_node_exporter_responses.go b/api/inventorypb/json/client/agents/add_node_exporter_responses.go index 9fd0822e35..0a785bc688 100644 --- a/api/inventorypb/json/client/agents/add_node_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_node_exporter_responses.go @@ -62,12 +62,12 @@ type AddNodeExporterOK struct { func (o *AddNodeExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddNodeExporter][%d] addNodeExporterOk %+v", 200, o.Payload) } + func (o *AddNodeExporterOK) GetPayload() *AddNodeExporterOKBody { return o.Payload } func (o *AddNodeExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddNodeExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddNodeExporterDefault) Code() int { func (o *AddNodeExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddNodeExporter][%d] AddNodeExporter default %+v", o._statusCode, o.Payload) } + func (o *AddNodeExporterDefault) GetPayload() *AddNodeExporterDefaultBody { return o.Payload } func (o *AddNodeExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddNodeExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddNodeExporterBody add node exporter body swagger:model AddNodeExporterBody */ type AddNodeExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -239,7 +238,6 @@ AddNodeExporterDefaultBody add node exporter default body swagger:model AddNodeExporterDefaultBody */ type AddNodeExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -305,9 +303,7 @@ func (o *AddNodeExporterDefaultBody) ContextValidate(ctx context.Context, format } func (o *AddNodeExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -318,7 +314,6 @@ func (o *AddNodeExporterDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -347,7 +342,6 @@ AddNodeExporterDefaultBodyDetailsItems0 add node exporter default body details i swagger:model AddNodeExporterDefaultBodyDetailsItems0 */ type AddNodeExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -385,7 +379,6 @@ AddNodeExporterOKBody add node exporter OK body swagger:model AddNodeExporterOKBody */ type AddNodeExporterOKBody struct { - // node exporter NodeExporter *AddNodeExporterOKBodyNodeExporter `json:"node_exporter,omitempty"` } @@ -438,7 +431,6 @@ func (o *AddNodeExporterOKBody) ContextValidate(ctx context.Context, formats str } func (o *AddNodeExporterOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if err := o.NodeExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -476,7 +468,6 @@ AddNodeExporterOKBodyNodeExporter NodeExporter runs on Generic or Container Node swagger:model AddNodeExporterOKBodyNodeExporter */ type AddNodeExporterOKBodyNodeExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go b/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go index 2598082ee0..b9defeaafd 100644 --- a/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_pmm_agent_parameters.go @@ -60,7 +60,6 @@ AddPMMAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddPMMAgentParams struct { - // Body. Body AddPMMAgentBody @@ -130,7 +129,6 @@ func (o *AddPMMAgentParams) SetBody(body AddPMMAgentBody) { // WriteToRequest writes these params to a swagger request func (o *AddPMMAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_pmm_agent_responses.go b/api/inventorypb/json/client/agents/add_pmm_agent_responses.go index 4af1dbbd59..6488e15501 100644 --- a/api/inventorypb/json/client/agents/add_pmm_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_pmm_agent_responses.go @@ -60,12 +60,12 @@ type AddPMMAgentOK struct { func (o *AddPMMAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPMMAgent][%d] addPmmAgentOk %+v", 200, o.Payload) } + func (o *AddPMMAgentOK) GetPayload() *AddPMMAgentOKBody { return o.Payload } func (o *AddPMMAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPMMAgentOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddPMMAgentDefault) Code() int { func (o *AddPMMAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPMMAgent][%d] AddPMMAgent default %+v", o._statusCode, o.Payload) } + func (o *AddPMMAgentDefault) GetPayload() *AddPMMAgentDefaultBody { return o.Payload } func (o *AddPMMAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPMMAgentDefaultBody) // response payload @@ -123,7 +123,6 @@ AddPMMAgentBody add PMM agent body swagger:model AddPMMAgentBody */ type AddPMMAgentBody struct { - // Node identifier where this instance runs. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -164,7 +163,6 @@ AddPMMAgentDefaultBody add PMM agent default body swagger:model AddPMMAgentDefaultBody */ type AddPMMAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *AddPMMAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddPMMAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *AddPMMAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -272,7 +267,6 @@ AddPMMAgentDefaultBodyDetailsItems0 add PMM agent default body details items0 swagger:model AddPMMAgentDefaultBodyDetailsItems0 */ type AddPMMAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ AddPMMAgentOKBody add PMM agent OK body swagger:model AddPMMAgentOKBody */ type AddPMMAgentOKBody struct { - // pmm agent PMMAgent *AddPMMAgentOKBodyPMMAgent `json:"pmm_agent,omitempty"` } @@ -363,7 +356,6 @@ func (o *AddPMMAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddPMMAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if err := o.PMMAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -401,7 +393,6 @@ AddPMMAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model AddPMMAgentOKBodyPMMAgent */ type AddPMMAgentOKBodyPMMAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go b/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go index 7c99c11083..48999a85e6 100644 --- a/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_postgres_exporter_parameters.go @@ -60,7 +60,6 @@ AddPostgresExporterParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type AddPostgresExporterParams struct { - // Body. Body AddPostgresExporterBody @@ -130,7 +129,6 @@ func (o *AddPostgresExporterParams) SetBody(body AddPostgresExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddPostgresExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go b/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go index 7d1ce734b7..a443028e3f 100644 --- a/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_postgres_exporter_responses.go @@ -62,12 +62,12 @@ type AddPostgresExporterOK struct { func (o *AddPostgresExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPostgresExporter][%d] addPostgresExporterOk %+v", 200, o.Payload) } + func (o *AddPostgresExporterOK) GetPayload() *AddPostgresExporterOKBody { return o.Payload } func (o *AddPostgresExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgresExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddPostgresExporterDefault) Code() int { func (o *AddPostgresExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddPostgresExporter][%d] AddPostgresExporter default %+v", o._statusCode, o.Payload) } + func (o *AddPostgresExporterDefault) GetPayload() *AddPostgresExporterDefaultBody { return o.Payload } func (o *AddPostgresExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgresExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddPostgresExporterBody add postgres exporter body swagger:model AddPostgresExporterBody */ type AddPostgresExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -269,7 +268,6 @@ AddPostgresExporterDefaultBody add postgres exporter default body swagger:model AddPostgresExporterDefaultBody */ type AddPostgresExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -335,9 +333,7 @@ func (o *AddPostgresExporterDefaultBody) ContextValidate(ctx context.Context, fo } func (o *AddPostgresExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,7 +344,6 @@ func (o *AddPostgresExporterDefaultBody) contextValidateDetails(ctx context.Cont return err } } - } return nil @@ -377,7 +372,6 @@ AddPostgresExporterDefaultBodyDetailsItems0 add postgres exporter default body d swagger:model AddPostgresExporterDefaultBodyDetailsItems0 */ type AddPostgresExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -415,7 +409,6 @@ AddPostgresExporterOKBody add postgres exporter OK body swagger:model AddPostgresExporterOKBody */ type AddPostgresExporterOKBody struct { - // postgres exporter PostgresExporter *AddPostgresExporterOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` } @@ -468,7 +461,6 @@ func (o *AddPostgresExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddPostgresExporterOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -506,7 +498,6 @@ AddPostgresExporterOKBodyPostgresExporter PostgresExporter runs on Generic or Co swagger:model AddPostgresExporterOKBodyPostgresExporter */ type AddPostgresExporterOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go index a483205bb7..1d26aff287 100644 --- a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_parameters.go @@ -60,7 +60,6 @@ AddProxySQLExporterParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type AddProxySQLExporterParams struct { - // Body. Body AddProxySQLExporterBody @@ -130,7 +129,6 @@ func (o *AddProxySQLExporterParams) SetBody(body AddProxySQLExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddProxySQLExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go index 9ef36ae602..8b4efbe9ed 100644 --- a/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_proxy_sql_exporter_responses.go @@ -62,12 +62,12 @@ type AddProxySQLExporterOK struct { func (o *AddProxySQLExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddProxySQLExporter][%d] addProxySqlExporterOk %+v", 200, o.Payload) } + func (o *AddProxySQLExporterOK) GetPayload() *AddProxySQLExporterOKBody { return o.Payload } func (o *AddProxySQLExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddProxySQLExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddProxySQLExporterDefault) Code() int { func (o *AddProxySQLExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddProxySQLExporter][%d] AddProxySQLExporter default %+v", o._statusCode, o.Payload) } + func (o *AddProxySQLExporterDefault) GetPayload() *AddProxySQLExporterDefaultBody { return o.Payload } func (o *AddProxySQLExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddProxySQLExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddProxySQLExporterBody add proxy SQL exporter body swagger:model AddProxySQLExporterBody */ type AddProxySQLExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -260,7 +259,6 @@ AddProxySQLExporterDefaultBody add proxy SQL exporter default body swagger:model AddProxySQLExporterDefaultBody */ type AddProxySQLExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -326,9 +324,7 @@ func (o *AddProxySQLExporterDefaultBody) ContextValidate(ctx context.Context, fo } func (o *AddProxySQLExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -339,7 +335,6 @@ func (o *AddProxySQLExporterDefaultBody) contextValidateDetails(ctx context.Cont return err } } - } return nil @@ -368,7 +363,6 @@ AddProxySQLExporterDefaultBodyDetailsItems0 add proxy SQL exporter default body swagger:model AddProxySQLExporterDefaultBodyDetailsItems0 */ type AddProxySQLExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -406,7 +400,6 @@ AddProxySQLExporterOKBody add proxy SQL exporter OK body swagger:model AddProxySQLExporterOKBody */ type AddProxySQLExporterOKBody struct { - // proxysql exporter ProxysqlExporter *AddProxySQLExporterOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` } @@ -459,7 +452,6 @@ func (o *AddProxySQLExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *AddProxySQLExporterOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -497,7 +489,6 @@ AddProxySQLExporterOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Co swagger:model AddProxySQLExporterOKBodyProxysqlExporter */ type AddProxySQLExporterOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go index 240c207558..4ba6b76646 100644 --- a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_parameters.go @@ -60,7 +60,6 @@ AddQANMongoDBProfilerAgentParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type AddQANMongoDBProfilerAgentParams struct { - // Body. Body AddQANMongoDBProfilerAgentBody @@ -130,7 +129,6 @@ func (o *AddQANMongoDBProfilerAgentParams) SetBody(body AddQANMongoDBProfilerAge // WriteToRequest writes these params to a swagger request func (o *AddQANMongoDBProfilerAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go index e4f7bc5686..a5b6eaaf09 100644 --- a/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_mongo_db_profiler_agent_responses.go @@ -62,12 +62,12 @@ type AddQANMongoDBProfilerAgentOK struct { func (o *AddQANMongoDBProfilerAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMongoDBProfilerAgent][%d] addQanMongoDbProfilerAgentOk %+v", 200, o.Payload) } + func (o *AddQANMongoDBProfilerAgentOK) GetPayload() *AddQANMongoDBProfilerAgentOKBody { return o.Payload } func (o *AddQANMongoDBProfilerAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANMongoDBProfilerAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANMongoDBProfilerAgentDefault) Code() int { func (o *AddQANMongoDBProfilerAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMongoDBProfilerAgent][%d] AddQANMongoDBProfilerAgent default %+v", o._statusCode, o.Payload) } + func (o *AddQANMongoDBProfilerAgentDefault) GetPayload() *AddQANMongoDBProfilerAgentDefaultBody { return o.Payload } func (o *AddQANMongoDBProfilerAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANMongoDBProfilerAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ AddQANMongoDBProfilerAgentBody add QAN mongo DB profiler agent body swagger:model AddQANMongoDBProfilerAgentBody */ type AddQANMongoDBProfilerAgentBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -271,7 +270,6 @@ AddQANMongoDBProfilerAgentDefaultBody add QAN mongo DB profiler agent default bo swagger:model AddQANMongoDBProfilerAgentDefaultBody */ type AddQANMongoDBProfilerAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -337,9 +335,7 @@ func (o *AddQANMongoDBProfilerAgentDefaultBody) ContextValidate(ctx context.Cont } func (o *AddQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -350,7 +346,6 @@ func (o *AddQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx conte return err } } - } return nil @@ -379,7 +374,6 @@ AddQANMongoDBProfilerAgentDefaultBodyDetailsItems0 add QAN mongo DB profiler age swagger:model AddQANMongoDBProfilerAgentDefaultBodyDetailsItems0 */ type AddQANMongoDBProfilerAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -417,7 +411,6 @@ AddQANMongoDBProfilerAgentOKBody add QAN mongo DB profiler agent OK body swagger:model AddQANMongoDBProfilerAgentOKBody */ type AddQANMongoDBProfilerAgentOKBody struct { - // qan mongodb profiler agent QANMongodbProfilerAgent *AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` } @@ -470,7 +463,6 @@ func (o *AddQANMongoDBProfilerAgentOKBody) ContextValidate(ctx context.Context, } func (o *AddQANMongoDBProfilerAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if err := o.QANMongodbProfilerAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -508,7 +500,6 @@ AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent swagger:model AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent */ type AddQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go index 14f12e0d93..c96dd4f37b 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_parameters.go @@ -60,7 +60,6 @@ AddQANMySQLPerfSchemaAgentParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type AddQANMySQLPerfSchemaAgentParams struct { - // Body. Body AddQANMySQLPerfSchemaAgentBody @@ -130,7 +129,6 @@ func (o *AddQANMySQLPerfSchemaAgentParams) SetBody(body AddQANMySQLPerfSchemaAge // WriteToRequest writes these params to a swagger request func (o *AddQANMySQLPerfSchemaAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go index c020b712a9..616f0634cc 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_perf_schema_agent_responses.go @@ -62,12 +62,12 @@ type AddQANMySQLPerfSchemaAgentOK struct { func (o *AddQANMySQLPerfSchemaAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLPerfSchemaAgent][%d] addQanMySqlPerfSchemaAgentOk %+v", 200, o.Payload) } + func (o *AddQANMySQLPerfSchemaAgentOK) GetPayload() *AddQANMySQLPerfSchemaAgentOKBody { return o.Payload } func (o *AddQANMySQLPerfSchemaAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANMySQLPerfSchemaAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANMySQLPerfSchemaAgentDefault) Code() int { func (o *AddQANMySQLPerfSchemaAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLPerfSchemaAgent][%d] AddQANMySQLPerfSchemaAgent default %+v", o._statusCode, o.Payload) } + func (o *AddQANMySQLPerfSchemaAgentDefault) GetPayload() *AddQANMySQLPerfSchemaAgentDefaultBody { return o.Payload } func (o *AddQANMySQLPerfSchemaAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANMySQLPerfSchemaAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ AddQANMySQLPerfSchemaAgentBody add QAN my SQL perf schema agent body swagger:model AddQANMySQLPerfSchemaAgentBody */ type AddQANMySQLPerfSchemaAgentBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -269,7 +268,6 @@ AddQANMySQLPerfSchemaAgentDefaultBody add QAN my SQL perf schema agent default b swagger:model AddQANMySQLPerfSchemaAgentDefaultBody */ type AddQANMySQLPerfSchemaAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -335,9 +333,7 @@ func (o *AddQANMySQLPerfSchemaAgentDefaultBody) ContextValidate(ctx context.Cont } func (o *AddQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,7 +344,6 @@ func (o *AddQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx conte return err } } - } return nil @@ -377,7 +372,6 @@ AddQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 add QAN my SQL perf schema ag swagger:model AddQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 */ type AddQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -415,7 +409,6 @@ AddQANMySQLPerfSchemaAgentOKBody add QAN my SQL perf schema agent OK body swagger:model AddQANMySQLPerfSchemaAgentOKBody */ type AddQANMySQLPerfSchemaAgentOKBody struct { - // qan mysql perfschema agent QANMysqlPerfschemaAgent *AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent `json:"qan_mysql_perfschema_agent,omitempty"` } @@ -468,7 +461,6 @@ func (o *AddQANMySQLPerfSchemaAgentOKBody) ContextValidate(ctx context.Context, } func (o *AddQANMySQLPerfSchemaAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if err := o.QANMysqlPerfschemaAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -506,7 +498,6 @@ AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent swagger:model AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent */ type AddQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go index 6f632e00e1..f1f42c5244 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_parameters.go @@ -60,7 +60,6 @@ AddQANMySQLSlowlogAgentParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type AddQANMySQLSlowlogAgentParams struct { - // Body. Body AddQANMySQLSlowlogAgentBody @@ -130,7 +129,6 @@ func (o *AddQANMySQLSlowlogAgentParams) SetBody(body AddQANMySQLSlowlogAgentBody // WriteToRequest writes these params to a swagger request func (o *AddQANMySQLSlowlogAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go index 1e390d07a8..fa9cbc2800 100644 --- a/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_my_sql_slowlog_agent_responses.go @@ -62,12 +62,12 @@ type AddQANMySQLSlowlogAgentOK struct { func (o *AddQANMySQLSlowlogAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLSlowlogAgent][%d] addQanMySqlSlowlogAgentOk %+v", 200, o.Payload) } + func (o *AddQANMySQLSlowlogAgentOK) GetPayload() *AddQANMySQLSlowlogAgentOKBody { return o.Payload } func (o *AddQANMySQLSlowlogAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANMySQLSlowlogAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANMySQLSlowlogAgentDefault) Code() int { func (o *AddQANMySQLSlowlogAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANMySQLSlowlogAgent][%d] AddQANMySQLSlowlogAgent default %+v", o._statusCode, o.Payload) } + func (o *AddQANMySQLSlowlogAgentDefault) GetPayload() *AddQANMySQLSlowlogAgentDefaultBody { return o.Payload } func (o *AddQANMySQLSlowlogAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANMySQLSlowlogAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ AddQANMySQLSlowlogAgentBody add QAN my SQL slowlog agent body swagger:model AddQANMySQLSlowlogAgentBody */ type AddQANMySQLSlowlogAgentBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -273,7 +272,6 @@ AddQANMySQLSlowlogAgentDefaultBody add QAN my SQL slowlog agent default body swagger:model AddQANMySQLSlowlogAgentDefaultBody */ type AddQANMySQLSlowlogAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -339,9 +337,7 @@ func (o *AddQANMySQLSlowlogAgentDefaultBody) ContextValidate(ctx context.Context } func (o *AddQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -352,7 +348,6 @@ func (o *AddQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx context. return err } } - } return nil @@ -381,7 +376,6 @@ AddQANMySQLSlowlogAgentDefaultBodyDetailsItems0 add QAN my SQL slowlog agent def swagger:model AddQANMySQLSlowlogAgentDefaultBodyDetailsItems0 */ type AddQANMySQLSlowlogAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -419,7 +413,6 @@ AddQANMySQLSlowlogAgentOKBody add QAN my SQL slowlog agent OK body swagger:model AddQANMySQLSlowlogAgentOKBody */ type AddQANMySQLSlowlogAgentOKBody struct { - // qan mysql slowlog agent QANMysqlSlowlogAgent *AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent `json:"qan_mysql_slowlog_agent,omitempty"` } @@ -472,7 +465,6 @@ func (o *AddQANMySQLSlowlogAgentOKBody) ContextValidate(ctx context.Context, for } func (o *AddQANMySQLSlowlogAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if err := o.QANMysqlSlowlogAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -510,7 +502,6 @@ AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs with swagger:model AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent */ type AddQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go index 7f12076bb4..be2ca5ab96 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_parameters.go @@ -60,7 +60,6 @@ AddQANPostgreSQLPgStatMonitorAgentParams contains all the parameters to send to Typically these are written to a http.Request. */ type AddQANPostgreSQLPgStatMonitorAgentParams struct { - // Body. Body AddQANPostgreSQLPgStatMonitorAgentBody @@ -130,7 +129,6 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentParams) SetBody(body AddQANPostgreSQL // WriteToRequest writes these params to a swagger request func (o *AddQANPostgreSQLPgStatMonitorAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go index be54da78f6..8ccbf4e307 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_stat_monitor_agent_responses.go @@ -62,12 +62,12 @@ type AddQANPostgreSQLPgStatMonitorAgentOK struct { func (o *AddQANPostgreSQLPgStatMonitorAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatMonitorAgent][%d] addQanPostgreSqlPgStatMonitorAgentOk %+v", 200, o.Payload) } + func (o *AddQANPostgreSQLPgStatMonitorAgentOK) GetPayload() *AddQANPostgreSQLPgStatMonitorAgentOKBody { return o.Payload } func (o *AddQANPostgreSQLPgStatMonitorAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANPostgreSQLPgStatMonitorAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) Code() int { func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatMonitorAgent][%d] AddQANPostgreSQLPgStatMonitorAgent default %+v", o._statusCode, o.Payload) } + func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) GetPayload() *AddQANPostgreSQLPgStatMonitorAgentDefaultBody { return o.Payload } func (o *AddQANPostgreSQLPgStatMonitorAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANPostgreSQLPgStatMonitorAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ AddQANPostgreSQLPgStatMonitorAgentBody add QAN postgre SQL pg stat monitor agent swagger:model AddQANPostgreSQLPgStatMonitorAgentBody */ type AddQANPostgreSQLPgStatMonitorAgentBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -269,7 +268,6 @@ AddQANPostgreSQLPgStatMonitorAgentDefaultBody add QAN postgre SQL pg stat monito swagger:model AddQANPostgreSQLPgStatMonitorAgentDefaultBody */ type AddQANPostgreSQLPgStatMonitorAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -335,9 +333,7 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentDefaultBody) ContextValidate(ctx cont } func (o *AddQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,7 +344,6 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetails(c return err } } - } return nil @@ -377,7 +372,6 @@ AddQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 add QAN postgre SQL p swagger:model AddQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 */ type AddQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -415,7 +409,6 @@ AddQANPostgreSQLPgStatMonitorAgentOKBody add QAN postgre SQL pg stat monitor age swagger:model AddQANPostgreSQLPgStatMonitorAgentOKBody */ type AddQANPostgreSQLPgStatMonitorAgentOKBody struct { - // qan postgresql pgstatmonitor agent QANPostgresqlPgstatmonitorAgent *AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` } @@ -468,7 +461,6 @@ func (o *AddQANPostgreSQLPgStatMonitorAgentOKBody) ContextValidate(ctx context.C } func (o *AddQANPostgreSQLPgStatMonitorAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -506,7 +498,6 @@ AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostg swagger:model AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type AddQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go index b9cecfa0a9..6ed493954b 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_parameters.go @@ -60,7 +60,6 @@ AddQANPostgreSQLPgStatementsAgentParams contains all the parameters to send to t Typically these are written to a http.Request. */ type AddQANPostgreSQLPgStatementsAgentParams struct { - // Body. Body AddQANPostgreSQLPgStatementsAgentBody @@ -130,7 +129,6 @@ func (o *AddQANPostgreSQLPgStatementsAgentParams) SetBody(body AddQANPostgreSQLP // WriteToRequest writes these params to a swagger request func (o *AddQANPostgreSQLPgStatementsAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go index a9cde9e41c..6de82d98fe 100644 --- a/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go +++ b/api/inventorypb/json/client/agents/add_qan_postgre_sql_pg_statements_agent_responses.go @@ -62,12 +62,12 @@ type AddQANPostgreSQLPgStatementsAgentOK struct { func (o *AddQANPostgreSQLPgStatementsAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatementsAgent][%d] addQanPostgreSqlPgStatementsAgentOk %+v", 200, o.Payload) } + func (o *AddQANPostgreSQLPgStatementsAgentOK) GetPayload() *AddQANPostgreSQLPgStatementsAgentOKBody { return o.Payload } func (o *AddQANPostgreSQLPgStatementsAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANPostgreSQLPgStatementsAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddQANPostgreSQLPgStatementsAgentDefault) Code() int { func (o *AddQANPostgreSQLPgStatementsAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddQANPostgreSQLPgStatementsAgent][%d] AddQANPostgreSQLPgStatementsAgent default %+v", o._statusCode, o.Payload) } + func (o *AddQANPostgreSQLPgStatementsAgentDefault) GetPayload() *AddQANPostgreSQLPgStatementsAgentDefaultBody { return o.Payload } func (o *AddQANPostgreSQLPgStatementsAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddQANPostgreSQLPgStatementsAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ AddQANPostgreSQLPgStatementsAgentBody add QAN postgre SQL pg statements agent bo swagger:model AddQANPostgreSQLPgStatementsAgentBody */ type AddQANPostgreSQLPgStatementsAgentBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -266,7 +265,6 @@ AddQANPostgreSQLPgStatementsAgentDefaultBody add QAN postgre SQL pg statements a swagger:model AddQANPostgreSQLPgStatementsAgentDefaultBody */ type AddQANPostgreSQLPgStatementsAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -332,9 +330,7 @@ func (o *AddQANPostgreSQLPgStatementsAgentDefaultBody) ContextValidate(ctx conte } func (o *AddQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -345,7 +341,6 @@ func (o *AddQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails(ct return err } } - } return nil @@ -374,7 +369,6 @@ AddQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 add QAN postgre SQL pg swagger:model AddQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 */ type AddQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -412,7 +406,6 @@ AddQANPostgreSQLPgStatementsAgentOKBody add QAN postgre SQL pg statements agent swagger:model AddQANPostgreSQLPgStatementsAgentOKBody */ type AddQANPostgreSQLPgStatementsAgentOKBody struct { - // qan postgresql pgstatements agent QANPostgresqlPgstatementsAgent *AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent `json:"qan_postgresql_pgstatements_agent,omitempty"` } @@ -465,7 +458,6 @@ func (o *AddQANPostgreSQLPgStatementsAgentOKBody) ContextValidate(ctx context.Co } func (o *AddQANPostgreSQLPgStatementsAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -503,7 +495,6 @@ AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgre swagger:model AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent */ type AddQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go b/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go index 9958797e27..f8cc041126 100644 --- a/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/add_rds_exporter_parameters.go @@ -60,7 +60,6 @@ AddRDSExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRDSExporterParams struct { - // Body. Body AddRDSExporterBody @@ -130,7 +129,6 @@ func (o *AddRDSExporterParams) SetBody(body AddRDSExporterBody) { // WriteToRequest writes these params to a swagger request func (o *AddRDSExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/add_rds_exporter_responses.go b/api/inventorypb/json/client/agents/add_rds_exporter_responses.go index 4bb6e96c9c..634ed78bb8 100644 --- a/api/inventorypb/json/client/agents/add_rds_exporter_responses.go +++ b/api/inventorypb/json/client/agents/add_rds_exporter_responses.go @@ -62,12 +62,12 @@ type AddRDSExporterOK struct { func (o *AddRDSExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddRDSExporter][%d] addRdsExporterOk %+v", 200, o.Payload) } + func (o *AddRDSExporterOK) GetPayload() *AddRDSExporterOKBody { return o.Payload } func (o *AddRDSExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRDSExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddRDSExporterDefault) Code() int { func (o *AddRDSExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/AddRDSExporter][%d] AddRDSExporter default %+v", o._statusCode, o.Payload) } + func (o *AddRDSExporterDefault) GetPayload() *AddRDSExporterDefaultBody { return o.Payload } func (o *AddRDSExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRDSExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ AddRDSExporterBody add RDS exporter body swagger:model AddRDSExporterBody */ type AddRDSExporterBody struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -254,7 +253,6 @@ AddRDSExporterDefaultBody add RDS exporter default body swagger:model AddRDSExporterDefaultBody */ type AddRDSExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -320,9 +318,7 @@ func (o *AddRDSExporterDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddRDSExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -333,7 +329,6 @@ func (o *AddRDSExporterDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -362,7 +357,6 @@ AddRDSExporterDefaultBodyDetailsItems0 add RDS exporter default body details ite swagger:model AddRDSExporterDefaultBodyDetailsItems0 */ type AddRDSExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -400,7 +394,6 @@ AddRDSExporterOKBody add RDS exporter OK body swagger:model AddRDSExporterOKBody */ type AddRDSExporterOKBody struct { - // rds exporter RDSExporter *AddRDSExporterOKBodyRDSExporter `json:"rds_exporter,omitempty"` } @@ -453,7 +446,6 @@ func (o *AddRDSExporterOKBody) ContextValidate(ctx context.Context, formats strf } func (o *AddRDSExporterOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -491,7 +483,6 @@ AddRDSExporterOKBodyRDSExporter RDSExporter runs on Generic or Container Node an swagger:model AddRDSExporterOKBodyRDSExporter */ type AddRDSExporterOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go b/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go index b9707c910b..49727b75e6 100644 --- a/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_azure_database_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeAzureDatabaseExporterParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ChangeAzureDatabaseExporterParams struct { - // Body. Body ChangeAzureDatabaseExporterBody @@ -130,7 +129,6 @@ func (o *ChangeAzureDatabaseExporterParams) SetBody(body ChangeAzureDatabaseExpo // WriteToRequest writes these params to a swagger request func (o *ChangeAzureDatabaseExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go b/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go index 9c16bca6d5..130d919287 100644 --- a/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_azure_database_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeAzureDatabaseExporterOK struct { func (o *ChangeAzureDatabaseExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeAzureDatabaseExporter][%d] changeAzureDatabaseExporterOk %+v", 200, o.Payload) } + func (o *ChangeAzureDatabaseExporterOK) GetPayload() *ChangeAzureDatabaseExporterOKBody { return o.Payload } func (o *ChangeAzureDatabaseExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeAzureDatabaseExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeAzureDatabaseExporterDefault) Code() int { func (o *ChangeAzureDatabaseExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeAzureDatabaseExporter][%d] ChangeAzureDatabaseExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeAzureDatabaseExporterDefault) GetPayload() *ChangeAzureDatabaseExporterDefaultBody { return o.Payload } func (o *ChangeAzureDatabaseExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeAzureDatabaseExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeAzureDatabaseExporterBody change azure database exporter body swagger:model ChangeAzureDatabaseExporterBody */ type ChangeAzureDatabaseExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeAzureDatabaseExporterBody) ContextValidate(ctx context.Context, f } func (o *ChangeAzureDatabaseExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeAzureDatabaseExporterDefaultBody change azure database exporter default bo swagger:model ChangeAzureDatabaseExporterDefaultBody */ type ChangeAzureDatabaseExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeAzureDatabaseExporterDefaultBody) ContextValidate(ctx context.Con } func (o *ChangeAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeAzureDatabaseExporterDefaultBody) contextValidateDetails(ctx cont return err } } - } return nil @@ -327,7 +321,6 @@ ChangeAzureDatabaseExporterDefaultBodyDetailsItems0 change azure database export swagger:model ChangeAzureDatabaseExporterDefaultBodyDetailsItems0 */ type ChangeAzureDatabaseExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeAzureDatabaseExporterOKBody change azure database exporter OK body swagger:model ChangeAzureDatabaseExporterOKBody */ type ChangeAzureDatabaseExporterOKBody struct { - // azure database exporter AzureDatabaseExporter *ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeAzureDatabaseExporterOKBody) ContextValidate(ctx context.Context, } func (o *ChangeAzureDatabaseExporterOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if err := o.AzureDatabaseExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter AzureDatabaseExporter run swagger:model ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter */ type ChangeAzureDatabaseExporterOKBodyAzureDatabaseExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -662,7 +652,6 @@ ChangeAzureDatabaseExporterParamsBodyCommon ChangeCommonAgentParams contains par swagger:model ChangeAzureDatabaseExporterParamsBodyCommon */ type ChangeAzureDatabaseExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_external_exporter_parameters.go b/api/inventorypb/json/client/agents/change_external_exporter_parameters.go index 706c60c9fe..96ed75e52e 100644 --- a/api/inventorypb/json/client/agents/change_external_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_external_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeExternalExporterParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ChangeExternalExporterParams struct { - // Body. Body ChangeExternalExporterBody @@ -130,7 +129,6 @@ func (o *ChangeExternalExporterParams) SetBody(body ChangeExternalExporterBody) // WriteToRequest writes these params to a swagger request func (o *ChangeExternalExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_external_exporter_responses.go b/api/inventorypb/json/client/agents/change_external_exporter_responses.go index 9066e45afa..15dc5e5a58 100644 --- a/api/inventorypb/json/client/agents/change_external_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_external_exporter_responses.go @@ -60,12 +60,12 @@ type ChangeExternalExporterOK struct { func (o *ChangeExternalExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeExternalExporter][%d] changeExternalExporterOk %+v", 200, o.Payload) } + func (o *ChangeExternalExporterOK) GetPayload() *ChangeExternalExporterOKBody { return o.Payload } func (o *ChangeExternalExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeExternalExporterOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ChangeExternalExporterDefault) Code() int { func (o *ChangeExternalExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeExternalExporter][%d] ChangeExternalExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeExternalExporterDefault) GetPayload() *ChangeExternalExporterDefaultBody { return o.Payload } func (o *ChangeExternalExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeExternalExporterDefaultBody) // response payload @@ -123,7 +123,6 @@ ChangeExternalExporterBody change external exporter body swagger:model ChangeExternalExporterBody */ type ChangeExternalExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -179,7 +178,6 @@ func (o *ChangeExternalExporterBody) ContextValidate(ctx context.Context, format } func (o *ChangeExternalExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -217,7 +215,6 @@ ChangeExternalExporterDefaultBody change external exporter default body swagger:model ChangeExternalExporterDefaultBody */ type ChangeExternalExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -283,9 +280,7 @@ func (o *ChangeExternalExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeExternalExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -296,7 +291,6 @@ func (o *ChangeExternalExporterDefaultBody) contextValidateDetails(ctx context.C return err } } - } return nil @@ -325,7 +319,6 @@ ChangeExternalExporterDefaultBodyDetailsItems0 change external exporter default swagger:model ChangeExternalExporterDefaultBodyDetailsItems0 */ type ChangeExternalExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -363,7 +356,6 @@ ChangeExternalExporterOKBody change external exporter OK body swagger:model ChangeExternalExporterOKBody */ type ChangeExternalExporterOKBody struct { - // external exporter ExternalExporter *ChangeExternalExporterOKBodyExternalExporter `json:"external_exporter,omitempty"` } @@ -416,7 +408,6 @@ func (o *ChangeExternalExporterOKBody) ContextValidate(ctx context.Context, form } func (o *ChangeExternalExporterOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -454,7 +445,6 @@ ChangeExternalExporterOKBodyExternalExporter ExternalExporter runs on any Node t swagger:model ChangeExternalExporterOKBodyExternalExporter */ type ChangeExternalExporterOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -522,7 +512,6 @@ ChangeExternalExporterParamsBodyCommon ChangeCommonAgentParams contains paramete swagger:model ChangeExternalExporterParamsBodyCommon */ type ChangeExternalExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go b/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go index c590bfc347..dfa26df26f 100644 --- a/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_mongo_db_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeMongoDBExporterParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeMongoDBExporterParams struct { - // Body. Body ChangeMongoDBExporterBody @@ -130,7 +129,6 @@ func (o *ChangeMongoDBExporterParams) SetBody(body ChangeMongoDBExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeMongoDBExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go b/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go index 44e95fe261..5f037ba801 100644 --- a/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_mongo_db_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeMongoDBExporterOK struct { func (o *ChangeMongoDBExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMongoDBExporter][%d] changeMongoDbExporterOk %+v", 200, o.Payload) } + func (o *ChangeMongoDBExporterOK) GetPayload() *ChangeMongoDBExporterOKBody { return o.Payload } func (o *ChangeMongoDBExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeMongoDBExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeMongoDBExporterDefault) Code() int { func (o *ChangeMongoDBExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMongoDBExporter][%d] ChangeMongoDBExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeMongoDBExporterDefault) GetPayload() *ChangeMongoDBExporterDefaultBody { return o.Payload } func (o *ChangeMongoDBExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeMongoDBExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeMongoDBExporterBody change mongo DB exporter body swagger:model ChangeMongoDBExporterBody */ type ChangeMongoDBExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeMongoDBExporterBody) ContextValidate(ctx context.Context, formats } func (o *ChangeMongoDBExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeMongoDBExporterDefaultBody change mongo DB exporter default body swagger:model ChangeMongoDBExporterDefaultBody */ type ChangeMongoDBExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeMongoDBExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeMongoDBExporterDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -327,7 +321,6 @@ ChangeMongoDBExporterDefaultBodyDetailsItems0 change mongo DB exporter default b swagger:model ChangeMongoDBExporterDefaultBodyDetailsItems0 */ type ChangeMongoDBExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeMongoDBExporterOKBody change mongo DB exporter OK body swagger:model ChangeMongoDBExporterOKBody */ type ChangeMongoDBExporterOKBody struct { - // mongodb exporter MongodbExporter *ChangeMongoDBExporterOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeMongoDBExporterOKBody) ContextValidate(ctx context.Context, forma } func (o *ChangeMongoDBExporterOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeMongoDBExporterOKBodyMongodbExporter MongoDBExporter runs on Generic or Co swagger:model ChangeMongoDBExporterOKBodyMongodbExporter */ type ChangeMongoDBExporterOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -678,7 +668,6 @@ ChangeMongoDBExporterParamsBodyCommon ChangeCommonAgentParams contains parameter swagger:model ChangeMongoDBExporterParamsBodyCommon */ type ChangeMongoDBExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go index 72bc19103d..c1662cbe59 100644 --- a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeMySQLdExporterParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type ChangeMySQLdExporterParams struct { - // Body. Body ChangeMySQLdExporterBody @@ -130,7 +129,6 @@ func (o *ChangeMySQLdExporterParams) SetBody(body ChangeMySQLdExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeMySQLdExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go index ed6b5a2cc0..5d6bf93ba3 100644 --- a/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_my_s_q_ld_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeMySQLdExporterOK struct { func (o *ChangeMySQLdExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMySQLdExporter][%d] changeMySQLdExporterOk %+v", 200, o.Payload) } + func (o *ChangeMySQLdExporterOK) GetPayload() *ChangeMySQLdExporterOKBody { return o.Payload } func (o *ChangeMySQLdExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeMySQLdExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeMySQLdExporterDefault) Code() int { func (o *ChangeMySQLdExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeMySQLdExporter][%d] ChangeMySQLdExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeMySQLdExporterDefault) GetPayload() *ChangeMySQLdExporterDefaultBody { return o.Payload } func (o *ChangeMySQLdExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeMySQLdExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeMySQLdExporterBody change my s q ld exporter body swagger:model ChangeMySQLdExporterBody */ type ChangeMySQLdExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeMySQLdExporterBody) ContextValidate(ctx context.Context, formats } func (o *ChangeMySQLdExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeMySQLdExporterDefaultBody change my s q ld exporter default body swagger:model ChangeMySQLdExporterDefaultBody */ type ChangeMySQLdExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeMySQLdExporterDefaultBody) ContextValidate(ctx context.Context, f } func (o *ChangeMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeMySQLdExporterDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -327,7 +321,6 @@ ChangeMySQLdExporterDefaultBodyDetailsItems0 change my s q ld exporter default b swagger:model ChangeMySQLdExporterDefaultBodyDetailsItems0 */ type ChangeMySQLdExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeMySQLdExporterOKBody change my s q ld exporter OK body swagger:model ChangeMySQLdExporterOKBody */ type ChangeMySQLdExporterOKBody struct { - // mysqld exporter MysqldExporter *ChangeMySQLdExporterOKBodyMysqldExporter `json:"mysqld_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeMySQLdExporterOKBody) ContextValidate(ctx context.Context, format } func (o *ChangeMySQLdExporterOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeMySQLdExporterOKBodyMysqldExporter MySQLdExporter runs on Generic or Conta swagger:model ChangeMySQLdExporterOKBodyMysqldExporter */ type ChangeMySQLdExporterOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -685,7 +675,6 @@ ChangeMySQLdExporterParamsBodyCommon ChangeCommonAgentParams contains parameters swagger:model ChangeMySQLdExporterParamsBodyCommon */ type ChangeMySQLdExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_node_exporter_parameters.go b/api/inventorypb/json/client/agents/change_node_exporter_parameters.go index d252cfc072..0006c8d16f 100644 --- a/api/inventorypb/json/client/agents/change_node_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_node_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeNodeExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeNodeExporterParams struct { - // Body. Body ChangeNodeExporterBody @@ -130,7 +129,6 @@ func (o *ChangeNodeExporterParams) SetBody(body ChangeNodeExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeNodeExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_node_exporter_responses.go b/api/inventorypb/json/client/agents/change_node_exporter_responses.go index 4dd0da23a4..9f98c7279a 100644 --- a/api/inventorypb/json/client/agents/change_node_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_node_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeNodeExporterOK struct { func (o *ChangeNodeExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeNodeExporter][%d] changeNodeExporterOk %+v", 200, o.Payload) } + func (o *ChangeNodeExporterOK) GetPayload() *ChangeNodeExporterOKBody { return o.Payload } func (o *ChangeNodeExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeNodeExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeNodeExporterDefault) Code() int { func (o *ChangeNodeExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeNodeExporter][%d] ChangeNodeExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeNodeExporterDefault) GetPayload() *ChangeNodeExporterDefaultBody { return o.Payload } func (o *ChangeNodeExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeNodeExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeNodeExporterBody change node exporter body swagger:model ChangeNodeExporterBody */ type ChangeNodeExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeNodeExporterBody) ContextValidate(ctx context.Context, formats st } func (o *ChangeNodeExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeNodeExporterDefaultBody change node exporter default body swagger:model ChangeNodeExporterDefaultBody */ type ChangeNodeExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeNodeExporterDefaultBody) ContextValidate(ctx context.Context, for } func (o *ChangeNodeExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeNodeExporterDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -327,7 +321,6 @@ ChangeNodeExporterDefaultBodyDetailsItems0 change node exporter default body det swagger:model ChangeNodeExporterDefaultBodyDetailsItems0 */ type ChangeNodeExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeNodeExporterOKBody change node exporter OK body swagger:model ChangeNodeExporterOKBody */ type ChangeNodeExporterOKBody struct { - // node exporter NodeExporter *ChangeNodeExporterOKBodyNodeExporter `json:"node_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeNodeExporterOKBody) ContextValidate(ctx context.Context, formats } func (o *ChangeNodeExporterOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if err := o.NodeExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeNodeExporterOKBodyNodeExporter NodeExporter runs on Generic or Container N swagger:model ChangeNodeExporterOKBodyNodeExporter */ type ChangeNodeExporterOKBodyNodeExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -656,7 +646,6 @@ ChangeNodeExporterParamsBodyCommon ChangeCommonAgentParams contains parameters t swagger:model ChangeNodeExporterParamsBodyCommon */ type ChangeNodeExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go b/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go index 6ea9423b53..b6a0e657ec 100644 --- a/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_postgres_exporter_parameters.go @@ -60,7 +60,6 @@ ChangePostgresExporterParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ChangePostgresExporterParams struct { - // Body. Body ChangePostgresExporterBody @@ -130,7 +129,6 @@ func (o *ChangePostgresExporterParams) SetBody(body ChangePostgresExporterBody) // WriteToRequest writes these params to a swagger request func (o *ChangePostgresExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go b/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go index 259d9b369b..f0bcb24ab9 100644 --- a/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_postgres_exporter_responses.go @@ -62,12 +62,12 @@ type ChangePostgresExporterOK struct { func (o *ChangePostgresExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangePostgresExporter][%d] changePostgresExporterOk %+v", 200, o.Payload) } + func (o *ChangePostgresExporterOK) GetPayload() *ChangePostgresExporterOKBody { return o.Payload } func (o *ChangePostgresExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangePostgresExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangePostgresExporterDefault) Code() int { func (o *ChangePostgresExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangePostgresExporter][%d] ChangePostgresExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangePostgresExporterDefault) GetPayload() *ChangePostgresExporterDefaultBody { return o.Payload } func (o *ChangePostgresExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangePostgresExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangePostgresExporterBody change postgres exporter body swagger:model ChangePostgresExporterBody */ type ChangePostgresExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangePostgresExporterBody) ContextValidate(ctx context.Context, format } func (o *ChangePostgresExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangePostgresExporterDefaultBody change postgres exporter default body swagger:model ChangePostgresExporterDefaultBody */ type ChangePostgresExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangePostgresExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangePostgresExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangePostgresExporterDefaultBody) contextValidateDetails(ctx context.C return err } } - } return nil @@ -327,7 +321,6 @@ ChangePostgresExporterDefaultBodyDetailsItems0 change postgres exporter default swagger:model ChangePostgresExporterDefaultBodyDetailsItems0 */ type ChangePostgresExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangePostgresExporterOKBody change postgres exporter OK body swagger:model ChangePostgresExporterOKBody */ type ChangePostgresExporterOKBody struct { - // postgres exporter PostgresExporter *ChangePostgresExporterOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangePostgresExporterOKBody) ContextValidate(ctx context.Context, form } func (o *ChangePostgresExporterOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangePostgresExporterOKBodyPostgresExporter PostgresExporter runs on Generic or swagger:model ChangePostgresExporterOKBodyPostgresExporter */ type ChangePostgresExporterOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -666,7 +656,6 @@ ChangePostgresExporterParamsBodyCommon ChangeCommonAgentParams contains paramete swagger:model ChangePostgresExporterParamsBodyCommon */ type ChangePostgresExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go index 1e9ecc1470..672412700e 100644 --- a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeProxySQLExporterParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ChangeProxySQLExporterParams struct { - // Body. Body ChangeProxySQLExporterBody @@ -130,7 +129,6 @@ func (o *ChangeProxySQLExporterParams) SetBody(body ChangeProxySQLExporterBody) // WriteToRequest writes these params to a swagger request func (o *ChangeProxySQLExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go index 39cd3d8715..85f951ae49 100644 --- a/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_proxy_sql_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeProxySQLExporterOK struct { func (o *ChangeProxySQLExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeProxySQLExporter][%d] changeProxySqlExporterOk %+v", 200, o.Payload) } + func (o *ChangeProxySQLExporterOK) GetPayload() *ChangeProxySQLExporterOKBody { return o.Payload } func (o *ChangeProxySQLExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeProxySQLExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeProxySQLExporterDefault) Code() int { func (o *ChangeProxySQLExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeProxySQLExporter][%d] ChangeProxySQLExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeProxySQLExporterDefault) GetPayload() *ChangeProxySQLExporterDefaultBody { return o.Payload } func (o *ChangeProxySQLExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeProxySQLExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeProxySQLExporterBody change proxy SQL exporter body swagger:model ChangeProxySQLExporterBody */ type ChangeProxySQLExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeProxySQLExporterBody) ContextValidate(ctx context.Context, format } func (o *ChangeProxySQLExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeProxySQLExporterDefaultBody change proxy SQL exporter default body swagger:model ChangeProxySQLExporterDefaultBody */ type ChangeProxySQLExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeProxySQLExporterDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeProxySQLExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeProxySQLExporterDefaultBody) contextValidateDetails(ctx context.C return err } } - } return nil @@ -327,7 +321,6 @@ ChangeProxySQLExporterDefaultBodyDetailsItems0 change proxy SQL exporter default swagger:model ChangeProxySQLExporterDefaultBodyDetailsItems0 */ type ChangeProxySQLExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeProxySQLExporterOKBody change proxy SQL exporter OK body swagger:model ChangeProxySQLExporterOKBody */ type ChangeProxySQLExporterOKBody struct { - // proxysql exporter ProxysqlExporter *ChangeProxySQLExporterOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeProxySQLExporterOKBody) ContextValidate(ctx context.Context, form } func (o *ChangeProxySQLExporterOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeProxySQLExporterOKBodyProxysqlExporter ProxySQLExporter runs on Generic or swagger:model ChangeProxySQLExporterOKBodyProxysqlExporter */ type ChangeProxySQLExporterOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -668,7 +658,6 @@ ChangeProxySQLExporterParamsBodyCommon ChangeCommonAgentParams contains paramete swagger:model ChangeProxySQLExporterParamsBodyCommon */ type ChangeProxySQLExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go index c318d3dd2b..474f009ca3 100644 --- a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_parameters.go @@ -60,7 +60,6 @@ ChangeQANMongoDBProfilerAgentParams contains all the parameters to send to the A Typically these are written to a http.Request. */ type ChangeQANMongoDBProfilerAgentParams struct { - // Body. Body ChangeQANMongoDBProfilerAgentBody @@ -130,7 +129,6 @@ func (o *ChangeQANMongoDBProfilerAgentParams) SetBody(body ChangeQANMongoDBProfi // WriteToRequest writes these params to a swagger request func (o *ChangeQANMongoDBProfilerAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go index e4f0f0c7d6..e047e5873b 100644 --- a/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_mongo_db_profiler_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANMongoDBProfilerAgentOK struct { func (o *ChangeQANMongoDBProfilerAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMongoDBProfilerAgent][%d] changeQanMongoDbProfilerAgentOk %+v", 200, o.Payload) } + func (o *ChangeQANMongoDBProfilerAgentOK) GetPayload() *ChangeQANMongoDBProfilerAgentOKBody { return o.Payload } func (o *ChangeQANMongoDBProfilerAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANMongoDBProfilerAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANMongoDBProfilerAgentDefault) Code() int { func (o *ChangeQANMongoDBProfilerAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMongoDBProfilerAgent][%d] ChangeQANMongoDBProfilerAgent default %+v", o._statusCode, o.Payload) } + func (o *ChangeQANMongoDBProfilerAgentDefault) GetPayload() *ChangeQANMongoDBProfilerAgentDefaultBody { return o.Payload } func (o *ChangeQANMongoDBProfilerAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANMongoDBProfilerAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeQANMongoDBProfilerAgentBody change QAN mongo DB profiler agent body swagger:model ChangeQANMongoDBProfilerAgentBody */ type ChangeQANMongoDBProfilerAgentBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeQANMongoDBProfilerAgentBody) ContextValidate(ctx context.Context, } func (o *ChangeQANMongoDBProfilerAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeQANMongoDBProfilerAgentDefaultBody change QAN mongo DB profiler agent defa swagger:model ChangeQANMongoDBProfilerAgentDefaultBody */ type ChangeQANMongoDBProfilerAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeQANMongoDBProfilerAgentDefaultBody) ContextValidate(ctx context.C } func (o *ChangeQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeQANMongoDBProfilerAgentDefaultBody) contextValidateDetails(ctx co return err } } - } return nil @@ -327,7 +321,6 @@ ChangeQANMongoDBProfilerAgentDefaultBodyDetailsItems0 change QAN mongo DB profil swagger:model ChangeQANMongoDBProfilerAgentDefaultBodyDetailsItems0 */ type ChangeQANMongoDBProfilerAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeQANMongoDBProfilerAgentOKBody change QAN mongo DB profiler agent OK body swagger:model ChangeQANMongoDBProfilerAgentOKBody */ type ChangeQANMongoDBProfilerAgentOKBody struct { - // qan mongodb profiler agent QANMongodbProfilerAgent *ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent `json:"qan_mongodb_profiler_agent,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeQANMongoDBProfilerAgentOKBody) ContextValidate(ctx context.Contex } func (o *ChangeQANMongoDBProfilerAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if err := o.QANMongodbProfilerAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAge swagger:model ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent */ type ChangeQANMongoDBProfilerAgentOKBodyQANMongodbProfilerAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -665,7 +655,6 @@ ChangeQANMongoDBProfilerAgentParamsBodyCommon ChangeCommonAgentParams contains p swagger:model ChangeQANMongoDBProfilerAgentParamsBodyCommon */ type ChangeQANMongoDBProfilerAgentParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go index d00ede7b82..c5c7f64dc9 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_parameters.go @@ -60,7 +60,6 @@ ChangeQANMySQLPerfSchemaAgentParams contains all the parameters to send to the A Typically these are written to a http.Request. */ type ChangeQANMySQLPerfSchemaAgentParams struct { - // Body. Body ChangeQANMySQLPerfSchemaAgentBody @@ -130,7 +129,6 @@ func (o *ChangeQANMySQLPerfSchemaAgentParams) SetBody(body ChangeQANMySQLPerfSch // WriteToRequest writes these params to a swagger request func (o *ChangeQANMySQLPerfSchemaAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go index 560c55487a..f4d4b364d0 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_perf_schema_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANMySQLPerfSchemaAgentOK struct { func (o *ChangeQANMySQLPerfSchemaAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLPerfSchemaAgent][%d] changeQanMySqlPerfSchemaAgentOk %+v", 200, o.Payload) } + func (o *ChangeQANMySQLPerfSchemaAgentOK) GetPayload() *ChangeQANMySQLPerfSchemaAgentOKBody { return o.Payload } func (o *ChangeQANMySQLPerfSchemaAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANMySQLPerfSchemaAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANMySQLPerfSchemaAgentDefault) Code() int { func (o *ChangeQANMySQLPerfSchemaAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLPerfSchemaAgent][%d] ChangeQANMySQLPerfSchemaAgent default %+v", o._statusCode, o.Payload) } + func (o *ChangeQANMySQLPerfSchemaAgentDefault) GetPayload() *ChangeQANMySQLPerfSchemaAgentDefaultBody { return o.Payload } func (o *ChangeQANMySQLPerfSchemaAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANMySQLPerfSchemaAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeQANMySQLPerfSchemaAgentBody change QAN my SQL perf schema agent body swagger:model ChangeQANMySQLPerfSchemaAgentBody */ type ChangeQANMySQLPerfSchemaAgentBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeQANMySQLPerfSchemaAgentBody) ContextValidate(ctx context.Context, } func (o *ChangeQANMySQLPerfSchemaAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeQANMySQLPerfSchemaAgentDefaultBody change QAN my SQL perf schema agent def swagger:model ChangeQANMySQLPerfSchemaAgentDefaultBody */ type ChangeQANMySQLPerfSchemaAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeQANMySQLPerfSchemaAgentDefaultBody) ContextValidate(ctx context.C } func (o *ChangeQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeQANMySQLPerfSchemaAgentDefaultBody) contextValidateDetails(ctx co return err } } - } return nil @@ -327,7 +321,6 @@ ChangeQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 change QAN my SQL perf sch swagger:model ChangeQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 */ type ChangeQANMySQLPerfSchemaAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeQANMySQLPerfSchemaAgentOKBody change QAN my SQL perf schema agent OK body swagger:model ChangeQANMySQLPerfSchemaAgentOKBody */ type ChangeQANMySQLPerfSchemaAgentOKBody struct { - // qan mysql perfschema agent QANMysqlPerfschemaAgent *ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent `json:"qan_mysql_perfschema_agent,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeQANMySQLPerfSchemaAgentOKBody) ContextValidate(ctx context.Contex } func (o *ChangeQANMySQLPerfSchemaAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if err := o.QANMysqlPerfschemaAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAge swagger:model ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent */ type ChangeQANMySQLPerfSchemaAgentOKBodyQANMysqlPerfschemaAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -677,7 +667,6 @@ ChangeQANMySQLPerfSchemaAgentParamsBodyCommon ChangeCommonAgentParams contains p swagger:model ChangeQANMySQLPerfSchemaAgentParamsBodyCommon */ type ChangeQANMySQLPerfSchemaAgentParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go index 2fde2c4d15..dbbe017f33 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_parameters.go @@ -60,7 +60,6 @@ ChangeQANMySQLSlowlogAgentParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ChangeQANMySQLSlowlogAgentParams struct { - // Body. Body ChangeQANMySQLSlowlogAgentBody @@ -130,7 +129,6 @@ func (o *ChangeQANMySQLSlowlogAgentParams) SetBody(body ChangeQANMySQLSlowlogAge // WriteToRequest writes these params to a swagger request func (o *ChangeQANMySQLSlowlogAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go index cdf034e3d1..8f33720634 100644 --- a/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_my_sql_slowlog_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANMySQLSlowlogAgentOK struct { func (o *ChangeQANMySQLSlowlogAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLSlowlogAgent][%d] changeQanMySqlSlowlogAgentOk %+v", 200, o.Payload) } + func (o *ChangeQANMySQLSlowlogAgentOK) GetPayload() *ChangeQANMySQLSlowlogAgentOKBody { return o.Payload } func (o *ChangeQANMySQLSlowlogAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANMySQLSlowlogAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANMySQLSlowlogAgentDefault) Code() int { func (o *ChangeQANMySQLSlowlogAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANMySQLSlowlogAgent][%d] ChangeQANMySQLSlowlogAgent default %+v", o._statusCode, o.Payload) } + func (o *ChangeQANMySQLSlowlogAgentDefault) GetPayload() *ChangeQANMySQLSlowlogAgentDefaultBody { return o.Payload } func (o *ChangeQANMySQLSlowlogAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANMySQLSlowlogAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeQANMySQLSlowlogAgentBody change QAN my SQL slowlog agent body swagger:model ChangeQANMySQLSlowlogAgentBody */ type ChangeQANMySQLSlowlogAgentBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeQANMySQLSlowlogAgentBody) ContextValidate(ctx context.Context, fo } func (o *ChangeQANMySQLSlowlogAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeQANMySQLSlowlogAgentDefaultBody change QAN my SQL slowlog agent default bo swagger:model ChangeQANMySQLSlowlogAgentDefaultBody */ type ChangeQANMySQLSlowlogAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeQANMySQLSlowlogAgentDefaultBody) ContextValidate(ctx context.Cont } func (o *ChangeQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeQANMySQLSlowlogAgentDefaultBody) contextValidateDetails(ctx conte return err } } - } return nil @@ -327,7 +321,6 @@ ChangeQANMySQLSlowlogAgentDefaultBodyDetailsItems0 change QAN my SQL slowlog age swagger:model ChangeQANMySQLSlowlogAgentDefaultBodyDetailsItems0 */ type ChangeQANMySQLSlowlogAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeQANMySQLSlowlogAgentOKBody change QAN my SQL slowlog agent OK body swagger:model ChangeQANMySQLSlowlogAgentOKBody */ type ChangeQANMySQLSlowlogAgentOKBody struct { - // qan mysql slowlog agent QANMysqlSlowlogAgent *ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent `json:"qan_mysql_slowlog_agent,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeQANMySQLSlowlogAgentOKBody) ContextValidate(ctx context.Context, } func (o *ChangeQANMySQLSlowlogAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if err := o.QANMysqlSlowlogAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs w swagger:model ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent */ type ChangeQANMySQLSlowlogAgentOKBodyQANMysqlSlowlogAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -680,7 +670,6 @@ ChangeQANMySQLSlowlogAgentParamsBodyCommon ChangeCommonAgentParams contains para swagger:model ChangeQANMySQLSlowlogAgentParamsBodyCommon */ type ChangeQANMySQLSlowlogAgentParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go index ec06fe6545..b68464b06e 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_parameters.go @@ -60,7 +60,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentParams contains all the parameters to send Typically these are written to a http.Request. */ type ChangeQANPostgreSQLPgStatMonitorAgentParams struct { - // Body. Body ChangeQANPostgreSQLPgStatMonitorAgentBody @@ -130,7 +129,6 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentParams) SetBody(body ChangeQANPost // WriteToRequest writes these params to a swagger request func (o *ChangeQANPostgreSQLPgStatMonitorAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go index 0a2d58a033..5c9f510ed7 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_stat_monitor_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANPostgreSQLPgStatMonitorAgentOK struct { func (o *ChangeQANPostgreSQLPgStatMonitorAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatMonitorAgent][%d] changeQanPostgreSqlPgStatMonitorAgentOk %+v", 200, o.Payload) } + func (o *ChangeQANPostgreSQLPgStatMonitorAgentOK) GetPayload() *ChangeQANPostgreSQLPgStatMonitorAgentOKBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatMonitorAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANPostgreSQLPgStatMonitorAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) Code() int { func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatMonitorAgent][%d] ChangeQANPostgreSQLPgStatMonitorAgent default %+v", o._statusCode, o.Payload) } + func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) GetPayload() *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentBody change QAN postgre SQL pg stat monitor swagger:model ChangeQANPostgreSQLPgStatMonitorAgentBody */ type ChangeQANPostgreSQLPgStatMonitorAgentBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentBody) ContextValidate(ctx context. } func (o *ChangeQANPostgreSQLPgStatMonitorAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody change QAN postgre SQL pg stat swagger:model ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody */ type ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) ContextValidate(ctx c } func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentDefaultBody) contextValidateDetail return err } } - } return nil @@ -327,7 +321,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 change QAN postgre swagger:model ChangeQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 */ type ChangeQANPostgreSQLPgStatMonitorAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentOKBody change QAN postgre SQL pg stat monit swagger:model ChangeQANPostgreSQLPgStatMonitorAgentOKBody */ type ChangeQANPostgreSQLPgStatMonitorAgentOKBody struct { - // qan postgresql pgstatmonitor agent QANPostgresqlPgstatmonitorAgent *ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeQANPostgreSQLPgStatMonitorAgentOKBody) ContextValidate(ctx contex } func (o *ChangeQANPostgreSQLPgStatMonitorAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPo swagger:model ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type ChangeQANPostgreSQLPgStatMonitorAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -668,7 +658,6 @@ ChangeQANPostgreSQLPgStatMonitorAgentParamsBodyCommon ChangeCommonAgentParams co swagger:model ChangeQANPostgreSQLPgStatMonitorAgentParamsBodyCommon */ type ChangeQANPostgreSQLPgStatMonitorAgentParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go index aadc876620..e298289e91 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_parameters.go @@ -60,7 +60,6 @@ ChangeQANPostgreSQLPgStatementsAgentParams contains all the parameters to send t Typically these are written to a http.Request. */ type ChangeQANPostgreSQLPgStatementsAgentParams struct { - // Body. Body ChangeQANPostgreSQLPgStatementsAgentBody @@ -130,7 +129,6 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentParams) SetBody(body ChangeQANPostg // WriteToRequest writes these params to a swagger request func (o *ChangeQANPostgreSQLPgStatementsAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go index 5d2b8ab229..23398c5633 100644 --- a/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go +++ b/api/inventorypb/json/client/agents/change_qan_postgre_sql_pg_statements_agent_responses.go @@ -62,12 +62,12 @@ type ChangeQANPostgreSQLPgStatementsAgentOK struct { func (o *ChangeQANPostgreSQLPgStatementsAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatementsAgent][%d] changeQanPostgreSqlPgStatementsAgentOk %+v", 200, o.Payload) } + func (o *ChangeQANPostgreSQLPgStatementsAgentOK) GetPayload() *ChangeQANPostgreSQLPgStatementsAgentOKBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatementsAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANPostgreSQLPgStatementsAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) Code() int { func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeQANPostgreSQLPgStatementsAgent][%d] ChangeQANPostgreSQLPgStatementsAgent default %+v", o._statusCode, o.Payload) } + func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) GetPayload() *ChangeQANPostgreSQLPgStatementsAgentDefaultBody { return o.Payload } func (o *ChangeQANPostgreSQLPgStatementsAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeQANPostgreSQLPgStatementsAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeQANPostgreSQLPgStatementsAgentBody change QAN postgre SQL pg statements ag swagger:model ChangeQANPostgreSQLPgStatementsAgentBody */ type ChangeQANPostgreSQLPgStatementsAgentBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentBody) ContextValidate(ctx context.C } func (o *ChangeQANPostgreSQLPgStatementsAgentBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeQANPostgreSQLPgStatementsAgentDefaultBody change QAN postgre SQL pg statem swagger:model ChangeQANPostgreSQLPgStatementsAgentDefaultBody */ type ChangeQANPostgreSQLPgStatementsAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentDefaultBody) ContextValidate(ctx co } func (o *ChangeQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentDefaultBody) contextValidateDetails return err } } - } return nil @@ -327,7 +321,6 @@ ChangeQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 change QAN postgre swagger:model ChangeQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 */ type ChangeQANPostgreSQLPgStatementsAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeQANPostgreSQLPgStatementsAgentOKBody change QAN postgre SQL pg statements swagger:model ChangeQANPostgreSQLPgStatementsAgentOKBody */ type ChangeQANPostgreSQLPgStatementsAgentOKBody struct { - // qan postgresql pgstatements agent QANPostgresqlPgstatementsAgent *ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent `json:"qan_postgresql_pgstatements_agent,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeQANPostgreSQLPgStatementsAgentOKBody) ContextValidate(ctx context } func (o *ChangeQANPostgreSQLPgStatementsAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent QANPost swagger:model ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent */ type ChangeQANPostgreSQLPgStatementsAgentOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -665,7 +655,6 @@ ChangeQANPostgreSQLPgStatementsAgentParamsBodyCommon ChangeCommonAgentParams con swagger:model ChangeQANPostgreSQLPgStatementsAgentParamsBodyCommon */ type ChangeQANPostgreSQLPgStatementsAgentParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go b/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go index f071fa78f7..a4c20a2fae 100644 --- a/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go +++ b/api/inventorypb/json/client/agents/change_rds_exporter_parameters.go @@ -60,7 +60,6 @@ ChangeRDSExporterParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeRDSExporterParams struct { - // Body. Body ChangeRDSExporterBody @@ -130,7 +129,6 @@ func (o *ChangeRDSExporterParams) SetBody(body ChangeRDSExporterBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeRDSExporterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/change_rds_exporter_responses.go b/api/inventorypb/json/client/agents/change_rds_exporter_responses.go index abeb878853..0c9a692092 100644 --- a/api/inventorypb/json/client/agents/change_rds_exporter_responses.go +++ b/api/inventorypb/json/client/agents/change_rds_exporter_responses.go @@ -62,12 +62,12 @@ type ChangeRDSExporterOK struct { func (o *ChangeRDSExporterOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeRDSExporter][%d] changeRdsExporterOk %+v", 200, o.Payload) } + func (o *ChangeRDSExporterOK) GetPayload() *ChangeRDSExporterOKBody { return o.Payload } func (o *ChangeRDSExporterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeRDSExporterOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ChangeRDSExporterDefault) Code() int { func (o *ChangeRDSExporterDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/ChangeRDSExporter][%d] ChangeRDSExporter default %+v", o._statusCode, o.Payload) } + func (o *ChangeRDSExporterDefault) GetPayload() *ChangeRDSExporterDefaultBody { return o.Payload } func (o *ChangeRDSExporterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeRDSExporterDefaultBody) // response payload @@ -125,7 +125,6 @@ ChangeRDSExporterBody change RDS exporter body swagger:model ChangeRDSExporterBody */ type ChangeRDSExporterBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -181,7 +180,6 @@ func (o *ChangeRDSExporterBody) ContextValidate(ctx context.Context, formats str } func (o *ChangeRDSExporterBody) contextValidateCommon(ctx context.Context, formats strfmt.Registry) error { - if o.Common != nil { if err := o.Common.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ChangeRDSExporterDefaultBody change RDS exporter default body swagger:model ChangeRDSExporterDefaultBody */ type ChangeRDSExporterDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ChangeRDSExporterDefaultBody) ContextValidate(ctx context.Context, form } func (o *ChangeRDSExporterDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ChangeRDSExporterDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -327,7 +321,6 @@ ChangeRDSExporterDefaultBodyDetailsItems0 change RDS exporter default body detai swagger:model ChangeRDSExporterDefaultBodyDetailsItems0 */ type ChangeRDSExporterDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ChangeRDSExporterOKBody change RDS exporter OK body swagger:model ChangeRDSExporterOKBody */ type ChangeRDSExporterOKBody struct { - // rds exporter RDSExporter *ChangeRDSExporterOKBodyRDSExporter `json:"rds_exporter,omitempty"` } @@ -418,7 +410,6 @@ func (o *ChangeRDSExporterOKBody) ContextValidate(ctx context.Context, formats s } func (o *ChangeRDSExporterOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -456,7 +447,6 @@ ChangeRDSExporterOKBodyRDSExporter RDSExporter runs on Generic or Container Node swagger:model ChangeRDSExporterOKBodyRDSExporter */ type ChangeRDSExporterOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -667,7 +657,6 @@ ChangeRDSExporterParamsBodyCommon ChangeCommonAgentParams contains parameters th swagger:model ChangeRDSExporterParamsBodyCommon */ type ChangeRDSExporterParamsBodyCommon struct { - // Enable this Agent. Can't be used with disabled. Enable bool `json:"enable,omitempty"` diff --git a/api/inventorypb/json/client/agents/get_agent_logs_parameters.go b/api/inventorypb/json/client/agents/get_agent_logs_parameters.go index fba72db550..78082ad59f 100644 --- a/api/inventorypb/json/client/agents/get_agent_logs_parameters.go +++ b/api/inventorypb/json/client/agents/get_agent_logs_parameters.go @@ -60,7 +60,6 @@ GetAgentLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentLogsParams struct { - // Body. Body GetAgentLogsBody @@ -130,7 +129,6 @@ func (o *GetAgentLogsParams) SetBody(body GetAgentLogsBody) { // WriteToRequest writes these params to a swagger request func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/get_agent_logs_responses.go b/api/inventorypb/json/client/agents/get_agent_logs_responses.go index 06de9b93f9..71c2f38be2 100644 --- a/api/inventorypb/json/client/agents/get_agent_logs_responses.go +++ b/api/inventorypb/json/client/agents/get_agent_logs_responses.go @@ -60,12 +60,12 @@ type GetAgentLogsOK struct { func (o *GetAgentLogsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/GetLogs][%d] getAgentLogsOk %+v", 200, o.Payload) } + func (o *GetAgentLogsOK) GetPayload() *GetAgentLogsOKBody { return o.Payload } func (o *GetAgentLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentLogsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetAgentLogsDefault) Code() int { func (o *GetAgentLogsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/GetLogs][%d] GetAgentLogs default %+v", o._statusCode, o.Payload) } + func (o *GetAgentLogsDefault) GetPayload() *GetAgentLogsDefaultBody { return o.Payload } func (o *GetAgentLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentLogsDefaultBody) // response payload @@ -123,7 +123,6 @@ GetAgentLogsBody get agent logs body swagger:model GetAgentLogsBody */ type GetAgentLogsBody struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -164,7 +163,6 @@ GetAgentLogsDefaultBody get agent logs default body swagger:model GetAgentLogsDefaultBody */ type GetAgentLogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *GetAgentLogsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -272,7 +267,6 @@ GetAgentLogsDefaultBodyDetailsItems0 get agent logs default body details items0 swagger:model GetAgentLogsDefaultBodyDetailsItems0 */ type GetAgentLogsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ GetAgentLogsOKBody get agent logs OK body swagger:model GetAgentLogsOKBody */ type GetAgentLogsOKBody struct { - // logs Logs []string `json:"logs"` diff --git a/api/inventorypb/json/client/agents/get_agent_parameters.go b/api/inventorypb/json/client/agents/get_agent_parameters.go index 96d93864cd..f546eed4ef 100644 --- a/api/inventorypb/json/client/agents/get_agent_parameters.go +++ b/api/inventorypb/json/client/agents/get_agent_parameters.go @@ -60,7 +60,6 @@ GetAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentParams struct { - // Body. Body GetAgentBody @@ -130,7 +129,6 @@ func (o *GetAgentParams) SetBody(body GetAgentBody) { // WriteToRequest writes these params to a swagger request func (o *GetAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/get_agent_responses.go b/api/inventorypb/json/client/agents/get_agent_responses.go index 36ffb6c112..95d06c09e3 100644 --- a/api/inventorypb/json/client/agents/get_agent_responses.go +++ b/api/inventorypb/json/client/agents/get_agent_responses.go @@ -62,12 +62,12 @@ type GetAgentOK struct { func (o *GetAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Get][%d] getAgentOk %+v", 200, o.Payload) } + func (o *GetAgentOK) GetPayload() *GetAgentOKBody { return o.Payload } func (o *GetAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetAgentDefault) Code() int { func (o *GetAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Get][%d] GetAgent default %+v", o._statusCode, o.Payload) } + func (o *GetAgentDefault) GetPayload() *GetAgentDefaultBody { return o.Payload } func (o *GetAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentDefaultBody) // response payload @@ -125,7 +125,6 @@ GetAgentBody get agent body swagger:model GetAgentBody */ type GetAgentBody struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` } @@ -163,7 +162,6 @@ GetAgentDefaultBody get agent default body swagger:model GetAgentDefaultBody */ type GetAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -229,9 +227,7 @@ func (o *GetAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -242,7 +238,6 @@ func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } - } return nil @@ -271,7 +266,6 @@ GetAgentDefaultBodyDetailsItems0 get agent default body details items0 swagger:model GetAgentDefaultBodyDetailsItems0 */ type GetAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -309,7 +303,6 @@ GetAgentOKBody get agent OK body swagger:model GetAgentOKBody */ type GetAgentOKBody struct { - // azure database exporter AzureDatabaseExporter *GetAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -782,7 +775,6 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if err := o.AzureDatabaseExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -798,7 +790,6 @@ func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -814,7 +805,6 @@ func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -830,7 +820,6 @@ func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -846,7 +835,6 @@ func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if err := o.NodeExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -862,7 +850,6 @@ func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if err := o.PMMAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -878,7 +865,6 @@ func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -894,7 +880,6 @@ func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -910,7 +895,6 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if err := o.QANMongodbProfilerAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -926,7 +910,6 @@ func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if err := o.QANMysqlPerfschemaAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -942,7 +925,6 @@ func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if err := o.QANMysqlSlowlogAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -958,7 +940,6 @@ func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -974,7 +955,6 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -990,7 +970,6 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1006,7 +985,6 @@ func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidateVmagent(ctx context.Context, formats strfmt.Registry) error { - if o.Vmagent != nil { if err := o.Vmagent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1044,7 +1022,6 @@ GetAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model GetAgentOKBodyAzureDatabaseExporter */ type GetAgentOKBodyAzureDatabaseExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1250,7 +1227,6 @@ GetAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model GetAgentOKBodyExternalExporter */ type GetAgentOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1318,7 +1294,6 @@ GetAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model GetAgentOKBodyMongodbExporter */ type GetAgentOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1540,7 +1515,6 @@ GetAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyMysqldExporter */ type GetAgentOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1769,7 +1743,6 @@ GetAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model GetAgentOKBodyNodeExporter */ type GetAgentOKBodyNodeExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1969,7 +1942,6 @@ GetAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model GetAgentOKBodyPMMAgent */ type GetAgentOKBodyPMMAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2021,7 +1993,6 @@ GetAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyPostgresExporter */ type GetAgentOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2231,7 +2202,6 @@ GetAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyProxysqlExporter */ type GetAgentOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2443,7 +2413,6 @@ GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbProfilerAgent */ type GetAgentOKBodyQANMongodbProfilerAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2652,7 +2621,6 @@ GetAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMysqlPerfschemaAgent */ type GetAgentOKBodyQANMysqlPerfschemaAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2873,7 +2841,6 @@ GetAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model GetAgentOKBodyQANMysqlSlowlogAgent */ type GetAgentOKBodyQANMysqlSlowlogAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3097,7 +3064,6 @@ GetAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model GetAgentOKBodyQANPostgresqlPgstatementsAgent */ type GetAgentOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3306,7 +3272,6 @@ GetAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model GetAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type GetAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3518,7 +3483,6 @@ GetAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model GetAgentOKBodyRDSExporter */ type GetAgentOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3731,7 +3695,6 @@ GetAgentOKBodyVmagent VMAgent runs on Generic or Container Node alongside pmm-ag swagger:model GetAgentOKBodyVmagent */ type GetAgentOKBodyVmagent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/list_agents_parameters.go b/api/inventorypb/json/client/agents/list_agents_parameters.go index 9abf6624ab..45319cd49a 100644 --- a/api/inventorypb/json/client/agents/list_agents_parameters.go +++ b/api/inventorypb/json/client/agents/list_agents_parameters.go @@ -60,7 +60,6 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { - // Body. Body ListAgentsBody @@ -130,7 +129,6 @@ func (o *ListAgentsParams) SetBody(body ListAgentsBody) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/list_agents_responses.go b/api/inventorypb/json/client/agents/list_agents_responses.go index c67541bc39..763fecc753 100644 --- a/api/inventorypb/json/client/agents/list_agents_responses.go +++ b/api/inventorypb/json/client/agents/list_agents_responses.go @@ -62,12 +62,12 @@ type ListAgentsOK struct { func (o *ListAgentsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/List][%d] listAgentsOk %+v", 200, o.Payload) } + func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { return o.Payload } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAgentsDefault) Code() int { func (o *ListAgentsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/List][%d] ListAgents default %+v", o._statusCode, o.Payload) } + func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { return o.Payload } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsDefaultBody) // response payload @@ -125,7 +125,6 @@ ListAgentsBody list agents body swagger:model ListAgentsBody */ type ListAgentsBody struct { - // Return only Agents started by this pmm-agent. // Exactly one of these parameters should be present: pmm_agent_id, node_id, service_id. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -269,7 +268,6 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -335,9 +333,7 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,7 +344,6 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -377,7 +372,6 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -415,7 +409,6 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { - // pmm agent PMMAgent []*ListAgentsOKBodyPMMAgentItems0 `json:"pmm_agent"` @@ -993,9 +986,7 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.PMMAgent); i++ { - if o.PMMAgent[i] != nil { if err := o.PMMAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1006,16 +997,13 @@ func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.VMAgent); i++ { - if o.VMAgent[i] != nil { if err := o.VMAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1026,16 +1014,13 @@ func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats s return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.NodeExporter); i++ { - if o.NodeExporter[i] != nil { if err := o.NodeExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1046,16 +1031,13 @@ func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, form return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.MysqldExporter); i++ { - if o.MysqldExporter[i] != nil { if err := o.MysqldExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1066,16 +1048,13 @@ func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, fo return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.MongodbExporter); i++ { - if o.MongodbExporter[i] != nil { if err := o.MongodbExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1086,16 +1065,13 @@ func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, f return err } } - } return nil } func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.PostgresExporter); i++ { - if o.PostgresExporter[i] != nil { if err := o.PostgresExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1106,16 +1082,13 @@ func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ProxysqlExporter); i++ { - if o.ProxysqlExporter[i] != nil { if err := o.ProxysqlExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1126,16 +1099,13 @@ func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANMysqlPerfschemaAgent); i++ { - if o.QANMysqlPerfschemaAgent[i] != nil { if err := o.QANMysqlPerfschemaAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1146,16 +1116,13 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Co return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANMysqlSlowlogAgent); i++ { - if o.QANMysqlSlowlogAgent[i] != nil { if err := o.QANMysqlSlowlogAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1166,16 +1133,13 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Conte return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANMongodbProfilerAgent); i++ { - if o.QANMongodbProfilerAgent[i] != nil { if err := o.QANMongodbProfilerAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1186,16 +1150,13 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANPostgresqlPgstatementsAgent); i++ { - if o.QANPostgresqlPgstatementsAgent[i] != nil { if err := o.QANPostgresqlPgstatementsAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1206,16 +1167,13 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx con return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANPostgresqlPgstatmonitorAgent); i++ { - if o.QANPostgresqlPgstatmonitorAgent[i] != nil { if err := o.QANPostgresqlPgstatmonitorAgent[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1226,16 +1184,13 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx co return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RDSExporter); i++ { - if o.RDSExporter[i] != nil { if err := o.RDSExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1246,16 +1201,13 @@ func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, forma return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ExternalExporter); i++ { - if o.ExternalExporter[i] != nil { if err := o.ExternalExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1266,16 +1218,13 @@ func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AzureDatabaseExporter); i++ { - if o.AzureDatabaseExporter[i] != nil { if err := o.AzureDatabaseExporter[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1286,7 +1235,6 @@ func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Cont return err } } - } return nil @@ -1315,7 +1263,6 @@ ListAgentsOKBodyAzureDatabaseExporterItems0 AzureDatabaseExporter runs on Generi swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0 */ type ListAgentsOKBodyAzureDatabaseExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1521,7 +1468,6 @@ ListAgentsOKBodyExternalExporterItems0 ExternalExporter runs on any Node type, i swagger:model ListAgentsOKBodyExternalExporterItems0 */ type ListAgentsOKBodyExternalExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1589,7 +1535,6 @@ ListAgentsOKBodyMongodbExporterItems0 MongoDBExporter runs on Generic or Contain swagger:model ListAgentsOKBodyMongodbExporterItems0 */ type ListAgentsOKBodyMongodbExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1811,7 +1756,6 @@ ListAgentsOKBodyMysqldExporterItems0 MySQLdExporter runs on Generic or Container swagger:model ListAgentsOKBodyMysqldExporterItems0 */ type ListAgentsOKBodyMysqldExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2040,7 +1984,6 @@ ListAgentsOKBodyNodeExporterItems0 NodeExporter runs on Generic or Container Nod swagger:model ListAgentsOKBodyNodeExporterItems0 */ type ListAgentsOKBodyNodeExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2240,7 +2183,6 @@ ListAgentsOKBodyPMMAgentItems0 PMMAgent runs on Generic or Container Node. swagger:model ListAgentsOKBodyPMMAgentItems0 */ type ListAgentsOKBodyPMMAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2292,7 +2234,6 @@ ListAgentsOKBodyPostgresExporterItems0 PostgresExporter runs on Generic or Conta swagger:model ListAgentsOKBodyPostgresExporterItems0 */ type ListAgentsOKBodyPostgresExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2502,7 +2443,6 @@ ListAgentsOKBodyProxysqlExporterItems0 ProxySQLExporter runs on Generic or Conta swagger:model ListAgentsOKBodyProxysqlExporterItems0 */ type ListAgentsOKBodyProxysqlExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2714,7 +2654,6 @@ ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs withi swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 */ type ListAgentsOKBodyQANMongodbProfilerAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2923,7 +2862,6 @@ ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 QANMySQLPerfSchemaAgent runs withi swagger:model ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 */ type ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3144,7 +3082,6 @@ ListAgentsOKBodyQANMysqlSlowlogAgentItems0 QANMySQLSlowlogAgent runs within pmm- swagger:model ListAgentsOKBodyQANMysqlSlowlogAgentItems0 */ type ListAgentsOKBodyQANMysqlSlowlogAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3368,7 +3305,6 @@ ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 QANPostgreSQLPgStatementsAg swagger:model ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3577,7 +3513,6 @@ ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 QANPostgreSQLPgStatMonitor swagger:model ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3789,7 +3724,6 @@ ListAgentsOKBodyRDSExporterItems0 RDSExporter runs on Generic or Container Node swagger:model ListAgentsOKBodyRDSExporterItems0 */ type ListAgentsOKBodyRDSExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4002,7 +3936,6 @@ ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongsid swagger:model ListAgentsOKBodyVMAgentItems0 */ type ListAgentsOKBodyVMAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventorypb/json/client/agents/remove_agent_parameters.go b/api/inventorypb/json/client/agents/remove_agent_parameters.go index b7e75d496d..de9f9fb549 100644 --- a/api/inventorypb/json/client/agents/remove_agent_parameters.go +++ b/api/inventorypb/json/client/agents/remove_agent_parameters.go @@ -60,7 +60,6 @@ RemoveAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveAgentParams struct { - // Body. Body RemoveAgentBody @@ -130,7 +129,6 @@ func (o *RemoveAgentParams) SetBody(body RemoveAgentBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/agents/remove_agent_responses.go b/api/inventorypb/json/client/agents/remove_agent_responses.go index fea21242f6..00cb211405 100644 --- a/api/inventorypb/json/client/agents/remove_agent_responses.go +++ b/api/inventorypb/json/client/agents/remove_agent_responses.go @@ -60,12 +60,12 @@ type RemoveAgentOK struct { func (o *RemoveAgentOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Remove][%d] removeAgentOk %+v", 200, o.Payload) } + func (o *RemoveAgentOK) GetPayload() interface{} { return o.Payload } func (o *RemoveAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveAgentDefault) Code() int { func (o *RemoveAgentDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Agents/Remove][%d] RemoveAgent default %+v", o._statusCode, o.Payload) } + func (o *RemoveAgentDefault) GetPayload() *RemoveAgentDefaultBody { return o.Payload } func (o *RemoveAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveAgentDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveAgentBody remove agent body swagger:model RemoveAgentBody */ type RemoveAgentBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -162,7 +161,6 @@ RemoveAgentDefaultBody remove agent default body swagger:model RemoveAgentDefaultBody */ type RemoveAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *RemoveAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -270,7 +265,6 @@ RemoveAgentDefaultBodyDetailsItems0 remove agent default body details items0 swagger:model RemoveAgentDefaultBodyDetailsItems0 */ type RemoveAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/nodes/add_container_node_parameters.go b/api/inventorypb/json/client/nodes/add_container_node_parameters.go index 42c5dfc5da..733d4a807b 100644 --- a/api/inventorypb/json/client/nodes/add_container_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_container_node_parameters.go @@ -60,7 +60,6 @@ AddContainerNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddContainerNodeParams struct { - // Body. Body AddContainerNodeBody @@ -130,7 +129,6 @@ func (o *AddContainerNodeParams) SetBody(body AddContainerNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddContainerNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_container_node_responses.go b/api/inventorypb/json/client/nodes/add_container_node_responses.go index 9213beea4f..1243859a12 100644 --- a/api/inventorypb/json/client/nodes/add_container_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_container_node_responses.go @@ -60,12 +60,12 @@ type AddContainerNodeOK struct { func (o *AddContainerNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddContainer][%d] addContainerNodeOk %+v", 200, o.Payload) } + func (o *AddContainerNodeOK) GetPayload() *AddContainerNodeOKBody { return o.Payload } func (o *AddContainerNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddContainerNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddContainerNodeDefault) Code() int { func (o *AddContainerNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddContainer][%d] AddContainerNode default %+v", o._statusCode, o.Payload) } + func (o *AddContainerNodeDefault) GetPayload() *AddContainerNodeDefaultBody { return o.Payload } func (o *AddContainerNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddContainerNodeDefaultBody) // response payload @@ -123,7 +123,6 @@ AddContainerNodeBody add container node body swagger:model AddContainerNodeBody */ type AddContainerNodeBody struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -185,7 +184,6 @@ AddContainerNodeDefaultBody add container node default body swagger:model AddContainerNodeDefaultBody */ type AddContainerNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -251,9 +249,7 @@ func (o *AddContainerNodeDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddContainerNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -264,7 +260,6 @@ func (o *AddContainerNodeDefaultBody) contextValidateDetails(ctx context.Context return err } } - } return nil @@ -293,7 +288,6 @@ AddContainerNodeDefaultBodyDetailsItems0 add container node default body details swagger:model AddContainerNodeDefaultBodyDetailsItems0 */ type AddContainerNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -331,7 +325,6 @@ AddContainerNodeOKBody add container node OK body swagger:model AddContainerNodeOKBody */ type AddContainerNodeOKBody struct { - // container Container *AddContainerNodeOKBodyContainer `json:"container,omitempty"` } @@ -384,7 +377,6 @@ func (o *AddContainerNodeOKBody) ContextValidate(ctx context.Context, formats st } func (o *AddContainerNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - if o.Container != nil { if err := o.Container.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -422,7 +414,6 @@ AddContainerNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model AddContainerNodeOKBodyContainer */ type AddContainerNodeOKBodyContainer struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_generic_node_parameters.go b/api/inventorypb/json/client/nodes/add_generic_node_parameters.go index b3f4ee12ae..b8a549c522 100644 --- a/api/inventorypb/json/client/nodes/add_generic_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_generic_node_parameters.go @@ -60,7 +60,6 @@ AddGenericNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddGenericNodeParams struct { - // Body. Body AddGenericNodeBody @@ -130,7 +129,6 @@ func (o *AddGenericNodeParams) SetBody(body AddGenericNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddGenericNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_generic_node_responses.go b/api/inventorypb/json/client/nodes/add_generic_node_responses.go index 3d526d312c..97378c70ad 100644 --- a/api/inventorypb/json/client/nodes/add_generic_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_generic_node_responses.go @@ -60,12 +60,12 @@ type AddGenericNodeOK struct { func (o *AddGenericNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddGeneric][%d] addGenericNodeOk %+v", 200, o.Payload) } + func (o *AddGenericNodeOK) GetPayload() *AddGenericNodeOKBody { return o.Payload } func (o *AddGenericNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddGenericNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddGenericNodeDefault) Code() int { func (o *AddGenericNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddGeneric][%d] AddGenericNode default %+v", o._statusCode, o.Payload) } + func (o *AddGenericNodeDefault) GetPayload() *AddGenericNodeDefaultBody { return o.Payload } func (o *AddGenericNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddGenericNodeDefaultBody) // response payload @@ -123,7 +123,6 @@ AddGenericNodeBody add generic node body swagger:model AddGenericNodeBody */ type AddGenericNodeBody struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -182,7 +181,6 @@ AddGenericNodeDefaultBody add generic node default body swagger:model AddGenericNodeDefaultBody */ type AddGenericNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -248,9 +246,7 @@ func (o *AddGenericNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddGenericNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -261,7 +257,6 @@ func (o *AddGenericNodeDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -290,7 +285,6 @@ AddGenericNodeDefaultBodyDetailsItems0 add generic node default body details ite swagger:model AddGenericNodeDefaultBodyDetailsItems0 */ type AddGenericNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -328,7 +322,6 @@ AddGenericNodeOKBody add generic node OK body swagger:model AddGenericNodeOKBody */ type AddGenericNodeOKBody struct { - // generic Generic *AddGenericNodeOKBodyGeneric `json:"generic,omitempty"` } @@ -381,7 +374,6 @@ func (o *AddGenericNodeOKBody) ContextValidate(ctx context.Context, formats strf } func (o *AddGenericNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - if o.Generic != nil { if err := o.Generic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -419,7 +411,6 @@ AddGenericNodeOKBodyGeneric GenericNode represents a bare metal server or virtua swagger:model AddGenericNodeOKBodyGeneric */ type AddGenericNodeOKBodyGeneric struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go index 0cd94f5bf4..a26c9249f8 100644 --- a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_parameters.go @@ -60,7 +60,6 @@ AddRemoteAzureDatabaseNodeParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type AddRemoteAzureDatabaseNodeParams struct { - // Body. Body AddRemoteAzureDatabaseNodeBody @@ -130,7 +129,6 @@ func (o *AddRemoteAzureDatabaseNodeParams) SetBody(body AddRemoteAzureDatabaseNo // WriteToRequest writes these params to a swagger request func (o *AddRemoteAzureDatabaseNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go index 3579eb5c3d..17c871dc64 100644 --- a/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_remote_azure_database_node_responses.go @@ -60,12 +60,12 @@ type AddRemoteAzureDatabaseNodeOK struct { func (o *AddRemoteAzureDatabaseNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteAzureDatabase][%d] addRemoteAzureDatabaseNodeOk %+v", 200, o.Payload) } + func (o *AddRemoteAzureDatabaseNodeOK) GetPayload() *AddRemoteAzureDatabaseNodeOKBody { return o.Payload } func (o *AddRemoteAzureDatabaseNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRemoteAzureDatabaseNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddRemoteAzureDatabaseNodeDefault) Code() int { func (o *AddRemoteAzureDatabaseNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteAzureDatabase][%d] AddRemoteAzureDatabaseNode default %+v", o._statusCode, o.Payload) } + func (o *AddRemoteAzureDatabaseNodeDefault) GetPayload() *AddRemoteAzureDatabaseNodeDefaultBody { return o.Payload } func (o *AddRemoteAzureDatabaseNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRemoteAzureDatabaseNodeDefaultBody) // response payload @@ -123,7 +123,6 @@ AddRemoteAzureDatabaseNodeBody add remote azure database node body swagger:model AddRemoteAzureDatabaseNodeBody */ type AddRemoteAzureDatabaseNodeBody struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -176,7 +175,6 @@ AddRemoteAzureDatabaseNodeDefaultBody add remote azure database node default bod swagger:model AddRemoteAzureDatabaseNodeDefaultBody */ type AddRemoteAzureDatabaseNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -242,9 +240,7 @@ func (o *AddRemoteAzureDatabaseNodeDefaultBody) ContextValidate(ctx context.Cont } func (o *AddRemoteAzureDatabaseNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -255,7 +251,6 @@ func (o *AddRemoteAzureDatabaseNodeDefaultBody) contextValidateDetails(ctx conte return err } } - } return nil @@ -284,7 +279,6 @@ AddRemoteAzureDatabaseNodeDefaultBodyDetailsItems0 add remote azure database nod swagger:model AddRemoteAzureDatabaseNodeDefaultBodyDetailsItems0 */ type AddRemoteAzureDatabaseNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -322,7 +316,6 @@ AddRemoteAzureDatabaseNodeOKBody add remote azure database node OK body swagger:model AddRemoteAzureDatabaseNodeOKBody */ type AddRemoteAzureDatabaseNodeOKBody struct { - // remote azure database RemoteAzureDatabase *AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase `json:"remote_azure_database,omitempty"` } @@ -375,7 +368,6 @@ func (o *AddRemoteAzureDatabaseNodeOKBody) ContextValidate(ctx context.Context, } func (o *AddRemoteAzureDatabaseNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteAzureDatabase != nil { if err := o.RemoteAzureDatabase.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -413,7 +405,6 @@ AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode repr swagger:model AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase */ type AddRemoteAzureDatabaseNodeOKBodyRemoteAzureDatabase struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_remote_node_parameters.go b/api/inventorypb/json/client/nodes/add_remote_node_parameters.go index 4fc9c7f4dc..1cda2acb2a 100644 --- a/api/inventorypb/json/client/nodes/add_remote_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_remote_node_parameters.go @@ -60,7 +60,6 @@ AddRemoteNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRemoteNodeParams struct { - // Body. Body AddRemoteNodeBody @@ -130,7 +129,6 @@ func (o *AddRemoteNodeParams) SetBody(body AddRemoteNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddRemoteNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_remote_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_node_responses.go index cfe69cdbb4..59afde419e 100644 --- a/api/inventorypb/json/client/nodes/add_remote_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_remote_node_responses.go @@ -60,12 +60,12 @@ type AddRemoteNodeOK struct { func (o *AddRemoteNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemote][%d] addRemoteNodeOk %+v", 200, o.Payload) } + func (o *AddRemoteNodeOK) GetPayload() *AddRemoteNodeOKBody { return o.Payload } func (o *AddRemoteNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRemoteNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddRemoteNodeDefault) Code() int { func (o *AddRemoteNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemote][%d] AddRemoteNode default %+v", o._statusCode, o.Payload) } + func (o *AddRemoteNodeDefault) GetPayload() *AddRemoteNodeDefaultBody { return o.Payload } func (o *AddRemoteNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRemoteNodeDefaultBody) // response payload @@ -123,7 +123,6 @@ AddRemoteNodeBody add remote node body swagger:model AddRemoteNodeBody */ type AddRemoteNodeBody struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -176,7 +175,6 @@ AddRemoteNodeDefaultBody add remote node default body swagger:model AddRemoteNodeDefaultBody */ type AddRemoteNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -242,9 +240,7 @@ func (o *AddRemoteNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddRemoteNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -255,7 +251,6 @@ func (o *AddRemoteNodeDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -284,7 +279,6 @@ AddRemoteNodeDefaultBodyDetailsItems0 add remote node default body details items swagger:model AddRemoteNodeDefaultBodyDetailsItems0 */ type AddRemoteNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -322,7 +316,6 @@ AddRemoteNodeOKBody add remote node OK body swagger:model AddRemoteNodeOKBody */ type AddRemoteNodeOKBody struct { - // remote Remote *AddRemoteNodeOKBodyRemote `json:"remote,omitempty"` } @@ -375,7 +368,6 @@ func (o *AddRemoteNodeOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddRemoteNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - if o.Remote != nil { if err := o.Remote.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -413,7 +405,6 @@ AddRemoteNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node swagger:model AddRemoteNodeOKBodyRemote */ type AddRemoteNodeOKBodyRemote struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go b/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go index c47491c1e2..24a2a4aee5 100644 --- a/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go +++ b/api/inventorypb/json/client/nodes/add_remote_rds_node_parameters.go @@ -60,7 +60,6 @@ AddRemoteRDSNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRemoteRDSNodeParams struct { - // Body. Body AddRemoteRDSNodeBody @@ -130,7 +129,6 @@ func (o *AddRemoteRDSNodeParams) SetBody(body AddRemoteRDSNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddRemoteRDSNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go b/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go index 255ec4366b..cbdcadf303 100644 --- a/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go +++ b/api/inventorypb/json/client/nodes/add_remote_rds_node_responses.go @@ -60,12 +60,12 @@ type AddRemoteRDSNodeOK struct { func (o *AddRemoteRDSNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteRDS][%d] addRemoteRdsNodeOk %+v", 200, o.Payload) } + func (o *AddRemoteRDSNodeOK) GetPayload() *AddRemoteRDSNodeOKBody { return o.Payload } func (o *AddRemoteRDSNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRemoteRDSNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddRemoteRDSNodeDefault) Code() int { func (o *AddRemoteRDSNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/AddRemoteRDS][%d] AddRemoteRDSNode default %+v", o._statusCode, o.Payload) } + func (o *AddRemoteRDSNodeDefault) GetPayload() *AddRemoteRDSNodeDefaultBody { return o.Payload } func (o *AddRemoteRDSNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRemoteRDSNodeDefaultBody) // response payload @@ -123,7 +123,6 @@ AddRemoteRDSNodeBody add remote RDS node body swagger:model AddRemoteRDSNodeBody */ type AddRemoteRDSNodeBody struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -176,7 +175,6 @@ AddRemoteRDSNodeDefaultBody add remote RDS node default body swagger:model AddRemoteRDSNodeDefaultBody */ type AddRemoteRDSNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -242,9 +240,7 @@ func (o *AddRemoteRDSNodeDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddRemoteRDSNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -255,7 +251,6 @@ func (o *AddRemoteRDSNodeDefaultBody) contextValidateDetails(ctx context.Context return err } } - } return nil @@ -284,7 +279,6 @@ AddRemoteRDSNodeDefaultBodyDetailsItems0 add remote RDS node default body detail swagger:model AddRemoteRDSNodeDefaultBodyDetailsItems0 */ type AddRemoteRDSNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -322,7 +316,6 @@ AddRemoteRDSNodeOKBody add remote RDS node OK body swagger:model AddRemoteRDSNodeOKBody */ type AddRemoteRDSNodeOKBody struct { - // remote rds RemoteRDS *AddRemoteRDSNodeOKBodyRemoteRDS `json:"remote_rds,omitempty"` } @@ -375,7 +368,6 @@ func (o *AddRemoteRDSNodeOKBody) ContextValidate(ctx context.Context, formats st } func (o *AddRemoteRDSNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteRDS != nil { if err := o.RemoteRDS.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -413,7 +405,6 @@ AddRemoteRDSNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents swagger:model AddRemoteRDSNodeOKBodyRemoteRDS */ type AddRemoteRDSNodeOKBodyRemoteRDS struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/get_node_parameters.go b/api/inventorypb/json/client/nodes/get_node_parameters.go index b6366fb7f4..f6ad37b23f 100644 --- a/api/inventorypb/json/client/nodes/get_node_parameters.go +++ b/api/inventorypb/json/client/nodes/get_node_parameters.go @@ -60,7 +60,6 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { - // Body. Body GetNodeBody @@ -130,7 +129,6 @@ func (o *GetNodeParams) SetBody(body GetNodeBody) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/get_node_responses.go b/api/inventorypb/json/client/nodes/get_node_responses.go index 484959404f..3f22cfb738 100644 --- a/api/inventorypb/json/client/nodes/get_node_responses.go +++ b/api/inventorypb/json/client/nodes/get_node_responses.go @@ -60,12 +60,12 @@ type GetNodeOK struct { func (o *GetNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Get][%d] getNodeOk %+v", 200, o.Payload) } + func (o *GetNodeOK) GetPayload() *GetNodeOKBody { return o.Payload } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetNodeDefault) Code() int { func (o *GetNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Get][%d] GetNode default %+v", o._statusCode, o.Payload) } + func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { return o.Payload } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeDefaultBody) // response payload @@ -123,7 +123,6 @@ GetNodeBody get node body swagger:model GetNodeBody */ type GetNodeBody struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` } @@ -161,7 +160,6 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -227,9 +225,7 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +236,6 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -269,7 +264,6 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -307,7 +301,6 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { - // container Container *GetNodeOKBodyContainer `json:"container,omitempty"` @@ -480,7 +473,6 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - if o.Container != nil { if err := o.Container.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -496,7 +488,6 @@ func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - if o.Generic != nil { if err := o.Generic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -512,7 +503,6 @@ func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - if o.Remote != nil { if err := o.Remote.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -528,7 +518,6 @@ func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteAzureDatabase != nil { if err := o.RemoteAzureDatabase.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -544,7 +533,6 @@ func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *GetNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteRDS != nil { if err := o.RemoteRDS.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -582,7 +570,6 @@ GetNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model GetNodeOKBodyContainer */ type GetNodeOKBodyContainer struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -647,7 +634,6 @@ GetNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model GetNodeOKBodyGeneric */ type GetNodeOKBodyGeneric struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -709,7 +695,6 @@ GetNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model GetNodeOKBodyRemote */ type GetNodeOKBodyRemote struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -765,7 +750,6 @@ GetNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model GetNodeOKBodyRemoteAzureDatabase */ type GetNodeOKBodyRemoteAzureDatabase struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -821,7 +805,6 @@ GetNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model GetNodeOKBodyRemoteRDS */ type GetNodeOKBodyRemoteRDS struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/list_nodes_parameters.go b/api/inventorypb/json/client/nodes/list_nodes_parameters.go index 75d49cd9e7..ed94a2202b 100644 --- a/api/inventorypb/json/client/nodes/list_nodes_parameters.go +++ b/api/inventorypb/json/client/nodes/list_nodes_parameters.go @@ -60,7 +60,6 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { - // Body. Body ListNodesBody @@ -130,7 +129,6 @@ func (o *ListNodesParams) SetBody(body ListNodesBody) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/list_nodes_responses.go b/api/inventorypb/json/client/nodes/list_nodes_responses.go index 4e5e0276df..ca9b8b4dae 100644 --- a/api/inventorypb/json/client/nodes/list_nodes_responses.go +++ b/api/inventorypb/json/client/nodes/list_nodes_responses.go @@ -62,12 +62,12 @@ type ListNodesOK struct { func (o *ListNodesOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/List][%d] listNodesOk %+v", 200, o.Payload) } + func (o *ListNodesOK) GetPayload() *ListNodesOKBody { return o.Payload } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListNodesDefault) Code() int { func (o *ListNodesDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/List][%d] ListNodes default %+v", o._statusCode, o.Payload) } + func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { return o.Payload } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListNodesBody list nodes body swagger:model ListNodesBody */ type ListNodesBody struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` @@ -227,7 +226,6 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -293,9 +291,7 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -306,7 +302,6 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -335,7 +330,6 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -373,7 +367,6 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { - // generic Generic []*ListNodesOKBodyGenericItems0 `json:"generic"` @@ -581,9 +574,7 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Generic); i++ { - if o.Generic[i] != nil { if err := o.Generic[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -594,16 +585,13 @@ func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats st return err } } - } return nil } func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Container); i++ { - if o.Container[i] != nil { if err := o.Container[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -614,16 +602,13 @@ func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats return err } } - } return nil } func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Remote); i++ { - if o.Remote[i] != nil { if err := o.Remote[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -634,16 +619,13 @@ func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats str return err } } - } return nil } func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RemoteRDS); i++ { - if o.RemoteRDS[i] != nil { if err := o.RemoteRDS[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -654,16 +636,13 @@ func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats return err } } - } return nil } func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RemoteAzureDatabase); i++ { - if o.RemoteAzureDatabase[i] != nil { if err := o.RemoteAzureDatabase[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -674,7 +653,6 @@ func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context return err } } - } return nil @@ -703,7 +681,6 @@ ListNodesOKBodyContainerItems0 ContainerNode represents a Docker container. swagger:model ListNodesOKBodyContainerItems0 */ type ListNodesOKBodyContainerItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -768,7 +745,6 @@ ListNodesOKBodyGenericItems0 GenericNode represents a bare metal server or virtu swagger:model ListNodesOKBodyGenericItems0 */ type ListNodesOKBodyGenericItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -830,7 +806,6 @@ ListNodesOKBodyRemoteAzureDatabaseItems0 RemoteAzureDatabaseNode represents remo swagger:model ListNodesOKBodyRemoteAzureDatabaseItems0 */ type ListNodesOKBodyRemoteAzureDatabaseItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -886,7 +861,6 @@ ListNodesOKBodyRemoteItems0 RemoteNode represents generic remote Node. It's a no swagger:model ListNodesOKBodyRemoteItems0 */ type ListNodesOKBodyRemoteItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -942,7 +916,6 @@ ListNodesOKBodyRemoteRDSItems0 RemoteRDSNode represents remote RDS Node. Agents swagger:model ListNodesOKBodyRemoteRDSItems0 */ type ListNodesOKBodyRemoteRDSItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventorypb/json/client/nodes/remove_node_parameters.go b/api/inventorypb/json/client/nodes/remove_node_parameters.go index eaf31ae4bf..5948139b98 100644 --- a/api/inventorypb/json/client/nodes/remove_node_parameters.go +++ b/api/inventorypb/json/client/nodes/remove_node_parameters.go @@ -60,7 +60,6 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { - // Body. Body RemoveNodeBody @@ -130,7 +129,6 @@ func (o *RemoveNodeParams) SetBody(body RemoveNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/nodes/remove_node_responses.go b/api/inventorypb/json/client/nodes/remove_node_responses.go index cfdc304f44..7de78f1ea0 100644 --- a/api/inventorypb/json/client/nodes/remove_node_responses.go +++ b/api/inventorypb/json/client/nodes/remove_node_responses.go @@ -60,12 +60,12 @@ type RemoveNodeOK struct { func (o *RemoveNodeOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Remove][%d] removeNodeOk %+v", 200, o.Payload) } + func (o *RemoveNodeOK) GetPayload() interface{} { return o.Payload } func (o *RemoveNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveNodeDefault) Code() int { func (o *RemoveNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Nodes/Remove][%d] RemoveNode default %+v", o._statusCode, o.Payload) } + func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { return o.Payload } func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveNodeDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveNodeBody remove node body swagger:model RemoveNodeBody */ type RemoveNodeBody struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -162,7 +161,6 @@ RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody */ type RemoveNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *RemoveNodeDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -270,7 +265,6 @@ RemoveNodeDefaultBodyDetailsItems0 remove node default body details items0 swagger:model RemoveNodeDefaultBodyDetailsItems0 */ type RemoveNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/services/add_custom_labels_parameters.go b/api/inventorypb/json/client/services/add_custom_labels_parameters.go index 360ece1edc..e508c1e565 100644 --- a/api/inventorypb/json/client/services/add_custom_labels_parameters.go +++ b/api/inventorypb/json/client/services/add_custom_labels_parameters.go @@ -60,7 +60,6 @@ AddCustomLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddCustomLabelsParams struct { - // Body. Body AddCustomLabelsBody @@ -130,7 +129,6 @@ func (o *AddCustomLabelsParams) SetBody(body AddCustomLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *AddCustomLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_custom_labels_responses.go b/api/inventorypb/json/client/services/add_custom_labels_responses.go index d18b205e37..112a8edc0f 100644 --- a/api/inventorypb/json/client/services/add_custom_labels_responses.go +++ b/api/inventorypb/json/client/services/add_custom_labels_responses.go @@ -60,12 +60,12 @@ type AddCustomLabelsOK struct { func (o *AddCustomLabelsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Add][%d] addCustomLabelsOk %+v", 200, o.Payload) } + func (o *AddCustomLabelsOK) GetPayload() interface{} { return o.Payload } func (o *AddCustomLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AddCustomLabelsDefault) Code() int { func (o *AddCustomLabelsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Add][%d] AddCustomLabels default %+v", o._statusCode, o.Payload) } + func (o *AddCustomLabelsDefault) GetPayload() *AddCustomLabelsDefaultBody { return o.Payload } func (o *AddCustomLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddCustomLabelsDefaultBody) // response payload @@ -121,7 +121,6 @@ AddCustomLabelsBody add custom labels body swagger:model AddCustomLabelsBody */ type AddCustomLabelsBody struct { - // Unique Service ID. ServiceID string `json:"service_id,omitempty"` @@ -162,7 +161,6 @@ AddCustomLabelsDefaultBody add custom labels default body swagger:model AddCustomLabelsDefaultBody */ type AddCustomLabelsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *AddCustomLabelsDefaultBody) ContextValidate(ctx context.Context, format } func (o *AddCustomLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *AddCustomLabelsDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -270,7 +265,6 @@ AddCustomLabelsDefaultBodyDetailsItems0 add custom labels default body details i swagger:model AddCustomLabelsDefaultBodyDetailsItems0 */ type AddCustomLabelsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/services/add_external_service_parameters.go b/api/inventorypb/json/client/services/add_external_service_parameters.go index 6ae016be94..53b34253d6 100644 --- a/api/inventorypb/json/client/services/add_external_service_parameters.go +++ b/api/inventorypb/json/client/services/add_external_service_parameters.go @@ -60,7 +60,6 @@ AddExternalServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddExternalServiceParams struct { - // Body. Body AddExternalServiceBody @@ -130,7 +129,6 @@ func (o *AddExternalServiceParams) SetBody(body AddExternalServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddExternalServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_external_service_responses.go b/api/inventorypb/json/client/services/add_external_service_responses.go index 7a972d4637..7f2cf9fbf2 100644 --- a/api/inventorypb/json/client/services/add_external_service_responses.go +++ b/api/inventorypb/json/client/services/add_external_service_responses.go @@ -60,12 +60,12 @@ type AddExternalServiceOK struct { func (o *AddExternalServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddExternalService][%d] addExternalServiceOk %+v", 200, o.Payload) } + func (o *AddExternalServiceOK) GetPayload() *AddExternalServiceOKBody { return o.Payload } func (o *AddExternalServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddExternalServiceDefault) Code() int { func (o *AddExternalServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddExternalService][%d] AddExternalService default %+v", o._statusCode, o.Payload) } + func (o *AddExternalServiceDefault) GetPayload() *AddExternalServiceDefaultBody { return o.Payload } func (o *AddExternalServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ AddExternalServiceBody add external service body swagger:model AddExternalServiceBody */ type AddExternalServiceBody struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -179,7 +178,6 @@ AddExternalServiceDefaultBody add external service default body swagger:model AddExternalServiceDefaultBody */ type AddExternalServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -245,9 +243,7 @@ func (o *AddExternalServiceDefaultBody) ContextValidate(ctx context.Context, for } func (o *AddExternalServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -258,7 +254,6 @@ func (o *AddExternalServiceDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -287,7 +282,6 @@ AddExternalServiceDefaultBodyDetailsItems0 add external service default body det swagger:model AddExternalServiceDefaultBodyDetailsItems0 */ type AddExternalServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -325,7 +319,6 @@ AddExternalServiceOKBody add external service OK body swagger:model AddExternalServiceOKBody */ type AddExternalServiceOKBody struct { - // external External *AddExternalServiceOKBodyExternal `json:"external,omitempty"` } @@ -378,7 +371,6 @@ func (o *AddExternalServiceOKBody) ContextValidate(ctx context.Context, formats } func (o *AddExternalServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if err := o.External.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -416,7 +408,6 @@ AddExternalServiceOKBodyExternal ExternalService represents a generic External s swagger:model AddExternalServiceOKBodyExternal */ type AddExternalServiceOKBodyExternal struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go b/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go index aabfe33f42..b90ea92106 100644 --- a/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go +++ b/api/inventorypb/json/client/services/add_ha_proxy_service_parameters.go @@ -60,7 +60,6 @@ AddHAProxyServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddHAProxyServiceParams struct { - // Body. Body AddHAProxyServiceBody @@ -130,7 +129,6 @@ func (o *AddHAProxyServiceParams) SetBody(body AddHAProxyServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddHAProxyServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go b/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go index f8ccb95aa6..812d6866cb 100644 --- a/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go +++ b/api/inventorypb/json/client/services/add_ha_proxy_service_responses.go @@ -60,12 +60,12 @@ type AddHAProxyServiceOK struct { func (o *AddHAProxyServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddHAProxyService][%d] addHaProxyServiceOk %+v", 200, o.Payload) } + func (o *AddHAProxyServiceOK) GetPayload() *AddHAProxyServiceOKBody { return o.Payload } func (o *AddHAProxyServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddHAProxyServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddHAProxyServiceDefault) Code() int { func (o *AddHAProxyServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddHAProxyService][%d] AddHAProxyService default %+v", o._statusCode, o.Payload) } + func (o *AddHAProxyServiceDefault) GetPayload() *AddHAProxyServiceDefaultBody { return o.Payload } func (o *AddHAProxyServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddHAProxyServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ AddHAProxyServiceBody add HA proxy service body swagger:model AddHAProxyServiceBody */ type AddHAProxyServiceBody struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -176,7 +175,6 @@ AddHAProxyServiceDefaultBody add HA proxy service default body swagger:model AddHAProxyServiceDefaultBody */ type AddHAProxyServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -242,9 +240,7 @@ func (o *AddHAProxyServiceDefaultBody) ContextValidate(ctx context.Context, form } func (o *AddHAProxyServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -255,7 +251,6 @@ func (o *AddHAProxyServiceDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -284,7 +279,6 @@ AddHAProxyServiceDefaultBodyDetailsItems0 add HA proxy service default body deta swagger:model AddHAProxyServiceDefaultBodyDetailsItems0 */ type AddHAProxyServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -322,7 +316,6 @@ AddHAProxyServiceOKBody add HA proxy service OK body swagger:model AddHAProxyServiceOKBody */ type AddHAProxyServiceOKBody struct { - // haproxy Haproxy *AddHAProxyServiceOKBodyHaproxy `json:"haproxy,omitempty"` } @@ -375,7 +368,6 @@ func (o *AddHAProxyServiceOKBody) ContextValidate(ctx context.Context, formats s } func (o *AddHAProxyServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -413,7 +405,6 @@ AddHAProxyServiceOKBodyHaproxy HAProxyService represents a generic HAProxy servi swagger:model AddHAProxyServiceOKBodyHaproxy */ type AddHAProxyServiceOKBodyHaproxy struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go b/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go index f2fd5ab729..c5b0806ad0 100644 --- a/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go +++ b/api/inventorypb/json/client/services/add_mongo_db_service_parameters.go @@ -60,7 +60,6 @@ AddMongoDBServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMongoDBServiceParams struct { - // Body. Body AddMongoDBServiceBody @@ -130,7 +129,6 @@ func (o *AddMongoDBServiceParams) SetBody(body AddMongoDBServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddMongoDBServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_mongo_db_service_responses.go b/api/inventorypb/json/client/services/add_mongo_db_service_responses.go index 069c8377e2..2f0a715d74 100644 --- a/api/inventorypb/json/client/services/add_mongo_db_service_responses.go +++ b/api/inventorypb/json/client/services/add_mongo_db_service_responses.go @@ -60,12 +60,12 @@ type AddMongoDBServiceOK struct { func (o *AddMongoDBServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMongoDB][%d] addMongoDbServiceOk %+v", 200, o.Payload) } + func (o *AddMongoDBServiceOK) GetPayload() *AddMongoDBServiceOKBody { return o.Payload } func (o *AddMongoDBServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddMongoDBServiceDefault) Code() int { func (o *AddMongoDBServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMongoDB][%d] AddMongoDBService default %+v", o._statusCode, o.Payload) } + func (o *AddMongoDBServiceDefault) GetPayload() *AddMongoDBServiceDefaultBody { return o.Payload } func (o *AddMongoDBServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ AddMongoDBServiceBody add mongo DB service body swagger:model AddMongoDBServiceBody */ type AddMongoDBServiceBody struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -188,7 +187,6 @@ AddMongoDBServiceDefaultBody add mongo DB service default body swagger:model AddMongoDBServiceDefaultBody */ type AddMongoDBServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -254,9 +252,7 @@ func (o *AddMongoDBServiceDefaultBody) ContextValidate(ctx context.Context, form } func (o *AddMongoDBServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -267,7 +263,6 @@ func (o *AddMongoDBServiceDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -296,7 +291,6 @@ AddMongoDBServiceDefaultBodyDetailsItems0 add mongo DB service default body deta swagger:model AddMongoDBServiceDefaultBodyDetailsItems0 */ type AddMongoDBServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -334,7 +328,6 @@ AddMongoDBServiceOKBody add mongo DB service OK body swagger:model AddMongoDBServiceOKBody */ type AddMongoDBServiceOKBody struct { - // mongodb Mongodb *AddMongoDBServiceOKBodyMongodb `json:"mongodb,omitempty"` } @@ -387,7 +380,6 @@ func (o *AddMongoDBServiceOKBody) ContextValidate(ctx context.Context, formats s } func (o *AddMongoDBServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if err := o.Mongodb.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,7 +417,6 @@ AddMongoDBServiceOKBodyMongodb MongoDBService represents a generic MongoDB insta swagger:model AddMongoDBServiceOKBodyMongodb */ type AddMongoDBServiceOKBodyMongodb struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_my_sql_service_parameters.go b/api/inventorypb/json/client/services/add_my_sql_service_parameters.go index 2b8548fe57..9b3cd35b43 100644 --- a/api/inventorypb/json/client/services/add_my_sql_service_parameters.go +++ b/api/inventorypb/json/client/services/add_my_sql_service_parameters.go @@ -60,7 +60,6 @@ AddMySQLServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMySQLServiceParams struct { - // Body. Body AddMySQLServiceBody @@ -130,7 +129,6 @@ func (o *AddMySQLServiceParams) SetBody(body AddMySQLServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddMySQLServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_my_sql_service_responses.go b/api/inventorypb/json/client/services/add_my_sql_service_responses.go index 65308c3e90..d3e8511769 100644 --- a/api/inventorypb/json/client/services/add_my_sql_service_responses.go +++ b/api/inventorypb/json/client/services/add_my_sql_service_responses.go @@ -60,12 +60,12 @@ type AddMySQLServiceOK struct { func (o *AddMySQLServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMySQL][%d] addMySqlServiceOk %+v", 200, o.Payload) } + func (o *AddMySQLServiceOK) GetPayload() *AddMySQLServiceOKBody { return o.Payload } func (o *AddMySQLServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddMySQLServiceDefault) Code() int { func (o *AddMySQLServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddMySQL][%d] AddMySQLService default %+v", o._statusCode, o.Payload) } + func (o *AddMySQLServiceDefault) GetPayload() *AddMySQLServiceDefaultBody { return o.Payload } func (o *AddMySQLServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ AddMySQLServiceBody add my SQL service body swagger:model AddMySQLServiceBody */ type AddMySQLServiceBody struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -188,7 +187,6 @@ AddMySQLServiceDefaultBody add my SQL service default body swagger:model AddMySQLServiceDefaultBody */ type AddMySQLServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -254,9 +252,7 @@ func (o *AddMySQLServiceDefaultBody) ContextValidate(ctx context.Context, format } func (o *AddMySQLServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -267,7 +263,6 @@ func (o *AddMySQLServiceDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -296,7 +291,6 @@ AddMySQLServiceDefaultBodyDetailsItems0 add my SQL service default body details swagger:model AddMySQLServiceDefaultBodyDetailsItems0 */ type AddMySQLServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -334,7 +328,6 @@ AddMySQLServiceOKBody add my SQL service OK body swagger:model AddMySQLServiceOKBody */ type AddMySQLServiceOKBody struct { - // mysql Mysql *AddMySQLServiceOKBodyMysql `json:"mysql,omitempty"` } @@ -387,7 +380,6 @@ func (o *AddMySQLServiceOKBody) ContextValidate(ctx context.Context, formats str } func (o *AddMySQLServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if err := o.Mysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,7 +417,6 @@ AddMySQLServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddMySQLServiceOKBodyMysql */ type AddMySQLServiceOKBodyMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go b/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go index 8bd61385f7..7f77afbcb7 100644 --- a/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go +++ b/api/inventorypb/json/client/services/add_postgre_sql_service_parameters.go @@ -60,7 +60,6 @@ AddPostgreSQLServiceParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type AddPostgreSQLServiceParams struct { - // Body. Body AddPostgreSQLServiceBody @@ -130,7 +129,6 @@ func (o *AddPostgreSQLServiceParams) SetBody(body AddPostgreSQLServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddPostgreSQLServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go b/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go index b7846e8570..c704610153 100644 --- a/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go +++ b/api/inventorypb/json/client/services/add_postgre_sql_service_responses.go @@ -60,12 +60,12 @@ type AddPostgreSQLServiceOK struct { func (o *AddPostgreSQLServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddPostgreSQL][%d] addPostgreSqlServiceOk %+v", 200, o.Payload) } + func (o *AddPostgreSQLServiceOK) GetPayload() *AddPostgreSQLServiceOKBody { return o.Payload } func (o *AddPostgreSQLServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgreSQLServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddPostgreSQLServiceDefault) Code() int { func (o *AddPostgreSQLServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddPostgreSQL][%d] AddPostgreSQLService default %+v", o._statusCode, o.Payload) } + func (o *AddPostgreSQLServiceDefault) GetPayload() *AddPostgreSQLServiceDefaultBody { return o.Payload } func (o *AddPostgreSQLServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgreSQLServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ AddPostgreSQLServiceBody add postgre SQL service body swagger:model AddPostgreSQLServiceBody */ type AddPostgreSQLServiceBody struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -188,7 +187,6 @@ AddPostgreSQLServiceDefaultBody add postgre SQL service default body swagger:model AddPostgreSQLServiceDefaultBody */ type AddPostgreSQLServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -254,9 +252,7 @@ func (o *AddPostgreSQLServiceDefaultBody) ContextValidate(ctx context.Context, f } func (o *AddPostgreSQLServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -267,7 +263,6 @@ func (o *AddPostgreSQLServiceDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -296,7 +291,6 @@ AddPostgreSQLServiceDefaultBodyDetailsItems0 add postgre SQL service default bod swagger:model AddPostgreSQLServiceDefaultBodyDetailsItems0 */ type AddPostgreSQLServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -334,7 +328,6 @@ AddPostgreSQLServiceOKBody add postgre SQL service OK body swagger:model AddPostgreSQLServiceOKBody */ type AddPostgreSQLServiceOKBody struct { - // postgresql Postgresql *AddPostgreSQLServiceOKBodyPostgresql `json:"postgresql,omitempty"` } @@ -387,7 +380,6 @@ func (o *AddPostgreSQLServiceOKBody) ContextValidate(ctx context.Context, format } func (o *AddPostgreSQLServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,7 +417,6 @@ AddPostgreSQLServiceOKBodyPostgresql PostgreSQLService represents a generic Post swagger:model AddPostgreSQLServiceOKBodyPostgresql */ type AddPostgreSQLServiceOKBodyPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go b/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go index ebbac7a9fd..f41482ed2c 100644 --- a/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go +++ b/api/inventorypb/json/client/services/add_proxy_sql_service_parameters.go @@ -60,7 +60,6 @@ AddProxySQLServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddProxySQLServiceParams struct { - // Body. Body AddProxySQLServiceBody @@ -130,7 +129,6 @@ func (o *AddProxySQLServiceParams) SetBody(body AddProxySQLServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddProxySQLServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go b/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go index eeebe808db..4bd65d4a30 100644 --- a/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go +++ b/api/inventorypb/json/client/services/add_proxy_sql_service_responses.go @@ -60,12 +60,12 @@ type AddProxySQLServiceOK struct { func (o *AddProxySQLServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddProxySQL][%d] addProxySqlServiceOk %+v", 200, o.Payload) } + func (o *AddProxySQLServiceOK) GetPayload() *AddProxySQLServiceOKBody { return o.Payload } func (o *AddProxySQLServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddProxySQLServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddProxySQLServiceDefault) Code() int { func (o *AddProxySQLServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/AddProxySQL][%d] AddProxySQLService default %+v", o._statusCode, o.Payload) } + func (o *AddProxySQLServiceDefault) GetPayload() *AddProxySQLServiceDefaultBody { return o.Payload } func (o *AddProxySQLServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddProxySQLServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ AddProxySQLServiceBody add proxy SQL service body swagger:model AddProxySQLServiceBody */ type AddProxySQLServiceBody struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -188,7 +187,6 @@ AddProxySQLServiceDefaultBody add proxy SQL service default body swagger:model AddProxySQLServiceDefaultBody */ type AddProxySQLServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -254,9 +252,7 @@ func (o *AddProxySQLServiceDefaultBody) ContextValidate(ctx context.Context, for } func (o *AddProxySQLServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -267,7 +263,6 @@ func (o *AddProxySQLServiceDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -296,7 +291,6 @@ AddProxySQLServiceDefaultBodyDetailsItems0 add proxy SQL service default body de swagger:model AddProxySQLServiceDefaultBodyDetailsItems0 */ type AddProxySQLServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -334,7 +328,6 @@ AddProxySQLServiceOKBody add proxy SQL service OK body swagger:model AddProxySQLServiceOKBody */ type AddProxySQLServiceOKBody struct { - // proxysql Proxysql *AddProxySQLServiceOKBodyProxysql `json:"proxysql,omitempty"` } @@ -387,7 +380,6 @@ func (o *AddProxySQLServiceOKBody) ContextValidate(ctx context.Context, formats } func (o *AddProxySQLServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,7 +417,6 @@ AddProxySQLServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL i swagger:model AddProxySQLServiceOKBodyProxysql */ type AddProxySQLServiceOKBodyProxysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/get_service_parameters.go b/api/inventorypb/json/client/services/get_service_parameters.go index 02011f9506..45db6f950a 100644 --- a/api/inventorypb/json/client/services/get_service_parameters.go +++ b/api/inventorypb/json/client/services/get_service_parameters.go @@ -60,7 +60,6 @@ GetServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetServiceParams struct { - // Body. Body GetServiceBody @@ -130,7 +129,6 @@ func (o *GetServiceParams) SetBody(body GetServiceBody) { // WriteToRequest writes these params to a swagger request func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/get_service_responses.go b/api/inventorypb/json/client/services/get_service_responses.go index be355fa3fe..5249f7e578 100644 --- a/api/inventorypb/json/client/services/get_service_responses.go +++ b/api/inventorypb/json/client/services/get_service_responses.go @@ -60,12 +60,12 @@ type GetServiceOK struct { func (o *GetServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Get][%d] getServiceOk %+v", 200, o.Payload) } + func (o *GetServiceOK) GetPayload() *GetServiceOKBody { return o.Payload } func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetServiceOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetServiceDefault) Code() int { func (o *GetServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Get][%d] GetService default %+v", o._statusCode, o.Payload) } + func (o *GetServiceDefault) GetPayload() *GetServiceDefaultBody { return o.Payload } func (o *GetServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ GetServiceBody get service body swagger:model GetServiceBody */ type GetServiceBody struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` } @@ -161,7 +160,6 @@ GetServiceDefaultBody get service default body swagger:model GetServiceDefaultBody */ type GetServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -227,9 +225,7 @@ func (o *GetServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +236,6 @@ func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -269,7 +264,6 @@ GetServiceDefaultBodyDetailsItems0 get service default body details items0 swagger:model GetServiceDefaultBodyDetailsItems0 */ type GetServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -307,7 +301,6 @@ GetServiceOKBody get service OK body swagger:model GetServiceOKBody */ type GetServiceOKBody struct { - // external External *GetServiceOKBodyExternal `json:"external,omitempty"` @@ -510,7 +503,6 @@ func (o *GetServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if err := o.External.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -526,7 +518,6 @@ func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if err := o.Haproxy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -542,7 +533,6 @@ func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if err := o.Mongodb.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -558,7 +548,6 @@ func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if err := o.Mysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -574,7 +563,6 @@ func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -590,7 +578,6 @@ func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if err := o.Proxysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -628,7 +615,6 @@ GetServiceOKBodyExternal ExternalService represents a generic External service i swagger:model GetServiceOKBodyExternal */ type GetServiceOKBodyExternal struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -687,7 +673,6 @@ GetServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model GetServiceOKBodyHaproxy */ type GetServiceOKBodyHaproxy struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -743,7 +728,6 @@ GetServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model GetServiceOKBodyMongodb */ type GetServiceOKBodyMongodb struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -811,7 +795,6 @@ GetServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model GetServiceOKBodyMysql */ type GetServiceOKBodyMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -879,7 +862,6 @@ GetServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model GetServiceOKBodyPostgresql */ type GetServiceOKBodyPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -950,7 +932,6 @@ GetServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model GetServiceOKBodyProxysql */ type GetServiceOKBodyProxysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/list_active_service_types_parameters.go b/api/inventorypb/json/client/services/list_active_service_types_parameters.go index 7fff356f2b..05465dbb3d 100644 --- a/api/inventorypb/json/client/services/list_active_service_types_parameters.go +++ b/api/inventorypb/json/client/services/list_active_service_types_parameters.go @@ -60,7 +60,6 @@ ListActiveServiceTypesParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ListActiveServiceTypesParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListActiveServiceTypesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListActiveServiceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/list_active_service_types_responses.go b/api/inventorypb/json/client/services/list_active_service_types_responses.go index 9dcbd3b44c..2a2f2e416b 100644 --- a/api/inventorypb/json/client/services/list_active_service_types_responses.go +++ b/api/inventorypb/json/client/services/list_active_service_types_responses.go @@ -62,12 +62,12 @@ type ListActiveServiceTypesOK struct { func (o *ListActiveServiceTypesOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/ListTypes][%d] listActiveServiceTypesOk %+v", 200, o.Payload) } + func (o *ListActiveServiceTypesOK) GetPayload() *ListActiveServiceTypesOKBody { return o.Payload } func (o *ListActiveServiceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListActiveServiceTypesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListActiveServiceTypesDefault) Code() int { func (o *ListActiveServiceTypesDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/ListTypes][%d] ListActiveServiceTypes default %+v", o._statusCode, o.Payload) } + func (o *ListActiveServiceTypesDefault) GetPayload() *ListActiveServiceTypesDefaultBody { return o.Payload } func (o *ListActiveServiceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListActiveServiceTypesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListActiveServiceTypesDefaultBody list active service types default body swagger:model ListActiveServiceTypesDefaultBody */ type ListActiveServiceTypesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *ListActiveServiceTypesDefaultBody) ContextValidate(ctx context.Context, } func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.C return err } } - } return nil @@ -233,7 +229,6 @@ ListActiveServiceTypesDefaultBodyDetailsItems0 list active service types default swagger:model ListActiveServiceTypesDefaultBodyDetailsItems0 */ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ ListActiveServiceTypesOKBody list active service types OK body swagger:model ListActiveServiceTypesOKBody */ type ListActiveServiceTypesOKBody struct { - // service types ServiceTypes []*string `json:"service_types"` } diff --git a/api/inventorypb/json/client/services/list_services_parameters.go b/api/inventorypb/json/client/services/list_services_parameters.go index 7553a0559e..152f648dca 100644 --- a/api/inventorypb/json/client/services/list_services_parameters.go +++ b/api/inventorypb/json/client/services/list_services_parameters.go @@ -60,7 +60,6 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { - // Body. Body ListServicesBody @@ -130,7 +129,6 @@ func (o *ListServicesParams) SetBody(body ListServicesBody) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/list_services_responses.go b/api/inventorypb/json/client/services/list_services_responses.go index d68e3b161a..d7d093f09d 100644 --- a/api/inventorypb/json/client/services/list_services_responses.go +++ b/api/inventorypb/json/client/services/list_services_responses.go @@ -62,12 +62,12 @@ type ListServicesOK struct { func (o *ListServicesOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/List][%d] listServicesOk %+v", 200, o.Payload) } + func (o *ListServicesOK) GetPayload() *ListServicesOKBody { return o.Payload } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListServicesDefault) Code() int { func (o *ListServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/List][%d] ListServices default %+v", o._statusCode, o.Payload) } + func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { return o.Payload } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListServicesBody list services body swagger:model ListServicesBody */ type ListServicesBody struct { - // Return only Services running on that Node. NodeID string `json:"node_id,omitempty"` @@ -236,7 +235,6 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -302,9 +300,7 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -315,7 +311,6 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -344,7 +339,6 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -382,7 +376,6 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { - // mysql Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` @@ -627,9 +620,7 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mysql); i++ { - if o.Mysql[i] != nil { if err := o.Mysql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -640,16 +631,13 @@ func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats s return err } } - } return nil } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mongodb); i++ { - if o.Mongodb[i] != nil { if err := o.Mongodb[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -660,16 +648,13 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } - } return nil } func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Postgresql); i++ { - if o.Postgresql[i] != nil { if err := o.Postgresql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -680,16 +665,13 @@ func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, form return err } } - } return nil } func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Proxysql); i++ { - if o.Proxysql[i] != nil { if err := o.Proxysql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -700,16 +682,13 @@ func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, format return err } } - } return nil } func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Haproxy); i++ { - if o.Haproxy[i] != nil { if err := o.Haproxy[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -720,16 +699,13 @@ func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats return err } } - } return nil } func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.External); i++ { - if o.External[i] != nil { if err := o.External[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -740,7 +716,6 @@ func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, format return err } } - } return nil @@ -769,7 +744,6 @@ ListServicesOKBodyExternalItems0 ExternalService represents a generic External s swagger:model ListServicesOKBodyExternalItems0 */ type ListServicesOKBodyExternalItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -828,7 +802,6 @@ ListServicesOKBodyHaproxyItems0 HAProxyService represents a generic HAProxy serv swagger:model ListServicesOKBodyHaproxyItems0 */ type ListServicesOKBodyHaproxyItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -884,7 +857,6 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -952,7 +924,6 @@ ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. swagger:model ListServicesOKBodyMysqlItems0 */ type ListServicesOKBodyMysqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1020,7 +991,6 @@ ListServicesOKBodyPostgresqlItems0 PostgreSQLService represents a generic Postgr swagger:model ListServicesOKBodyPostgresqlItems0 */ type ListServicesOKBodyPostgresqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1091,7 +1061,6 @@ ListServicesOKBodyProxysqlItems0 ProxySQLService represents a generic ProxySQL i swagger:model ListServicesOKBodyProxysqlItems0 */ type ListServicesOKBodyProxysqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventorypb/json/client/services/remove_custom_labels_parameters.go b/api/inventorypb/json/client/services/remove_custom_labels_parameters.go index cb7c255bde..bf5236f353 100644 --- a/api/inventorypb/json/client/services/remove_custom_labels_parameters.go +++ b/api/inventorypb/json/client/services/remove_custom_labels_parameters.go @@ -60,7 +60,6 @@ RemoveCustomLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveCustomLabelsParams struct { - // Body. Body RemoveCustomLabelsBody @@ -130,7 +129,6 @@ func (o *RemoveCustomLabelsParams) SetBody(body RemoveCustomLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveCustomLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/remove_custom_labels_responses.go b/api/inventorypb/json/client/services/remove_custom_labels_responses.go index f57b224370..0701571929 100644 --- a/api/inventorypb/json/client/services/remove_custom_labels_responses.go +++ b/api/inventorypb/json/client/services/remove_custom_labels_responses.go @@ -60,12 +60,12 @@ type RemoveCustomLabelsOK struct { func (o *RemoveCustomLabelsOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Remove][%d] removeCustomLabelsOk %+v", 200, o.Payload) } + func (o *RemoveCustomLabelsOK) GetPayload() interface{} { return o.Payload } func (o *RemoveCustomLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveCustomLabelsDefault) Code() int { func (o *RemoveCustomLabelsDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/CustomLabels/Remove][%d] RemoveCustomLabels default %+v", o._statusCode, o.Payload) } + func (o *RemoveCustomLabelsDefault) GetPayload() *RemoveCustomLabelsDefaultBody { return o.Payload } func (o *RemoveCustomLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveCustomLabelsDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveCustomLabelsBody remove custom labels body swagger:model RemoveCustomLabelsBody */ type RemoveCustomLabelsBody struct { - // Unique Service ID. ServiceID string `json:"service_id,omitempty"` @@ -162,7 +161,6 @@ RemoveCustomLabelsDefaultBody remove custom labels default body swagger:model RemoveCustomLabelsDefaultBody */ type RemoveCustomLabelsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *RemoveCustomLabelsDefaultBody) ContextValidate(ctx context.Context, for } func (o *RemoveCustomLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *RemoveCustomLabelsDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -270,7 +265,6 @@ RemoveCustomLabelsDefaultBodyDetailsItems0 remove custom labels default body det swagger:model RemoveCustomLabelsDefaultBodyDetailsItems0 */ type RemoveCustomLabelsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/json/client/services/remove_service_parameters.go b/api/inventorypb/json/client/services/remove_service_parameters.go index ed9f9dd5d8..4246b7a5ce 100644 --- a/api/inventorypb/json/client/services/remove_service_parameters.go +++ b/api/inventorypb/json/client/services/remove_service_parameters.go @@ -60,7 +60,6 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { - // Body. Body RemoveServiceBody @@ -130,7 +129,6 @@ func (o *RemoveServiceParams) SetBody(body RemoveServiceBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventorypb/json/client/services/remove_service_responses.go b/api/inventorypb/json/client/services/remove_service_responses.go index 387b8aa924..c7bbbf1ce0 100644 --- a/api/inventorypb/json/client/services/remove_service_responses.go +++ b/api/inventorypb/json/client/services/remove_service_responses.go @@ -60,12 +60,12 @@ type RemoveServiceOK struct { func (o *RemoveServiceOK) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Remove][%d] removeServiceOk %+v", 200, o.Payload) } + func (o *RemoveServiceOK) GetPayload() interface{} { return o.Payload } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveServiceDefault) Code() int { func (o *RemoveServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/inventory/Services/Remove][%d] RemoveService default %+v", o._statusCode, o.Payload) } + func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { return o.Payload } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveServiceBody remove service body swagger:model RemoveServiceBody */ type RemoveServiceBody struct { - // Unique randomly generated instance identifier. Required. ServiceID string `json:"service_id,omitempty"` @@ -162,7 +161,6 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -270,7 +265,6 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventorypb/log_level.pb.go b/api/inventorypb/log_level.pb.go index 0556fb2722..50a79d8c90 100644 --- a/api/inventorypb/log_level.pb.go +++ b/api/inventorypb/log_level.pb.go @@ -7,10 +7,11 @@ package inventorypb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -113,10 +114,13 @@ func file_inventorypb_log_level_proto_rawDescGZIP() []byte { return file_inventorypb_log_level_proto_rawDescData } -var file_inventorypb_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventorypb_log_level_proto_goTypes = []interface{}{ - (LogLevel)(0), // 0: inventory.LogLevel -} +var ( + file_inventorypb_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventorypb_log_level_proto_goTypes = []interface{}{ + (LogLevel)(0), // 0: inventory.LogLevel + } +) + var file_inventorypb_log_level_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventorypb/log_level.swagger.json b/api/inventorypb/log_level.swagger.json deleted file mode 100644 index eb72e3908d..0000000000 --- a/api/inventorypb/log_level.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "inventorypb/log_level.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/inventorypb/nodes.pb.go b/api/inventorypb/nodes.pb.go index b803de4d8b..afabb19136 100644 --- a/api/inventorypb/nodes.pb.go +++ b/api/inventorypb/nodes.pb.go @@ -7,13 +7,14 @@ package inventorypb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -2218,42 +2219,45 @@ func file_inventorypb_nodes_proto_rawDescGZIP() []byte { return file_inventorypb_nodes_proto_rawDescData } -var file_inventorypb_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventorypb_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 31) -var file_inventorypb_nodes_proto_goTypes = []interface{}{ - (NodeType)(0), // 0: inventory.NodeType - (*GenericNode)(nil), // 1: inventory.GenericNode - (*ContainerNode)(nil), // 2: inventory.ContainerNode - (*RemoteNode)(nil), // 3: inventory.RemoteNode - (*RemoteRDSNode)(nil), // 4: inventory.RemoteRDSNode - (*RemoteAzureDatabaseNode)(nil), // 5: inventory.RemoteAzureDatabaseNode - (*ListNodesRequest)(nil), // 6: inventory.ListNodesRequest - (*ListNodesResponse)(nil), // 7: inventory.ListNodesResponse - (*GetNodeRequest)(nil), // 8: inventory.GetNodeRequest - (*GetNodeResponse)(nil), // 9: inventory.GetNodeResponse - (*AddGenericNodeRequest)(nil), // 10: inventory.AddGenericNodeRequest - (*AddGenericNodeResponse)(nil), // 11: inventory.AddGenericNodeResponse - (*AddContainerNodeRequest)(nil), // 12: inventory.AddContainerNodeRequest - (*AddContainerNodeResponse)(nil), // 13: inventory.AddContainerNodeResponse - (*AddRemoteNodeRequest)(nil), // 14: inventory.AddRemoteNodeRequest - (*AddRemoteNodeResponse)(nil), // 15: inventory.AddRemoteNodeResponse - (*AddRemoteRDSNodeRequest)(nil), // 16: inventory.AddRemoteRDSNodeRequest - (*AddRemoteRDSNodeResponse)(nil), // 17: inventory.AddRemoteRDSNodeResponse - (*AddRemoteAzureDatabaseNodeRequest)(nil), // 18: inventory.AddRemoteAzureDatabaseNodeRequest - (*AddRemoteAzureDatabaseNodeResponse)(nil), // 19: inventory.AddRemoteAzureDatabaseNodeResponse - (*RemoveNodeRequest)(nil), // 20: inventory.RemoveNodeRequest - (*RemoveNodeResponse)(nil), // 21: inventory.RemoveNodeResponse - nil, // 22: inventory.GenericNode.CustomLabelsEntry - nil, // 23: inventory.ContainerNode.CustomLabelsEntry - nil, // 24: inventory.RemoteNode.CustomLabelsEntry - nil, // 25: inventory.RemoteRDSNode.CustomLabelsEntry - nil, // 26: inventory.RemoteAzureDatabaseNode.CustomLabelsEntry - nil, // 27: inventory.AddGenericNodeRequest.CustomLabelsEntry - nil, // 28: inventory.AddContainerNodeRequest.CustomLabelsEntry - nil, // 29: inventory.AddRemoteNodeRequest.CustomLabelsEntry - nil, // 30: inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry - nil, // 31: inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry -} +var ( + file_inventorypb_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventorypb_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 31) + file_inventorypb_nodes_proto_goTypes = []interface{}{ + (NodeType)(0), // 0: inventory.NodeType + (*GenericNode)(nil), // 1: inventory.GenericNode + (*ContainerNode)(nil), // 2: inventory.ContainerNode + (*RemoteNode)(nil), // 3: inventory.RemoteNode + (*RemoteRDSNode)(nil), // 4: inventory.RemoteRDSNode + (*RemoteAzureDatabaseNode)(nil), // 5: inventory.RemoteAzureDatabaseNode + (*ListNodesRequest)(nil), // 6: inventory.ListNodesRequest + (*ListNodesResponse)(nil), // 7: inventory.ListNodesResponse + (*GetNodeRequest)(nil), // 8: inventory.GetNodeRequest + (*GetNodeResponse)(nil), // 9: inventory.GetNodeResponse + (*AddGenericNodeRequest)(nil), // 10: inventory.AddGenericNodeRequest + (*AddGenericNodeResponse)(nil), // 11: inventory.AddGenericNodeResponse + (*AddContainerNodeRequest)(nil), // 12: inventory.AddContainerNodeRequest + (*AddContainerNodeResponse)(nil), // 13: inventory.AddContainerNodeResponse + (*AddRemoteNodeRequest)(nil), // 14: inventory.AddRemoteNodeRequest + (*AddRemoteNodeResponse)(nil), // 15: inventory.AddRemoteNodeResponse + (*AddRemoteRDSNodeRequest)(nil), // 16: inventory.AddRemoteRDSNodeRequest + (*AddRemoteRDSNodeResponse)(nil), // 17: inventory.AddRemoteRDSNodeResponse + (*AddRemoteAzureDatabaseNodeRequest)(nil), // 18: inventory.AddRemoteAzureDatabaseNodeRequest + (*AddRemoteAzureDatabaseNodeResponse)(nil), // 19: inventory.AddRemoteAzureDatabaseNodeResponse + (*RemoveNodeRequest)(nil), // 20: inventory.RemoveNodeRequest + (*RemoveNodeResponse)(nil), // 21: inventory.RemoveNodeResponse + nil, // 22: inventory.GenericNode.CustomLabelsEntry + nil, // 23: inventory.ContainerNode.CustomLabelsEntry + nil, // 24: inventory.RemoteNode.CustomLabelsEntry + nil, // 25: inventory.RemoteRDSNode.CustomLabelsEntry + nil, // 26: inventory.RemoteAzureDatabaseNode.CustomLabelsEntry + nil, // 27: inventory.AddGenericNodeRequest.CustomLabelsEntry + nil, // 28: inventory.AddContainerNodeRequest.CustomLabelsEntry + nil, // 29: inventory.AddRemoteNodeRequest.CustomLabelsEntry + nil, // 30: inventory.AddRemoteRDSNodeRequest.CustomLabelsEntry + nil, // 31: inventory.AddRemoteAzureDatabaseNodeRequest.CustomLabelsEntry + } +) + var file_inventorypb_nodes_proto_depIdxs = []int32{ 22, // 0: inventory.GenericNode.custom_labels:type_name -> inventory.GenericNode.CustomLabelsEntry 23, // 1: inventory.ContainerNode.custom_labels:type_name -> inventory.ContainerNode.CustomLabelsEntry diff --git a/api/inventorypb/nodes.pb.gw.go b/api/inventorypb/nodes.pb.gw.go index 6d280e4a92..91d1c6a5a5 100644 --- a/api/inventorypb/nodes.pb.gw.go +++ b/api/inventorypb/nodes.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest @@ -45,7 +47,6 @@ func request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Nodes_ListNodes_0(ctx context.Context, marshaler runtime.Mars msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, c msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Nodes_GetNode_0(ctx context.Context, marshaler runtime.Marsha msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddGenericNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Nodes_AddGenericNode_0(ctx context.Context, marshaler runtime msg, err := server.AddGenericNode(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddContainerNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Nodes_AddContainerNode_0(ctx context.Context, marshaler runti msg, err := server.AddContainerNode(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.AddRemoteNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Nodes_AddRemoteNode_0(ctx context.Context, marshaler runtime. msg, err := server.AddRemoteNode(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddRemoteRDSNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Nodes_AddRemoteRDSNode_0(ctx context.Context, marshaler runti msg, err := server.AddRemoteRDSNode(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marshaler r msg, err := client.AddRemoteAzureDatabaseNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Nodes_AddRemoteAzureDatabaseNode_0(ctx context.Context, marsh msg, err := server.AddRemoteAzureDatabaseNode(ctx, &protoReq) return msg, metadata, err - } func request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.RemoveNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Mar msg, err := server.RemoveNode(ctx, &protoReq) return msg, metadata, err - } // RegisterNodesHandlerServer registers the http handlers for service Nodes to "mux". @@ -308,7 +294,6 @@ func local_request_Nodes_RemoveNode_0(ctx context.Context, marshaler runtime.Mar // 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 RegisterNodesHandlerFromEndpoint instead. func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodesServer) error { - mux.Handle("POST", pattern_Nodes_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -331,7 +316,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,7 +340,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddGenericNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -381,7 +364,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddGenericNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddContainerNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -406,7 +388,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddContainerNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddRemoteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -431,7 +412,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddRemoteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddRemoteRDSNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -456,7 +436,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddRemoteRDSNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddRemoteAzureDatabaseNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -481,7 +460,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_AddRemoteAzureDatabaseNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -506,7 +484,6 @@ func RegisterNodesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Nodes_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -549,7 +526,6 @@ func RegisterNodesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodesClient" to call the correct interceptors. func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodesClient) error { - mux.Handle("POST", pattern_Nodes_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -569,7 +545,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,7 +566,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddGenericNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -613,7 +587,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddGenericNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddContainerNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -635,7 +608,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddContainerNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddRemoteNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -657,7 +629,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddRemoteNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddRemoteRDSNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -679,7 +650,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddRemoteRDSNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_AddRemoteAzureDatabaseNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -701,7 +671,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_AddRemoteAzureDatabaseNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Nodes_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -723,7 +692,6 @@ func RegisterNodesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Nodes_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/inventorypb/nodes.swagger.json b/api/inventorypb/nodes.swagger.json deleted file mode 100644 index bae050ba33..0000000000 --- a/api/inventorypb/nodes.swagger.json +++ /dev/null @@ -1,854 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "inventorypb/nodes.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Nodes" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/inventory/Nodes/AddContainer": { - "post": { - "summary": "Add Container Node", - "description": "Adds container Node.", - "operationId": "AddContainerNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddContainerNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddContainerNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/AddGeneric": { - "post": { - "summary": "Add Generic Node", - "description": "Adds generic Node.", - "operationId": "AddGenericNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddGenericNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddGenericNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/AddRemote": { - "post": { - "summary": "Add Remote Node", - "description": "Adds remote Node.", - "operationId": "AddRemoteNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddRemoteNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddRemoteNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/AddRemoteAzureDatabase": { - "post": { - "summary": "Add Remote Azure Database Node", - "description": "Adds remote Azure database Node.", - "operationId": "AddRemoteAzureDatabaseNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddRemoteAzureDatabaseNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddRemoteAzureDatabaseNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/AddRemoteRDS": { - "post": { - "summary": "Add Remote RDS Node", - "description": "Adds remote RDS Node.", - "operationId": "AddRemoteRDSNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddRemoteRDSNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddRemoteRDSNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/Get": { - "post": { - "summary": "Get Node", - "description": "Returns a single Node by ID.", - "operationId": "GetNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryGetNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryGetNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/List": { - "post": { - "summary": "List Nodes", - "description": "Returns a list of all Nodes.", - "operationId": "ListNodes", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryListNodesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryListNodesRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - }, - "/v1/inventory/Nodes/Remove": { - "post": { - "summary": "Remove Node", - "description": "Removes Node.", - "operationId": "RemoveNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryRemoveNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryRemoveNodeRequest" - } - } - ], - "tags": [ - "Nodes" - ] - } - } - }, - "definitions": { - "inventoryAddContainerNodeRequest": { - "type": "object", - "properties": { - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id of the Generic Node where this Container Node runs." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddContainerNodeResponse": { - "type": "object", - "properties": { - "container": { - "$ref": "#/definitions/inventoryContainerNode" - } - } - }, - "inventoryAddGenericNodeRequest": { - "type": "object", - "properties": { - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddGenericNodeResponse": { - "type": "object", - "properties": { - "generic": { - "$ref": "#/definitions/inventoryGenericNode" - } - } - }, - "inventoryAddRemoteAzureDatabaseNodeRequest": { - "type": "object", - "properties": { - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "DB instance identifier." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddRemoteAzureDatabaseNodeResponse": { - "type": "object", - "properties": { - "remote_azure_database": { - "$ref": "#/definitions/inventoryRemoteAzureDatabaseNode" - } - } - }, - "inventoryAddRemoteNodeRequest": { - "type": "object", - "properties": { - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddRemoteNodeResponse": { - "type": "object", - "properties": { - "remote": { - "$ref": "#/definitions/inventoryRemoteNode" - } - } - }, - "inventoryAddRemoteRDSNodeRequest": { - "type": "object", - "properties": { - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "DB instance identifier." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddRemoteRDSNodeResponse": { - "type": "object", - "properties": { - "remote_rds": { - "$ref": "#/definitions/inventoryRemoteRDSNode" - } - } - }, - "inventoryContainerNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id of the Generic Node where this Container Node runs." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "ContainerNode represents a Docker container." - }, - "inventoryGenericNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "GenericNode represents a bare metal server or virtual machine." - }, - "inventoryGetNodeRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - } - } - }, - "inventoryGetNodeResponse": { - "type": "object", - "properties": { - "generic": { - "$ref": "#/definitions/inventoryGenericNode" - }, - "container": { - "$ref": "#/definitions/inventoryContainerNode" - }, - "remote": { - "$ref": "#/definitions/inventoryRemoteNode" - }, - "remote_rds": { - "$ref": "#/definitions/inventoryRemoteRDSNode" - }, - "remote_azure_database": { - "$ref": "#/definitions/inventoryRemoteAzureDatabaseNode" - } - } - }, - "inventoryListNodesRequest": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Return only Nodes with matching Node type." - } - } - }, - "inventoryListNodesResponse": { - "type": "object", - "properties": { - "generic": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryGenericNode" - } - }, - "container": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryContainerNode" - } - }, - "remote": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryRemoteNode" - } - }, - "remote_rds": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryRemoteRDSNode" - } - }, - "remote_azure_database": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryRemoteAzureDatabaseNode" - } - } - } - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "inventoryRemoteAzureDatabaseNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "DB instance identifier." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes." - }, - "inventoryRemoteNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes." - }, - "inventoryRemoteRDSNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "DB instance identifier." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;" - } - }, - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes." - }, - "inventoryRemoveNodeRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "force": { - "type": "boolean", - "description": "Remove node with all dependencies." - } - } - }, - "inventoryRemoveNodeResponse": { - "type": "object" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/inventorypb/nodes_grpc.pb.go b/api/inventorypb/nodes_grpc.pb.go index e45671a41f..372069998c 100644 --- a/api/inventorypb/nodes_grpc.pb.go +++ b/api/inventorypb/nodes_grpc.pb.go @@ -8,6 +8,7 @@ package inventorypb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -155,30 +156,36 @@ type NodesServer interface { } // UnimplementedNodesServer must be embedded to have forward compatible implementations. -type UnimplementedNodesServer struct { -} +type UnimplementedNodesServer struct{} func (UnimplementedNodesServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } + func (UnimplementedNodesServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } + func (UnimplementedNodesServer) AddGenericNode(context.Context, *AddGenericNodeRequest) (*AddGenericNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddGenericNode not implemented") } + func (UnimplementedNodesServer) AddContainerNode(context.Context, *AddContainerNodeRequest) (*AddContainerNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddContainerNode not implemented") } + func (UnimplementedNodesServer) AddRemoteNode(context.Context, *AddRemoteNodeRequest) (*AddRemoteNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRemoteNode not implemented") } + func (UnimplementedNodesServer) AddRemoteRDSNode(context.Context, *AddRemoteRDSNodeRequest) (*AddRemoteRDSNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRemoteRDSNode not implemented") } + func (UnimplementedNodesServer) AddRemoteAzureDatabaseNode(context.Context, *AddRemoteAzureDatabaseNodeRequest) (*AddRemoteAzureDatabaseNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRemoteAzureDatabaseNode not implemented") } + func (UnimplementedNodesServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented") } diff --git a/api/inventorypb/services.pb.go b/api/inventorypb/services.pb.go index 69323bd0e1..f187ecaec2 100644 --- a/api/inventorypb/services.pb.go +++ b/api/inventorypb/services.pb.go @@ -7,13 +7,14 @@ package inventorypb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -3155,54 +3156,57 @@ func file_inventorypb_services_proto_rawDescGZIP() []byte { return file_inventorypb_services_proto_rawDescData } -var file_inventorypb_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventorypb_services_proto_msgTypes = make([]protoimpl.MessageInfo, 43) -var file_inventorypb_services_proto_goTypes = []interface{}{ - (ServiceType)(0), // 0: inventory.ServiceType - (*MySQLService)(nil), // 1: inventory.MySQLService - (*MongoDBService)(nil), // 2: inventory.MongoDBService - (*PostgreSQLService)(nil), // 3: inventory.PostgreSQLService - (*ProxySQLService)(nil), // 4: inventory.ProxySQLService - (*HAProxyService)(nil), // 5: inventory.HAProxyService - (*ExternalService)(nil), // 6: inventory.ExternalService - (*ListServicesRequest)(nil), // 7: inventory.ListServicesRequest - (*ListServicesResponse)(nil), // 8: inventory.ListServicesResponse - (*ListActiveServiceTypesRequest)(nil), // 9: inventory.ListActiveServiceTypesRequest - (*ListActiveServiceTypesResponse)(nil), // 10: inventory.ListActiveServiceTypesResponse - (*GetServiceRequest)(nil), // 11: inventory.GetServiceRequest - (*GetServiceResponse)(nil), // 12: inventory.GetServiceResponse - (*AddMySQLServiceRequest)(nil), // 13: inventory.AddMySQLServiceRequest - (*AddMySQLServiceResponse)(nil), // 14: inventory.AddMySQLServiceResponse - (*AddMongoDBServiceRequest)(nil), // 15: inventory.AddMongoDBServiceRequest - (*AddMongoDBServiceResponse)(nil), // 16: inventory.AddMongoDBServiceResponse - (*AddPostgreSQLServiceRequest)(nil), // 17: inventory.AddPostgreSQLServiceRequest - (*AddPostgreSQLServiceResponse)(nil), // 18: inventory.AddPostgreSQLServiceResponse - (*AddProxySQLServiceRequest)(nil), // 19: inventory.AddProxySQLServiceRequest - (*AddProxySQLServiceResponse)(nil), // 20: inventory.AddProxySQLServiceResponse - (*AddHAProxyServiceRequest)(nil), // 21: inventory.AddHAProxyServiceRequest - (*AddHAProxyServiceResponse)(nil), // 22: inventory.AddHAProxyServiceResponse - (*AddExternalServiceRequest)(nil), // 23: inventory.AddExternalServiceRequest - (*AddExternalServiceResponse)(nil), // 24: inventory.AddExternalServiceResponse - (*RemoveServiceRequest)(nil), // 25: inventory.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 26: inventory.RemoveServiceResponse - (*AddCustomLabelsRequest)(nil), // 27: inventory.AddCustomLabelsRequest - (*AddCustomLabelsResponse)(nil), // 28: inventory.AddCustomLabelsResponse - (*RemoveCustomLabelsRequest)(nil), // 29: inventory.RemoveCustomLabelsRequest - (*RemoveCustomLabelsResponse)(nil), // 30: inventory.RemoveCustomLabelsResponse - nil, // 31: inventory.MySQLService.CustomLabelsEntry - nil, // 32: inventory.MongoDBService.CustomLabelsEntry - nil, // 33: inventory.PostgreSQLService.CustomLabelsEntry - nil, // 34: inventory.ProxySQLService.CustomLabelsEntry - nil, // 35: inventory.HAProxyService.CustomLabelsEntry - nil, // 36: inventory.ExternalService.CustomLabelsEntry - nil, // 37: inventory.AddMySQLServiceRequest.CustomLabelsEntry - nil, // 38: inventory.AddMongoDBServiceRequest.CustomLabelsEntry - nil, // 39: inventory.AddPostgreSQLServiceRequest.CustomLabelsEntry - nil, // 40: inventory.AddProxySQLServiceRequest.CustomLabelsEntry - nil, // 41: inventory.AddHAProxyServiceRequest.CustomLabelsEntry - nil, // 42: inventory.AddExternalServiceRequest.CustomLabelsEntry - nil, // 43: inventory.AddCustomLabelsRequest.CustomLabelsEntry -} +var ( + file_inventorypb_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventorypb_services_proto_msgTypes = make([]protoimpl.MessageInfo, 43) + file_inventorypb_services_proto_goTypes = []interface{}{ + (ServiceType)(0), // 0: inventory.ServiceType + (*MySQLService)(nil), // 1: inventory.MySQLService + (*MongoDBService)(nil), // 2: inventory.MongoDBService + (*PostgreSQLService)(nil), // 3: inventory.PostgreSQLService + (*ProxySQLService)(nil), // 4: inventory.ProxySQLService + (*HAProxyService)(nil), // 5: inventory.HAProxyService + (*ExternalService)(nil), // 6: inventory.ExternalService + (*ListServicesRequest)(nil), // 7: inventory.ListServicesRequest + (*ListServicesResponse)(nil), // 8: inventory.ListServicesResponse + (*ListActiveServiceTypesRequest)(nil), // 9: inventory.ListActiveServiceTypesRequest + (*ListActiveServiceTypesResponse)(nil), // 10: inventory.ListActiveServiceTypesResponse + (*GetServiceRequest)(nil), // 11: inventory.GetServiceRequest + (*GetServiceResponse)(nil), // 12: inventory.GetServiceResponse + (*AddMySQLServiceRequest)(nil), // 13: inventory.AddMySQLServiceRequest + (*AddMySQLServiceResponse)(nil), // 14: inventory.AddMySQLServiceResponse + (*AddMongoDBServiceRequest)(nil), // 15: inventory.AddMongoDBServiceRequest + (*AddMongoDBServiceResponse)(nil), // 16: inventory.AddMongoDBServiceResponse + (*AddPostgreSQLServiceRequest)(nil), // 17: inventory.AddPostgreSQLServiceRequest + (*AddPostgreSQLServiceResponse)(nil), // 18: inventory.AddPostgreSQLServiceResponse + (*AddProxySQLServiceRequest)(nil), // 19: inventory.AddProxySQLServiceRequest + (*AddProxySQLServiceResponse)(nil), // 20: inventory.AddProxySQLServiceResponse + (*AddHAProxyServiceRequest)(nil), // 21: inventory.AddHAProxyServiceRequest + (*AddHAProxyServiceResponse)(nil), // 22: inventory.AddHAProxyServiceResponse + (*AddExternalServiceRequest)(nil), // 23: inventory.AddExternalServiceRequest + (*AddExternalServiceResponse)(nil), // 24: inventory.AddExternalServiceResponse + (*RemoveServiceRequest)(nil), // 25: inventory.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 26: inventory.RemoveServiceResponse + (*AddCustomLabelsRequest)(nil), // 27: inventory.AddCustomLabelsRequest + (*AddCustomLabelsResponse)(nil), // 28: inventory.AddCustomLabelsResponse + (*RemoveCustomLabelsRequest)(nil), // 29: inventory.RemoveCustomLabelsRequest + (*RemoveCustomLabelsResponse)(nil), // 30: inventory.RemoveCustomLabelsResponse + nil, // 31: inventory.MySQLService.CustomLabelsEntry + nil, // 32: inventory.MongoDBService.CustomLabelsEntry + nil, // 33: inventory.PostgreSQLService.CustomLabelsEntry + nil, // 34: inventory.ProxySQLService.CustomLabelsEntry + nil, // 35: inventory.HAProxyService.CustomLabelsEntry + nil, // 36: inventory.ExternalService.CustomLabelsEntry + nil, // 37: inventory.AddMySQLServiceRequest.CustomLabelsEntry + nil, // 38: inventory.AddMongoDBServiceRequest.CustomLabelsEntry + nil, // 39: inventory.AddPostgreSQLServiceRequest.CustomLabelsEntry + nil, // 40: inventory.AddProxySQLServiceRequest.CustomLabelsEntry + nil, // 41: inventory.AddHAProxyServiceRequest.CustomLabelsEntry + nil, // 42: inventory.AddExternalServiceRequest.CustomLabelsEntry + nil, // 43: inventory.AddCustomLabelsRequest.CustomLabelsEntry + } +) + var file_inventorypb_services_proto_depIdxs = []int32{ 31, // 0: inventory.MySQLService.custom_labels:type_name -> inventory.MySQLService.CustomLabelsEntry 32, // 1: inventory.MongoDBService.custom_labels:type_name -> inventory.MongoDBService.CustomLabelsEntry diff --git a/api/inventorypb/services.pb.gw.go b/api/inventorypb/services.pb.gw.go index 611d4002ab..41149720ca 100644 --- a/api/inventorypb/services.pb.gw.go +++ b/api/inventorypb/services.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Services_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServicesRequest @@ -45,7 +47,6 @@ func request_Services_ListServices_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Services_ListServices_0(ctx context.Context, marshaler runtim msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err - } func request_Services_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Services_ListActiveServiceTypes_0(ctx context.Context, marshaler ru msg, err := client.ListActiveServiceTypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Services_ListActiveServiceTypes_0(ctx context.Context, marsha msg, err := server.ListActiveServiceTypes(ctx, &protoReq) return msg, metadata, err - } func request_Services_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Services_GetService_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Services_GetService_0(ctx context.Context, marshaler runtime. msg, err := server.GetService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddMySQLService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Services_AddMySQLService_0(ctx context.Context, marshaler runtime.M msg, err := client.AddMySQLService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddMySQLService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Services_AddMySQLService_0(ctx context.Context, marshaler run msg, err := server.AddMySQLService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddMongoDBService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Services_AddMongoDBService_0(ctx context.Context, marshaler runtime msg, err := client.AddMongoDBService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddMongoDBService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Services_AddMongoDBService_0(ctx context.Context, marshaler r msg, err := server.AddMongoDBService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddPostgreSQLService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Services_AddPostgreSQLService_0(ctx context.Context, marshaler runt msg, err := client.AddPostgreSQLService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddPostgreSQLService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Services_AddPostgreSQLService_0(ctx context.Context, marshale msg, err := server.AddPostgreSQLService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddProxySQLService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Services_AddProxySQLService_0(ctx context.Context, marshaler runtim msg, err := client.AddProxySQLService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddProxySQLService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Services_AddProxySQLService_0(ctx context.Context, marshaler msg, err := server.AddProxySQLService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddHAProxyService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_Services_AddHAProxyService_0(ctx context.Context, marshaler runtime msg, err := client.AddHAProxyService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddHAProxyService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_Services_AddHAProxyService_0(ctx context.Context, marshaler r msg, err := server.AddHAProxyService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddExternalService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -317,7 +303,6 @@ func request_Services_AddExternalService_0(ctx context.Context, marshaler runtim msg, err := client.AddExternalService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddExternalService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -334,7 +319,6 @@ func local_request_Services_AddExternalService_0(ctx context.Context, marshaler msg, err := server.AddExternalService(ctx, &protoReq) return msg, metadata, err - } func request_Services_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -351,7 +335,6 @@ func request_Services_RemoveService_0(ctx context.Context, marshaler runtime.Mar msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -368,7 +351,6 @@ func local_request_Services_RemoveService_0(ctx context.Context, marshaler runti msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err - } func request_Services_AddCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -385,7 +367,6 @@ func request_Services_AddCustomLabels_0(ctx context.Context, marshaler runtime.M msg, err := client.AddCustomLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_AddCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -402,7 +383,6 @@ func local_request_Services_AddCustomLabels_0(ctx context.Context, marshaler run msg, err := server.AddCustomLabels(ctx, &protoReq) return msg, metadata, err - } func request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -419,7 +399,6 @@ func request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler runtim msg, err := client.RemoveCustomLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -436,7 +415,6 @@ func local_request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler msg, err := server.RemoveCustomLabels(ctx, &protoReq) return msg, metadata, err - } // RegisterServicesHandlerServer registers the http handlers for service Services to "mux". @@ -444,7 +422,6 @@ func local_request_Services_RemoveCustomLabels_0(ctx context.Context, marshaler // 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 RegisterServicesHandlerFromEndpoint instead. func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServicesServer) error { - mux.Handle("POST", pattern_Services_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -467,7 +444,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -492,7 +468,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -517,7 +492,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddMySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -542,7 +516,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddMySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddMongoDBService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -567,7 +540,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddMongoDBService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddPostgreSQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -592,7 +564,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddPostgreSQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddProxySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -617,7 +588,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddProxySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddHAProxyService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -642,7 +612,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddHAProxyService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddExternalService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -667,7 +636,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddExternalService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -692,7 +660,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -717,7 +684,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_AddCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_RemoveCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -742,7 +708,6 @@ func RegisterServicesHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Services_RemoveCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -785,7 +750,6 @@ func RegisterServicesHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServicesClient" to call the correct interceptors. func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServicesClient) error { - mux.Handle("POST", pattern_Services_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -805,7 +769,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -827,7 +790,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -849,7 +811,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddMySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -871,7 +832,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddMySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddMongoDBService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -893,7 +853,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddMongoDBService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddPostgreSQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -915,7 +874,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddPostgreSQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddProxySQLService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -937,7 +895,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddProxySQLService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddHAProxyService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -959,7 +916,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddHAProxyService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddExternalService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -981,7 +937,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddExternalService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1003,7 +958,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_AddCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1025,7 +979,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_AddCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Services_RemoveCustomLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1047,7 +1000,6 @@ func RegisterServicesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Services_RemoveCustomLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/inventorypb/services.swagger.json b/api/inventorypb/services.swagger.json deleted file mode 100644 index b41244a52a..0000000000 --- a/api/inventorypb/services.swagger.json +++ /dev/null @@ -1,1214 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "inventorypb/services.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Services" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/inventory/Services/AddExternalService": { - "post": { - "summary": "Add External Service", - "description": "Adds External Service.", - "operationId": "AddExternalService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddExternalServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddExternalServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/AddHAProxyService": { - "post": { - "summary": "Add HAProxy Service", - "description": "Adds HAProxy Service.", - "operationId": "AddHAProxyService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddHAProxyServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddHAProxyServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/AddMongoDB": { - "post": { - "summary": "Add MongoDB Service", - "description": "Adds MongoDB Service.", - "operationId": "AddMongoDBService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddMongoDBServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddMongoDBServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/AddMySQL": { - "post": { - "summary": "Add MySQL Service", - "description": "Adds MySQL Service.", - "operationId": "AddMySQLService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddMySQLServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddMySQLServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/AddPostgreSQL": { - "post": { - "summary": "Add PostgreSQL Service", - "description": "Adds PostgreSQL Service.", - "operationId": "AddPostgreSQLService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddPostgreSQLServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddPostgreSQLServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/AddProxySQL": { - "post": { - "summary": "Add ProxySQL Service", - "description": "Adds ProxySQL Service.", - "operationId": "AddProxySQLService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddProxySQLServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddProxySQLServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/CustomLabels/Add": { - "post": { - "summary": "Add/replace custom labels", - "description": "Adds or replaces (if the key exists) custom labels for a Service.", - "operationId": "AddCustomLabels", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryAddCustomLabelsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryAddCustomLabelsRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/CustomLabels/Remove": { - "post": { - "summary": "Remove custom labels", - "description": "Removes custom labels from a Service by key.", - "operationId": "RemoveCustomLabels", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryRemoveCustomLabelsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryRemoveCustomLabelsRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/Get": { - "post": { - "summary": "Get Service", - "description": "Returns a single Service by ID.", - "operationId": "GetService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryGetServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryGetServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/List": { - "post": { - "summary": "List Services", - "description": "Returns a list of Services filtered by type.", - "operationId": "ListServices", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryListServicesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryListServicesRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/ListTypes": { - "post": { - "summary": "List Active Service Types", - "description": "Returns a list of active Service types.", - "operationId": "ListActiveServiceTypes", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryListActiveServiceTypesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryListActiveServiceTypesRequest" - } - } - ], - "tags": [ - "Services" - ] - } - }, - "/v1/inventory/Services/Remove": { - "post": { - "summary": "Remove Service", - "description": "Removes Service.", - "operationId": "RemoveService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/inventoryRemoveServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/inventoryRemoveServiceRequest" - } - } - ], - "tags": [ - "Services" - ] - } - } - }, - "definitions": { - "inventoryAddCustomLabelsRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique Service ID." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels to be added." - } - } - }, - "inventoryAddCustomLabelsResponse": { - "type": "object" - }, - "inventoryAddExternalServiceRequest": { - "type": "object", - "properties": { - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs. Required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "group": { - "type": "string", - "description": "Group name of external service." - } - } - }, - "inventoryAddExternalServiceResponse": { - "type": "object", - "properties": { - "external": { - "$ref": "#/definitions/inventoryExternalService" - } - } - }, - "inventoryAddHAProxyServiceRequest": { - "type": "object", - "properties": { - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs. Required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddHAProxyServiceResponse": { - "type": "object", - "properties": { - "haproxy": { - "$ref": "#/definitions/inventoryHAProxyService" - } - } - }, - "inventoryAddMongoDBServiceRequest": { - "type": "object", - "properties": { - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs. Required." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddMongoDBServiceResponse": { - "type": "object", - "properties": { - "mongodb": { - "$ref": "#/definitions/inventoryMongoDBService" - } - } - }, - "inventoryAddMySQLServiceRequest": { - "type": "object", - "properties": { - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs. Required." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddMySQLServiceResponse": { - "type": "object", - "properties": { - "mysql": { - "$ref": "#/definitions/inventoryMySQLService" - } - } - }, - "inventoryAddPostgreSQLServiceRequest": { - "type": "object", - "properties": { - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs. Required." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddPostgreSQLServiceResponse": { - "type": "object", - "properties": { - "postgresql": { - "$ref": "#/definitions/inventoryPostgreSQLService" - } - } - }, - "inventoryAddProxySQLServiceRequest": { - "type": "object", - "properties": { - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs. Required." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - } - }, - "inventoryAddProxySQLServiceResponse": { - "type": "object", - "properties": { - "proxysql": { - "$ref": "#/definitions/inventoryProxySQLService" - } - } - }, - "inventoryExternalService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this service instance runs." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "group": { - "type": "string", - "description": "Group name of external service." - } - }, - "description": "ExternalService represents a generic External service instance." - }, - "inventoryGetServiceRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - } - } - }, - "inventoryGetServiceResponse": { - "type": "object", - "properties": { - "mysql": { - "$ref": "#/definitions/inventoryMySQLService" - }, - "mongodb": { - "$ref": "#/definitions/inventoryMongoDBService" - }, - "postgresql": { - "$ref": "#/definitions/inventoryPostgreSQLService" - }, - "proxysql": { - "$ref": "#/definitions/inventoryProxySQLService" - }, - "haproxy": { - "$ref": "#/definitions/inventoryHAProxyService" - }, - "external": { - "$ref": "#/definitions/inventoryExternalService" - } - } - }, - "inventoryHAProxyService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this service instance runs." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "HAProxyService represents a generic HAProxy service instance." - }, - "inventoryListActiveServiceTypesRequest": { - "type": "object" - }, - "inventoryListActiveServiceTypesResponse": { - "type": "object", - "properties": { - "service_types": { - "type": "array", - "items": { - "$ref": "#/definitions/inventoryServiceType" - } - } - } - }, - "inventoryListServicesRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Return only Services running on that Node." - }, - "service_type": { - "$ref": "#/definitions/inventoryServiceType", - "description": "Return only services filtered by service type." - }, - "external_group": { - "type": "string", - "description": "Return only services in this external group." - } - } - }, - "inventoryListServicesResponse": { - "type": "object", - "properties": { - "mysql": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryMySQLService" - } - }, - "mongodb": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryMongoDBService" - } - }, - "postgresql": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryPostgreSQLService" - } - }, - "proxysql": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryProxySQLService" - } - }, - "haproxy": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryHAProxyService" - } - }, - "external": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryExternalService" - } - } - } - }, - "inventoryMongoDBService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MongoDBService represents a generic MongoDB instance." - }, - "inventoryMySQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MySQLService represents a generic MySQL instance." - }, - "inventoryPostgreSQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "database_name": { - "type": "string", - "description": "Database name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "PostgreSQLService represents a generic PostgreSQL instance." - }, - "inventoryProxySQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "ProxySQLService represents a generic ProxySQL instance." - }, - "inventoryRemoveCustomLabelsRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique Service ID." - }, - "custom_label_keys": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Custom user-assigned label keys to be removed." - } - } - }, - "inventoryRemoveCustomLabelsResponse": { - "type": "object" - }, - "inventoryRemoveServiceRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier. Required." - }, - "force": { - "type": "boolean", - "description": "Remove service with all dependencies." - } - } - }, - "inventoryRemoveServiceResponse": { - "type": "object" - }, - "inventoryServiceType": { - "type": "string", - "enum": [ - "SERVICE_TYPE_INVALID", - "MYSQL_SERVICE", - "MONGODB_SERVICE", - "POSTGRESQL_SERVICE", - "PROXYSQL_SERVICE", - "HAPROXY_SERVICE", - "EXTERNAL_SERVICE" - ], - "default": "SERVICE_TYPE_INVALID", - "description": "ServiceType describes supported Service types." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/inventorypb/services_grpc.pb.go b/api/inventorypb/services_grpc.pb.go index c140e5d001..c1e42669ca 100644 --- a/api/inventorypb/services_grpc.pb.go +++ b/api/inventorypb/services_grpc.pb.go @@ -8,6 +8,7 @@ package inventorypb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -211,42 +212,52 @@ type ServicesServer interface { } // UnimplementedServicesServer must be embedded to have forward compatible implementations. -type UnimplementedServicesServer struct { -} +type UnimplementedServicesServer struct{} func (UnimplementedServicesServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } + func (UnimplementedServicesServer) ListActiveServiceTypes(context.Context, *ListActiveServiceTypesRequest) (*ListActiveServiceTypesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListActiveServiceTypes not implemented") } + func (UnimplementedServicesServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") } + func (UnimplementedServicesServer) AddMySQLService(context.Context, *AddMySQLServiceRequest) (*AddMySQLServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMySQLService not implemented") } + func (UnimplementedServicesServer) AddMongoDBService(context.Context, *AddMongoDBServiceRequest) (*AddMongoDBServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMongoDBService not implemented") } + func (UnimplementedServicesServer) AddPostgreSQLService(context.Context, *AddPostgreSQLServiceRequest) (*AddPostgreSQLServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPostgreSQLService not implemented") } + func (UnimplementedServicesServer) AddProxySQLService(context.Context, *AddProxySQLServiceRequest) (*AddProxySQLServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQLService not implemented") } + func (UnimplementedServicesServer) AddHAProxyService(context.Context, *AddHAProxyServiceRequest) (*AddHAProxyServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddHAProxyService not implemented") } + func (UnimplementedServicesServer) AddExternalService(context.Context, *AddExternalServiceRequest) (*AddExternalServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternalService not implemented") } + func (UnimplementedServicesServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } + func (UnimplementedServicesServer) AddCustomLabels(context.Context, *AddCustomLabelsRequest) (*AddCustomLabelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddCustomLabels not implemented") } + func (UnimplementedServicesServer) RemoveCustomLabels(context.Context, *RemoveCustomLabelsRequest) (*RemoveCustomLabelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveCustomLabels not implemented") } diff --git a/api/managementpb/actions.pb.go b/api/managementpb/actions.pb.go index be49601765..bbfaffae1a 100644 --- a/api/managementpb/actions.pb.go +++ b/api/managementpb/actions.pb.go @@ -7,13 +7,14 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -2551,41 +2552,44 @@ func file_managementpb_actions_proto_rawDescGZIP() []byte { return file_managementpb_actions_proto_rawDescData } -var file_managementpb_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 30) -var file_managementpb_actions_proto_goTypes = []interface{}{ - (ActionType)(0), // 0: management.ActionType - (*GetActionRequest)(nil), // 1: management.GetActionRequest - (*GetActionResponse)(nil), // 2: management.GetActionResponse - (*StartMySQLExplainActionRequest)(nil), // 3: management.StartMySQLExplainActionRequest - (*StartMySQLExplainActionResponse)(nil), // 4: management.StartMySQLExplainActionResponse - (*StartMySQLExplainJSONActionRequest)(nil), // 5: management.StartMySQLExplainJSONActionRequest - (*StartMySQLExplainJSONActionResponse)(nil), // 6: management.StartMySQLExplainJSONActionResponse - (*StartMySQLExplainTraditionalJSONActionRequest)(nil), // 7: management.StartMySQLExplainTraditionalJSONActionRequest - (*StartMySQLExplainTraditionalJSONActionResponse)(nil), // 8: management.StartMySQLExplainTraditionalJSONActionResponse - (*StartMySQLShowCreateTableActionRequest)(nil), // 9: management.StartMySQLShowCreateTableActionRequest - (*StartMySQLShowCreateTableActionResponse)(nil), // 10: management.StartMySQLShowCreateTableActionResponse - (*StartMySQLShowTableStatusActionRequest)(nil), // 11: management.StartMySQLShowTableStatusActionRequest - (*StartMySQLShowTableStatusActionResponse)(nil), // 12: management.StartMySQLShowTableStatusActionResponse - (*StartMySQLShowIndexActionRequest)(nil), // 13: management.StartMySQLShowIndexActionRequest - (*StartMySQLShowIndexActionResponse)(nil), // 14: management.StartMySQLShowIndexActionResponse - (*StartPostgreSQLShowCreateTableActionRequest)(nil), // 15: management.StartPostgreSQLShowCreateTableActionRequest - (*StartPostgreSQLShowCreateTableActionResponse)(nil), // 16: management.StartPostgreSQLShowCreateTableActionResponse - (*StartPostgreSQLShowIndexActionRequest)(nil), // 17: management.StartPostgreSQLShowIndexActionRequest - (*StartPostgreSQLShowIndexActionResponse)(nil), // 18: management.StartPostgreSQLShowIndexActionResponse - (*StartMongoDBExplainActionRequest)(nil), // 19: management.StartMongoDBExplainActionRequest - (*StartMongoDBExplainActionResponse)(nil), // 20: management.StartMongoDBExplainActionResponse - (*StartPTSummaryActionRequest)(nil), // 21: management.StartPTSummaryActionRequest - (*StartPTSummaryActionResponse)(nil), // 22: management.StartPTSummaryActionResponse - (*StartPTPgSummaryActionRequest)(nil), // 23: management.StartPTPgSummaryActionRequest - (*StartPTPgSummaryActionResponse)(nil), // 24: management.StartPTPgSummaryActionResponse - (*StartPTMongoDBSummaryActionRequest)(nil), // 25: management.StartPTMongoDBSummaryActionRequest - (*StartPTMongoDBSummaryActionResponse)(nil), // 26: management.StartPTMongoDBSummaryActionResponse - (*StartPTMySQLSummaryActionRequest)(nil), // 27: management.StartPTMySQLSummaryActionRequest - (*StartPTMySQLSummaryActionResponse)(nil), // 28: management.StartPTMySQLSummaryActionResponse - (*CancelActionRequest)(nil), // 29: management.CancelActionRequest - (*CancelActionResponse)(nil), // 30: management.CancelActionResponse -} +var ( + file_managementpb_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 30) + file_managementpb_actions_proto_goTypes = []interface{}{ + (ActionType)(0), // 0: management.ActionType + (*GetActionRequest)(nil), // 1: management.GetActionRequest + (*GetActionResponse)(nil), // 2: management.GetActionResponse + (*StartMySQLExplainActionRequest)(nil), // 3: management.StartMySQLExplainActionRequest + (*StartMySQLExplainActionResponse)(nil), // 4: management.StartMySQLExplainActionResponse + (*StartMySQLExplainJSONActionRequest)(nil), // 5: management.StartMySQLExplainJSONActionRequest + (*StartMySQLExplainJSONActionResponse)(nil), // 6: management.StartMySQLExplainJSONActionResponse + (*StartMySQLExplainTraditionalJSONActionRequest)(nil), // 7: management.StartMySQLExplainTraditionalJSONActionRequest + (*StartMySQLExplainTraditionalJSONActionResponse)(nil), // 8: management.StartMySQLExplainTraditionalJSONActionResponse + (*StartMySQLShowCreateTableActionRequest)(nil), // 9: management.StartMySQLShowCreateTableActionRequest + (*StartMySQLShowCreateTableActionResponse)(nil), // 10: management.StartMySQLShowCreateTableActionResponse + (*StartMySQLShowTableStatusActionRequest)(nil), // 11: management.StartMySQLShowTableStatusActionRequest + (*StartMySQLShowTableStatusActionResponse)(nil), // 12: management.StartMySQLShowTableStatusActionResponse + (*StartMySQLShowIndexActionRequest)(nil), // 13: management.StartMySQLShowIndexActionRequest + (*StartMySQLShowIndexActionResponse)(nil), // 14: management.StartMySQLShowIndexActionResponse + (*StartPostgreSQLShowCreateTableActionRequest)(nil), // 15: management.StartPostgreSQLShowCreateTableActionRequest + (*StartPostgreSQLShowCreateTableActionResponse)(nil), // 16: management.StartPostgreSQLShowCreateTableActionResponse + (*StartPostgreSQLShowIndexActionRequest)(nil), // 17: management.StartPostgreSQLShowIndexActionRequest + (*StartPostgreSQLShowIndexActionResponse)(nil), // 18: management.StartPostgreSQLShowIndexActionResponse + (*StartMongoDBExplainActionRequest)(nil), // 19: management.StartMongoDBExplainActionRequest + (*StartMongoDBExplainActionResponse)(nil), // 20: management.StartMongoDBExplainActionResponse + (*StartPTSummaryActionRequest)(nil), // 21: management.StartPTSummaryActionRequest + (*StartPTSummaryActionResponse)(nil), // 22: management.StartPTSummaryActionResponse + (*StartPTPgSummaryActionRequest)(nil), // 23: management.StartPTPgSummaryActionRequest + (*StartPTPgSummaryActionResponse)(nil), // 24: management.StartPTPgSummaryActionResponse + (*StartPTMongoDBSummaryActionRequest)(nil), // 25: management.StartPTMongoDBSummaryActionRequest + (*StartPTMongoDBSummaryActionResponse)(nil), // 26: management.StartPTMongoDBSummaryActionResponse + (*StartPTMySQLSummaryActionRequest)(nil), // 27: management.StartPTMySQLSummaryActionRequest + (*StartPTMySQLSummaryActionResponse)(nil), // 28: management.StartPTMySQLSummaryActionResponse + (*CancelActionRequest)(nil), // 29: management.CancelActionRequest + (*CancelActionResponse)(nil), // 30: management.CancelActionResponse + } +) + var file_managementpb_actions_proto_depIdxs = []int32{ 1, // 0: management.Actions.GetAction:input_type -> management.GetActionRequest 3, // 1: management.Actions.StartMySQLExplainAction:input_type -> management.StartMySQLExplainActionRequest diff --git a/api/managementpb/actions.pb.gw.go b/api/managementpb/actions.pb.gw.go index 4df6a934e0..afb3efb2f4 100644 --- a/api/managementpb/actions.pb.gw.go +++ b/api/managementpb/actions.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetActionRequest @@ -45,7 +47,6 @@ func request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.GetAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Actions_GetAction_0(ctx context.Context, marshaler runtime.Ma msg, err := server.GetAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMySQLExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Actions_StartMySQLExplainAction_0(ctx context.Context, marshaler ru msg, err := client.StartMySQLExplainAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMySQLExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Actions_StartMySQLExplainAction_0(ctx context.Context, marsha msg, err := server.StartMySQLExplainAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, marshale msg, err := client.StartMySQLExplainJSONAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Actions_StartMySQLExplainJSONAction_0(ctx context.Context, ma msg, err := server.StartMySQLExplainJSONAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context.Contex msg, err := client.StartMySQLExplainTraditionalJSONAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Actions_StartMySQLExplainTraditionalJSONAction_0(ctx context. msg, err := server.StartMySQLExplainTraditionalJSONAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context, mars msg, err := client.StartMySQLShowCreateTableAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Actions_StartMySQLShowCreateTableAction_0(ctx context.Context msg, err := server.StartMySQLShowCreateTableAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context, mars msg, err := client.StartMySQLShowTableStatusAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Actions_StartMySQLShowTableStatusAction_0(ctx context.Context msg, err := server.StartMySQLShowTableStatusAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, marshaler msg, err := client.StartMySQLShowIndexAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Actions_StartMySQLShowIndexAction_0(ctx context.Context, mars msg, err := server.StartMySQLShowIndexAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Context, msg, err := client.StartPostgreSQLShowCreateTableAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_Actions_StartPostgreSQLShowCreateTableAction_0(ctx context.Co msg, err := server.StartPostgreSQLShowCreateTableAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -317,7 +303,6 @@ func request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, marsh msg, err := client.StartPostgreSQLShowIndexAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -334,7 +319,6 @@ func local_request_Actions_StartPostgreSQLShowIndexAction_0(ctx context.Context, msg, err := server.StartPostgreSQLShowIndexAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartMongoDBExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -351,7 +335,6 @@ func request_Actions_StartMongoDBExplainAction_0(ctx context.Context, marshaler msg, err := client.StartMongoDBExplainAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartMongoDBExplainAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -368,7 +351,6 @@ func local_request_Actions_StartMongoDBExplainAction_0(ctx context.Context, mars msg, err := server.StartMongoDBExplainAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -385,7 +367,6 @@ func request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler runti msg, err := client.StartPTSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -402,7 +383,6 @@ func local_request_Actions_StartPTSummaryAction_0(ctx context.Context, marshaler msg, err := server.StartPTSummaryAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -419,7 +399,6 @@ func request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshaler run msg, err := client.StartPTPgSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -436,7 +415,6 @@ func local_request_Actions_StartPTPgSummaryAction_0(ctx context.Context, marshal msg, err := server.StartPTPgSummaryAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -453,7 +431,6 @@ func request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, marshale msg, err := client.StartPTMongoDBSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -470,7 +447,6 @@ func local_request_Actions_StartPTMongoDBSummaryAction_0(ctx context.Context, ma msg, err := server.StartPTMongoDBSummaryAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -487,7 +463,6 @@ func request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, marshaler msg, err := client.StartPTMySQLSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -504,7 +479,6 @@ func local_request_Actions_StartPTMySQLSummaryAction_0(ctx context.Context, mars msg, err := server.StartPTMySQLSummaryAction(ctx, &protoReq) return msg, metadata, err - } func request_Actions_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -521,7 +495,6 @@ func request_Actions_CancelAction_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.CancelAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Actions_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -538,7 +511,6 @@ func local_request_Actions_CancelAction_0(ctx context.Context, marshaler runtime msg, err := server.CancelAction(ctx, &protoReq) return msg, metadata, err - } // RegisterActionsHandlerServer registers the http handlers for service Actions to "mux". @@ -546,7 +518,6 @@ func local_request_Actions_CancelAction_0(ctx context.Context, marshaler runtime // 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 RegisterActionsHandlerFromEndpoint instead. func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ActionsServer) error { - mux.Handle("POST", pattern_Actions_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -569,7 +540,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -594,7 +564,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLExplainJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -619,7 +588,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLExplainJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLExplainTraditionalJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -644,7 +612,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLExplainTraditionalJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -669,7 +636,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLShowTableStatusAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -694,7 +660,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLShowTableStatusAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -719,7 +684,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMySQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -744,7 +708,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPostgreSQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -769,7 +732,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPostgreSQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMongoDBExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -794,7 +756,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartMongoDBExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -819,7 +780,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTPgSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -844,7 +804,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTPgSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTMongoDBSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -869,7 +828,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTMongoDBSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTMySQLSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -894,7 +852,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_StartPTMySQLSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -919,7 +876,6 @@ func RegisterActionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Actions_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -962,7 +918,6 @@ func RegisterActionsHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ActionsClient" to call the correct interceptors. func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ActionsClient) error { - mux.Handle("POST", pattern_Actions_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -982,7 +937,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1004,7 +958,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLExplainJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1026,7 +979,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLExplainJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLExplainTraditionalJSONAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1048,7 +1000,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLExplainTraditionalJSONAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1070,7 +1021,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLShowTableStatusAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1092,7 +1042,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLShowTableStatusAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMySQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1114,7 +1063,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMySQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowCreateTableAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1136,7 +1084,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPostgreSQLShowCreateTableAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPostgreSQLShowIndexAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1158,7 +1105,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPostgreSQLShowIndexAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartMongoDBExplainAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1180,7 +1126,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartMongoDBExplainAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1202,7 +1147,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTPgSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1224,7 +1168,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTPgSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTMongoDBSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1246,7 +1189,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTMongoDBSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_StartPTMySQLSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1268,7 +1210,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_StartPTMySQLSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Actions_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1290,7 +1231,6 @@ func RegisterActionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Actions_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/actions.swagger.json b/api/managementpb/actions.swagger.json deleted file mode 100644 index 2b20e8358f..0000000000 --- a/api/managementpb/actions.swagger.json +++ /dev/null @@ -1,1051 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/actions.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Actions" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Actions/Cancel": { - "post": { - "summary": "Cancel Action", - "description": "Stops an Action.", - "operationId": "CancelAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementCancelActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementCancelActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/Get": { - "post": { - "summary": "Get Action", - "description": "Gets the result of a given Action.", - "operationId": "GetAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementGetActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementGetActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMongoDBExplain": { - "post": { - "summary": "Start 'MongoDB EXPLAIN' Action", - "description": "Starts 'MongoDB EXPLAIN' Action.", - "operationId": "StartMongoDBExplainAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMongoDBExplainActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMongoDBExplainActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMySQLExplain": { - "post": { - "summary": "Start 'MySQL EXPLAIN' Action", - "description": "Starts 'MySQL EXPLAIN' Action with traditional output.", - "operationId": "StartMySQLExplainAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMySQLExplainActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMySQLExplainActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMySQLExplainJSON": { - "post": { - "summary": "Start 'MySQL EXPLAIN JSON' Action", - "description": "Starts 'MySQL EXPLAIN' Action with JSON output.", - "operationId": "StartMySQLExplainJSONAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMySQLExplainJSONActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMySQLExplainJSONActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMySQLExplainTraditionalJSON": { - "post": { - "summary": "Start 'MySQL EXPLAIN Traditional JSON' Action", - "description": "Starts 'MySQL EXPLAIN' Action with traditional JSON output.", - "operationId": "StartMySQLExplainTraditionalJSONAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMySQLExplainTraditionalJSONActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMySQLExplainTraditionalJSONActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMySQLShowCreateTable": { - "post": { - "summary": "Start 'MySQL SHOW CREATE TABLE' Action", - "description": "Starts 'MySQL SHOW CREATE TABLE' Action.", - "operationId": "StartMySQLShowCreateTableAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMySQLShowCreateTableActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMySQLShowCreateTableActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMySQLShowIndex": { - "post": { - "summary": "Start 'MySQL SHOW INDEX' Action", - "description": "Starts 'MySQL SHOW INDEX' Action.", - "operationId": "StartMySQLShowIndexAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMySQLShowIndexActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMySQLShowIndexActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartMySQLShowTableStatus": { - "post": { - "summary": "Start 'MySQL SHOW TABLE STATUS' Action", - "description": "Starts 'MySQL SHOW TABLE STATUS' Action.", - "operationId": "StartMySQLShowTableStatusAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartMySQLShowTableStatusActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartMySQLShowTableStatusActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartPTMongoDBSummary": { - "post": { - "summary": "Start 'PT MongoDB Summary' Action", - "description": "Starts 'Percona Toolkit MongoDB Summary' Action.", - "operationId": "StartPTMongoDBSummaryAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartPTMongoDBSummaryActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartPTMongoDBSummaryActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartPTMySQLSummary": { - "post": { - "summary": "Start 'PT MySQL Summary' Action", - "description": "Starts 'Percona Toolkit MySQL Summary' Action.", - "operationId": "StartPTMySQLSummaryAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartPTMySQLSummaryActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartPTMySQLSummaryActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartPTPgSummary": { - "post": { - "summary": "Start 'PT PostgreSQL Summary' Action", - "description": "Starts 'Percona Toolkit PostgreSQL Summary' Action.", - "operationId": "StartPTPgSummaryAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartPTPgSummaryActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartPTPgSummaryActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartPTSummary": { - "post": { - "summary": "Start 'PT Summary' Action", - "description": "Starts 'Percona Toolkit Summary' Action.", - "operationId": "StartPTSummaryAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartPTSummaryActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartPTSummaryActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartPostgreSQLShowCreateTable": { - "post": { - "summary": "Start 'PostgreSQL SHOW CREATE TABLE' Action", - "description": "Starts 'PostgreSQL SHOW CREATE TABLE' Action.", - "operationId": "StartPostgreSQLShowCreateTableAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartPostgreSQLShowCreateTableActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartPostgreSQLShowCreateTableActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - }, - "/v1/management/Actions/StartPostgreSQLShowIndex": { - "post": { - "summary": "Start 'PostgreSQL SHOW INDEX' Action", - "description": "Starts 'PostgreSQL SHOW INDEX' Action.", - "operationId": "StartPostgreSQLShowIndexAction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartPostgreSQLShowIndexActionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartPostgreSQLShowIndexActionRequest" - } - } - ], - "tags": [ - "Actions" - ] - } - } - }, - "definitions": { - "managementCancelActionRequest": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID. Required." - } - } - }, - "managementCancelActionResponse": { - "type": "object" - }, - "managementGetActionRequest": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - } - } - }, - "managementGetActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where this Action is running / was run." - }, - "output": { - "type": "string", - "description": "Current Action output; may be partial if Action is still running." - }, - "done": { - "type": "boolean", - "description": "True if Action is finished." - }, - "error": { - "type": "string", - "description": "Error message if Action failed." - } - } - }, - "managementStartMongoDBExplainActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "query": { - "type": "string", - "description": "Query. Required." - } - } - }, - "managementStartMongoDBExplainActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartMySQLExplainActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "query": { - "type": "string", - "description": "Deprecated: should not be used.\nWill be removed in 2.42." - }, - "query_id": { - "type": "string", - "description": "Query ID of query." - }, - "placeholders": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Array of placeholder values" - }, - "database": { - "type": "string", - "description": "Database name. Required if it can't be deduced from the query ID." - } - } - }, - "managementStartMySQLExplainActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartMySQLExplainJSONActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "query": { - "type": "string", - "description": "Deprecated: should not be used.\nWill be removed in 2.42." - }, - "query_id": { - "type": "string", - "description": "Query ID of query." - }, - "placeholders": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Array of placeholder values" - }, - "database": { - "type": "string", - "description": "Database name. Required if it can't be deduced from the query ID." - } - } - }, - "managementStartMySQLExplainJSONActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartMySQLExplainTraditionalJSONActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "query": { - "type": "string", - "description": "Deprecated: should not be used.\nWill be removed in 2.42." - }, - "query_id": { - "type": "string", - "description": "Query ID of query." - }, - "placeholders": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Array of placeholder values" - }, - "database": { - "type": "string", - "description": "Database name. Required if it can't be deduced from the query ID." - } - } - }, - "managementStartMySQLExplainTraditionalJSONActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartMySQLShowCreateTableActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "table_name": { - "type": "string", - "description": "Table name. Required. May additionally contain a database name." - }, - "database": { - "type": "string", - "description": "Database name. Required if not given in the table_name field." - } - } - }, - "managementStartMySQLShowCreateTableActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartMySQLShowIndexActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "table_name": { - "type": "string", - "description": "Table name. Required. May additionally contain a database name." - }, - "database": { - "type": "string", - "description": "Database name. Required if not given in the table_name field." - } - } - }, - "managementStartMySQLShowIndexActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartMySQLShowTableStatusActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "table_name": { - "type": "string", - "description": "Table name. Required. May additionally contain a database name." - }, - "database": { - "type": "string", - "description": "Database name. Required if not given in the table_name field." - } - } - }, - "managementStartMySQLShowTableStatusActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartPTMongoDBSummaryActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action." - } - }, - "title": "Message to prepare pt-mongodb-summary data" - }, - "managementStartPTMongoDBSummaryActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - }, - "title": "Message to retrieve the prepared pt-mongodb-summary data" - }, - "managementStartPTMySQLSummaryActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action." - } - }, - "title": "Message to prepare pt-mysql-summary data" - }, - "managementStartPTMySQLSummaryActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - }, - "title": "Message to retrieve the prepared pt-mysql-summary data" - }, - "managementStartPTPgSummaryActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action." - } - }, - "title": "Message to prepare pt-pg-summary data" - }, - "managementStartPTPgSummaryActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - }, - "title": "Message to retrieve the prepared pt-pg-summary data" - }, - "managementStartPTSummaryActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "node_id": { - "type": "string", - "description": "Node ID for this Action." - } - } - }, - "managementStartPTSummaryActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartPostgreSQLShowCreateTableActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "table_name": { - "type": "string", - "description": "Table name. Required. May additionally contain a database name." - }, - "database": { - "type": "string", - "description": "Database name. Required if not given in the table_name field." - } - } - }, - "managementStartPostgreSQLShowCreateTableActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "managementStartPostgreSQLShowIndexActionRequest": { - "type": "object", - "properties": { - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to run this Action." - }, - "service_id": { - "type": "string", - "description": "Service ID for this Action. Required." - }, - "table_name": { - "type": "string", - "description": "Table name. Required. May additionally contain a database name." - }, - "database": { - "type": "string", - "description": "Database name. Required if not given in the table_name field." - } - } - }, - "managementStartPostgreSQLShowIndexActionResponse": { - "type": "object", - "properties": { - "action_id": { - "type": "string", - "description": "Unique Action ID." - }, - "pmm_agent_id": { - "type": "string", - "description": "pmm-agent ID where to this Action was started." - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/actions_grpc.pb.go b/api/managementpb/actions_grpc.pb.go index bd2f259f4e..b06625ee9a 100644 --- a/api/managementpb/actions_grpc.pb.go +++ b/api/managementpb/actions_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -253,51 +254,64 @@ type ActionsServer interface { } // UnimplementedActionsServer must be embedded to have forward compatible implementations. -type UnimplementedActionsServer struct { -} +type UnimplementedActionsServer struct{} func (UnimplementedActionsServer) GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAction not implemented") } + func (UnimplementedActionsServer) StartMySQLExplainAction(context.Context, *StartMySQLExplainActionRequest) (*StartMySQLExplainActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLExplainAction not implemented") } + func (UnimplementedActionsServer) StartMySQLExplainJSONAction(context.Context, *StartMySQLExplainJSONActionRequest) (*StartMySQLExplainJSONActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLExplainJSONAction not implemented") } + func (UnimplementedActionsServer) StartMySQLExplainTraditionalJSONAction(context.Context, *StartMySQLExplainTraditionalJSONActionRequest) (*StartMySQLExplainTraditionalJSONActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLExplainTraditionalJSONAction not implemented") } + func (UnimplementedActionsServer) StartMySQLShowCreateTableAction(context.Context, *StartMySQLShowCreateTableActionRequest) (*StartMySQLShowCreateTableActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLShowCreateTableAction not implemented") } + func (UnimplementedActionsServer) StartMySQLShowTableStatusAction(context.Context, *StartMySQLShowTableStatusActionRequest) (*StartMySQLShowTableStatusActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLShowTableStatusAction not implemented") } + func (UnimplementedActionsServer) StartMySQLShowIndexAction(context.Context, *StartMySQLShowIndexActionRequest) (*StartMySQLShowIndexActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMySQLShowIndexAction not implemented") } + func (UnimplementedActionsServer) StartPostgreSQLShowCreateTableAction(context.Context, *StartPostgreSQLShowCreateTableActionRequest) (*StartPostgreSQLShowCreateTableActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPostgreSQLShowCreateTableAction not implemented") } + func (UnimplementedActionsServer) StartPostgreSQLShowIndexAction(context.Context, *StartPostgreSQLShowIndexActionRequest) (*StartPostgreSQLShowIndexActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPostgreSQLShowIndexAction not implemented") } + func (UnimplementedActionsServer) StartMongoDBExplainAction(context.Context, *StartMongoDBExplainActionRequest) (*StartMongoDBExplainActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartMongoDBExplainAction not implemented") } + func (UnimplementedActionsServer) StartPTSummaryAction(context.Context, *StartPTSummaryActionRequest) (*StartPTSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTSummaryAction not implemented") } + func (UnimplementedActionsServer) StartPTPgSummaryAction(context.Context, *StartPTPgSummaryActionRequest) (*StartPTPgSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTPgSummaryAction not implemented") } + func (UnimplementedActionsServer) StartPTMongoDBSummaryAction(context.Context, *StartPTMongoDBSummaryActionRequest) (*StartPTMongoDBSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTMongoDBSummaryAction not implemented") } + func (UnimplementedActionsServer) StartPTMySQLSummaryAction(context.Context, *StartPTMySQLSummaryActionRequest) (*StartPTMySQLSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTMySQLSummaryAction not implemented") } + func (UnimplementedActionsServer) CancelAction(context.Context, *CancelActionRequest) (*CancelActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelAction not implemented") } diff --git a/api/managementpb/agent/agent.pb.go b/api/managementpb/agent/agent.pb.go index b25c55bd77..319577f8b5 100644 --- a/api/managementpb/agent/agent.pb.go +++ b/api/managementpb/agent/agent.pb.go @@ -7,14 +7,15 @@ package agentv1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -1082,18 +1083,21 @@ func file_managementpb_agent_agent_proto_rawDescGZIP() []byte { return file_managementpb_agent_agent_proto_rawDescData } -var file_managementpb_agent_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_managementpb_agent_agent_proto_goTypes = []interface{}{ - (*UniversalAgent)(nil), // 0: agent.v1beta1.UniversalAgent - (*ListAgentRequest)(nil), // 1: agent.v1beta1.ListAgentRequest - (*ListAgentResponse)(nil), // 2: agent.v1beta1.ListAgentResponse - (*UniversalAgent_MySQLOptions)(nil), // 3: agent.v1beta1.UniversalAgent.MySQLOptions - (*UniversalAgent_AzureOptions)(nil), // 4: agent.v1beta1.UniversalAgent.AzureOptions - (*UniversalAgent_MongoDBOptions)(nil), // 5: agent.v1beta1.UniversalAgent.MongoDBOptions - (*UniversalAgent_PostgreSQLOptions)(nil), // 6: agent.v1beta1.UniversalAgent.PostgreSQLOptions - nil, // 7: agent.v1beta1.UniversalAgent.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp -} +var ( + file_managementpb_agent_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_managementpb_agent_agent_proto_goTypes = []interface{}{ + (*UniversalAgent)(nil), // 0: agent.v1beta1.UniversalAgent + (*ListAgentRequest)(nil), // 1: agent.v1beta1.ListAgentRequest + (*ListAgentResponse)(nil), // 2: agent.v1beta1.ListAgentResponse + (*UniversalAgent_MySQLOptions)(nil), // 3: agent.v1beta1.UniversalAgent.MySQLOptions + (*UniversalAgent_AzureOptions)(nil), // 4: agent.v1beta1.UniversalAgent.AzureOptions + (*UniversalAgent_MongoDBOptions)(nil), // 5: agent.v1beta1.UniversalAgent.MongoDBOptions + (*UniversalAgent_PostgreSQLOptions)(nil), // 6: agent.v1beta1.UniversalAgent.PostgreSQLOptions + nil, // 7: agent.v1beta1.UniversalAgent.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + } +) + var file_managementpb_agent_agent_proto_depIdxs = []int32{ 4, // 0: agent.v1beta1.UniversalAgent.azure_options:type_name -> agent.v1beta1.UniversalAgent.AzureOptions 8, // 1: agent.v1beta1.UniversalAgent.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/agent/agent.pb.gw.go b/api/managementpb/agent/agent.pb.gw.go index f17cb9d1fc..9329b46d39 100644 --- a/api/managementpb/agent/agent.pb.gw.go +++ b/api/managementpb/agent/agent.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentRequest @@ -45,7 +47,6 @@ func request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server AgentServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Mar msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err - } // RegisterAgentHandlerServer registers the http handlers for service Agent to "mux". @@ -70,7 +70,6 @@ func local_request_Agent_ListAgents_0(ctx context.Context, marshaler runtime.Mar // 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 RegisterAgentHandlerFromEndpoint instead. func RegisterAgentHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentServer) error { - mux.Handle("POST", pattern_Agent_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterAgentHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Agent_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterAgentHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentClient" to call the correct interceptors. func RegisterAgentHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentClient) error { - mux.Handle("POST", pattern_Agent_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterAgentHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Agent_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_Agent_ListAgents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Agent", "List"}, "")) -) +var pattern_Agent_ListAgents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Agent", "List"}, "")) -var ( - forward_Agent_ListAgents_0 = runtime.ForwardResponseMessage -) +var forward_Agent_ListAgents_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/agent/agent.swagger.json b/api/managementpb/agent/agent.swagger.json deleted file mode 100644 index 8f6404ed53..0000000000 --- a/api/managementpb/agent/agent.swagger.json +++ /dev/null @@ -1,386 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/agent/agent.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Agent" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Agent/List": { - "post": { - "summary": "List Agents", - "description": "Returns a filtered list of Agents.", - "operationId": "ListAgents", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListAgentResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "Only one of the parameters below must be set.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListAgentRequest" - } - } - ], - "tags": [ - "Agent" - ] - } - } - }, - "definitions": { - "UniversalAgentAzureOptions": { - "type": "object", - "properties": { - "client_id": { - "type": "string", - "description": "Azure client ID." - }, - "is_client_secret_set": { - "type": "boolean", - "description": "True if Azure client secret is set." - }, - "resource_group": { - "type": "string", - "description": "Azure resource group." - }, - "subscription_id": { - "type": "string", - "description": "Azure subscription ID." - }, - "tenant_id": { - "type": "string", - "description": "Azure tenant ID." - } - } - }, - "UniversalAgentMongoDBOptions": { - "type": "object", - "properties": { - "is_tls_certificate_key_set": { - "type": "boolean", - "description": "True if TLS certificate is set." - }, - "is_tls_certificate_key_file_password_set": { - "type": "boolean", - "description": "True if TLS certificate file password is set." - }, - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "authentication_mechanism": { - "type": "string", - "description": "MongoDB auth mechanism." - }, - "authentication_database": { - "type": "string", - "description": "MongoDB auth database." - }, - "stats_collections": { - "type": "array", - "items": { - "type": "string" - }, - "description": "MongoDB stats collections." - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "description": "MongoDB collections limit." - }, - "enable_all_collectors": { - "type": "boolean", - "description": "True if all collectors are enabled." - } - } - }, - "UniversalAgentMySQLOptions": { - "type": "object", - "properties": { - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "tls_cert": { - "type": "string", - "description": "TLS certificate." - }, - "is_tls_key_set": { - "type": "boolean", - "description": "True if TLS key is set." - } - } - }, - "UniversalAgentPostgreSQLOptions": { - "type": "object", - "properties": { - "ssl_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "ssl_cert": { - "type": "string", - "description": "TLS certificate." - }, - "is_ssl_key_set": { - "type": "boolean", - "description": "True if TLS key is set." - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1ListAgentRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Return only Agents that relate to a specific ServiceID." - }, - "node_id": { - "type": "string", - "description": "Return only Agents that relate to a specific NodeID." - } - }, - "description": "Only one of the parameters below must be set." - }, - "v1beta1ListAgentResponse": { - "type": "object", - "properties": { - "agents": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1UniversalAgent" - }, - "description": "List of Agents." - } - } - }, - "v1beta1UniversalAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique agent identifier." - }, - "is_agent_password_set": { - "type": "boolean", - "description": "True if the agent password is set." - }, - "agent_type": { - "type": "string", - "description": "Agent type." - }, - "aws_access_key": { - "type": "string", - "description": "AWS Access Key." - }, - "is_aws_secret_key_set": { - "type": "boolean", - "description": "True if AWS Secret Key is set." - }, - "azure_options": { - "$ref": "#/definitions/UniversalAgentAzureOptions", - "description": "Options used for connecting to Azure." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "log_level": { - "type": "string", - "description": "Log level for exporter." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN." - }, - "max_query_log_size": { - "type": "string", - "format": "int64", - "description": "Limit query log size in QAN." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "metrics_scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "mongo_db_options": { - "$ref": "#/definitions/UniversalAgentMongoDBOptions", - "description": "TLS and other options for connecting to MongoDB." - }, - "mysql_options": { - "$ref": "#/definitions/UniversalAgentMySQLOptions", - "description": "TLS options for connecting to MySQL." - }, - "node_id": { - "type": "string", - "description": "A unique node identifier." - }, - "is_password_set": { - "type": "boolean", - "description": "True if password for connecting the agent to the database is set." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier." - }, - "postgresql_options": { - "$ref": "#/definitions/UniversalAgentPostgreSQLOptions", - "description": "TLS options for connecting to PostgreSQL." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "push_metrics": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "comments_parsing_disabled": { - "type": "boolean", - "description": "True if query comments parsing is disabled." - }, - "rds_basic_metrics_disabled": { - "type": "boolean", - "description": "True if RDS basic metrics are disdabled." - }, - "rds_enhanced_metrics_disabled": { - "type": "boolean", - "description": "True if RDS enhanced metrics are disdabled." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "status": { - "type": "string", - "description": "Actual Agent status." - }, - "table_count": { - "type": "integer", - "format": "int32", - "description": "Last known table count." - }, - "table_count_tablestats_group_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp." - }, - "version": { - "type": "string", - "description": "Agent version." - }, - "is_connected": { - "type": "boolean", - "description": "True if Agent is running and connected to pmm-managed." - } - } - } - } -} diff --git a/api/managementpb/agent/agent_grpc.pb.go b/api/managementpb/agent/agent_grpc.pb.go index 464719fa0d..3cecb4e31d 100644 --- a/api/managementpb/agent/agent_grpc.pb.go +++ b/api/managementpb/agent/agent_grpc.pb.go @@ -8,6 +8,7 @@ package agentv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type AgentServer interface { } // UnimplementedAgentServer must be embedded to have forward compatible implementations. -type UnimplementedAgentServer struct { -} +type UnimplementedAgentServer struct{} func (UnimplementedAgentServer) ListAgents(context.Context, *ListAgentRequest) (*ListAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") diff --git a/api/managementpb/agent/json/client/agent/list_agents_parameters.go b/api/managementpb/agent/json/client/agent/list_agents_parameters.go index f74504e77b..5116dca42d 100644 --- a/api/managementpb/agent/json/client/agent/list_agents_parameters.go +++ b/api/managementpb/agent/json/client/agent/list_agents_parameters.go @@ -60,7 +60,6 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { - /* Body. Only one of the parameters below must be set. @@ -133,7 +132,6 @@ func (o *ListAgentsParams) SetBody(body ListAgentsBody) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/agent/json/client/agent/list_agents_responses.go b/api/managementpb/agent/json/client/agent/list_agents_responses.go index 9b049a10e6..6143803fa9 100644 --- a/api/managementpb/agent/json/client/agent/list_agents_responses.go +++ b/api/managementpb/agent/json/client/agent/list_agents_responses.go @@ -61,12 +61,12 @@ type ListAgentsOK struct { func (o *ListAgentsOK) Error() string { return fmt.Sprintf("[POST /v1/management/Agent/List][%d] listAgentsOk %+v", 200, o.Payload) } + func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { return o.Payload } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *ListAgentsDefault) Code() int { func (o *ListAgentsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Agent/List][%d] ListAgents default %+v", o._statusCode, o.Payload) } + func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { return o.Payload } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsDefaultBody) // response payload @@ -124,7 +124,6 @@ ListAgentsBody Only one of the parameters below must be set. swagger:model ListAgentsBody */ type ListAgentsBody struct { - // Return only Agents that relate to a specific ServiceID. ServiceID string `json:"service_id,omitempty"` @@ -165,7 +164,6 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -231,9 +229,7 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -244,7 +240,6 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -273,7 +268,6 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -311,7 +305,6 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { - // List of Agents. Agents []*ListAgentsOKBodyAgentsItems0 `json:"agents"` } @@ -371,9 +364,7 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -384,7 +375,6 @@ func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats st return err } } - } return nil @@ -413,7 +403,6 @@ ListAgentsOKBodyAgentsItems0 list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0 */ type ListAgentsOKBodyAgentsItems0 struct { - // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -697,7 +686,6 @@ func (o *ListAgentsOKBodyAgentsItems0) ContextValidate(ctx context.Context, form } func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { - if o.AzureOptions != nil { if err := o.AzureOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -713,7 +701,6 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MongoDBOptions != nil { if err := o.MongoDBOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -729,7 +716,6 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlOptions != nil { if err := o.MysqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -745,7 +731,6 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlOptions != nil { if err := o.PostgresqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -783,7 +768,6 @@ ListAgentsOKBodyAgentsItems0AzureOptions list agents OK body agents items0 azure swagger:model ListAgentsOKBodyAgentsItems0AzureOptions */ type ListAgentsOKBodyAgentsItems0AzureOptions struct { - // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -833,7 +817,6 @@ ListAgentsOKBodyAgentsItems0MongoDBOptions list agents OK body agents items0 mon swagger:model ListAgentsOKBodyAgentsItems0MongoDBOptions */ type ListAgentsOKBodyAgentsItems0MongoDBOptions struct { - // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -892,7 +875,6 @@ ListAgentsOKBodyAgentsItems0MysqlOptions list agents OK body agents items0 mysql swagger:model ListAgentsOKBodyAgentsItems0MysqlOptions */ type ListAgentsOKBodyAgentsItems0MysqlOptions struct { - // TLS CA certificate. TLSCa string `json:"tls_ca,omitempty"` @@ -936,7 +918,6 @@ ListAgentsOKBodyAgentsItems0PostgresqlOptions list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0PostgresqlOptions */ type ListAgentsOKBodyAgentsItems0PostgresqlOptions struct { - // TLS CA certificate. SslCa string `json:"ssl_ca,omitempty"` diff --git a/api/managementpb/alerting/alerting.pb.go b/api/managementpb/alerting/alerting.pb.go index 2534a50d16..13ec12832d 100644 --- a/api/managementpb/alerting/alerting.pb.go +++ b/api/managementpb/alerting/alerting.pb.go @@ -7,15 +7,17 @@ package alertingv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - managementpb "github.com/percona/pmm/api/managementpb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + managementpb "github.com/percona/pmm/api/managementpb" ) const ( @@ -1594,40 +1596,43 @@ func file_managementpb_alerting_alerting_proto_rawDescGZIP() []byte { return file_managementpb_alerting_alerting_proto_rawDescData } -var file_managementpb_alerting_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_managementpb_alerting_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_managementpb_alerting_alerting_proto_goTypes = []interface{}{ - (TemplateSource)(0), // 0: alerting.v1.TemplateSource - (FilterType)(0), // 1: alerting.v1.FilterType - (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition - (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition - (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition - (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition - (*Template)(nil), // 6: alerting.v1.Template - (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest - (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse - (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest - (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse - (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest - (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse - (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest - (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse - (*Filter)(nil), // 15: alerting.v1.Filter - (*ParamValue)(nil), // 16: alerting.v1.ParamValue - (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest - (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse - nil, // 19: alerting.v1.Template.LabelsEntry - nil, // 20: alerting.v1.Template.AnnotationsEntry - nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry - (managementpb.BooleanFlag)(0), // 22: managementpb.BooleanFlag - (ParamUnit)(0), // 23: alerting.v1.ParamUnit - (ParamType)(0), // 24: alerting.v1.ParamType - (*durationpb.Duration)(nil), // 25: google.protobuf.Duration - (managementpb.Severity)(0), // 26: management.Severity - (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp - (*managementpb.PageParams)(nil), // 28: management.PageParams - (*managementpb.PageTotals)(nil), // 29: management.PageTotals -} +var ( + file_managementpb_alerting_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_managementpb_alerting_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) + file_managementpb_alerting_alerting_proto_goTypes = []interface{}{ + (TemplateSource)(0), // 0: alerting.v1.TemplateSource + (FilterType)(0), // 1: alerting.v1.FilterType + (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition + (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition + (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition + (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition + (*Template)(nil), // 6: alerting.v1.Template + (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest + (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse + (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest + (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse + (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest + (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse + (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest + (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse + (*Filter)(nil), // 15: alerting.v1.Filter + (*ParamValue)(nil), // 16: alerting.v1.ParamValue + (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest + (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse + nil, // 19: alerting.v1.Template.LabelsEntry + nil, // 20: alerting.v1.Template.AnnotationsEntry + nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry + (managementpb.BooleanFlag)(0), // 22: managementpb.BooleanFlag + (ParamUnit)(0), // 23: alerting.v1.ParamUnit + (ParamType)(0), // 24: alerting.v1.ParamType + (*durationpb.Duration)(nil), // 25: google.protobuf.Duration + (managementpb.Severity)(0), // 26: management.Severity + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp + (*managementpb.PageParams)(nil), // 28: management.PageParams + (*managementpb.PageTotals)(nil), // 29: management.PageTotals + } +) + var file_managementpb_alerting_alerting_proto_depIdxs = []int32{ 22, // 0: alerting.v1.BoolParamDefinition.default:type_name -> managementpb.BooleanFlag 23, // 1: alerting.v1.ParamDefinition.unit:type_name -> alerting.v1.ParamUnit diff --git a/api/managementpb/alerting/alerting.pb.gw.go b/api/managementpb/alerting/alerting.pb.gw.go index f79bc4ca0d..419b71ea2f 100644 --- a/api/managementpb/alerting/alerting.pb.gw.go +++ b/api/managementpb/alerting/alerting.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Alerting_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListTemplatesRequest @@ -45,7 +47,6 @@ func request_Alerting_ListTemplates_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ListTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerting_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Alerting_ListTemplates_0(ctx context.Context, marshaler runti msg, err := server.ListTemplates(ctx, &protoReq) return msg, metadata, err - } func request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runtime.Ma msg, err := client.CreateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Alerting_CreateTemplate_0(ctx context.Context, marshaler runt msg, err := server.CreateTemplate(ctx, &protoReq) return msg, metadata, err - } func request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runtime.Ma msg, err := client.UpdateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Alerting_UpdateTemplate_0(ctx context.Context, marshaler runt msg, err := server.UpdateTemplate(ctx, &protoReq) return msg, metadata, err - } func request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runtime.Ma msg, err := client.DeleteTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Alerting_DeleteTemplate_0(ctx context.Context, marshaler runt msg, err := server.DeleteTemplate(ctx, &protoReq) return msg, metadata, err - } func request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.CreateRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime. msg, err := server.CreateRule(ctx, &protoReq) return msg, metadata, err - } // RegisterAlertingHandlerServer registers the http handlers for service Alerting to "mux". @@ -206,7 +198,6 @@ func local_request_Alerting_CreateRule_0(ctx context.Context, marshaler runtime. // 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 RegisterAlertingHandlerFromEndpoint instead. func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertingServer) error { - mux.Handle("POST", pattern_Alerting_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -229,7 +220,6 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -254,7 +244,6 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -279,7 +268,6 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -304,7 +292,6 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -329,7 +316,6 @@ func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Alerting_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -372,7 +358,6 @@ func RegisterAlertingHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AlertingClient" to call the correct interceptors. func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertingClient) error { - mux.Handle("POST", pattern_Alerting_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -392,7 +377,6 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -414,7 +398,6 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,7 +419,6 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -458,7 +440,6 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerting_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -480,7 +461,6 @@ func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Alerting_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/alerting/alerting.swagger.json b/api/managementpb/alerting/alerting.swagger.json deleted file mode 100644 index 3511f94c50..0000000000 --- a/api/managementpb/alerting/alerting.swagger.json +++ /dev/null @@ -1,632 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/alerting/alerting.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Alerting" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/alerting/Rules/Create": { - "post": { - "summary": "CreateRule creates alerting rule from the given template.", - "operationId": "CreateRule", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1CreateRuleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1CreateRuleRequest" - } - } - ], - "tags": [ - "Alerting" - ] - } - }, - "/v1/management/alerting/Templates/Create": { - "post": { - "summary": "CreateTemplate creates a new template.", - "operationId": "CreateTemplate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1CreateTemplateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1CreateTemplateRequest" - } - } - ], - "tags": [ - "Alerting" - ] - } - }, - "/v1/management/alerting/Templates/Delete": { - "post": { - "summary": "DeleteTemplate deletes existing, previously created via API.", - "operationId": "DeleteTemplate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1DeleteTemplateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1DeleteTemplateRequest" - } - } - ], - "tags": [ - "Alerting" - ] - } - }, - "/v1/management/alerting/Templates/List": { - "post": { - "summary": "ListTemplates returns a list of all collected alert rule templates.", - "operationId": "ListTemplates", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListTemplatesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListTemplatesRequest" - } - } - ], - "tags": [ - "Alerting" - ] - } - }, - "/v1/management/alerting/Templates/Update": { - "post": { - "summary": "UpdateTemplate updates existing template, previously created via API.", - "operationId": "UpdateTemplate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateTemplateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateTemplateRequest" - } - } - ], - "tags": [ - "Alerting" - ] - } - } - }, - "definitions": { - "managementPageParams": { - "type": "object", - "properties": { - "page_size": { - "type": "integer", - "format": "int32", - "description": "Maximum number of results per page." - }, - "index": { - "type": "integer", - "format": "int32", - "description": "Index of the requested page, starts from 0." - } - }, - "description": "PageParams represents page request parameters for pagination." - }, - "managementPageTotals": { - "type": "object", - "properties": { - "total_items": { - "type": "integer", - "format": "int32", - "description": "Total number of results." - }, - "total_pages": { - "type": "integer", - "format": "int32", - "description": "Total number of pages." - } - }, - "description": "PageTotals represents total values for pagination." - }, - "managementSeverity": { - "type": "string", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "default": "SEVERITY_INVALID", - "description": "Severity represents severity level of the check result or alert." - }, - "managementpbBooleanFlag": { - "type": "string", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "default": "DO_NOT_CHANGE", - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1BoolParamDefinition": { - "type": "object", - "properties": { - "default": { - "$ref": "#/definitions/managementpbBooleanFlag" - } - }, - "description": "BoolParamDefinition represents boolean parameter's default value." - }, - "v1CreateRuleRequest": { - "type": "object", - "properties": { - "template_name": { - "type": "string", - "description": "Template name." - }, - "name": { - "type": "string", - "description": "Rule name." - }, - "group": { - "type": "string", - "description": "Rule group name." - }, - "folder_uid": { - "type": "string", - "description": "Folder UID." - }, - "params": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1ParamValue" - }, - "description": "Rule parameters. All template parameters should be set." - }, - "for": { - "type": "string", - "description": "Rule duration. Should be set." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Rule severity. Should be set." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "All custom labels to add or remove (with empty values) to default labels from template." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Filter" - }, - "description": "Filters." - } - } - }, - "v1CreateRuleResponse": { - "type": "object" - }, - "v1CreateTemplateRequest": { - "type": "object", - "properties": { - "yaml": { - "type": "string", - "description": "YAML template file content." - } - } - }, - "v1CreateTemplateResponse": { - "type": "object" - }, - "v1DeleteTemplateRequest": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "v1DeleteTemplateResponse": { - "type": "object" - }, - "v1Filter": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/v1FilterType" - }, - "label": { - "type": "string" - }, - "regexp": { - "type": "string" - } - }, - "description": "Filter represents a single filter condition." - }, - "v1FilterType": { - "type": "string", - "enum": [ - "FILTER_TYPE_INVALID", - "MATCH", - "MISMATCH" - ], - "default": "FILTER_TYPE_INVALID", - "description": "FilterType represents filter matching type." - }, - "v1FloatParamDefinition": { - "type": "object", - "properties": { - "has_default": { - "type": "boolean", - "description": "True if default value is set." - }, - "default": { - "type": "number", - "format": "double", - "description": "Default value if has_default is true." - }, - "has_min": { - "type": "boolean", - "description": "True if minimal valid value is set." - }, - "min": { - "type": "number", - "format": "double", - "description": "Minimal valid value (inclusive) if has_min is true." - }, - "has_max": { - "type": "boolean", - "description": "True if maximal valid value is set." - }, - "max": { - "type": "number", - "format": "double", - "description": "Maximal valid value (inclusive) if has_max is true." - } - }, - "description": "FloatParamDefinition represents float parameter's default value and valid range." - }, - "v1ListTemplatesRequest": { - "type": "object", - "properties": { - "reload": { - "type": "boolean", - "description": "If true, template files will be re-read from disk." - }, - "page_params": { - "$ref": "#/definitions/managementPageParams", - "description": "Page request." - } - } - }, - "v1ListTemplatesResponse": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Template" - } - }, - "totals": { - "$ref": "#/definitions/managementPageTotals", - "description": "Total items and pages." - } - } - }, - "v1ParamDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "summary": { - "type": "string", - "description": "Short human-readable parameter summary." - }, - "unit": { - "$ref": "#/definitions/v1ParamUnit", - "description": "Parameter unit." - }, - "type": { - "$ref": "#/definitions/v1ParamType", - "description": "Parameter type." - }, - "bool": { - "$ref": "#/definitions/v1BoolParamDefinition", - "description": "Bool value." - }, - "float": { - "$ref": "#/definitions/v1FloatParamDefinition", - "description": "Float value." - }, - "string": { - "$ref": "#/definitions/v1StringParamDefinition", - "description": "String value." - } - }, - "description": "ParamDefinition represents a single query parameter." - }, - "v1ParamType": { - "type": "string", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "default": "PARAM_TYPE_INVALID", - "description": "ParamType represents template parameter type." - }, - "v1ParamUnit": { - "type": "string", - "enum": [ - "PARAM_UNIT_INVALID", - "PERCENTAGE", - "SECONDS" - ], - "default": "PARAM_UNIT_INVALID", - "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s" - }, - "v1ParamValue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "type": { - "$ref": "#/definitions/v1ParamType", - "description": "Parameter type." - }, - "bool": { - "type": "boolean", - "description": "Bool value." - }, - "float": { - "type": "number", - "format": "double", - "description": "Float value." - }, - "string": { - "type": "string", - "description": "String value." - } - }, - "description": "ParamValue represents a single rule parameter value." - }, - "v1StringParamDefinition": { - "type": "object", - "properties": { - "has_default": { - "type": "boolean", - "description": "True if default value is set." - }, - "default": { - "type": "string", - "description": "Default value if has_default is true." - } - }, - "description": "StringParamDefinition represents string parameter's default value." - }, - "v1Template": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID)." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "expr": { - "type": "string", - "description": "PromQL query expression with templating parameters." - }, - "params": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1ParamDefinition" - }, - "description": "Query parameters definitions." - }, - "for": { - "type": "string", - "description": "Default duration value." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Severity." - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Labels." - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Annotations." - }, - "source": { - "$ref": "#/definitions/v1TemplateSource", - "description": "Template source. Only templates created via API can be updated or deleted via API." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Template creation time. Empty for built-in and SaaS templates." - }, - "yaml": { - "type": "string", - "description": "YAML template file content. Empty for built-in and SaaS templates." - } - }, - "description": "Template represents Alert Template that is used to create Alert Rule." - }, - "v1TemplateSource": { - "type": "string", - "enum": [ - "TEMPLATE_SOURCE_INVALID", - "BUILT_IN", - "SAAS", - "USER_FILE", - "USER_API" - ], - "default": "TEMPLATE_SOURCE_INVALID", - "description": "TemplateSource defines template source.\n\n - BUILT_IN: Template that is shipped with PMM Server releases.\n - SAAS: Template that is downloaded from check.percona.com.\n - USER_FILE: Templated loaded from user-suplied file.\n - USER_API: Templated created via API." - }, - "v1UpdateTemplateRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID)." - }, - "yaml": { - "type": "string", - "description": "YAML template file content." - } - } - }, - "v1UpdateTemplateResponse": { - "type": "object" - } - } -} diff --git a/api/managementpb/alerting/alerting_grpc.pb.go b/api/managementpb/alerting/alerting_grpc.pb.go index d48af6785b..cfde9b6503 100644 --- a/api/managementpb/alerting/alerting_grpc.pb.go +++ b/api/managementpb/alerting/alerting_grpc.pb.go @@ -8,6 +8,7 @@ package alertingv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -113,21 +114,24 @@ type AlertingServer interface { } // UnimplementedAlertingServer must be embedded to have forward compatible implementations. -type UnimplementedAlertingServer struct { -} +type UnimplementedAlertingServer struct{} func (UnimplementedAlertingServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTemplates not implemented") } + func (UnimplementedAlertingServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*CreateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTemplate not implemented") } + func (UnimplementedAlertingServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*UpdateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTemplate not implemented") } + func (UnimplementedAlertingServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*DeleteTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTemplate not implemented") } + func (UnimplementedAlertingServer) CreateRule(context.Context, *CreateRuleRequest) (*CreateRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRule not implemented") } diff --git a/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go b/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go index 0a8a84af09..2ed45ff356 100644 --- a/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/create_rule_parameters.go @@ -60,7 +60,6 @@ CreateRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRuleParams struct { - // Body. Body CreateRuleBody @@ -130,7 +129,6 @@ func (o *CreateRuleParams) SetBody(body CreateRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/create_rule_responses.go b/api/managementpb/alerting/json/client/alerting/create_rule_responses.go index 635bb12234..645d3f8b71 100644 --- a/api/managementpb/alerting/json/client/alerting/create_rule_responses.go +++ b/api/managementpb/alerting/json/client/alerting/create_rule_responses.go @@ -62,12 +62,12 @@ type CreateRuleOK struct { func (o *CreateRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Rules/Create][%d] createRuleOk %+v", 200, o.Payload) } + func (o *CreateRuleOK) GetPayload() interface{} { return o.Payload } func (o *CreateRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *CreateRuleDefault) Code() int { func (o *CreateRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Rules/Create][%d] CreateRule default %+v", o._statusCode, o.Payload) } + func (o *CreateRuleDefault) GetPayload() *CreateRuleDefaultBody { return o.Payload } func (o *CreateRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateRuleDefaultBody) // response payload @@ -123,7 +123,6 @@ CreateRuleBody create rule body swagger:model CreateRuleBody */ type CreateRuleBody struct { - // Template name. TemplateName string `json:"template_name,omitempty"` @@ -309,9 +308,7 @@ func (o *CreateRuleBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -322,16 +319,13 @@ func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strf return err } } - } return nil } func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Filters); i++ { - if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -342,7 +336,6 @@ func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats str return err } } - } return nil @@ -371,7 +364,6 @@ CreateRuleDefaultBody create rule default body swagger:model CreateRuleDefaultBody */ type CreateRuleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -437,9 +429,7 @@ func (o *CreateRuleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -450,7 +440,6 @@ func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -479,7 +468,6 @@ CreateRuleDefaultBodyDetailsItems0 create rule default body details items0 swagger:model CreateRuleDefaultBodyDetailsItems0 */ type CreateRuleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -517,7 +505,6 @@ CreateRuleParamsBodyFiltersItems0 Filter represents a single filter condition. swagger:model CreateRuleParamsBodyFiltersItems0 */ type CreateRuleParamsBodyFiltersItems0 struct { - // FilterType represents filter matching type. // Enum: [FILTER_TYPE_INVALID MATCH MISMATCH] Type *string `json:"type,omitempty"` @@ -616,7 +603,6 @@ CreateRuleParamsBodyParamsItems0 ParamValue represents a single rule parameter v swagger:model CreateRuleParamsBodyParamsItems0 */ type CreateRuleParamsBodyParamsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/alerting/json/client/alerting/create_template_parameters.go b/api/managementpb/alerting/json/client/alerting/create_template_parameters.go index b0f1301962..02a03694ee 100644 --- a/api/managementpb/alerting/json/client/alerting/create_template_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/create_template_parameters.go @@ -60,7 +60,6 @@ CreateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateTemplateParams struct { - // Body. Body CreateTemplateBody @@ -130,7 +129,6 @@ func (o *CreateTemplateParams) SetBody(body CreateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *CreateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/create_template_responses.go b/api/managementpb/alerting/json/client/alerting/create_template_responses.go index d567d92db9..ab5c000932 100644 --- a/api/managementpb/alerting/json/client/alerting/create_template_responses.go +++ b/api/managementpb/alerting/json/client/alerting/create_template_responses.go @@ -60,12 +60,12 @@ type CreateTemplateOK struct { func (o *CreateTemplateOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Create][%d] createTemplateOk %+v", 200, o.Payload) } + func (o *CreateTemplateOK) GetPayload() interface{} { return o.Payload } func (o *CreateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *CreateTemplateDefault) Code() int { func (o *CreateTemplateDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Create][%d] CreateTemplate default %+v", o._statusCode, o.Payload) } + func (o *CreateTemplateDefault) GetPayload() *CreateTemplateDefaultBody { return o.Payload } func (o *CreateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateTemplateDefaultBody) // response payload @@ -121,7 +121,6 @@ CreateTemplateBody create template body swagger:model CreateTemplateBody */ type CreateTemplateBody struct { - // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -159,7 +158,6 @@ CreateTemplateDefaultBody create template default body swagger:model CreateTemplateDefaultBody */ type CreateTemplateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *CreateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -267,7 +262,6 @@ CreateTemplateDefaultBodyDetailsItems0 create template default body details item swagger:model CreateTemplateDefaultBodyDetailsItems0 */ type CreateTemplateDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go b/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go index 9a5fb37a1f..ba1bfb54cd 100644 --- a/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/delete_template_parameters.go @@ -60,7 +60,6 @@ DeleteTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteTemplateParams struct { - // Body. Body DeleteTemplateBody @@ -130,7 +129,6 @@ func (o *DeleteTemplateParams) SetBody(body DeleteTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/delete_template_responses.go b/api/managementpb/alerting/json/client/alerting/delete_template_responses.go index 83a429dc72..07d858421d 100644 --- a/api/managementpb/alerting/json/client/alerting/delete_template_responses.go +++ b/api/managementpb/alerting/json/client/alerting/delete_template_responses.go @@ -60,12 +60,12 @@ type DeleteTemplateOK struct { func (o *DeleteTemplateOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Delete][%d] deleteTemplateOk %+v", 200, o.Payload) } + func (o *DeleteTemplateOK) GetPayload() interface{} { return o.Payload } func (o *DeleteTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteTemplateDefault) Code() int { func (o *DeleteTemplateDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Delete][%d] DeleteTemplate default %+v", o._statusCode, o.Payload) } + func (o *DeleteTemplateDefault) GetPayload() *DeleteTemplateDefaultBody { return o.Payload } func (o *DeleteTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteTemplateDefaultBody) // response payload @@ -121,7 +121,6 @@ DeleteTemplateBody delete template body swagger:model DeleteTemplateBody */ type DeleteTemplateBody struct { - // name Name string `json:"name,omitempty"` } @@ -159,7 +158,6 @@ DeleteTemplateDefaultBody delete template default body swagger:model DeleteTemplateDefaultBody */ type DeleteTemplateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *DeleteTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -267,7 +262,6 @@ DeleteTemplateDefaultBodyDetailsItems0 delete template default body details item swagger:model DeleteTemplateDefaultBodyDetailsItems0 */ type DeleteTemplateDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go b/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go index 5d959c0791..c8054173a2 100644 --- a/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/list_templates_parameters.go @@ -60,7 +60,6 @@ ListTemplatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListTemplatesParams struct { - // Body. Body ListTemplatesBody @@ -130,7 +129,6 @@ func (o *ListTemplatesParams) SetBody(body ListTemplatesBody) { // WriteToRequest writes these params to a swagger request func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/list_templates_responses.go b/api/managementpb/alerting/json/client/alerting/list_templates_responses.go index 28dadd7741..a4f455229a 100644 --- a/api/managementpb/alerting/json/client/alerting/list_templates_responses.go +++ b/api/managementpb/alerting/json/client/alerting/list_templates_responses.go @@ -62,12 +62,12 @@ type ListTemplatesOK struct { func (o *ListTemplatesOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/List][%d] listTemplatesOk %+v", 200, o.Payload) } + func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody { return o.Payload } func (o *ListTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListTemplatesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListTemplatesDefault) Code() int { func (o *ListTemplatesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/List][%d] ListTemplates default %+v", o._statusCode, o.Payload) } + func (o *ListTemplatesDefault) GetPayload() *ListTemplatesDefaultBody { return o.Payload } func (o *ListTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListTemplatesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListTemplatesBody list templates body swagger:model ListTemplatesBody */ type ListTemplatesBody struct { - // If true, template files will be re-read from disk. Reload bool `json:"reload,omitempty"` @@ -181,7 +180,6 @@ func (o *ListTemplatesBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ListTemplatesBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { - if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ ListTemplatesDefaultBody list templates default body swagger:model ListTemplatesDefaultBody */ type ListTemplatesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *ListTemplatesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -327,7 +321,6 @@ ListTemplatesDefaultBodyDetailsItems0 list templates default body details items0 swagger:model ListTemplatesDefaultBodyDetailsItems0 */ type ListTemplatesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ ListTemplatesOKBody list templates OK body swagger:model ListTemplatesOKBody */ type ListTemplatesOKBody struct { - // templates Templates []*ListTemplatesOKBodyTemplatesItems0 `json:"templates"` @@ -455,9 +447,7 @@ func (o *ListTemplatesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Templates); i++ { - if o.Templates[i] != nil { if err := o.Templates[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -468,14 +458,12 @@ func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, form return err } } - } return nil } func (o *ListTemplatesOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { - if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -513,7 +501,6 @@ ListTemplatesOKBodyTemplatesItems0 Template represents Alert Template that is us swagger:model ListTemplatesOKBodyTemplatesItems0 */ type ListTemplatesOKBodyTemplatesItems0 struct { - // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -749,9 +736,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0) ContextValidate(ctx context.Context } func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -762,7 +747,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.C return err } } - } return nil @@ -791,7 +775,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0 ParamDefinition represents a sing swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0 */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -1023,7 +1006,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) ContextValidate(ctx con } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { - if o.Bool != nil { if err := o.Bool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1039,7 +1021,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { - if o.Float != nil { if err := o.Float.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1055,7 +1036,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ct } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { - if o.String != nil { if err := o.String.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1093,7 +1073,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool BoolParamDefinition represent swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool struct { - // BooleanFlag represent a command to set some boolean property to true, // to false, or avoid changing that property. // @@ -1191,7 +1170,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Float FloatParamDefinition represe swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Float */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Float struct { - // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -1244,7 +1222,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0String StringParamDefinition repre swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0String */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0String struct { - // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -1285,7 +1262,6 @@ ListTemplatesOKBodyTotals PageTotals represents total values for pagination. swagger:model ListTemplatesOKBodyTotals */ type ListTemplatesOKBodyTotals struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -1326,7 +1302,6 @@ ListTemplatesParamsBodyPageParams PageParams represents page request parameters swagger:model ListTemplatesParamsBodyPageParams */ type ListTemplatesParamsBodyPageParams struct { - // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/alerting/json/client/alerting/update_template_parameters.go b/api/managementpb/alerting/json/client/alerting/update_template_parameters.go index 2b82bcdeed..9fa2d67282 100644 --- a/api/managementpb/alerting/json/client/alerting/update_template_parameters.go +++ b/api/managementpb/alerting/json/client/alerting/update_template_parameters.go @@ -60,7 +60,6 @@ UpdateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateTemplateParams struct { - // Body. Body UpdateTemplateBody @@ -130,7 +129,6 @@ func (o *UpdateTemplateParams) SetBody(body UpdateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/alerting/json/client/alerting/update_template_responses.go b/api/managementpb/alerting/json/client/alerting/update_template_responses.go index 7095421648..242e579151 100644 --- a/api/managementpb/alerting/json/client/alerting/update_template_responses.go +++ b/api/managementpb/alerting/json/client/alerting/update_template_responses.go @@ -60,12 +60,12 @@ type UpdateTemplateOK struct { func (o *UpdateTemplateOK) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Update][%d] updateTemplateOk %+v", 200, o.Payload) } + func (o *UpdateTemplateOK) GetPayload() interface{} { return o.Payload } func (o *UpdateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *UpdateTemplateDefault) Code() int { func (o *UpdateTemplateDefault) Error() string { return fmt.Sprintf("[POST /v1/management/alerting/Templates/Update][%d] UpdateTemplate default %+v", o._statusCode, o.Payload) } + func (o *UpdateTemplateDefault) GetPayload() *UpdateTemplateDefaultBody { return o.Payload } func (o *UpdateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateTemplateDefaultBody) // response payload @@ -121,7 +121,6 @@ UpdateTemplateBody update template body swagger:model UpdateTemplateBody */ type UpdateTemplateBody struct { - // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -162,7 +161,6 @@ UpdateTemplateDefaultBody update template default body swagger:model UpdateTemplateDefaultBody */ type UpdateTemplateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *UpdateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -270,7 +265,6 @@ UpdateTemplateDefaultBodyDetailsItems0 update template default body details item swagger:model UpdateTemplateDefaultBodyDetailsItems0 */ type UpdateTemplateDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/alerting/params.pb.go b/api/managementpb/alerting/params.pb.go index 7859856f54..3d4682a0da 100644 --- a/api/managementpb/alerting/params.pb.go +++ b/api/managementpb/alerting/params.pb.go @@ -7,10 +7,11 @@ package alertingv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -166,11 +167,14 @@ func file_managementpb_alerting_params_proto_rawDescGZIP() []byte { return file_managementpb_alerting_params_proto_rawDescData } -var file_managementpb_alerting_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_managementpb_alerting_params_proto_goTypes = []interface{}{ - (ParamUnit)(0), // 0: alerting.v1.ParamUnit - (ParamType)(0), // 1: alerting.v1.ParamType -} +var ( + file_managementpb_alerting_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_managementpb_alerting_params_proto_goTypes = []interface{}{ + (ParamUnit)(0), // 0: alerting.v1.ParamUnit + (ParamType)(0), // 1: alerting.v1.ParamType + } +) + var file_managementpb_alerting_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/alerting/params.swagger.json b/api/managementpb/alerting/params.swagger.json deleted file mode 100644 index 20cda5af4f..0000000000 --- a/api/managementpb/alerting/params.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/alerting/params.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/annotation.pb.go b/api/managementpb/annotation.pb.go index 52c6900b0b..fa05f9da7c 100644 --- a/api/managementpb/annotation.pb.go +++ b/api/managementpb/annotation.pb.go @@ -7,13 +7,14 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -195,11 +196,14 @@ func file_managementpb_annotation_proto_rawDescGZIP() []byte { return file_managementpb_annotation_proto_rawDescData } -var file_managementpb_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_managementpb_annotation_proto_goTypes = []interface{}{ - (*AddAnnotationRequest)(nil), // 0: management.AddAnnotationRequest - (*AddAnnotationResponse)(nil), // 1: management.AddAnnotationResponse -} +var ( + file_managementpb_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) + file_managementpb_annotation_proto_goTypes = []interface{}{ + (*AddAnnotationRequest)(nil), // 0: management.AddAnnotationRequest + (*AddAnnotationResponse)(nil), // 1: management.AddAnnotationResponse + } +) + var file_managementpb_annotation_proto_depIdxs = []int32{ 0, // 0: management.Annotation.AddAnnotation:input_type -> management.AddAnnotationRequest 1, // 1: management.Annotation.AddAnnotation:output_type -> management.AddAnnotationResponse diff --git a/api/managementpb/annotation.pb.gw.go b/api/managementpb/annotation.pb.gw.go index 8231c499d8..ebcf79c3f5 100644 --- a/api/managementpb/annotation.pb.gw.go +++ b/api/managementpb/annotation.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Annotation_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, client AnnotationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddAnnotationRequest @@ -45,7 +47,6 @@ func request_Annotation_AddAnnotation_0(ctx context.Context, marshaler runtime.M msg, err := client.AddAnnotation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Annotation_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, server AnnotationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Annotation_AddAnnotation_0(ctx context.Context, marshaler run msg, err := server.AddAnnotation(ctx, &protoReq) return msg, metadata, err - } // RegisterAnnotationHandlerServer registers the http handlers for service Annotation to "mux". @@ -70,7 +70,6 @@ func local_request_Annotation_AddAnnotation_0(ctx context.Context, marshaler run // 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 RegisterAnnotationHandlerFromEndpoint instead. func RegisterAnnotationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AnnotationServer) error { - mux.Handle("POST", pattern_Annotation_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterAnnotationHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Annotation_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterAnnotationHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AnnotationClient" to call the correct interceptors. func RegisterAnnotationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AnnotationClient) error { - mux.Handle("POST", pattern_Annotation_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterAnnotationHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Annotation_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_Annotation_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) -) +var pattern_Annotation_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) -var ( - forward_Annotation_AddAnnotation_0 = runtime.ForwardResponseMessage -) +var forward_Annotation_AddAnnotation_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/annotation.swagger.json b/api/managementpb/annotation.swagger.json deleted file mode 100644 index 406d94b17a..0000000000 --- a/api/managementpb/annotation.swagger.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/annotation.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Annotation" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Annotations/Add": { - "post": { - "summary": "Add Annotation", - "description": "Adds annotation.", - "operationId": "AddAnnotation", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddAnnotationResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "AddAnnotationRequest is a params to add new annotation.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddAnnotationRequest" - } - } - ], - "tags": [ - "Annotation" - ] - } - } - }, - "definitions": { - "managementAddAnnotationRequest": { - "type": "object", - "properties": { - "text": { - "type": "string", - "description": "An annotation description. Required." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags are used to filter annotations." - }, - "node_name": { - "type": "string", - "description": "Used for annotate node." - }, - "service_names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Used for annotate services." - } - }, - "description": "AddAnnotationRequest is a params to add new annotation." - }, - "managementAddAnnotationResponse": { - "type": "object" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/annotation_grpc.pb.go b/api/managementpb/annotation_grpc.pb.go index 1b72842841..f89e1b16eb 100644 --- a/api/managementpb/annotation_grpc.pb.go +++ b/api/managementpb/annotation_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type AnnotationServer interface { } // UnimplementedAnnotationServer must be embedded to have forward compatible implementations. -type UnimplementedAnnotationServer struct { -} +type UnimplementedAnnotationServer struct{} func (UnimplementedAnnotationServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAnnotation not implemented") diff --git a/api/managementpb/azure/azure.pb.go b/api/managementpb/azure/azure.pb.go index 849dd321da..6bbdd4e895 100644 --- a/api/managementpb/azure/azure.pb.go +++ b/api/managementpb/azure/azure.pb.go @@ -7,12 +7,13 @@ package azurev1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -824,17 +825,20 @@ func file_managementpb_azure_azure_proto_rawDescGZIP() []byte { return file_managementpb_azure_azure_proto_rawDescData } -var file_managementpb_azure_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_azure_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_managementpb_azure_azure_proto_goTypes = []interface{}{ - (DiscoverAzureDatabaseType)(0), // 0: azure.v1beta1.DiscoverAzureDatabaseType - (*DiscoverAzureDatabaseRequest)(nil), // 1: azure.v1beta1.DiscoverAzureDatabaseRequest - (*DiscoverAzureDatabaseInstance)(nil), // 2: azure.v1beta1.DiscoverAzureDatabaseInstance - (*DiscoverAzureDatabaseResponse)(nil), // 3: azure.v1beta1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseRequest)(nil), // 4: azure.v1beta1.AddAzureDatabaseRequest - (*AddAzureDatabaseResponse)(nil), // 5: azure.v1beta1.AddAzureDatabaseResponse - nil, // 6: azure.v1beta1.AddAzureDatabaseRequest.CustomLabelsEntry -} +var ( + file_managementpb_azure_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_azure_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_managementpb_azure_azure_proto_goTypes = []interface{}{ + (DiscoverAzureDatabaseType)(0), // 0: azure.v1beta1.DiscoverAzureDatabaseType + (*DiscoverAzureDatabaseRequest)(nil), // 1: azure.v1beta1.DiscoverAzureDatabaseRequest + (*DiscoverAzureDatabaseInstance)(nil), // 2: azure.v1beta1.DiscoverAzureDatabaseInstance + (*DiscoverAzureDatabaseResponse)(nil), // 3: azure.v1beta1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseRequest)(nil), // 4: azure.v1beta1.AddAzureDatabaseRequest + (*AddAzureDatabaseResponse)(nil), // 5: azure.v1beta1.AddAzureDatabaseResponse + nil, // 6: azure.v1beta1.AddAzureDatabaseRequest.CustomLabelsEntry + } +) + var file_managementpb_azure_azure_proto_depIdxs = []int32{ 0, // 0: azure.v1beta1.DiscoverAzureDatabaseInstance.type:type_name -> azure.v1beta1.DiscoverAzureDatabaseType 2, // 1: azure.v1beta1.DiscoverAzureDatabaseResponse.azure_database_instance:type_name -> azure.v1beta1.DiscoverAzureDatabaseInstance diff --git a/api/managementpb/azure/azure.pb.gw.go b/api/managementpb/azure/azure.pb.gw.go index 143120c58a..07de32ff10 100644 --- a/api/managementpb/azure/azure.pb.gw.go +++ b/api/managementpb/azure/azure.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client AzureDatabaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DiscoverAzureDatabaseRequest @@ -45,7 +47,6 @@ func request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, marshale msg, err := client.DiscoverAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server AzureDatabaseServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_AzureDatabase_DiscoverAzureDatabase_0(ctx context.Context, ma msg, err := server.DiscoverAzureDatabase(ctx, &protoReq) return msg, metadata, err - } func request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client AzureDatabaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshaler run msg, err := client.AddAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server AzureDatabaseServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshal msg, err := server.AddAzureDatabase(ctx, &protoReq) return msg, metadata, err - } // RegisterAzureDatabaseHandlerServer registers the http handlers for service AzureDatabase to "mux". @@ -104,7 +102,6 @@ func local_request_AzureDatabase_AddAzureDatabase_0(ctx context.Context, marshal // 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 RegisterAzureDatabaseHandlerFromEndpoint instead. func RegisterAzureDatabaseHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AzureDatabaseServer) error { - mux.Handle("POST", pattern_AzureDatabase_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -127,7 +124,6 @@ func RegisterAzureDatabaseHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AzureDatabase_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -152,7 +148,6 @@ func RegisterAzureDatabaseHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -195,7 +190,6 @@ func RegisterAzureDatabaseHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AzureDatabaseClient" to call the correct interceptors. func RegisterAzureDatabaseHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AzureDatabaseClient) error { - mux.Handle("POST", pattern_AzureDatabase_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -215,7 +209,6 @@ func RegisterAzureDatabaseHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AzureDatabase_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -237,7 +230,6 @@ func RegisterAzureDatabaseHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AzureDatabase_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/azure/azure.swagger.json b/api/managementpb/azure/azure.swagger.json deleted file mode 100644 index ef81b88b38..0000000000 --- a/api/managementpb/azure/azure.swagger.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/azure/azure.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "AzureDatabase" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/azure/AzureDatabase/Add": { - "post": { - "summary": "AddAzureDatabase adds Azure Database instance.", - "operationId": "AddAzureDatabase", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1AddAzureDatabaseResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1AddAzureDatabaseRequest" - } - } - ], - "tags": [ - "AzureDatabase" - ] - } - }, - "/v1/management/azure/AzureDatabase/Discover": { - "post": { - "summary": "DiscoverAzureDatabase discovers Azure Database for MySQL, MariaDB and PostgreSQL Server instances.", - "operationId": "DiscoverAzureDatabase", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "DiscoverAzureDatabaseRequest discover azure databases request.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseRequest" - } - } - ], - "tags": [ - "AzureDatabase" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1AddAzureDatabaseRequest": { - "type": "object", - "properties": { - "region": { - "type": "string", - "description": "Azure database location." - }, - "az": { - "type": "string", - "description": "Azure database availability zone." - }, - "instance_id": { - "type": "string", - "description": "Azure database instance ID." - }, - "node_model": { - "type": "string", - "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku." - }, - "address": { - "type": "string", - "description": "Address used to connect to it." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name. Defaults to Azure Database instance ID." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Defaults to Azure Database instance ID." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "username": { - "type": "string", - "description": "Username for scraping metrics." - }, - "password": { - "type": "string", - "description": "Password for scraping metrics." - }, - "azure_client_id": { - "type": "string", - "description": "Azure client ID." - }, - "azure_client_secret": { - "type": "string", - "description": "Azure client secret." - }, - "azure_tenant_id": { - "type": "string", - "description": "Azure tanant ID." - }, - "azure_subscription_id": { - "type": "string", - "description": "Azure subscription ID." - }, - "azure_resource_group": { - "type": "string", - "description": "Azure resource group." - }, - "azure_database_exporter": { - "type": "boolean", - "description": "If true, adds azure_database_exporter." - }, - "qan": { - "type": "boolean", - "description": "If true, adds qan-mysql-perfschema-agent or qan-postgresql-pgstatements-agent." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node and Service." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them." - }, - "type": { - "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseType", - "title": "Azure database resource type (mysql, maria, postgres)" - } - } - }, - "v1beta1AddAzureDatabaseResponse": { - "type": "object" - }, - "v1beta1DiscoverAzureDatabaseInstance": { - "type": "object", - "properties": { - "instance_id": { - "type": "string", - "description": "Azure database instance ID." - }, - "region": { - "type": "string", - "description": "Azure database location." - }, - "service_name": { - "type": "string", - "description": "Azure database server name." - }, - "username": { - "type": "string", - "description": "Database username." - }, - "address": { - "type": "string", - "description": "Address used to connect to it." - }, - "azure_resource_group": { - "type": "string", - "description": "Azure Resource group." - }, - "environment": { - "type": "string", - "description": "Environment tag." - }, - "type": { - "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseType", - "description": "Database type." - }, - "az": { - "type": "string", - "description": "Azure database availability zone." - }, - "node_model": { - "type": "string", - "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku." - } - }, - "description": "DiscoverAzureDatabaseInstance models an unique Azure Database instance for the list of instances returned by Discovery." - }, - "v1beta1DiscoverAzureDatabaseRequest": { - "type": "object", - "properties": { - "azure_client_id": { - "type": "string", - "description": "Azure client ID." - }, - "azure_client_secret": { - "type": "string", - "description": "Azure client secret." - }, - "azure_tenant_id": { - "type": "string", - "description": "Azure tanant ID." - }, - "azure_subscription_id": { - "type": "string", - "description": "Azure subscription ID." - } - }, - "description": "DiscoverAzureDatabaseRequest discover azure databases request." - }, - "v1beta1DiscoverAzureDatabaseResponse": { - "type": "object", - "properties": { - "azure_database_instance": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1DiscoverAzureDatabaseInstance" - } - } - }, - "description": "DiscoverAzureDatabaseResponse discover azure databases response." - }, - "v1beta1DiscoverAzureDatabaseType": { - "type": "string", - "enum": [ - "DISCOVER_AZURE_DATABASE_TYPE_INVALID", - "DISCOVER_AZURE_DATABASE_TYPE_MYSQL", - "DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL" - ], - "default": "DISCOVER_AZURE_DATABASE_TYPE_INVALID", - "description": "DiscoverAzureDatabaseType describes supported Azure Database instance engines.\n\n - DISCOVER_AZURE_DATABASE_TYPE_MYSQL: MySQL type: microsoft.dbformysql or MariaDB type: microsoft.dbformariadb\n - DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL: PostgreSQL type: microsoft.dbformysql" - } - } -} diff --git a/api/managementpb/azure/azure_grpc.pb.go b/api/managementpb/azure/azure_grpc.pb.go index 0771345fb9..0174809115 100644 --- a/api/managementpb/azure/azure_grpc.pb.go +++ b/api/managementpb/azure/azure_grpc.pb.go @@ -8,6 +8,7 @@ package azurev1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -71,12 +72,12 @@ type AzureDatabaseServer interface { } // UnimplementedAzureDatabaseServer must be embedded to have forward compatible implementations. -type UnimplementedAzureDatabaseServer struct { -} +type UnimplementedAzureDatabaseServer struct{} func (UnimplementedAzureDatabaseServer) DiscoverAzureDatabase(context.Context, *DiscoverAzureDatabaseRequest) (*DiscoverAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverAzureDatabase not implemented") } + func (UnimplementedAzureDatabaseServer) AddAzureDatabase(context.Context, *AddAzureDatabaseRequest) (*AddAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAzureDatabase not implemented") } diff --git a/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go b/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go index 416354a45e..0eb4da68c3 100644 --- a/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go +++ b/api/managementpb/azure/json/client/azure_database/add_azure_database_parameters.go @@ -60,7 +60,6 @@ AddAzureDatabaseParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAzureDatabaseParams struct { - // Body. Body AddAzureDatabaseBody @@ -130,7 +129,6 @@ func (o *AddAzureDatabaseParams) SetBody(body AddAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go b/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go index e07c79a6d6..84dff23137 100644 --- a/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go +++ b/api/managementpb/azure/json/client/azure_database/add_azure_database_responses.go @@ -62,12 +62,12 @@ type AddAzureDatabaseOK struct { func (o *AddAzureDatabaseOK) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Add][%d] addAzureDatabaseOk %+v", 200, o.Payload) } + func (o *AddAzureDatabaseOK) GetPayload() interface{} { return o.Payload } func (o *AddAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *AddAzureDatabaseDefault) Code() int { func (o *AddAzureDatabaseDefault) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Add][%d] AddAzureDatabase default %+v", o._statusCode, o.Payload) } + func (o *AddAzureDatabaseDefault) GetPayload() *AddAzureDatabaseDefaultBody { return o.Payload } func (o *AddAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAzureDatabaseDefaultBody) // response payload @@ -123,7 +123,6 @@ AddAzureDatabaseBody add azure database body swagger:model AddAzureDatabaseBody */ type AddAzureDatabaseBody struct { - // Azure database location. Region string `json:"region,omitempty"` @@ -294,7 +293,6 @@ AddAzureDatabaseDefaultBody add azure database default body swagger:model AddAzureDatabaseDefaultBody */ type AddAzureDatabaseDefaultBody struct { - // error Error string `json:"error,omitempty"` @@ -363,9 +361,7 @@ func (o *AddAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -376,7 +372,6 @@ func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context return err } } - } return nil @@ -405,7 +400,6 @@ AddAzureDatabaseDefaultBodyDetailsItems0 add azure database default body details swagger:model AddAzureDatabaseDefaultBodyDetailsItems0 */ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { - // type url TypeURL string `json:"type_url,omitempty"` diff --git a/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go b/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go index e3e4400c01..a3d93a92e1 100644 --- a/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go +++ b/api/managementpb/azure/json/client/azure_database/discover_azure_database_parameters.go @@ -60,7 +60,6 @@ DiscoverAzureDatabaseParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type DiscoverAzureDatabaseParams struct { - // Body. Body DiscoverAzureDatabaseBody @@ -130,7 +129,6 @@ func (o *DiscoverAzureDatabaseParams) SetBody(body DiscoverAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go b/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go index 3e32f8f17b..8198487041 100644 --- a/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go +++ b/api/managementpb/azure/json/client/azure_database/discover_azure_database_responses.go @@ -62,12 +62,12 @@ type DiscoverAzureDatabaseOK struct { func (o *DiscoverAzureDatabaseOK) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Discover][%d] discoverAzureDatabaseOk %+v", 200, o.Payload) } + func (o *DiscoverAzureDatabaseOK) GetPayload() *DiscoverAzureDatabaseOKBody { return o.Payload } func (o *DiscoverAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverAzureDatabaseOKBody) // response payload @@ -104,12 +104,12 @@ func (o *DiscoverAzureDatabaseDefault) Code() int { func (o *DiscoverAzureDatabaseDefault) Error() string { return fmt.Sprintf("[POST /v1/management/azure/AzureDatabase/Discover][%d] DiscoverAzureDatabase default %+v", o._statusCode, o.Payload) } + func (o *DiscoverAzureDatabaseDefault) GetPayload() *DiscoverAzureDatabaseDefaultBody { return o.Payload } func (o *DiscoverAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverAzureDatabaseDefaultBody) // response payload @@ -125,7 +125,6 @@ DiscoverAzureDatabaseBody DiscoverAzureDatabaseRequest discover azure databases swagger:model DiscoverAzureDatabaseBody */ type DiscoverAzureDatabaseBody struct { - // Azure client ID. AzureClientID string `json:"azure_client_id,omitempty"` @@ -172,7 +171,6 @@ DiscoverAzureDatabaseDefaultBody discover azure database default body swagger:model DiscoverAzureDatabaseDefaultBody */ type DiscoverAzureDatabaseDefaultBody struct { - // error Error string `json:"error,omitempty"` @@ -241,9 +239,7 @@ func (o *DiscoverAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, } func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -254,7 +250,6 @@ func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -283,7 +278,6 @@ DiscoverAzureDatabaseDefaultBodyDetailsItems0 discover azure database default bo swagger:model DiscoverAzureDatabaseDefaultBodyDetailsItems0 */ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { - // type url TypeURL string `json:"type_url,omitempty"` @@ -325,7 +319,6 @@ DiscoverAzureDatabaseOKBody DiscoverAzureDatabaseResponse discover azure databas swagger:model DiscoverAzureDatabaseOKBody */ type DiscoverAzureDatabaseOKBody struct { - // azure database instance AzureDatabaseInstance []*DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 `json:"azure_database_instance"` } @@ -385,9 +378,7 @@ func (o *DiscoverAzureDatabaseOKBody) ContextValidate(ctx context.Context, forma } func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AzureDatabaseInstance); i++ { - if o.AzureDatabaseInstance[i] != nil { if err := o.AzureDatabaseInstance[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -398,7 +389,6 @@ func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx c return err } } - } return nil @@ -427,7 +417,6 @@ DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 DiscoverAzureDatabaseInst swagger:model DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 */ type DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 struct { - // Azure database instance ID. InstanceID string `json:"instance_id,omitempty"` diff --git a/api/managementpb/backup/artifacts.pb.go b/api/managementpb/backup/artifacts.pb.go index e783887fb3..e45b927427 100644 --- a/api/managementpb/backup/artifacts.pb.go +++ b/api/managementpb/backup/artifacts.pb.go @@ -7,12 +7,13 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -738,23 +739,26 @@ func file_managementpb_backup_artifacts_proto_rawDescGZIP() []byte { return file_managementpb_backup_artifacts_proto_rawDescData } -var file_managementpb_backup_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_backup_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_managementpb_backup_artifacts_proto_goTypes = []interface{}{ - (BackupStatus)(0), // 0: backup.v1.BackupStatus - (*Artifact)(nil), // 1: backup.v1.Artifact - (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest - (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse - (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest - (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse - (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange - (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest - (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse - (DataModel)(0), // 9: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (BackupMode)(0), // 11: backup.v1.BackupMode - (*Metadata)(nil), // 12: backup.v1.Metadata -} +var ( + file_managementpb_backup_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_backup_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_managementpb_backup_artifacts_proto_goTypes = []interface{}{ + (BackupStatus)(0), // 0: backup.v1.BackupStatus + (*Artifact)(nil), // 1: backup.v1.Artifact + (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse + (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest + (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse + (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange + (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest + (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse + (DataModel)(0), // 9: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (BackupMode)(0), // 11: backup.v1.BackupMode + (*Metadata)(nil), // 12: backup.v1.Metadata + } +) + var file_managementpb_backup_artifacts_proto_depIdxs = []int32{ 9, // 0: backup.v1.Artifact.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.Artifact.status:type_name -> backup.v1.BackupStatus diff --git a/api/managementpb/backup/artifacts.pb.gw.go b/api/managementpb/backup/artifacts.pb.gw.go index a1cd910a56..f80aa72372 100644 --- a/api/managementpb/backup/artifacts.pb.gw.go +++ b/api/managementpb/backup/artifacts.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, client ArtifactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListArtifactsRequest @@ -45,7 +47,6 @@ func request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runtime.Ma msg, err := client.ListArtifacts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, server ArtifactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Artifacts_ListArtifacts_0(ctx context.Context, marshaler runt msg, err := server.ListArtifacts(ctx, &protoReq) return msg, metadata, err - } func request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client ArtifactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler runtime.M msg, err := client.DeleteArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server ArtifactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Artifacts_DeleteArtifact_0(ctx context.Context, marshaler run msg, err := server.DeleteArtifact(ctx, &protoReq) return msg, metadata, err - } func request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, client ArtifactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler runti msg, err := client.ListPitrTimeranges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, server ArtifactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler msg, err := server.ListPitrTimeranges(ctx, &protoReq) return msg, metadata, err - } // RegisterArtifactsHandlerServer registers the http handlers for service Artifacts to "mux". @@ -138,7 +134,6 @@ func local_request_Artifacts_ListPitrTimeranges_0(ctx context.Context, marshaler // 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 RegisterArtifactsHandlerFromEndpoint instead. func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArtifactsServer) error { - mux.Handle("POST", pattern_Artifacts_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -161,7 +156,6 @@ func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Artifacts_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -186,7 +180,6 @@ func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Artifacts_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -211,7 +204,6 @@ func RegisterArtifactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -254,7 +246,6 @@ func RegisterArtifactsHandler(ctx context.Context, mux *runtime.ServeMux, conn * // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ArtifactsClient" to call the correct interceptors. func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArtifactsClient) error { - mux.Handle("POST", pattern_Artifacts_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -274,7 +265,6 @@ func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Artifacts_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -296,7 +286,6 @@ func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Artifacts_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -318,7 +307,6 @@ func RegisterArtifactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Artifacts_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/backup/artifacts.swagger.json b/api/managementpb/backup/artifacts.swagger.json deleted file mode 100644 index dbd57d49fc..0000000000 --- a/api/managementpb/backup/artifacts.swagger.json +++ /dev/null @@ -1,364 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/backup/artifacts.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Artifacts" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/backup/Artifacts/Delete": { - "post": { - "summary": "DeleteArtifact deletes specified artifact.", - "operationId": "DeleteArtifact", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1DeleteArtifactResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1DeleteArtifactRequest" - } - } - ], - "tags": [ - "Artifacts" - ] - } - }, - "/v1/management/backup/Artifacts/List": { - "post": { - "summary": "ListArtifacts returns a list of all backup artifacts.", - "operationId": "ListArtifacts", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListArtifactsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListArtifactsRequest" - } - } - ], - "tags": [ - "Artifacts" - ] - } - }, - "/v1/management/backup/Artifacts/ListPITRTimeranges": { - "post": { - "summary": "ListPitrTimeranges list the available MongoDB PITR timeranges in a given backup location", - "operationId": "ListPitrTimeranges", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListPitrTimerangesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListPitrTimerangesRequest" - } - } - ], - "tags": [ - "Artifacts" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1Artifact": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string", - "description": "Machine-readable artifact ID." - }, - "name": { - "type": "string", - "title": "Artifact name" - }, - "vendor": { - "type": "string", - "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." - }, - "location_id": { - "type": "string", - "description": "Machine-readable location ID." - }, - "location_name": { - "type": "string", - "description": "Location name." - }, - "service_id": { - "type": "string", - "description": "Machine-readable service ID." - }, - "service_name": { - "type": "string", - "description": "Service name." - }, - "data_model": { - "$ref": "#/definitions/v1DataModel", - "description": "Backup data model." - }, - "status": { - "$ref": "#/definitions/v1BackupStatus", - "description": "Backup status." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Artifact creation time." - }, - "mode": { - "$ref": "#/definitions/v1BackupMode", - "description": "Backup mode." - }, - "is_sharded_cluster": { - "type": "boolean", - "description": "Source database setup type." - }, - "folder": { - "type": "string", - "description": "Folder to store artifact on a storage." - }, - "metadata_list": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Metadata" - }, - "description": "List of artifact metadata." - } - }, - "description": "Artifact represents single backup artifact." - }, - "v1BackupMode": { - "type": "string", - "enum": [ - "BACKUP_MODE_INVALID", - "SNAPSHOT", - "INCREMENTAL", - "PITR" - ], - "default": "BACKUP_MODE_INVALID", - "description": "BackupMode specifies backup mode." - }, - "v1BackupStatus": { - "type": "string", - "enum": [ - "BACKUP_STATUS_INVALID", - "BACKUP_STATUS_PENDING", - "BACKUP_STATUS_IN_PROGRESS", - "BACKUP_STATUS_PAUSED", - "BACKUP_STATUS_SUCCESS", - "BACKUP_STATUS_ERROR", - "BACKUP_STATUS_DELETING", - "BACKUP_STATUS_FAILED_TO_DELETE", - "BACKUP_STATUS_CLEANUP_IN_PROGRESS" - ], - "default": "BACKUP_STATUS_INVALID", - "description": "BackupStatus shows the current status of execution of backup." - }, - "v1DataModel": { - "type": "string", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "default": "DATA_MODEL_INVALID", - "description": "DataModel is a model used for performing a backup." - }, - "v1DeleteArtifactRequest": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string", - "description": "Machine-readable artifact ID." - }, - "remove_files": { - "type": "boolean", - "description": "Removes all the backup files associated with artifact if flag is set." - } - } - }, - "v1DeleteArtifactResponse": { - "type": "object" - }, - "v1File": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "is_directory": { - "type": "boolean" - } - }, - "description": "File represents file or folder on a storage." - }, - "v1ListArtifactsRequest": { - "type": "object" - }, - "v1ListArtifactsResponse": { - "type": "object", - "properties": { - "artifacts": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Artifact" - } - } - } - }, - "v1ListPitrTimerangesRequest": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string", - "description": "Artifact ID represents artifact whose location has PITR timeranges to be retrieved." - } - } - }, - "v1ListPitrTimerangesResponse": { - "type": "object", - "properties": { - "timeranges": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1PitrTimerange" - } - } - } - }, - "v1Metadata": { - "type": "object", - "properties": { - "file_list": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1File" - }, - "description": "List of files backup consists of." - }, - "restore_to": { - "type": "string", - "format": "date-time", - "description": "Exact time DB can be restored to." - }, - "pbm_metadata": { - "$ref": "#/definitions/v1PbmMetadata" - } - }, - "description": "Metadata contains extra artifact data like files it consists of, tool specific data, etc." - }, - "v1PbmMetadata": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of backup in backup tool representation." - } - }, - "description": "PbmMetadata contains additional data for pbm cli tools." - }, - "v1PitrTimerange": { - "type": "object", - "properties": { - "start_timestamp": { - "type": "string", - "format": "date-time", - "description": "start_timestamp is the time of the first event in the PITR chunk." - }, - "end_timestamp": { - "type": "string", - "format": "date-time", - "description": "end_timestamp is the time of the last event in the PITR chunk." - } - } - } - } -} diff --git a/api/managementpb/backup/artifacts_grpc.pb.go b/api/managementpb/backup/artifacts_grpc.pb.go index f0729da692..7556103074 100644 --- a/api/managementpb/backup/artifacts_grpc.pb.go +++ b/api/managementpb/backup/artifacts_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -85,15 +86,16 @@ type ArtifactsServer interface { } // UnimplementedArtifactsServer must be embedded to have forward compatible implementations. -type UnimplementedArtifactsServer struct { -} +type UnimplementedArtifactsServer struct{} func (UnimplementedArtifactsServer) ListArtifacts(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifacts not implemented") } + func (UnimplementedArtifactsServer) DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteArtifact not implemented") } + func (UnimplementedArtifactsServer) ListPitrTimeranges(context.Context, *ListPitrTimerangesRequest) (*ListPitrTimerangesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPitrTimeranges not implemented") } diff --git a/api/managementpb/backup/backups.pb.go b/api/managementpb/backup/backups.pb.go index a45c158a26..edeb0ee602 100644 --- a/api/managementpb/backup/backups.pb.go +++ b/api/managementpb/backup/backups.pb.go @@ -7,17 +7,19 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -1712,36 +1714,39 @@ func file_managementpb_backup_backups_proto_rawDescGZIP() []byte { return file_managementpb_backup_backups_proto_rawDescData } -var file_managementpb_backup_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_managementpb_backup_backups_proto_goTypes = []interface{}{ - (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest - (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse - (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest - (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse - (*RestoreBackupRequest)(nil), // 4: backup.v1.RestoreBackupRequest - (*RestoreBackupResponse)(nil), // 5: backup.v1.RestoreBackupResponse - (*ScheduledBackup)(nil), // 6: backup.v1.ScheduledBackup - (*ScheduleBackupRequest)(nil), // 7: backup.v1.ScheduleBackupRequest - (*ScheduleBackupResponse)(nil), // 8: backup.v1.ScheduleBackupResponse - (*ListScheduledBackupsRequest)(nil), // 9: backup.v1.ListScheduledBackupsRequest - (*ListScheduledBackupsResponse)(nil), // 10: backup.v1.ListScheduledBackupsResponse - (*ChangeScheduledBackupRequest)(nil), // 11: backup.v1.ChangeScheduledBackupRequest - (*ChangeScheduledBackupResponse)(nil), // 12: backup.v1.ChangeScheduledBackupResponse - (*RemoveScheduledBackupRequest)(nil), // 13: backup.v1.RemoveScheduledBackupRequest - (*RemoveScheduledBackupResponse)(nil), // 14: backup.v1.RemoveScheduledBackupResponse - (*GetLogsRequest)(nil), // 15: backup.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 16: backup.v1.GetLogsResponse - (*LogChunk)(nil), // 17: backup.v1.LogChunk - (*durationpb.Duration)(nil), // 18: google.protobuf.Duration - (DataModel)(0), // 19: backup.v1.DataModel - (*inventorypb.MySQLService)(nil), // 20: inventory.MySQLService - (*inventorypb.MongoDBService)(nil), // 21: inventory.MongoDBService - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (BackupMode)(0), // 23: backup.v1.BackupMode - (*wrapperspb.BoolValue)(nil), // 24: google.protobuf.BoolValue - (*wrapperspb.StringValue)(nil), // 25: google.protobuf.StringValue - (*wrapperspb.UInt32Value)(nil), // 26: google.protobuf.UInt32Value -} +var ( + file_managementpb_backup_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 18) + file_managementpb_backup_backups_proto_goTypes = []interface{}{ + (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest + (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse + (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest + (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse + (*RestoreBackupRequest)(nil), // 4: backup.v1.RestoreBackupRequest + (*RestoreBackupResponse)(nil), // 5: backup.v1.RestoreBackupResponse + (*ScheduledBackup)(nil), // 6: backup.v1.ScheduledBackup + (*ScheduleBackupRequest)(nil), // 7: backup.v1.ScheduleBackupRequest + (*ScheduleBackupResponse)(nil), // 8: backup.v1.ScheduleBackupResponse + (*ListScheduledBackupsRequest)(nil), // 9: backup.v1.ListScheduledBackupsRequest + (*ListScheduledBackupsResponse)(nil), // 10: backup.v1.ListScheduledBackupsResponse + (*ChangeScheduledBackupRequest)(nil), // 11: backup.v1.ChangeScheduledBackupRequest + (*ChangeScheduledBackupResponse)(nil), // 12: backup.v1.ChangeScheduledBackupResponse + (*RemoveScheduledBackupRequest)(nil), // 13: backup.v1.RemoveScheduledBackupRequest + (*RemoveScheduledBackupResponse)(nil), // 14: backup.v1.RemoveScheduledBackupResponse + (*GetLogsRequest)(nil), // 15: backup.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 16: backup.v1.GetLogsResponse + (*LogChunk)(nil), // 17: backup.v1.LogChunk + (*durationpb.Duration)(nil), // 18: google.protobuf.Duration + (DataModel)(0), // 19: backup.v1.DataModel + (*inventorypb.MySQLService)(nil), // 20: inventory.MySQLService + (*inventorypb.MongoDBService)(nil), // 21: inventory.MongoDBService + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (BackupMode)(0), // 23: backup.v1.BackupMode + (*wrapperspb.BoolValue)(nil), // 24: google.protobuf.BoolValue + (*wrapperspb.StringValue)(nil), // 25: google.protobuf.StringValue + (*wrapperspb.UInt32Value)(nil), // 26: google.protobuf.UInt32Value + } +) + var file_managementpb_backup_backups_proto_depIdxs = []int32{ 18, // 0: backup.v1.StartBackupRequest.retry_interval:type_name -> google.protobuf.Duration 19, // 1: backup.v1.StartBackupRequest.data_model:type_name -> backup.v1.DataModel diff --git a/api/managementpb/backup/backups.pb.gw.go b/api/managementpb/backup/backups.pb.gw.go index e5ea98d6f8..ad56562fe5 100644 --- a/api/managementpb/backup/backups.pb.gw.go +++ b/api/managementpb/backup/backups.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Backups_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartBackupRequest @@ -45,7 +47,6 @@ func request_Backups_StartBackup_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.StartBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Backups_StartBackup_0(ctx context.Context, marshaler runtime. msg, err := server.StartBackup(ctx, &protoReq) return msg, metadata, err - } func request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, marsh msg, err := client.ListArtifactCompatibleServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Backups_ListArtifactCompatibleServices_0(ctx context.Context, msg, err := server.ListArtifactCompatibleServices(ctx, &protoReq) return msg, metadata, err - } func request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtime.Mars msg, err := client.RestoreBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Backups_RestoreBackup_0(ctx context.Context, marshaler runtim msg, err := server.RestoreBackup(ctx, &protoReq) return msg, metadata, err - } func request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ScheduleBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Backups_ScheduleBackup_0(ctx context.Context, marshaler runti msg, err := server.ScheduleBackup(ctx, &protoReq) return msg, metadata, err - } func request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler runti msg, err := client.ListScheduledBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Backups_ListScheduledBackups_0(ctx context.Context, marshaler msg, err := server.ListScheduledBackups(ctx, &protoReq) return msg, metadata, err - } func request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshaler runt msg, err := client.ChangeScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Backups_ChangeScheduledBackup_0(ctx context.Context, marshale msg, err := server.ChangeScheduledBackup(ctx, &protoReq) return msg, metadata, err - } func request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshaler runt msg, err := client.RemoveScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Backups_RemoveScheduledBackup_0(ctx context.Context, marshale msg, err := server.RemoveScheduledBackup(ctx, &protoReq) return msg, metadata, err - } func request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client BackupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server BackupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Mars msg, err := server.GetLogs(ctx, &protoReq) return msg, metadata, err - } // RegisterBackupsHandlerServer registers the http handlers for service Backups to "mux". @@ -308,7 +294,6 @@ func local_request_Backups_GetLogs_0(ctx context.Context, marshaler runtime.Mars // 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 RegisterBackupsHandlerFromEndpoint instead. func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BackupsServer) error { - mux.Handle("POST", pattern_Backups_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -331,7 +316,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,7 +340,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -381,7 +364,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -406,7 +388,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -431,7 +412,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -456,7 +436,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -481,7 +460,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -506,7 +484,6 @@ func RegisterBackupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Backups_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -549,7 +526,6 @@ func RegisterBackupsHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "BackupsClient" to call the correct interceptors. func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BackupsClient) error { - mux.Handle("POST", pattern_Backups_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -569,7 +545,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,7 +566,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -613,7 +587,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -635,7 +608,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -657,7 +629,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -679,7 +650,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -701,7 +671,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Backups_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -723,7 +692,6 @@ func RegisterBackupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Backups_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/backup/backups.swagger.json b/api/managementpb/backup/backups.swagger.json deleted file mode 100644 index fa07a12653..0000000000 --- a/api/managementpb/backup/backups.swagger.json +++ /dev/null @@ -1,812 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/backup/backups.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Backups" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/backup/Backups/ChangeScheduled": { - "post": { - "summary": "ChangeScheduledBackup changes existing scheduled backup.", - "operationId": "ChangeScheduledBackup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ChangeScheduledBackupResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ChangeScheduledBackupRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/GetLogs": { - "post": { - "summary": "GetLogs returns logs from the underlying tools for a backup/restore job.", - "operationId": "GetLogs", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetLogsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GetLogsRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/ListArtifactCompatibleServices": { - "post": { - "summary": "ListArtifactCompatibleServices lists compatible services for restoring a backup.", - "operationId": "ListArtifactCompatibleServices", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListArtifactCompatibleServicesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListArtifactCompatibleServicesRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/ListScheduled": { - "post": { - "summary": "ListScheduledBackups returns all scheduled backups.", - "operationId": "ListScheduledBackups", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListScheduledBackupsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListScheduledBackupsRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/RemoveScheduled": { - "post": { - "summary": "RemoveScheduledBackup removes existing scheduled backup.", - "operationId": "RemoveScheduledBackup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1RemoveScheduledBackupResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1RemoveScheduledBackupRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/Restore": { - "post": { - "summary": "RestoreBackup requests the backup restore.", - "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup\nERROR_CODE_INCOMPATIBLE_TARGET_MYSQL - target MySQL version is not compatible with the artifact for performing a restore of the backup", - "operationId": "RestoreBackup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1RestoreBackupResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1RestoreBackupRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/Schedule": { - "post": { - "summary": "ScheduleBackup schedules repeated backup.", - "operationId": "ScheduleBackup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ScheduleBackupResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ScheduleBackupRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - }, - "/v1/management/backup/Backups/Start": { - "post": { - "summary": "StartBackup request backup specified service to location.", - "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup", - "operationId": "StartBackup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1StartBackupResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1StartBackupRequest" - } - } - ], - "tags": [ - "Backups" - ] - } - } - }, - "definitions": { - "inventoryMongoDBService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MongoDBService represents a generic MongoDB instance." - }, - "inventoryMySQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MySQLService represents a generic MySQL instance." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1BackupMode": { - "type": "string", - "enum": [ - "BACKUP_MODE_INVALID", - "SNAPSHOT", - "INCREMENTAL", - "PITR" - ], - "default": "BACKUP_MODE_INVALID", - "description": "BackupMode specifies backup mode." - }, - "v1ChangeScheduledBackupRequest": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "cron_expression": { - "type": "string", - "description": "How often backup should be run in cron format." - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "First backup wouldn't happen before this time." - }, - "name": { - "type": "string", - "description": "Name of backup." - }, - "description": { - "type": "string", - "description": "Human-readable description." - }, - "retry_interval": { - "type": "string", - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." - }, - "retries": { - "type": "integer", - "format": "int64", - "description": "How many times to retry a failed backup before giving up." - }, - "retention": { - "type": "integer", - "format": "int64", - "description": "How many artifacts keep. 0 - unlimited." - } - } - }, - "v1ChangeScheduledBackupResponse": { - "type": "object" - }, - "v1DataModel": { - "type": "string", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "default": "DATA_MODEL_INVALID", - "description": "DataModel is a model used for performing a backup." - }, - "v1GetLogsRequest": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string" - }, - "offset": { - "type": "integer", - "format": "int64" - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "restore_id": { - "type": "string" - } - } - }, - "v1GetLogsResponse": { - "type": "object", - "properties": { - "logs": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1LogChunk" - } - }, - "end": { - "type": "boolean" - } - } - }, - "v1ListArtifactCompatibleServicesRequest": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string", - "description": "Artifact id used to determine restore compatibility." - } - } - }, - "v1ListArtifactCompatibleServicesResponse": { - "type": "object", - "properties": { - "mysql": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryMySQLService" - } - }, - "mongodb": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/inventoryMongoDBService" - } - } - } - }, - "v1ListScheduledBackupsRequest": { - "type": "object" - }, - "v1ListScheduledBackupsResponse": { - "type": "object", - "properties": { - "scheduled_backups": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1ScheduledBackup" - } - } - } - }, - "v1LogChunk": { - "type": "object", - "properties": { - "chunk_id": { - "type": "integer", - "format": "int64" - }, - "data": { - "type": "string" - } - }, - "description": "LogChunk represent one chunk of logs." - }, - "v1RemoveScheduledBackupRequest": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string" - } - } - }, - "v1RemoveScheduledBackupResponse": { - "type": "object" - }, - "v1RestoreBackupRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Service identifier where backup should be restored." - }, - "artifact_id": { - "type": "string", - "description": "Artifact id to restore." - }, - "pitr_timestamp": { - "type": "string", - "format": "date-time", - "title": "Timestamp of PITR to restore to" - } - } - }, - "v1RestoreBackupResponse": { - "type": "object", - "properties": { - "restore_id": { - "type": "string", - "description": "Unique restore identifier." - } - } - }, - "v1ScheduleBackupRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Service identifier where backup should be performed." - }, - "location_id": { - "type": "string", - "description": "Machine-readable location ID." - }, - "cron_expression": { - "type": "string", - "description": "How often backup should be run in cron format." - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "First backup wouldn't happen before this time." - }, - "name": { - "type": "string", - "description": "Name of backup." - }, - "description": { - "type": "string", - "description": "Human-readable description." - }, - "retry_interval": { - "type": "string", - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." - }, - "retries": { - "type": "integer", - "format": "int64", - "description": "How many times to retry a failed backup before giving up." - }, - "enabled": { - "type": "boolean", - "description": "If scheduling is enabled." - }, - "retention": { - "type": "integer", - "format": "int64", - "description": "How many artifacts keep. 0 - unlimited." - }, - "mode": { - "$ref": "#/definitions/v1BackupMode", - "description": "Backup mode." - }, - "data_model": { - "$ref": "#/definitions/v1DataModel", - "description": "Backup data model (physical or logical)." - }, - "folder": { - "type": "string", - "description": "Folder on storage for artifact." - } - } - }, - "v1ScheduleBackupResponse": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string" - } - } - }, - "v1ScheduledBackup": { - "type": "object", - "properties": { - "scheduled_backup_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "service_id": { - "type": "string", - "description": "Machine-readable service ID." - }, - "service_name": { - "type": "string", - "description": "Service name." - }, - "location_id": { - "type": "string", - "description": "Machine-readable location ID." - }, - "location_name": { - "type": "string", - "description": "Location name." - }, - "cron_expression": { - "type": "string", - "description": "How often backup will be run in cron format." - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "First backup wouldn't happen before this time." - }, - "name": { - "type": "string", - "description": "Artifact name." - }, - "description": { - "type": "string", - "description": "Description." - }, - "retry_interval": { - "type": "string", - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." - }, - "retries": { - "type": "integer", - "format": "int64", - "description": "How many times to retry a failed backup before giving up." - }, - "enabled": { - "type": "boolean", - "description": "If scheduling is enabled." - }, - "data_model": { - "$ref": "#/definitions/v1DataModel", - "description": "Backup data model (physical or logical)." - }, - "vendor": { - "type": "string", - "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." - }, - "last_run": { - "type": "string", - "format": "date-time", - "description": "Last run." - }, - "next_run": { - "type": "string", - "format": "date-time", - "description": "Next run." - }, - "retention": { - "type": "integer", - "format": "int64", - "description": "How many artifacts keep. 0 - unlimited." - }, - "mode": { - "$ref": "#/definitions/v1BackupMode", - "description": "Backup mode." - }, - "folder": { - "type": "string", - "description": "Folder on storage for artifact." - } - }, - "description": "ScheduledBackup represents scheduled task for backup." - }, - "v1StartBackupRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "location_id": { - "type": "string", - "description": "Machine-readable location ID." - }, - "name": { - "type": "string", - "description": "If empty then name is auto-generated." - }, - "description": { - "type": "string", - "description": "Human-readable description." - }, - "retry_interval": { - "type": "string", - "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." - }, - "retries": { - "type": "integer", - "format": "int64", - "description": "How many times to retry a failed backup before giving up." - }, - "data_model": { - "$ref": "#/definitions/v1DataModel", - "description": "DataModel represents the data model used for the backup." - }, - "folder": { - "type": "string", - "description": "Folder on storage for artifact." - } - } - }, - "v1StartBackupResponse": { - "type": "object", - "properties": { - "artifact_id": { - "type": "string", - "description": "Unique identifier." - } - } - } - } -} diff --git a/api/managementpb/backup/backups_grpc.pb.go b/api/managementpb/backup/backups_grpc.pb.go index 6a8ee0bbb3..707dc31afe 100644 --- a/api/managementpb/backup/backups_grpc.pb.go +++ b/api/managementpb/backup/backups_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -155,30 +156,36 @@ type BackupsServer interface { } // UnimplementedBackupsServer must be embedded to have forward compatible implementations. -type UnimplementedBackupsServer struct { -} +type UnimplementedBackupsServer struct{} func (UnimplementedBackupsServer) StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartBackup not implemented") } + func (UnimplementedBackupsServer) ListArtifactCompatibleServices(context.Context, *ListArtifactCompatibleServicesRequest) (*ListArtifactCompatibleServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifactCompatibleServices not implemented") } + func (UnimplementedBackupsServer) RestoreBackup(context.Context, *RestoreBackupRequest) (*RestoreBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RestoreBackup not implemented") } + func (UnimplementedBackupsServer) ScheduleBackup(context.Context, *ScheduleBackupRequest) (*ScheduleBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ScheduleBackup not implemented") } + func (UnimplementedBackupsServer) ListScheduledBackups(context.Context, *ListScheduledBackupsRequest) (*ListScheduledBackupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListScheduledBackups not implemented") } + func (UnimplementedBackupsServer) ChangeScheduledBackup(context.Context, *ChangeScheduledBackupRequest) (*ChangeScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeScheduledBackup not implemented") } + func (UnimplementedBackupsServer) RemoveScheduledBackup(context.Context, *RemoveScheduledBackupRequest) (*RemoveScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveScheduledBackup not implemented") } + func (UnimplementedBackupsServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") } diff --git a/api/managementpb/backup/common.pb.go b/api/managementpb/backup/common.pb.go index 354353576b..ef4b58828d 100644 --- a/api/managementpb/backup/common.pb.go +++ b/api/managementpb/backup/common.pb.go @@ -7,12 +7,13 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -381,16 +382,19 @@ func file_managementpb_backup_common_proto_rawDescGZIP() []byte { return file_managementpb_backup_common_proto_rawDescData } -var file_managementpb_backup_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_managementpb_backup_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_backup_common_proto_goTypes = []interface{}{ - (DataModel)(0), // 0: backup.v1.DataModel - (BackupMode)(0), // 1: backup.v1.BackupMode - (*File)(nil), // 2: backup.v1.File - (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata - (*Metadata)(nil), // 4: backup.v1.Metadata - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp -} +var ( + file_managementpb_backup_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_managementpb_backup_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_backup_common_proto_goTypes = []interface{}{ + (DataModel)(0), // 0: backup.v1.DataModel + (BackupMode)(0), // 1: backup.v1.BackupMode + (*File)(nil), // 2: backup.v1.File + (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata + (*Metadata)(nil), // 4: backup.v1.Metadata + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + } +) + var file_managementpb_backup_common_proto_depIdxs = []int32{ 2, // 0: backup.v1.Metadata.file_list:type_name -> backup.v1.File 5, // 1: backup.v1.Metadata.restore_to:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/backup/common.swagger.json b/api/managementpb/backup/common.swagger.json deleted file mode 100644 index 716e7a45ef..0000000000 --- a/api/managementpb/backup/common.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/backup/common.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/backup/errors.pb.go b/api/managementpb/backup/errors.pb.go index 71bf5a1b91..63b0b266bb 100644 --- a/api/managementpb/backup/errors.pb.go +++ b/api/managementpb/backup/errors.pb.go @@ -7,10 +7,11 @@ package backupv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -182,12 +183,15 @@ func file_managementpb_backup_errors_proto_rawDescGZIP() []byte { return file_managementpb_backup_errors_proto_rawDescData } -var file_managementpb_backup_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_backup_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_managementpb_backup_errors_proto_goTypes = []interface{}{ - (ErrorCode)(0), // 0: backup.v1.ErrorCode - (*Error)(nil), // 1: backup.v1.Error -} +var ( + file_managementpb_backup_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_backup_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) + file_managementpb_backup_errors_proto_goTypes = []interface{}{ + (ErrorCode)(0), // 0: backup.v1.ErrorCode + (*Error)(nil), // 1: backup.v1.Error + } +) + var file_managementpb_backup_errors_proto_depIdxs = []int32{ 0, // 0: backup.v1.Error.code:type_name -> backup.v1.ErrorCode 1, // [1:1] is the sub-list for method output_type diff --git a/api/managementpb/backup/errors.swagger.json b/api/managementpb/backup/errors.swagger.json deleted file mode 100644 index 7fedd765ce..0000000000 --- a/api/managementpb/backup/errors.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/backup/errors.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go b/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go index ab13b0db89..cdf5c2d89b 100644 --- a/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go +++ b/api/managementpb/backup/json/client/artifacts/delete_artifact_parameters.go @@ -60,7 +60,6 @@ DeleteArtifactParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteArtifactParams struct { - // Body. Body DeleteArtifactBody @@ -130,7 +129,6 @@ func (o *DeleteArtifactParams) SetBody(body DeleteArtifactBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go b/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go index cfb1223155..03cd4b4f68 100644 --- a/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go +++ b/api/managementpb/backup/json/client/artifacts/delete_artifact_responses.go @@ -60,12 +60,12 @@ type DeleteArtifactOK struct { func (o *DeleteArtifactOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/Delete][%d] deleteArtifactOk %+v", 200, o.Payload) } + func (o *DeleteArtifactOK) GetPayload() interface{} { return o.Payload } func (o *DeleteArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteArtifactDefault) Code() int { func (o *DeleteArtifactDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/Delete][%d] DeleteArtifact default %+v", o._statusCode, o.Payload) } + func (o *DeleteArtifactDefault) GetPayload() *DeleteArtifactDefaultBody { return o.Payload } func (o *DeleteArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteArtifactDefaultBody) // response payload @@ -121,7 +121,6 @@ DeleteArtifactBody delete artifact body swagger:model DeleteArtifactBody */ type DeleteArtifactBody struct { - // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -162,7 +161,6 @@ DeleteArtifactDefaultBody delete artifact default body swagger:model DeleteArtifactDefaultBody */ type DeleteArtifactDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *DeleteArtifactDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -270,7 +265,6 @@ DeleteArtifactDefaultBodyDetailsItems0 delete artifact default body details item swagger:model DeleteArtifactDefaultBodyDetailsItems0 */ type DeleteArtifactDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go b/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go index df511fdabf..5932e115ec 100644 --- a/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go +++ b/api/managementpb/backup/json/client/artifacts/list_artifacts_parameters.go @@ -60,7 +60,6 @@ ListArtifactsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListArtifactsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListArtifactsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListArtifactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go b/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go index 2d62900b15..c9d51fc1fc 100644 --- a/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go +++ b/api/managementpb/backup/json/client/artifacts/list_artifacts_responses.go @@ -62,12 +62,12 @@ type ListArtifactsOK struct { func (o *ListArtifactsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/List][%d] listArtifactsOk %+v", 200, o.Payload) } + func (o *ListArtifactsOK) GetPayload() *ListArtifactsOKBody { return o.Payload } func (o *ListArtifactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListArtifactsDefault) Code() int { func (o *ListArtifactsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/List][%d] ListArtifacts default %+v", o._statusCode, o.Payload) } + func (o *ListArtifactsDefault) GetPayload() *ListArtifactsDefaultBody { return o.Payload } func (o *ListArtifactsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactsDefaultBody) // response payload @@ -125,7 +125,6 @@ ListArtifactsDefaultBody list artifacts default body swagger:model ListArtifactsDefaultBody */ type ListArtifactsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *ListArtifactsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -233,7 +229,6 @@ ListArtifactsDefaultBodyDetailsItems0 list artifacts default body details items0 swagger:model ListArtifactsDefaultBodyDetailsItems0 */ type ListArtifactsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ ListArtifactsOKBody list artifacts OK body swagger:model ListArtifactsOKBody */ type ListArtifactsOKBody struct { - // artifacts Artifacts []*ListArtifactsOKBodyArtifactsItems0 `json:"artifacts"` } @@ -331,9 +325,7 @@ func (o *ListArtifactsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Artifacts); i++ { - if o.Artifacts[i] != nil { if err := o.Artifacts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,7 +336,6 @@ func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, form return err } } - } return nil @@ -373,7 +364,6 @@ ListArtifactsOKBodyArtifactsItems0 Artifact represents single backup artifact. swagger:model ListArtifactsOKBodyArtifactsItems0 */ type ListArtifactsOKBodyArtifactsItems0 struct { - // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -660,9 +650,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0) ContextValidate(ctx context.Context } func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.MetadataList); i++ { - if o.MetadataList[i] != nil { if err := o.MetadataList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -673,7 +661,6 @@ func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx con return err } } - } return nil @@ -702,7 +689,6 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0 Metadata contains extra art swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0 struct { - // List of files backup consists of. FileList []*ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 `json:"file_list"` @@ -812,9 +798,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) ContextValidate(c } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFileList(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.FileList); i++ { - if o.FileList[i] != nil { if err := o.FileList[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -825,14 +809,12 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFi return err } } - } return nil } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidatePbmMetadata(ctx context.Context, formats strfmt.Registry) error { - if o.PbmMetadata != nil { if err := o.PbmMetadata.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -870,7 +852,6 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 File represen swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 struct { - // name Name string `json:"name,omitempty"` @@ -911,7 +892,6 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata PbmMetadata cont swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata struct { - // Name of backup in backup tool representation. Name string `json:"name,omitempty"` } diff --git a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go index b91cb5e190..66e1f4cf57 100644 --- a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go +++ b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_parameters.go @@ -60,7 +60,6 @@ ListPitrTimerangesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListPitrTimerangesParams struct { - // Body. Body ListPitrTimerangesBody @@ -130,7 +129,6 @@ func (o *ListPitrTimerangesParams) SetBody(body ListPitrTimerangesBody) { // WriteToRequest writes these params to a swagger request func (o *ListPitrTimerangesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go index 1b0624029b..1cd2d69336 100644 --- a/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go +++ b/api/managementpb/backup/json/client/artifacts/list_pitr_timeranges_responses.go @@ -61,12 +61,12 @@ type ListPitrTimerangesOK struct { func (o *ListPitrTimerangesOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/ListPITRTimeranges][%d] listPitrTimerangesOk %+v", 200, o.Payload) } + func (o *ListPitrTimerangesOK) GetPayload() *ListPitrTimerangesOKBody { return o.Payload } func (o *ListPitrTimerangesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListPitrTimerangesOKBody) // response payload @@ -103,12 +103,12 @@ func (o *ListPitrTimerangesDefault) Code() int { func (o *ListPitrTimerangesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Artifacts/ListPITRTimeranges][%d] ListPitrTimeranges default %+v", o._statusCode, o.Payload) } + func (o *ListPitrTimerangesDefault) GetPayload() *ListPitrTimerangesDefaultBody { return o.Payload } func (o *ListPitrTimerangesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListPitrTimerangesDefaultBody) // response payload @@ -124,7 +124,6 @@ ListPitrTimerangesBody list pitr timeranges body swagger:model ListPitrTimerangesBody */ type ListPitrTimerangesBody struct { - // Artifact ID represents artifact whose location has PITR timeranges to be retrieved. ArtifactID string `json:"artifact_id,omitempty"` } @@ -162,7 +161,6 @@ ListPitrTimerangesDefaultBody list pitr timeranges default body swagger:model ListPitrTimerangesDefaultBody */ type ListPitrTimerangesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *ListPitrTimerangesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -270,7 +265,6 @@ ListPitrTimerangesDefaultBodyDetailsItems0 list pitr timeranges default body det swagger:model ListPitrTimerangesDefaultBodyDetailsItems0 */ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -308,7 +302,6 @@ ListPitrTimerangesOKBody list pitr timeranges OK body swagger:model ListPitrTimerangesOKBody */ type ListPitrTimerangesOKBody struct { - // timeranges Timeranges []*ListPitrTimerangesOKBodyTimerangesItems0 `json:"timeranges"` } @@ -368,9 +361,7 @@ func (o *ListPitrTimerangesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Timeranges); i++ { - if o.Timeranges[i] != nil { if err := o.Timeranges[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -381,7 +372,6 @@ func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context return err } } - } return nil @@ -410,7 +400,6 @@ ListPitrTimerangesOKBodyTimerangesItems0 list pitr timeranges OK body timeranges swagger:model ListPitrTimerangesOKBodyTimerangesItems0 */ type ListPitrTimerangesOKBodyTimerangesItems0 struct { - // start_timestamp is the time of the first event in the PITR chunk. // Format: date-time StartTimestamp strfmt.DateTime `json:"start_timestamp,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go b/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go index 8cb9679de3..e372d89f19 100644 --- a/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/change_scheduled_backup_parameters.go @@ -60,7 +60,6 @@ ChangeScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeScheduledBackupParams struct { - // Body. Body ChangeScheduledBackupBody @@ -130,7 +129,6 @@ func (o *ChangeScheduledBackupParams) SetBody(body ChangeScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go b/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go index d6ef4dc441..eaefe8fc84 100644 --- a/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/change_scheduled_backup_responses.go @@ -61,12 +61,12 @@ type ChangeScheduledBackupOK struct { func (o *ChangeScheduledBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ChangeScheduled][%d] changeScheduledBackupOk %+v", 200, o.Payload) } + func (o *ChangeScheduledBackupOK) GetPayload() interface{} { return o.Payload } func (o *ChangeScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -101,12 +101,12 @@ func (o *ChangeScheduledBackupDefault) Code() int { func (o *ChangeScheduledBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ChangeScheduled][%d] ChangeScheduledBackup default %+v", o._statusCode, o.Payload) } + func (o *ChangeScheduledBackupDefault) GetPayload() *ChangeScheduledBackupDefaultBody { return o.Payload } func (o *ChangeScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeScheduledBackupDefaultBody) // response payload @@ -122,7 +122,6 @@ ChangeScheduledBackupBody change scheduled backup body swagger:model ChangeScheduledBackupBody */ type ChangeScheduledBackupBody struct { - // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` @@ -206,7 +205,6 @@ ChangeScheduledBackupDefaultBody change scheduled backup default body swagger:model ChangeScheduledBackupDefaultBody */ type ChangeScheduledBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -272,9 +270,7 @@ func (o *ChangeScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -285,7 +281,6 @@ func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -314,7 +309,6 @@ ChangeScheduledBackupDefaultBodyDetailsItems0 change scheduled backup default bo swagger:model ChangeScheduledBackupDefaultBodyDetailsItems0 */ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/get_logs_parameters.go b/api/managementpb/backup/json/client/backups/get_logs_parameters.go index 5b43e385bf..d6540699d4 100644 --- a/api/managementpb/backup/json/client/backups/get_logs_parameters.go +++ b/api/managementpb/backup/json/client/backups/get_logs_parameters.go @@ -60,7 +60,6 @@ GetLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsParams struct { - // Body. Body GetLogsBody @@ -130,7 +129,6 @@ func (o *GetLogsParams) SetBody(body GetLogsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/get_logs_responses.go b/api/managementpb/backup/json/client/backups/get_logs_responses.go index 0829b3d0aa..a378c0ff8b 100644 --- a/api/managementpb/backup/json/client/backups/get_logs_responses.go +++ b/api/managementpb/backup/json/client/backups/get_logs_responses.go @@ -60,12 +60,12 @@ type GetLogsOK struct { func (o *GetLogsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/GetLogs][%d] getLogsOk %+v", 200, o.Payload) } + func (o *GetLogsOK) GetPayload() *GetLogsOKBody { return o.Payload } func (o *GetLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetLogsDefault) Code() int { func (o *GetLogsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/GetLogs][%d] GetLogs default %+v", o._statusCode, o.Payload) } + func (o *GetLogsDefault) GetPayload() *GetLogsDefaultBody { return o.Payload } func (o *GetLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsDefaultBody) // response payload @@ -123,7 +123,6 @@ GetLogsBody get logs body swagger:model GetLogsBody */ type GetLogsBody struct { - // artifact id ArtifactID string `json:"artifact_id,omitempty"` @@ -170,7 +169,6 @@ GetLogsDefaultBody get logs default body swagger:model GetLogsDefaultBody */ type GetLogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -236,9 +234,7 @@ func (o *GetLogsDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +245,6 @@ func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -278,7 +273,6 @@ GetLogsDefaultBodyDetailsItems0 get logs default body details items0 swagger:model GetLogsDefaultBodyDetailsItems0 */ type GetLogsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -316,7 +310,6 @@ GetLogsOKBody get logs OK body swagger:model GetLogsOKBody */ type GetLogsOKBody struct { - // logs Logs []*GetLogsOKBodyLogsItems0 `json:"logs"` @@ -379,9 +372,7 @@ func (o *GetLogsOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Logs); i++ { - if o.Logs[i] != nil { if err := o.Logs[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -392,7 +383,6 @@ func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt. return err } } - } return nil @@ -421,7 +411,6 @@ GetLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsOKBodyLogsItems0 */ type GetLogsOKBodyLogsItems0 struct { - // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go index ae5fb30e84..a5ecbdeece 100644 --- a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go +++ b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_parameters.go @@ -60,7 +60,6 @@ ListArtifactCompatibleServicesParams contains all the parameters to send to the Typically these are written to a http.Request. */ type ListArtifactCompatibleServicesParams struct { - // Body. Body ListArtifactCompatibleServicesBody @@ -130,7 +129,6 @@ func (o *ListArtifactCompatibleServicesParams) SetBody(body ListArtifactCompatib // WriteToRequest writes these params to a swagger request func (o *ListArtifactCompatibleServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go index 2f1764be77..cde43dc58d 100644 --- a/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go +++ b/api/managementpb/backup/json/client/backups/list_artifact_compatible_services_responses.go @@ -60,12 +60,12 @@ type ListArtifactCompatibleServicesOK struct { func (o *ListArtifactCompatibleServicesOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListArtifactCompatibleServices][%d] listArtifactCompatibleServicesOk %+v", 200, o.Payload) } + func (o *ListArtifactCompatibleServicesOK) GetPayload() *ListArtifactCompatibleServicesOKBody { return o.Payload } func (o *ListArtifactCompatibleServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactCompatibleServicesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListArtifactCompatibleServicesDefault) Code() int { func (o *ListArtifactCompatibleServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListArtifactCompatibleServices][%d] ListArtifactCompatibleServices default %+v", o._statusCode, o.Payload) } + func (o *ListArtifactCompatibleServicesDefault) GetPayload() *ListArtifactCompatibleServicesDefaultBody { return o.Payload } func (o *ListArtifactCompatibleServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactCompatibleServicesDefaultBody) // response payload @@ -123,7 +123,6 @@ ListArtifactCompatibleServicesBody list artifact compatible services body swagger:model ListArtifactCompatibleServicesBody */ type ListArtifactCompatibleServicesBody struct { - // Artifact id used to determine restore compatibility. ArtifactID string `json:"artifact_id,omitempty"` } @@ -161,7 +160,6 @@ ListArtifactCompatibleServicesDefaultBody list artifact compatible services defa swagger:model ListArtifactCompatibleServicesDefaultBody */ type ListArtifactCompatibleServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -227,9 +225,7 @@ func (o *ListArtifactCompatibleServicesDefaultBody) ContextValidate(ctx context. } func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +236,6 @@ func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx c return err } } - } return nil @@ -269,7 +264,6 @@ ListArtifactCompatibleServicesDefaultBodyDetailsItems0 list artifact compatible swagger:model ListArtifactCompatibleServicesDefaultBodyDetailsItems0 */ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -307,7 +301,6 @@ ListArtifactCompatibleServicesOKBody list artifact compatible services OK body swagger:model ListArtifactCompatibleServicesOKBody */ type ListArtifactCompatibleServicesOKBody struct { - // mysql Mysql []*ListArtifactCompatibleServicesOKBodyMysqlItems0 `json:"mysql"` @@ -404,9 +397,7 @@ func (o *ListArtifactCompatibleServicesOKBody) ContextValidate(ctx context.Conte } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mysql); i++ { - if o.Mysql[i] != nil { if err := o.Mysql[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -417,16 +408,13 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context. return err } } - } return nil } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mongodb); i++ { - if o.Mongodb[i] != nil { if err := o.Mongodb[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -437,7 +425,6 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx contex return err } } - } return nil @@ -466,7 +453,6 @@ ListArtifactCompatibleServicesOKBodyMongodbItems0 MongoDBService represents a ge swagger:model ListArtifactCompatibleServicesOKBodyMongodbItems0 */ type ListArtifactCompatibleServicesOKBodyMongodbItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -534,7 +520,6 @@ ListArtifactCompatibleServicesOKBodyMysqlItems0 MySQLService represents a generi swagger:model ListArtifactCompatibleServicesOKBodyMysqlItems0 */ type ListArtifactCompatibleServicesOKBodyMysqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go b/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go index d0c6e616ea..e906ca98b7 100644 --- a/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go +++ b/api/managementpb/backup/json/client/backups/list_scheduled_backups_parameters.go @@ -60,7 +60,6 @@ ListScheduledBackupsParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type ListScheduledBackupsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListScheduledBackupsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListScheduledBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go b/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go index ef2f3a86f8..dc4448f868 100644 --- a/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go +++ b/api/managementpb/backup/json/client/backups/list_scheduled_backups_responses.go @@ -62,12 +62,12 @@ type ListScheduledBackupsOK struct { func (o *ListScheduledBackupsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListScheduled][%d] listScheduledBackupsOk %+v", 200, o.Payload) } + func (o *ListScheduledBackupsOK) GetPayload() *ListScheduledBackupsOKBody { return o.Payload } func (o *ListScheduledBackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListScheduledBackupsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListScheduledBackupsDefault) Code() int { func (o *ListScheduledBackupsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/ListScheduled][%d] ListScheduledBackups default %+v", o._statusCode, o.Payload) } + func (o *ListScheduledBackupsDefault) GetPayload() *ListScheduledBackupsDefaultBody { return o.Payload } func (o *ListScheduledBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListScheduledBackupsDefaultBody) // response payload @@ -125,7 +125,6 @@ ListScheduledBackupsDefaultBody list scheduled backups default body swagger:model ListScheduledBackupsDefaultBody */ type ListScheduledBackupsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *ListScheduledBackupsDefaultBody) ContextValidate(ctx context.Context, f } func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -233,7 +229,6 @@ ListScheduledBackupsDefaultBodyDetailsItems0 list scheduled backups default body swagger:model ListScheduledBackupsDefaultBodyDetailsItems0 */ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ ListScheduledBackupsOKBody list scheduled backups OK body swagger:model ListScheduledBackupsOKBody */ type ListScheduledBackupsOKBody struct { - // scheduled backups ScheduledBackups []*ListScheduledBackupsOKBodyScheduledBackupsItems0 `json:"scheduled_backups"` } @@ -331,9 +325,7 @@ func (o *ListScheduledBackupsOKBody) ContextValidate(ctx context.Context, format } func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ScheduledBackups); i++ { - if o.ScheduledBackups[i] != nil { if err := o.ScheduledBackups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,7 +336,6 @@ func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context return err } } - } return nil @@ -373,7 +364,6 @@ ListScheduledBackupsOKBodyScheduledBackupsItems0 ScheduledBackup represents sche swagger:model ListScheduledBackupsOKBodyScheduledBackupsItems0 */ type ListScheduledBackupsOKBodyScheduledBackupsItems0 struct { - // Machine-readable ID. ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` diff --git a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go index 6bfb93d977..a488611ff2 100644 --- a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_parameters.go @@ -60,7 +60,6 @@ RemoveScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type RemoveScheduledBackupParams struct { - // Body. Body RemoveScheduledBackupBody @@ -130,7 +129,6 @@ func (o *RemoveScheduledBackupParams) SetBody(body RemoveScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go index 431c7af8b5..053d701ed4 100644 --- a/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/remove_scheduled_backup_responses.go @@ -60,12 +60,12 @@ type RemoveScheduledBackupOK struct { func (o *RemoveScheduledBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/RemoveScheduled][%d] removeScheduledBackupOk %+v", 200, o.Payload) } + func (o *RemoveScheduledBackupOK) GetPayload() interface{} { return o.Payload } func (o *RemoveScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveScheduledBackupDefault) Code() int { func (o *RemoveScheduledBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/RemoveScheduled][%d] RemoveScheduledBackup default %+v", o._statusCode, o.Payload) } + func (o *RemoveScheduledBackupDefault) GetPayload() *RemoveScheduledBackupDefaultBody { return o.Payload } func (o *RemoveScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveScheduledBackupDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveScheduledBackupBody remove scheduled backup body swagger:model RemoveScheduledBackupBody */ type RemoveScheduledBackupBody struct { - // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } @@ -159,7 +158,6 @@ RemoveScheduledBackupDefaultBody remove scheduled backup default body swagger:model RemoveScheduledBackupDefaultBody */ type RemoveScheduledBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *RemoveScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -267,7 +262,6 @@ RemoveScheduledBackupDefaultBodyDetailsItems0 remove scheduled backup default bo swagger:model RemoveScheduledBackupDefaultBodyDetailsItems0 */ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/restore_backup_parameters.go b/api/managementpb/backup/json/client/backups/restore_backup_parameters.go index 9fa0d9bf9f..99b307bab3 100644 --- a/api/managementpb/backup/json/client/backups/restore_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/restore_backup_parameters.go @@ -60,7 +60,6 @@ RestoreBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RestoreBackupParams struct { - // Body. Body RestoreBackupBody @@ -130,7 +129,6 @@ func (o *RestoreBackupParams) SetBody(body RestoreBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RestoreBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/restore_backup_responses.go b/api/managementpb/backup/json/client/backups/restore_backup_responses.go index 86a5ef0ee9..39085e7f15 100644 --- a/api/managementpb/backup/json/client/backups/restore_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/restore_backup_responses.go @@ -61,12 +61,12 @@ type RestoreBackupOK struct { func (o *RestoreBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Restore][%d] restoreBackupOk %+v", 200, o.Payload) } + func (o *RestoreBackupOK) GetPayload() *RestoreBackupOKBody { return o.Payload } func (o *RestoreBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RestoreBackupOKBody) // response payload @@ -103,12 +103,12 @@ func (o *RestoreBackupDefault) Code() int { func (o *RestoreBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Restore][%d] RestoreBackup default %+v", o._statusCode, o.Payload) } + func (o *RestoreBackupDefault) GetPayload() *RestoreBackupDefaultBody { return o.Payload } func (o *RestoreBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RestoreBackupDefaultBody) // response payload @@ -124,7 +124,6 @@ RestoreBackupBody restore backup body swagger:model RestoreBackupBody */ type RestoreBackupBody struct { - // Service identifier where backup should be restored. ServiceID string `json:"service_id,omitempty"` @@ -190,7 +189,6 @@ RestoreBackupDefaultBody restore backup default body swagger:model RestoreBackupDefaultBody */ type RestoreBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -256,9 +254,7 @@ func (o *RestoreBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -269,7 +265,6 @@ func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -298,7 +293,6 @@ RestoreBackupDefaultBodyDetailsItems0 restore backup default body details items0 swagger:model RestoreBackupDefaultBodyDetailsItems0 */ type RestoreBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -336,7 +330,6 @@ RestoreBackupOKBody restore backup OK body swagger:model RestoreBackupOKBody */ type RestoreBackupOKBody struct { - // Unique restore identifier. RestoreID string `json:"restore_id,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go b/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go index a5fcdafba4..3aec66ead3 100644 --- a/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/schedule_backup_parameters.go @@ -60,7 +60,6 @@ ScheduleBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ScheduleBackupParams struct { - // Body. Body ScheduleBackupBody @@ -130,7 +129,6 @@ func (o *ScheduleBackupParams) SetBody(body ScheduleBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ScheduleBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/schedule_backup_responses.go b/api/managementpb/backup/json/client/backups/schedule_backup_responses.go index b5be3f43c8..dc5aff4818 100644 --- a/api/managementpb/backup/json/client/backups/schedule_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/schedule_backup_responses.go @@ -62,12 +62,12 @@ type ScheduleBackupOK struct { func (o *ScheduleBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Schedule][%d] scheduleBackupOk %+v", 200, o.Payload) } + func (o *ScheduleBackupOK) GetPayload() *ScheduleBackupOKBody { return o.Payload } func (o *ScheduleBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ScheduleBackupOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ScheduleBackupDefault) Code() int { func (o *ScheduleBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Schedule][%d] ScheduleBackup default %+v", o._statusCode, o.Payload) } + func (o *ScheduleBackupDefault) GetPayload() *ScheduleBackupDefaultBody { return o.Payload } func (o *ScheduleBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ScheduleBackupDefaultBody) // response payload @@ -125,7 +125,6 @@ ScheduleBackupBody schedule backup body swagger:model ScheduleBackupBody */ type ScheduleBackupBody struct { - // Service identifier where backup should be performed. ServiceID string `json:"service_id,omitempty"` @@ -324,7 +323,6 @@ ScheduleBackupDefaultBody schedule backup default body swagger:model ScheduleBackupDefaultBody */ type ScheduleBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -390,9 +388,7 @@ func (o *ScheduleBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -403,7 +399,6 @@ func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -432,7 +427,6 @@ ScheduleBackupDefaultBodyDetailsItems0 schedule backup default body details item swagger:model ScheduleBackupDefaultBodyDetailsItems0 */ type ScheduleBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -470,7 +464,6 @@ ScheduleBackupOKBody schedule backup OK body swagger:model ScheduleBackupOKBody */ type ScheduleBackupOKBody struct { - // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } diff --git a/api/managementpb/backup/json/client/backups/start_backup_parameters.go b/api/managementpb/backup/json/client/backups/start_backup_parameters.go index fd66c34dcd..55fffd3ba5 100644 --- a/api/managementpb/backup/json/client/backups/start_backup_parameters.go +++ b/api/managementpb/backup/json/client/backups/start_backup_parameters.go @@ -60,7 +60,6 @@ StartBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartBackupParams struct { - // Body. Body StartBackupBody @@ -130,7 +129,6 @@ func (o *StartBackupParams) SetBody(body StartBackupBody) { // WriteToRequest writes these params to a swagger request func (o *StartBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/backups/start_backup_responses.go b/api/managementpb/backup/json/client/backups/start_backup_responses.go index a37dad21bd..95949e6af9 100644 --- a/api/managementpb/backup/json/client/backups/start_backup_responses.go +++ b/api/managementpb/backup/json/client/backups/start_backup_responses.go @@ -62,12 +62,12 @@ type StartBackupOK struct { func (o *StartBackupOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Start][%d] startBackupOk %+v", 200, o.Payload) } + func (o *StartBackupOK) GetPayload() *StartBackupOKBody { return o.Payload } func (o *StartBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartBackupOKBody) // response payload @@ -104,12 +104,12 @@ func (o *StartBackupDefault) Code() int { func (o *StartBackupDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Backups/Start][%d] StartBackup default %+v", o._statusCode, o.Payload) } + func (o *StartBackupDefault) GetPayload() *StartBackupDefaultBody { return o.Payload } func (o *StartBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartBackupDefaultBody) // response payload @@ -125,7 +125,6 @@ StartBackupBody start backup body swagger:model StartBackupBody */ type StartBackupBody struct { - // Service identifier. ServiceID string `json:"service_id,omitempty"` @@ -239,7 +238,6 @@ StartBackupDefaultBody start backup default body swagger:model StartBackupDefaultBody */ type StartBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -305,9 +303,7 @@ func (o *StartBackupDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -318,7 +314,6 @@ func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -347,7 +342,6 @@ StartBackupDefaultBodyDetailsItems0 start backup default body details items0 swagger:model StartBackupDefaultBodyDetailsItems0 */ type StartBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -385,7 +379,6 @@ StartBackupOKBody start backup OK body swagger:model StartBackupOKBody */ type StartBackupOKBody struct { - // Unique identifier. ArtifactID string `json:"artifact_id,omitempty"` } diff --git a/api/managementpb/backup/json/client/locations/add_location_parameters.go b/api/managementpb/backup/json/client/locations/add_location_parameters.go index 595587c4a4..7c8120fc3d 100644 --- a/api/managementpb/backup/json/client/locations/add_location_parameters.go +++ b/api/managementpb/backup/json/client/locations/add_location_parameters.go @@ -60,7 +60,6 @@ AddLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddLocationParams struct { - // Body. Body AddLocationBody @@ -130,7 +129,6 @@ func (o *AddLocationParams) SetBody(body AddLocationBody) { // WriteToRequest writes these params to a swagger request func (o *AddLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/add_location_responses.go b/api/managementpb/backup/json/client/locations/add_location_responses.go index 425c0c0a20..9267795dda 100644 --- a/api/managementpb/backup/json/client/locations/add_location_responses.go +++ b/api/managementpb/backup/json/client/locations/add_location_responses.go @@ -60,12 +60,12 @@ type AddLocationOK struct { func (o *AddLocationOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Add][%d] addLocationOk %+v", 200, o.Payload) } + func (o *AddLocationOK) GetPayload() *AddLocationOKBody { return o.Payload } func (o *AddLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddLocationOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddLocationDefault) Code() int { func (o *AddLocationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Add][%d] AddLocation default %+v", o._statusCode, o.Payload) } + func (o *AddLocationDefault) GetPayload() *AddLocationDefaultBody { return o.Payload } func (o *AddLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddLocationDefaultBody) // response payload @@ -123,7 +123,6 @@ AddLocationBody add location body swagger:model AddLocationBody */ type AddLocationBody struct { - // Location name Name string `json:"name,omitempty"` @@ -212,7 +211,6 @@ func (o *AddLocationBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -228,7 +226,6 @@ func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, f } func (o *AddLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -266,7 +263,6 @@ AddLocationDefaultBody add location default body swagger:model AddLocationDefaultBody */ type AddLocationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -332,9 +328,7 @@ func (o *AddLocationDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -345,7 +339,6 @@ func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -374,7 +367,6 @@ AddLocationDefaultBodyDetailsItems0 add location default body details items0 swagger:model AddLocationDefaultBodyDetailsItems0 */ type AddLocationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -412,7 +404,6 @@ AddLocationOKBody add location OK body swagger:model AddLocationOKBody */ type AddLocationOKBody struct { - // Machine-readable ID. LocationID string `json:"location_id,omitempty"` } @@ -450,7 +441,6 @@ AddLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents file s swagger:model AddLocationParamsBodyFilesystemConfig */ type AddLocationParamsBodyFilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -488,7 +478,6 @@ AddLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configuratio swagger:model AddLocationParamsBodyS3Config */ type AddLocationParamsBodyS3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/locations/change_location_parameters.go b/api/managementpb/backup/json/client/locations/change_location_parameters.go index d86902776e..c24f94e848 100644 --- a/api/managementpb/backup/json/client/locations/change_location_parameters.go +++ b/api/managementpb/backup/json/client/locations/change_location_parameters.go @@ -60,7 +60,6 @@ ChangeLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeLocationParams struct { - // Body. Body ChangeLocationBody @@ -130,7 +129,6 @@ func (o *ChangeLocationParams) SetBody(body ChangeLocationBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/change_location_responses.go b/api/managementpb/backup/json/client/locations/change_location_responses.go index 11efb2b20f..fa79790e0f 100644 --- a/api/managementpb/backup/json/client/locations/change_location_responses.go +++ b/api/managementpb/backup/json/client/locations/change_location_responses.go @@ -60,12 +60,12 @@ type ChangeLocationOK struct { func (o *ChangeLocationOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Change][%d] changeLocationOk %+v", 200, o.Payload) } + func (o *ChangeLocationOK) GetPayload() interface{} { return o.Payload } func (o *ChangeLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ChangeLocationDefault) Code() int { func (o *ChangeLocationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Change][%d] ChangeLocation default %+v", o._statusCode, o.Payload) } + func (o *ChangeLocationDefault) GetPayload() *ChangeLocationDefaultBody { return o.Payload } func (o *ChangeLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeLocationDefaultBody) // response payload @@ -121,7 +121,6 @@ ChangeLocationBody change location body swagger:model ChangeLocationBody */ type ChangeLocationBody struct { - // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -213,7 +212,6 @@ func (o *ChangeLocationBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -229,7 +227,6 @@ func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context } func (o *ChangeLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -267,7 +264,6 @@ ChangeLocationDefaultBody change location default body swagger:model ChangeLocationDefaultBody */ type ChangeLocationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -333,9 +329,7 @@ func (o *ChangeLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -346,7 +340,6 @@ func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -375,7 +368,6 @@ ChangeLocationDefaultBodyDetailsItems0 change location default body details item swagger:model ChangeLocationDefaultBodyDetailsItems0 */ type ChangeLocationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -413,7 +405,6 @@ ChangeLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents fil swagger:model ChangeLocationParamsBodyFilesystemConfig */ type ChangeLocationParamsBodyFilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -451,7 +442,6 @@ ChangeLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configura swagger:model ChangeLocationParamsBodyS3Config */ type ChangeLocationParamsBodyS3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/locations/list_locations_parameters.go b/api/managementpb/backup/json/client/locations/list_locations_parameters.go index e26ff5121d..070bf3c0d3 100644 --- a/api/managementpb/backup/json/client/locations/list_locations_parameters.go +++ b/api/managementpb/backup/json/client/locations/list_locations_parameters.go @@ -60,7 +60,6 @@ ListLocationsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListLocationsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListLocationsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListLocationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/list_locations_responses.go b/api/managementpb/backup/json/client/locations/list_locations_responses.go index e9d7f9254f..a005e9b029 100644 --- a/api/managementpb/backup/json/client/locations/list_locations_responses.go +++ b/api/managementpb/backup/json/client/locations/list_locations_responses.go @@ -60,12 +60,12 @@ type ListLocationsOK struct { func (o *ListLocationsOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/List][%d] listLocationsOk %+v", 200, o.Payload) } + func (o *ListLocationsOK) GetPayload() *ListLocationsOKBody { return o.Payload } func (o *ListLocationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListLocationsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListLocationsDefault) Code() int { func (o *ListLocationsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/List][%d] ListLocations default %+v", o._statusCode, o.Payload) } + func (o *ListLocationsDefault) GetPayload() *ListLocationsDefaultBody { return o.Payload } func (o *ListLocationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListLocationsDefaultBody) // response payload @@ -123,7 +123,6 @@ ListLocationsDefaultBody list locations default body swagger:model ListLocationsDefaultBody */ type ListLocationsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *ListLocationsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -231,7 +227,6 @@ ListLocationsDefaultBodyDetailsItems0 list locations default body details items0 swagger:model ListLocationsDefaultBodyDetailsItems0 */ type ListLocationsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ ListLocationsOKBody list locations OK body swagger:model ListLocationsOKBody */ type ListLocationsOKBody struct { - // locations Locations []*ListLocationsOKBodyLocationsItems0 `json:"locations"` } @@ -329,9 +323,7 @@ func (o *ListLocationsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Locations); i++ { - if o.Locations[i] != nil { if err := o.Locations[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -342,7 +334,6 @@ func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, form return err } } - } return nil @@ -371,7 +362,6 @@ ListLocationsOKBodyLocationsItems0 Location represents single Backup Location. swagger:model ListLocationsOKBodyLocationsItems0 */ type ListLocationsOKBodyLocationsItems0 struct { - // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -463,7 +453,6 @@ func (o *ListLocationsOKBodyLocationsItems0) ContextValidate(ctx context.Context } func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -479,7 +468,6 @@ func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx } func (o *ListLocationsOKBodyLocationsItems0) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -517,7 +505,6 @@ ListLocationsOKBodyLocationsItems0FilesystemConfig FilesystemLocationConfig repr swagger:model ListLocationsOKBodyLocationsItems0FilesystemConfig */ type ListLocationsOKBodyLocationsItems0FilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -555,7 +542,6 @@ ListLocationsOKBodyLocationsItems0S3Config S3LocationConfig represents S3 bucket swagger:model ListLocationsOKBodyLocationsItems0S3Config */ type ListLocationsOKBodyLocationsItems0S3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/locations/remove_location_parameters.go b/api/managementpb/backup/json/client/locations/remove_location_parameters.go index 279d1a1654..593dd04ecd 100644 --- a/api/managementpb/backup/json/client/locations/remove_location_parameters.go +++ b/api/managementpb/backup/json/client/locations/remove_location_parameters.go @@ -60,7 +60,6 @@ RemoveLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveLocationParams struct { - // Body. Body RemoveLocationBody @@ -130,7 +129,6 @@ func (o *RemoveLocationParams) SetBody(body RemoveLocationBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/remove_location_responses.go b/api/managementpb/backup/json/client/locations/remove_location_responses.go index 70c7ae2160..9177250956 100644 --- a/api/managementpb/backup/json/client/locations/remove_location_responses.go +++ b/api/managementpb/backup/json/client/locations/remove_location_responses.go @@ -60,12 +60,12 @@ type RemoveLocationOK struct { func (o *RemoveLocationOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Remove][%d] removeLocationOk %+v", 200, o.Payload) } + func (o *RemoveLocationOK) GetPayload() interface{} { return o.Payload } func (o *RemoveLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveLocationDefault) Code() int { func (o *RemoveLocationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/Remove][%d] RemoveLocation default %+v", o._statusCode, o.Payload) } + func (o *RemoveLocationDefault) GetPayload() *RemoveLocationDefaultBody { return o.Payload } func (o *RemoveLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveLocationDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveLocationBody remove location body swagger:model RemoveLocationBody */ type RemoveLocationBody struct { - // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -162,7 +161,6 @@ RemoveLocationDefaultBody remove location default body swagger:model RemoveLocationDefaultBody */ type RemoveLocationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *RemoveLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -270,7 +265,6 @@ RemoveLocationDefaultBodyDetailsItems0 remove location default body details item swagger:model RemoveLocationDefaultBodyDetailsItems0 */ type RemoveLocationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/backup/json/client/locations/test_location_config_parameters.go b/api/managementpb/backup/json/client/locations/test_location_config_parameters.go index 4e65319e8a..b694abba5e 100644 --- a/api/managementpb/backup/json/client/locations/test_location_config_parameters.go +++ b/api/managementpb/backup/json/client/locations/test_location_config_parameters.go @@ -60,7 +60,6 @@ TestLocationConfigParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type TestLocationConfigParams struct { - // Body. Body TestLocationConfigBody @@ -130,7 +129,6 @@ func (o *TestLocationConfigParams) SetBody(body TestLocationConfigBody) { // WriteToRequest writes these params to a swagger request func (o *TestLocationConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/locations/test_location_config_responses.go b/api/managementpb/backup/json/client/locations/test_location_config_responses.go index edce75b396..42948149c1 100644 --- a/api/managementpb/backup/json/client/locations/test_location_config_responses.go +++ b/api/managementpb/backup/json/client/locations/test_location_config_responses.go @@ -60,12 +60,12 @@ type TestLocationConfigOK struct { func (o *TestLocationConfigOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/TestConfig][%d] testLocationConfigOk %+v", 200, o.Payload) } + func (o *TestLocationConfigOK) GetPayload() interface{} { return o.Payload } func (o *TestLocationConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *TestLocationConfigDefault) Code() int { func (o *TestLocationConfigDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/Locations/TestConfig][%d] TestLocationConfig default %+v", o._statusCode, o.Payload) } + func (o *TestLocationConfigDefault) GetPayload() *TestLocationConfigDefaultBody { return o.Payload } func (o *TestLocationConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(TestLocationConfigDefaultBody) // response payload @@ -121,7 +121,6 @@ TestLocationConfigBody test location config body swagger:model TestLocationConfigBody */ type TestLocationConfigBody struct { - // filesystem config FilesystemConfig *TestLocationConfigParamsBodyFilesystemConfig `json:"filesystem_config,omitempty"` @@ -204,7 +203,6 @@ func (o *TestLocationConfigBody) ContextValidate(ctx context.Context, formats st } func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if err := o.FilesystemConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -220,7 +218,6 @@ func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Con } func (o *TestLocationConfigBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if err := o.S3Config.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -258,7 +255,6 @@ TestLocationConfigDefaultBody test location config default body swagger:model TestLocationConfigDefaultBody */ type TestLocationConfigDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -324,9 +320,7 @@ func (o *TestLocationConfigDefaultBody) ContextValidate(ctx context.Context, for } func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -337,7 +331,6 @@ func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -366,7 +359,6 @@ TestLocationConfigDefaultBodyDetailsItems0 test location config default body det swagger:model TestLocationConfigDefaultBodyDetailsItems0 */ type TestLocationConfigDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -404,7 +396,6 @@ TestLocationConfigParamsBodyFilesystemConfig FilesystemLocationConfig represents swagger:model TestLocationConfigParamsBodyFilesystemConfig */ type TestLocationConfigParamsBodyFilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -442,7 +433,6 @@ TestLocationConfigParamsBodyS3Config S3LocationConfig represents S3 bucket confi swagger:model TestLocationConfigParamsBodyS3Config */ type TestLocationConfigParamsBodyS3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go b/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go index d60458608c..e9058f4280 100644 --- a/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go +++ b/api/managementpb/backup/json/client/restore_history/list_restore_history_parameters.go @@ -60,7 +60,6 @@ ListRestoreHistoryParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListRestoreHistoryParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListRestoreHistoryParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListRestoreHistoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go b/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go index 741d91d4ff..2a30f3f837 100644 --- a/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go +++ b/api/managementpb/backup/json/client/restore_history/list_restore_history_responses.go @@ -62,12 +62,12 @@ type ListRestoreHistoryOK struct { func (o *ListRestoreHistoryOK) Error() string { return fmt.Sprintf("[POST /v1/management/backup/RestoreHistory/List][%d] listRestoreHistoryOk %+v", 200, o.Payload) } + func (o *ListRestoreHistoryOK) GetPayload() *ListRestoreHistoryOKBody { return o.Payload } func (o *ListRestoreHistoryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRestoreHistoryOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListRestoreHistoryDefault) Code() int { func (o *ListRestoreHistoryDefault) Error() string { return fmt.Sprintf("[POST /v1/management/backup/RestoreHistory/List][%d] ListRestoreHistory default %+v", o._statusCode, o.Payload) } + func (o *ListRestoreHistoryDefault) GetPayload() *ListRestoreHistoryDefaultBody { return o.Payload } func (o *ListRestoreHistoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRestoreHistoryDefaultBody) // response payload @@ -125,7 +125,6 @@ ListRestoreHistoryDefaultBody list restore history default body swagger:model ListRestoreHistoryDefaultBody */ type ListRestoreHistoryDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *ListRestoreHistoryDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListRestoreHistoryDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *ListRestoreHistoryDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -233,7 +229,6 @@ ListRestoreHistoryDefaultBodyDetailsItems0 list restore history default body det swagger:model ListRestoreHistoryDefaultBodyDetailsItems0 */ type ListRestoreHistoryDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ ListRestoreHistoryOKBody list restore history OK body swagger:model ListRestoreHistoryOKBody */ type ListRestoreHistoryOKBody struct { - // items Items []*ListRestoreHistoryOKBodyItemsItems0 `json:"items"` } @@ -331,9 +325,7 @@ func (o *ListRestoreHistoryOKBody) ContextValidate(ctx context.Context, formats } func (o *ListRestoreHistoryOKBody) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Items); i++ { - if o.Items[i] != nil { if err := o.Items[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,7 +336,6 @@ func (o *ListRestoreHistoryOKBody) contextValidateItems(ctx context.Context, for return err } } - } return nil @@ -373,7 +364,6 @@ ListRestoreHistoryOKBodyItemsItems0 RestoreHistoryItem represents single backup swagger:model ListRestoreHistoryOKBodyItemsItems0 */ type ListRestoreHistoryOKBodyItemsItems0 struct { - // Machine-readable restore id. RestoreID string `json:"restore_id,omitempty"` diff --git a/api/managementpb/backup/locations.pb.go b/api/managementpb/backup/locations.pb.go index 11e70cd034..29c046325a 100644 --- a/api/managementpb/backup/locations.pb.go +++ b/api/managementpb/backup/locations.pb.go @@ -7,12 +7,13 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -939,22 +940,25 @@ func file_managementpb_backup_locations_proto_rawDescGZIP() []byte { return file_managementpb_backup_locations_proto_rawDescData } -var file_managementpb_backup_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_managementpb_backup_locations_proto_goTypes = []interface{}{ - (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig - (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig - (*Location)(nil), // 2: backup.v1.Location - (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest - (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse - (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest - (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse - (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest - (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse - (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest - (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse - (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest - (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse -} +var ( + file_managementpb_backup_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) + file_managementpb_backup_locations_proto_goTypes = []interface{}{ + (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig + (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig + (*Location)(nil), // 2: backup.v1.Location + (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest + (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse + (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest + (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse + (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest + (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse + (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest + (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse + (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest + (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse + } +) + var file_managementpb_backup_locations_proto_depIdxs = []int32{ 0, // 0: backup.v1.Location.filesystem_config:type_name -> backup.v1.FilesystemLocationConfig 1, // 1: backup.v1.Location.s3_config:type_name -> backup.v1.S3LocationConfig diff --git a/api/managementpb/backup/locations.pb.gw.go b/api/managementpb/backup/locations.pb.gw.go index 10310efce6..04abab82c8 100644 --- a/api/managementpb/backup/locations.pb.gw.go +++ b/api/managementpb/backup/locations.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Locations_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListLocationsRequest @@ -45,7 +47,6 @@ func request_Locations_ListLocations_0(ctx context.Context, marshaler runtime.Ma msg, err := client.ListLocations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Locations_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Locations_ListLocations_0(ctx context.Context, marshaler runt msg, err := server.ListLocations(ctx, &protoReq) return msg, metadata, err - } func request_Locations_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Locations_AddLocation_0(ctx context.Context, marshaler runtime.Mars msg, err := client.AddLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Locations_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Locations_AddLocation_0(ctx context.Context, marshaler runtim msg, err := server.AddLocation(ctx, &protoReq) return msg, metadata, err - } func request_Locations_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Locations_ChangeLocation_0(ctx context.Context, marshaler runtime.M msg, err := client.ChangeLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Locations_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Locations_ChangeLocation_0(ctx context.Context, marshaler run msg, err := server.ChangeLocation(ctx, &protoReq) return msg, metadata, err - } func request_Locations_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Locations_RemoveLocation_0(ctx context.Context, marshaler runtime.M msg, err := client.RemoveLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Locations_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Locations_RemoveLocation_0(ctx context.Context, marshaler run msg, err := server.RemoveLocation(ctx, &protoReq) return msg, metadata, err - } func request_Locations_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Locations_TestLocationConfig_0(ctx context.Context, marshaler runti msg, err := client.TestLocationConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Locations_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Locations_TestLocationConfig_0(ctx context.Context, marshaler msg, err := server.TestLocationConfig(ctx, &protoReq) return msg, metadata, err - } // RegisterLocationsHandlerServer registers the http handlers for service Locations to "mux". @@ -206,7 +198,6 @@ func local_request_Locations_TestLocationConfig_0(ctx context.Context, marshaler // 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 RegisterLocationsHandlerFromEndpoint instead. func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocationsServer) error { - mux.Handle("POST", pattern_Locations_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -229,7 +220,6 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -254,7 +244,6 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -279,7 +268,6 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -304,7 +292,6 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -329,7 +316,6 @@ func RegisterLocationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -372,7 +358,6 @@ func RegisterLocationsHandler(ctx context.Context, mux *runtime.ServeMux, conn * // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "LocationsClient" to call the correct interceptors. func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocationsClient) error { - mux.Handle("POST", pattern_Locations_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -392,7 +377,6 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -414,7 +398,6 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,7 +419,6 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -458,7 +440,6 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Locations_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -480,7 +461,6 @@ func RegisterLocationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_Locations_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/backup/locations.swagger.json b/api/managementpb/backup/locations.swagger.json deleted file mode 100644 index d1d9041779..0000000000 --- a/api/managementpb/backup/locations.swagger.json +++ /dev/null @@ -1,369 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/backup/locations.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Locations" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/backup/Locations/Add": { - "post": { - "summary": "AddLocation adds backup location.", - "operationId": "AddLocation", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1AddLocationResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1AddLocationRequest" - } - } - ], - "tags": [ - "Locations" - ] - } - }, - "/v1/management/backup/Locations/Change": { - "post": { - "summary": "ChangeLocation changes backup location.", - "operationId": "ChangeLocation", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ChangeLocationResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ChangeLocationRequest" - } - } - ], - "tags": [ - "Locations" - ] - } - }, - "/v1/management/backup/Locations/List": { - "post": { - "summary": "ListLocations returns a list of all backup locations.", - "operationId": "ListLocations", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListLocationsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListLocationsRequest" - } - } - ], - "tags": [ - "Locations" - ] - } - }, - "/v1/management/backup/Locations/Remove": { - "post": { - "summary": "RemoveLocation removes existing backup location.", - "operationId": "RemoveLocation", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1RemoveLocationResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1RemoveLocationRequest" - } - } - ], - "tags": [ - "Locations" - ] - } - }, - "/v1/management/backup/Locations/TestConfig": { - "post": { - "summary": "TestLocationConfig tests backup location and credentials.", - "operationId": "TestLocationConfig", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1TestLocationConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1TestLocationConfigRequest" - } - } - ], - "tags": [ - "Locations" - ] - } - } - }, - "definitions": { - "backupv1Location": { - "type": "object", - "properties": { - "location_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "name": { - "type": "string", - "title": "Location name" - }, - "description": { - "type": "string", - "title": "Short description" - }, - "filesystem_config": { - "$ref": "#/definitions/v1FilesystemLocationConfig" - }, - "s3_config": { - "$ref": "#/definitions/v1S3LocationConfig" - } - }, - "description": "Location represents single Backup Location." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1AddLocationRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Location name" - }, - "description": { - "type": "string" - }, - "filesystem_config": { - "$ref": "#/definitions/v1FilesystemLocationConfig", - "description": "Filesystem location configuration. Exactly one config should be set." - }, - "s3_config": { - "$ref": "#/definitions/v1S3LocationConfig", - "description": "S3 Bucket configuration. Exactly one config should be set." - } - } - }, - "v1AddLocationResponse": { - "type": "object", - "properties": { - "location_id": { - "type": "string", - "description": "Machine-readable ID." - } - } - }, - "v1ChangeLocationRequest": { - "type": "object", - "properties": { - "location_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "name": { - "type": "string", - "title": "Location name" - }, - "description": { - "type": "string" - }, - "filesystem_config": { - "$ref": "#/definitions/v1FilesystemLocationConfig", - "description": "Filesystem location configuration. Exactly one config should be set." - }, - "s3_config": { - "$ref": "#/definitions/v1S3LocationConfig", - "description": "S3 Bucket configuration. Exactly one config should be set." - } - } - }, - "v1ChangeLocationResponse": { - "type": "object" - }, - "v1FilesystemLocationConfig": { - "type": "object", - "properties": { - "path": { - "type": "string" - } - }, - "description": "FilesystemLocationConfig represents file system location config." - }, - "v1ListLocationsRequest": { - "type": "object" - }, - "v1ListLocationsResponse": { - "type": "object", - "properties": { - "locations": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/backupv1Location" - } - } - } - }, - "v1RemoveLocationRequest": { - "type": "object", - "properties": { - "location_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "force": { - "type": "boolean", - "title": "Force mode" - } - } - }, - "v1RemoveLocationResponse": { - "type": "object" - }, - "v1S3LocationConfig": { - "type": "object", - "properties": { - "endpoint": { - "type": "string" - }, - "access_key": { - "type": "string" - }, - "secret_key": { - "type": "string" - }, - "bucket_name": { - "type": "string" - } - }, - "description": "S3LocationConfig represents S3 bucket configuration." - }, - "v1TestLocationConfigRequest": { - "type": "object", - "properties": { - "filesystem_config": { - "$ref": "#/definitions/v1FilesystemLocationConfig", - "description": "Filesystem location configuration. Exactly one config should be set." - }, - "s3_config": { - "$ref": "#/definitions/v1S3LocationConfig", - "description": "S3 Bucket configuration. Exactly one config should be set." - } - } - }, - "v1TestLocationConfigResponse": { - "type": "object" - } - } -} diff --git a/api/managementpb/backup/locations_grpc.pb.go b/api/managementpb/backup/locations_grpc.pb.go index 948478bcc4..1378eacc9b 100644 --- a/api/managementpb/backup/locations_grpc.pb.go +++ b/api/managementpb/backup/locations_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -113,21 +114,24 @@ type LocationsServer interface { } // UnimplementedLocationsServer must be embedded to have forward compatible implementations. -type UnimplementedLocationsServer struct { -} +type UnimplementedLocationsServer struct{} func (UnimplementedLocationsServer) ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListLocations not implemented") } + func (UnimplementedLocationsServer) AddLocation(context.Context, *AddLocationRequest) (*AddLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddLocation not implemented") } + func (UnimplementedLocationsServer) ChangeLocation(context.Context, *ChangeLocationRequest) (*ChangeLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeLocation not implemented") } + func (UnimplementedLocationsServer) RemoveLocation(context.Context, *RemoveLocationRequest) (*RemoveLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveLocation not implemented") } + func (UnimplementedLocationsServer) TestLocationConfig(context.Context, *TestLocationConfigRequest) (*TestLocationConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestLocationConfig not implemented") } diff --git a/api/managementpb/backup/restores.pb.go b/api/managementpb/backup/restores.pb.go index adcfacfffc..3b01fa4b43 100644 --- a/api/managementpb/backup/restores.pb.go +++ b/api/managementpb/backup/restores.pb.go @@ -7,12 +7,13 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -415,16 +416,19 @@ func file_managementpb_backup_restores_proto_rawDescGZIP() []byte { return file_managementpb_backup_restores_proto_rawDescData } -var file_managementpb_backup_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_backup_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_backup_restores_proto_goTypes = []interface{}{ - (RestoreStatus)(0), // 0: backup.v1.RestoreStatus - (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem - (*ListRestoreHistoryRequest)(nil), // 2: backup.v1.ListRestoreHistoryRequest - (*ListRestoreHistoryResponse)(nil), // 3: backup.v1.ListRestoreHistoryResponse - (DataModel)(0), // 4: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp -} +var ( + file_managementpb_backup_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_backup_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_backup_restores_proto_goTypes = []interface{}{ + (RestoreStatus)(0), // 0: backup.v1.RestoreStatus + (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem + (*ListRestoreHistoryRequest)(nil), // 2: backup.v1.ListRestoreHistoryRequest + (*ListRestoreHistoryResponse)(nil), // 3: backup.v1.ListRestoreHistoryResponse + (DataModel)(0), // 4: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + } +) + var file_managementpb_backup_restores_proto_depIdxs = []int32{ 4, // 0: backup.v1.RestoreHistoryItem.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.RestoreHistoryItem.status:type_name -> backup.v1.RestoreStatus diff --git a/api/managementpb/backup/restores.pb.gw.go b/api/managementpb/backup/restores.pb.gw.go index 1a126bbc28..cab260bb0e 100644 --- a/api/managementpb/backup/restores.pb.gw.go +++ b/api/managementpb/backup/restores.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreHistoryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListRestoreHistoryRequest @@ -45,7 +47,6 @@ func request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, marshaler msg, err := client.ListRestoreHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreHistoryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, mars msg, err := server.ListRestoreHistory(ctx, &protoReq) return msg, metadata, err - } // RegisterRestoreHistoryHandlerServer registers the http handlers for service RestoreHistory to "mux". @@ -70,7 +70,6 @@ func local_request_RestoreHistory_ListRestoreHistory_0(ctx context.Context, mars // 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 RegisterRestoreHistoryHandlerFromEndpoint instead. func RegisterRestoreHistoryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestoreHistoryServer) error { - mux.Handle("POST", pattern_RestoreHistory_ListRestoreHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterRestoreHistoryHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreHistory_ListRestoreHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterRestoreHistoryHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RestoreHistoryClient" to call the correct interceptors. func RegisterRestoreHistoryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestoreHistoryClient) error { - mux.Handle("POST", pattern_RestoreHistory_ListRestoreHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterRestoreHistoryHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreHistory_ListRestoreHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_RestoreHistory_ListRestoreHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "backup", "RestoreHistory", "List"}, "")) -) +var pattern_RestoreHistory_ListRestoreHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "backup", "RestoreHistory", "List"}, "")) -var ( - forward_RestoreHistory_ListRestoreHistory_0 = runtime.ForwardResponseMessage -) +var forward_RestoreHistory_ListRestoreHistory_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/backup/restores.swagger.json b/api/managementpb/backup/restores.swagger.json deleted file mode 100644 index 2f954ec810..0000000000 --- a/api/managementpb/backup/restores.swagger.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/backup/restores.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "RestoreHistory" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/backup/RestoreHistory/List": { - "post": { - "summary": "ListRestoreHistory returns a list of all backup restore history items.", - "operationId": "ListRestoreHistory", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListRestoreHistoryResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1ListRestoreHistoryRequest" - } - } - ], - "tags": [ - "RestoreHistory" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1DataModel": { - "type": "string", - "enum": [ - "DATA_MODEL_INVALID", - "PHYSICAL", - "LOGICAL" - ], - "default": "DATA_MODEL_INVALID", - "description": "DataModel is a model used for performing a backup." - }, - "v1ListRestoreHistoryRequest": { - "type": "object" - }, - "v1ListRestoreHistoryResponse": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1RestoreHistoryItem" - } - } - } - }, - "v1RestoreHistoryItem": { - "type": "object", - "properties": { - "restore_id": { - "type": "string", - "description": "Machine-readable restore id." - }, - "artifact_id": { - "type": "string", - "description": "ID of the artifact used for restore." - }, - "name": { - "type": "string", - "description": "Artifact name used for restore." - }, - "vendor": { - "type": "string", - "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." - }, - "location_id": { - "type": "string", - "description": "Machine-readable location ID." - }, - "location_name": { - "type": "string", - "description": "Location name." - }, - "service_id": { - "type": "string", - "description": "Machine-readable service ID." - }, - "service_name": { - "type": "string", - "description": "Service name." - }, - "data_model": { - "$ref": "#/definitions/v1DataModel", - "description": "Backup data model." - }, - "status": { - "$ref": "#/definitions/v1RestoreStatus", - "description": "Restore status." - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "Restore start time." - }, - "finished_at": { - "type": "string", - "format": "date-time", - "description": "Restore finish time." - }, - "pitr_timestamp": { - "type": "string", - "format": "date-time", - "description": "PITR timestamp is filled for PITR restores, empty otherwise." - } - }, - "description": "RestoreHistoryItem represents single backup restore item." - }, - "v1RestoreStatus": { - "type": "string", - "enum": [ - "RESTORE_STATUS_INVALID", - "RESTORE_STATUS_IN_PROGRESS", - "RESTORE_STATUS_SUCCESS", - "RESTORE_STATUS_ERROR" - ], - "default": "RESTORE_STATUS_INVALID", - "description": "RestoreStatus shows the current status of execution of restore." - } - } -} diff --git a/api/managementpb/backup/restores_grpc.pb.go b/api/managementpb/backup/restores_grpc.pb.go index dc960d39ec..2dfd019fd7 100644 --- a/api/managementpb/backup/restores_grpc.pb.go +++ b/api/managementpb/backup/restores_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type RestoreHistoryServer interface { } // UnimplementedRestoreHistoryServer must be embedded to have forward compatible implementations. -type UnimplementedRestoreHistoryServer struct { -} +type UnimplementedRestoreHistoryServer struct{} func (UnimplementedRestoreHistoryServer) ListRestoreHistory(context.Context, *ListRestoreHistoryRequest) (*ListRestoreHistoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRestoreHistory not implemented") diff --git a/api/managementpb/boolean_flag.pb.go b/api/managementpb/boolean_flag.pb.go index 26d8d16a4a..5451b2e878 100644 --- a/api/managementpb/boolean_flag.pb.go +++ b/api/managementpb/boolean_flag.pb.go @@ -7,10 +7,11 @@ package managementpb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -108,10 +109,13 @@ func file_managementpb_boolean_flag_proto_rawDescGZIP() []byte { return file_managementpb_boolean_flag_proto_rawDescData } -var file_managementpb_boolean_flag_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_boolean_flag_proto_goTypes = []interface{}{ - (BooleanFlag)(0), // 0: managementpb.BooleanFlag -} +var ( + file_managementpb_boolean_flag_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_boolean_flag_proto_goTypes = []interface{}{ + (BooleanFlag)(0), // 0: managementpb.BooleanFlag + } +) + var file_managementpb_boolean_flag_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/boolean_flag.swagger.json b/api/managementpb/boolean_flag.swagger.json deleted file mode 100644 index 422954b7a5..0000000000 --- a/api/managementpb/boolean_flag.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/boolean_flag.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/checks.pb.go b/api/managementpb/checks.pb.go index fa93fdce84..ead9da805a 100644 --- a/api/managementpb/checks.pb.go +++ b/api/managementpb/checks.pb.go @@ -7,12 +7,13 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "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 ( @@ -1804,39 +1805,42 @@ func file_managementpb_checks_proto_rawDescGZIP() []byte { return file_managementpb_checks_proto_rawDescData } -var file_managementpb_checks_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_managementpb_checks_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_managementpb_checks_proto_goTypes = []interface{}{ - (SecurityCheckInterval)(0), // 0: management.SecurityCheckInterval - (AdvisorCheckFamily)(0), // 1: management.AdvisorCheckFamily - (*SecurityCheckResult)(nil), // 2: management.SecurityCheckResult - (*CheckResultSummary)(nil), // 3: management.CheckResultSummary - (*CheckResult)(nil), // 4: management.CheckResult - (*SecurityCheck)(nil), // 5: management.SecurityCheck - (*Advisor)(nil), // 6: management.Advisor - (*ChangeSecurityCheckParams)(nil), // 7: management.ChangeSecurityCheckParams - (*GetSecurityCheckResultsRequest)(nil), // 8: management.GetSecurityCheckResultsRequest - (*GetSecurityCheckResultsResponse)(nil), // 9: management.GetSecurityCheckResultsResponse - (*StartSecurityChecksRequest)(nil), // 10: management.StartSecurityChecksRequest - (*StartSecurityChecksResponse)(nil), // 11: management.StartSecurityChecksResponse - (*ListSecurityChecksRequest)(nil), // 12: management.ListSecurityChecksRequest - (*ListSecurityChecksResponse)(nil), // 13: management.ListSecurityChecksResponse - (*ListAdvisorsRequest)(nil), // 14: management.ListAdvisorsRequest - (*ListAdvisorsResponse)(nil), // 15: management.ListAdvisorsResponse - (*ChangeSecurityChecksRequest)(nil), // 16: management.ChangeSecurityChecksRequest - (*ChangeSecurityChecksResponse)(nil), // 17: management.ChangeSecurityChecksResponse - (*ListFailedServicesRequest)(nil), // 18: management.ListFailedServicesRequest - (*ListFailedServicesResponse)(nil), // 19: management.ListFailedServicesResponse - (*GetFailedChecksRequest)(nil), // 20: management.GetFailedChecksRequest - (*GetFailedChecksResponse)(nil), // 21: management.GetFailedChecksResponse - (*ToggleCheckAlertRequest)(nil), // 22: management.ToggleCheckAlertRequest - (*ToggleCheckAlertResponse)(nil), // 23: management.ToggleCheckAlertResponse - nil, // 24: management.SecurityCheckResult.LabelsEntry - nil, // 25: management.CheckResult.LabelsEntry - (Severity)(0), // 26: management.Severity - (*PageParams)(nil), // 27: management.PageParams - (*PageTotals)(nil), // 28: management.PageTotals -} +var ( + file_managementpb_checks_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_managementpb_checks_proto_msgTypes = make([]protoimpl.MessageInfo, 24) + file_managementpb_checks_proto_goTypes = []interface{}{ + (SecurityCheckInterval)(0), // 0: management.SecurityCheckInterval + (AdvisorCheckFamily)(0), // 1: management.AdvisorCheckFamily + (*SecurityCheckResult)(nil), // 2: management.SecurityCheckResult + (*CheckResultSummary)(nil), // 3: management.CheckResultSummary + (*CheckResult)(nil), // 4: management.CheckResult + (*SecurityCheck)(nil), // 5: management.SecurityCheck + (*Advisor)(nil), // 6: management.Advisor + (*ChangeSecurityCheckParams)(nil), // 7: management.ChangeSecurityCheckParams + (*GetSecurityCheckResultsRequest)(nil), // 8: management.GetSecurityCheckResultsRequest + (*GetSecurityCheckResultsResponse)(nil), // 9: management.GetSecurityCheckResultsResponse + (*StartSecurityChecksRequest)(nil), // 10: management.StartSecurityChecksRequest + (*StartSecurityChecksResponse)(nil), // 11: management.StartSecurityChecksResponse + (*ListSecurityChecksRequest)(nil), // 12: management.ListSecurityChecksRequest + (*ListSecurityChecksResponse)(nil), // 13: management.ListSecurityChecksResponse + (*ListAdvisorsRequest)(nil), // 14: management.ListAdvisorsRequest + (*ListAdvisorsResponse)(nil), // 15: management.ListAdvisorsResponse + (*ChangeSecurityChecksRequest)(nil), // 16: management.ChangeSecurityChecksRequest + (*ChangeSecurityChecksResponse)(nil), // 17: management.ChangeSecurityChecksResponse + (*ListFailedServicesRequest)(nil), // 18: management.ListFailedServicesRequest + (*ListFailedServicesResponse)(nil), // 19: management.ListFailedServicesResponse + (*GetFailedChecksRequest)(nil), // 20: management.GetFailedChecksRequest + (*GetFailedChecksResponse)(nil), // 21: management.GetFailedChecksResponse + (*ToggleCheckAlertRequest)(nil), // 22: management.ToggleCheckAlertRequest + (*ToggleCheckAlertResponse)(nil), // 23: management.ToggleCheckAlertResponse + nil, // 24: management.SecurityCheckResult.LabelsEntry + nil, // 25: management.CheckResult.LabelsEntry + (Severity)(0), // 26: management.Severity + (*PageParams)(nil), // 27: management.PageParams + (*PageTotals)(nil), // 28: management.PageTotals + } +) + var file_managementpb_checks_proto_depIdxs = []int32{ 26, // 0: management.SecurityCheckResult.severity:type_name -> management.Severity 24, // 1: management.SecurityCheckResult.labels:type_name -> management.SecurityCheckResult.LabelsEntry diff --git a/api/managementpb/checks.pb.gw.go b/api/managementpb/checks.pb.gw.go index 900e577d80..ab78dffe20 100644 --- a/api/managementpb/checks.pb.gw.go +++ b/api/managementpb/checks.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_SecurityChecks_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListFailedServicesRequest @@ -45,7 +47,6 @@ func request_SecurityChecks_ListFailedServices_0(ctx context.Context, marshaler msg, err := client.ListFailedServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_SecurityChecks_ListFailedServices_0(ctx context.Context, mars msg, err := server.ListFailedServices(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshaler run msg, err := client.GetFailedChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_SecurityChecks_GetFailedChecks_0(ctx context.Context, marshal msg, err := server.GetFailedChecks(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marshaler ru msg, err := client.ToggleCheckAlert(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_SecurityChecks_ToggleCheckAlert_0(ctx context.Context, marsha msg, err := server.ToggleCheckAlert(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, marsh msg, err := client.GetSecurityCheckResults(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_SecurityChecks_GetSecurityCheckResults_0(ctx context.Context, msg, err := server.GetSecurityCheckResults(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, marshaler msg, err := client.StartSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_SecurityChecks_StartSecurityChecks_0(ctx context.Context, mar msg, err := server.StartSecurityChecks(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, marshaler msg, err := client.ListSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_SecurityChecks_ListSecurityChecks_0(ctx context.Context, mars msg, err := server.ListSecurityChecks(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler runtim msg, err := client.ListAdvisors(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_SecurityChecks_ListAdvisors_0(ctx context.Context, marshaler msg, err := server.ListAdvisors(ctx, &protoReq) return msg, metadata, err - } func request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, marshale msg, err := client.ChangeSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, ma msg, err := server.ChangeSecurityChecks(ctx, &protoReq) return msg, metadata, err - } // RegisterSecurityChecksHandlerServer registers the http handlers for service SecurityChecks to "mux". @@ -308,7 +294,6 @@ func local_request_SecurityChecks_ChangeSecurityChecks_0(ctx context.Context, ma // 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 RegisterSecurityChecksHandlerFromEndpoint instead. func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityChecksServer) error { - mux.Handle("POST", pattern_SecurityChecks_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -331,7 +316,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,7 +340,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ToggleCheckAlert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -381,7 +364,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ToggleCheckAlert_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_GetSecurityCheckResults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -406,7 +388,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetSecurityCheckResults_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_StartSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -431,7 +412,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_StartSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ListSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -456,7 +436,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -481,7 +460,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ChangeSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -506,7 +484,6 @@ func RegisterSecurityChecksHandlerServer(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ChangeSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -549,7 +526,6 @@ func RegisterSecurityChecksHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "SecurityChecksClient" to call the correct interceptors. func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityChecksClient) error { - mux.Handle("POST", pattern_SecurityChecks_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -569,7 +545,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,7 +566,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ToggleCheckAlert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -613,7 +587,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ToggleCheckAlert_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_GetSecurityCheckResults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -635,7 +608,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_GetSecurityCheckResults_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_StartSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -657,7 +629,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_StartSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ListSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -679,7 +650,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -701,7 +671,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_SecurityChecks_ChangeSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -723,7 +692,6 @@ func RegisterSecurityChecksHandlerClient(ctx context.Context, mux *runtime.Serve } forward_SecurityChecks_ChangeSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/checks.swagger.json b/api/managementpb/checks.swagger.json deleted file mode 100644 index d0c7039491..0000000000 --- a/api/managementpb/checks.swagger.json +++ /dev/null @@ -1,732 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/checks.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "SecurityChecks" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Advisors/List": { - "post": { - "summary": "List advisors", - "description": "Returns a list of advisors available to the user.", - "operationId": "ListAdvisors", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementListAdvisorsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementListAdvisorsRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/Change": { - "post": { - "summary": "Change Security Checks", - "description": "Enables/disables Security Thread Tool checks or changes their interval by names.", - "operationId": "ChangeSecurityChecks", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementChangeSecurityChecksResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementChangeSecurityChecksRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/FailedChecks": { - "post": { - "summary": "Get Failed Checks", - "description": "Returns the latest check results for a given service.", - "operationId": "GetFailedChecks", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementGetFailedChecksResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementGetFailedChecksRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/GetCheckResults": { - "post": { - "summary": "Get Security Check Results", - "description": "Returns Security Thread Tool's latest checks results.", - "operationId": "GetSecurityCheckResults", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementGetSecurityCheckResultsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementGetSecurityCheckResultsRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/List": { - "post": { - "summary": "List advisor checks", - "description": "Returns a list of checks available to the user.", - "operationId": "ListSecurityChecks", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementListSecurityChecksResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementListSecurityChecksRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/ListFailedServices": { - "post": { - "summary": "List Failed Services", - "description": "Returns a list of services with failed checks and a summary of check results.", - "operationId": "ListFailedServices", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementListFailedServicesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementListFailedServicesRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/Start": { - "post": { - "summary": "Start Security Checks", - "description": "Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", - "operationId": "StartSecurityChecks", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementStartSecurityChecksResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementStartSecurityChecksRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - }, - "/v1/management/SecurityChecks/ToggleCheckAlert": { - "post": { - "summary": "Toggle Check Alert", - "description": "Silence/Unsilence alerts for a specific check result.", - "operationId": "ToggleCheckAlert", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementToggleCheckAlertResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementToggleCheckAlertRequest" - } - } - ], - "tags": [ - "SecurityChecks" - ] - } - } - }, - "definitions": { - "managementAdvisor": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "description": { - "type": "string", - "description": "Long human-readable description." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "comment": { - "type": "string", - "description": "Comment." - }, - "category": { - "type": "string", - "description": "Category." - }, - "checks": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementSecurityCheck" - }, - "description": "Advisor checks." - } - } - }, - "managementAdvisorCheckFamily": { - "type": "string", - "enum": [ - "ADVISOR_CHECK_FAMILY_INVALID", - "ADVISOR_CHECK_FAMILY_MYSQL", - "ADVISOR_CHECK_FAMILY_POSTGRESQL", - "ADVISOR_CHECK_FAMILY_MONGODB" - ], - "default": "ADVISOR_CHECK_FAMILY_INVALID" - }, - "managementChangeSecurityCheckParams": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the check to change." - }, - "enable": { - "type": "boolean" - }, - "disable": { - "type": "boolean" - }, - "interval": { - "$ref": "#/definitions/managementSecurityCheckInterval", - "description": "check execution interval." - } - }, - "description": "ChangeSecurityCheckParams specifies a single check parameters." - }, - "managementChangeSecurityChecksRequest": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementChangeSecurityCheckParams" - } - } - } - }, - "managementChangeSecurityChecksResponse": { - "type": "object" - }, - "managementCheckResult": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "severity": { - "$ref": "#/definitions/managementSeverity" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "read_more_url": { - "type": "string", - "description": "URL containing information on how to resolve an issue detected by an STT check." - }, - "service_name": { - "type": "string", - "description": "Name of the monitored service on which the check ran." - }, - "service_id": { - "type": "string", - "description": "ID of the monitored service on which the check ran." - }, - "check_name": { - "type": "string", - "title": "Name of the check that failed" - }, - "alert_id": { - "type": "string", - "title": "ID of the check result as stored in AlertManager" - }, - "silenced": { - "type": "boolean", - "title": "Silence status of the check result" - } - }, - "description": "CheckResult represents the check results for a given service." - }, - "managementCheckResultSummary": { - "type": "object", - "properties": { - "service_name": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "emergency_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"EMERGENCY\"." - }, - "alert_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"ALERT\"." - }, - "critical_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"CRITICAL\"." - }, - "error_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"ERROR\"." - }, - "warning_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"WARNING\"." - }, - "notice_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"NOTICE\"." - }, - "info_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"INFO\"." - }, - "debug_count": { - "type": "integer", - "format": "int64", - "description": "Number of failed checks for this service with severity level \"DEBUG\"." - } - }, - "description": "CheckResultSummary is a summary of check results." - }, - "managementGetFailedChecksRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string" - }, - "page_params": { - "$ref": "#/definitions/managementPageParams" - } - } - }, - "managementGetFailedChecksResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementCheckResult" - } - }, - "page_totals": { - "$ref": "#/definitions/managementPageTotals" - } - } - }, - "managementGetSecurityCheckResultsRequest": { - "type": "object" - }, - "managementGetSecurityCheckResultsResponse": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementSecurityCheckResult" - } - } - } - }, - "managementListAdvisorsRequest": { - "type": "object" - }, - "managementListAdvisorsResponse": { - "type": "object", - "properties": { - "advisors": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementAdvisor" - } - } - } - }, - "managementListFailedServicesRequest": { - "type": "object" - }, - "managementListFailedServicesResponse": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementCheckResultSummary" - } - } - } - }, - "managementListSecurityChecksRequest": { - "type": "object" - }, - "managementListSecurityChecksResponse": { - "type": "object", - "properties": { - "checks": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementSecurityCheck" - } - } - } - }, - "managementPageParams": { - "type": "object", - "properties": { - "page_size": { - "type": "integer", - "format": "int32", - "description": "Maximum number of results per page." - }, - "index": { - "type": "integer", - "format": "int32", - "description": "Index of the requested page, starts from 0." - } - }, - "description": "PageParams represents page request parameters for pagination." - }, - "managementPageTotals": { - "type": "object", - "properties": { - "total_items": { - "type": "integer", - "format": "int32", - "description": "Total number of results." - }, - "total_pages": { - "type": "integer", - "format": "int32", - "description": "Total number of pages." - } - }, - "description": "PageTotals represents total values for pagination." - }, - "managementSecurityCheck": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "disabled": { - "type": "boolean", - "description": "True if that check is disabled." - }, - "description": { - "type": "string", - "description": "Long human-readable description." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "interval": { - "$ref": "#/definitions/managementSecurityCheckInterval", - "description": "Check execution interval." - }, - "family": { - "$ref": "#/definitions/managementAdvisorCheckFamily", - "description": "DB family." - } - }, - "description": "SecurityCheck contains check name and status." - }, - "managementSecurityCheckInterval": { - "type": "string", - "enum": [ - "SECURITY_CHECK_INTERVAL_INVALID", - "STANDARD", - "FREQUENT", - "RARE" - ], - "default": "SECURITY_CHECK_INTERVAL_INVALID", - "description": "SecurityCheckInterval represents possible execution interval values for checks." - }, - "managementSecurityCheckResult": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "severity": { - "$ref": "#/definitions/managementSeverity" - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "read_more_url": { - "type": "string", - "description": "URL containing information on how to resolve an issue detected by an STT check." - }, - "service_name": { - "type": "string", - "description": "Name of the monitored service on which the check ran." - } - }, - "description": "SecurityCheckResult represents the check result returned from pmm-managed after running the check." - }, - "managementSeverity": { - "type": "string", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "default": "SEVERITY_INVALID", - "description": "Severity represents severity level of the check result or alert." - }, - "managementStartSecurityChecksRequest": { - "type": "object", - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Names of the checks that should be started." - } - } - }, - "managementStartSecurityChecksResponse": { - "type": "object" - }, - "managementToggleCheckAlertRequest": { - "type": "object", - "properties": { - "alert_id": { - "type": "string", - "description": "Alert ID of the check result." - }, - "silence": { - "type": "boolean", - "description": "Silence the check result if set to true, unsilence otherwise." - } - } - }, - "managementToggleCheckAlertResponse": { - "type": "object" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/checks_grpc.pb.go b/api/managementpb/checks_grpc.pb.go index 4aeccc6f93..bfa8496cd4 100644 --- a/api/managementpb/checks_grpc.pb.go +++ b/api/managementpb/checks_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -158,30 +159,36 @@ type SecurityChecksServer interface { } // UnimplementedSecurityChecksServer must be embedded to have forward compatible implementations. -type UnimplementedSecurityChecksServer struct { -} +type UnimplementedSecurityChecksServer struct{} func (UnimplementedSecurityChecksServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFailedServices not implemented") } + func (UnimplementedSecurityChecksServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFailedChecks not implemented") } + func (UnimplementedSecurityChecksServer) ToggleCheckAlert(context.Context, *ToggleCheckAlertRequest) (*ToggleCheckAlertResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ToggleCheckAlert not implemented") } + func (UnimplementedSecurityChecksServer) GetSecurityCheckResults(context.Context, *GetSecurityCheckResultsRequest) (*GetSecurityCheckResultsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSecurityCheckResults not implemented") } + func (UnimplementedSecurityChecksServer) StartSecurityChecks(context.Context, *StartSecurityChecksRequest) (*StartSecurityChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartSecurityChecks not implemented") } + func (UnimplementedSecurityChecksServer) ListSecurityChecks(context.Context, *ListSecurityChecksRequest) (*ListSecurityChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSecurityChecks not implemented") } + func (UnimplementedSecurityChecksServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisors not implemented") } + func (UnimplementedSecurityChecksServer) ChangeSecurityChecks(context.Context, *ChangeSecurityChecksRequest) (*ChangeSecurityChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSecurityChecks not implemented") } diff --git a/api/managementpb/external.pb.go b/api/managementpb/external.pb.go index 49f06ec969..81ca2e7509 100644 --- a/api/managementpb/external.pb.go +++ b/api/managementpb/external.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -418,16 +420,19 @@ func file_managementpb_external_proto_rawDescGZIP() []byte { return file_managementpb_external_proto_rawDescData } -var file_managementpb_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_external_proto_goTypes = []interface{}{ - (*AddExternalRequest)(nil), // 0: management.AddExternalRequest - (*AddExternalResponse)(nil), // 1: management.AddExternalResponse - nil, // 2: management.AddExternalRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (*inventorypb.ExternalService)(nil), // 5: inventory.ExternalService - (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter -} +var ( + file_managementpb_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_external_proto_goTypes = []interface{}{ + (*AddExternalRequest)(nil), // 0: management.AddExternalRequest + (*AddExternalResponse)(nil), // 1: management.AddExternalResponse + nil, // 2: management.AddExternalRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (*inventorypb.ExternalService)(nil), // 5: inventory.ExternalService + (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter + } +) + var file_managementpb_external_proto_depIdxs = []int32{ 3, // 0: management.AddExternalRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddExternalRequest.custom_labels:type_name -> management.AddExternalRequest.CustomLabelsEntry diff --git a/api/managementpb/external.pb.gw.go b/api/managementpb/external.pb.gw.go index 01431e1b12..315f8a4d17 100644 --- a/api/managementpb/external.pb.gw.go +++ b/api/managementpb/external.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_External_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, client ExternalClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddExternalRequest @@ -45,7 +47,6 @@ func request_External_AddExternal_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddExternal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_External_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, server ExternalServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_External_AddExternal_0(ctx context.Context, marshaler runtime msg, err := server.AddExternal(ctx, &protoReq) return msg, metadata, err - } // RegisterExternalHandlerServer registers the http handlers for service External to "mux". @@ -70,7 +70,6 @@ func local_request_External_AddExternal_0(ctx context.Context, marshaler runtime // 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 RegisterExternalHandlerFromEndpoint instead. func RegisterExternalHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExternalServer) error { - mux.Handle("POST", pattern_External_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterExternalHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_External_AddExternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterExternalHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ExternalClient" to call the correct interceptors. func RegisterExternalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExternalClient) error { - mux.Handle("POST", pattern_External_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterExternalHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_External_AddExternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_External_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) -) +var pattern_External_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) -var ( - forward_External_AddExternal_0 = runtime.ForwardResponseMessage -) +var forward_External_AddExternal_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/external.swagger.json b/api/managementpb/external.swagger.json deleted file mode 100644 index ed6a42932e..0000000000 --- a/api/managementpb/external.swagger.json +++ /dev/null @@ -1,343 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/external.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "External" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/External/Add": { - "post": { - "summary": "Add External Service", - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", - "operationId": "AddExternal", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddExternalResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddExternalRequest" - } - } - ], - "tags": [ - "External" - ] - } - } - }, - "definitions": { - "inventoryExternalExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "disabled": { - "type": "boolean", - "description": "If disabled, metrics from this exporter will not be collected." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - } - }, - "description": "ExternalExporter runs on any Node type, including Remote Node." - }, - "inventoryExternalService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this service instance runs." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "group": { - "type": "string", - "description": "Group name of external service." - } - }, - "description": "ExternalService represents a generic External service instance." - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "managementAddExternalRequest": { - "type": "object", - "properties": { - "runs_on_node_id": { - "type": "string", - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "node_name": { - "type": "string", - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "add_node": { - "$ref": "#/definitions/managementAddNodeParams", - "description": "Create a new Node with those parameters.\nadd_node always should be passed with address.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "address": { - "type": "string", - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "password": { - "type": "string", - "description": "HTTP basic auth password for collecting metrics." - }, - "scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "node_id": { - "type": "string", - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "group": { - "type": "string", - "description": "Group name of external service." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically.\nNode with registered pmm_agent_id must present at pmm-server\nin case of push metrics_mode." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - } - } - }, - "managementAddExternalResponse": { - "type": "object", - "properties": { - "service": { - "$ref": "#/definitions/inventoryExternalService" - }, - "external_exporter": { - "$ref": "#/definitions/inventoryExternalExporter" - } - } - }, - "managementAddNodeParams": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - } - }, - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/external_grpc.pb.go b/api/managementpb/external_grpc.pb.go index f069641f0a..6d28285b1f 100644 --- a/api/managementpb/external_grpc.pb.go +++ b/api/managementpb/external_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -61,8 +62,7 @@ type ExternalServer interface { } // UnimplementedExternalServer must be embedded to have forward compatible implementations. -type UnimplementedExternalServer struct { -} +type UnimplementedExternalServer struct{} func (UnimplementedExternalServer) AddExternal(context.Context, *AddExternalRequest) (*AddExternalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternal not implemented") diff --git a/api/managementpb/haproxy.pb.go b/api/managementpb/haproxy.pb.go index ad81b48688..ec9e677887 100644 --- a/api/managementpb/haproxy.pb.go +++ b/api/managementpb/haproxy.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -390,16 +392,19 @@ func file_managementpb_haproxy_proto_rawDescGZIP() []byte { return file_managementpb_haproxy_proto_rawDescData } -var file_managementpb_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_haproxy_proto_goTypes = []interface{}{ - (*AddHAProxyRequest)(nil), // 0: management.AddHAProxyRequest - (*AddHAProxyResponse)(nil), // 1: management.AddHAProxyResponse - nil, // 2: management.AddHAProxyRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (*inventorypb.HAProxyService)(nil), // 5: inventory.HAProxyService - (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter -} +var ( + file_managementpb_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_haproxy_proto_goTypes = []interface{}{ + (*AddHAProxyRequest)(nil), // 0: management.AddHAProxyRequest + (*AddHAProxyResponse)(nil), // 1: management.AddHAProxyResponse + nil, // 2: management.AddHAProxyRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (*inventorypb.HAProxyService)(nil), // 5: inventory.HAProxyService + (*inventorypb.ExternalExporter)(nil), // 6: inventory.ExternalExporter + } +) + var file_managementpb_haproxy_proto_depIdxs = []int32{ 3, // 0: management.AddHAProxyRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddHAProxyRequest.custom_labels:type_name -> management.AddHAProxyRequest.CustomLabelsEntry diff --git a/api/managementpb/haproxy.pb.gw.go b/api/managementpb/haproxy.pb.gw.go index 37013f743a..dba51d5a1e 100644 --- a/api/managementpb/haproxy.pb.gw.go +++ b/api/managementpb/haproxy.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.Marshaler, client HAProxyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddHAProxyRequest @@ -45,7 +47,6 @@ func request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.AddHAProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.Marshaler, server HAProxyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.M msg, err := server.AddHAProxy(ctx, &protoReq) return msg, metadata, err - } // RegisterHAProxyHandlerServer registers the http handlers for service HAProxy to "mux". @@ -70,7 +70,6 @@ func local_request_HAProxy_AddHAProxy_0(ctx context.Context, marshaler runtime.M // 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 RegisterHAProxyHandlerFromEndpoint instead. func RegisterHAProxyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HAProxyServer) error { - mux.Handle("POST", pattern_HAProxy_AddHAProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterHAProxyHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_HAProxy_AddHAProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterHAProxyHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "HAProxyClient" to call the correct interceptors. func RegisterHAProxyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HAProxyClient) error { - mux.Handle("POST", pattern_HAProxy_AddHAProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterHAProxyHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_HAProxy_AddHAProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_HAProxy_AddHAProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "HAProxy", "Add"}, "")) -) +var pattern_HAProxy_AddHAProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "HAProxy", "Add"}, "")) -var ( - forward_HAProxy_AddHAProxy_0 = runtime.ForwardResponseMessage -) +var forward_HAProxy_AddHAProxy_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/haproxy.swagger.json b/api/managementpb/haproxy.swagger.json deleted file mode 100644 index 2930f745b5..0000000000 --- a/api/managementpb/haproxy.swagger.json +++ /dev/null @@ -1,331 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/haproxy.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "HAProxy" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/HAProxy/Add": { - "post": { - "summary": "Add HAProxy", - "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", - "operationId": "AddHAProxy", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddHAProxyResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddHAProxyRequest" - } - } - ], - "tags": [ - "HAProxy" - ] - } - } - }, - "definitions": { - "inventoryExternalExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "disabled": { - "type": "boolean", - "description": "If disabled, metrics from this exporter will not be collected." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - } - }, - "description": "ExternalExporter runs on any Node type, including Remote Node." - }, - "inventoryHAProxyService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this service instance runs." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "HAProxyService represents a generic HAProxy service instance." - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "managementAddHAProxyRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "node_name": { - "type": "string", - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "add_node": { - "$ref": "#/definitions/managementAddNodeParams", - "description": "Create a new Node with those parameters.\nadd_node always should be passed with address.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "address": { - "type": "string", - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "password": { - "type": "string", - "description": "HTTP basic auth password for collecting metrics." - }, - "scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically.\nNode with registered pmm_agent_id must present at pmm-server\nin case of push metrics_mode." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - } - } - }, - "managementAddHAProxyResponse": { - "type": "object", - "properties": { - "service": { - "$ref": "#/definitions/inventoryHAProxyService" - }, - "external_exporter": { - "$ref": "#/definitions/inventoryExternalExporter" - } - } - }, - "managementAddNodeParams": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - } - }, - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/haproxy_grpc.pb.go b/api/managementpb/haproxy_grpc.pb.go index b8560eda2c..d9deef0550 100644 --- a/api/managementpb/haproxy_grpc.pb.go +++ b/api/managementpb/haproxy_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -61,8 +62,7 @@ type HAProxyServer interface { } // UnimplementedHAProxyServer must be embedded to have forward compatible implementations. -type UnimplementedHAProxyServer struct { -} +type UnimplementedHAProxyServer struct{} func (UnimplementedHAProxyServer) AddHAProxy(context.Context, *AddHAProxyRequest) (*AddHAProxyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddHAProxy not implemented") diff --git a/api/managementpb/ia/alerts.pb.go b/api/managementpb/ia/alerts.pb.go index 8250a20799..c8ac098177 100644 --- a/api/managementpb/ia/alerts.pb.go +++ b/api/managementpb/ia/alerts.pb.go @@ -7,14 +7,16 @@ package iav1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - managementpb "github.com/percona/pmm/api/managementpb" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + managementpb "github.com/percona/pmm/api/managementpb" ) const ( @@ -458,22 +460,25 @@ func file_managementpb_ia_alerts_proto_rawDescGZIP() []byte { return file_managementpb_ia_alerts_proto_rawDescData } -var file_managementpb_ia_alerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_managementpb_ia_alerts_proto_goTypes = []interface{}{ - (*Alert)(nil), // 0: ia.v1beta1.Alert - (*ListAlertsRequest)(nil), // 1: ia.v1beta1.ListAlertsRequest - (*ListAlertsResponse)(nil), // 2: ia.v1beta1.ListAlertsResponse - (*ToggleAlertsRequest)(nil), // 3: ia.v1beta1.ToggleAlertsRequest - (*ToggleAlertsResponse)(nil), // 4: ia.v1beta1.ToggleAlertsResponse - nil, // 5: ia.v1beta1.Alert.LabelsEntry - (managementpb.Severity)(0), // 6: management.Severity - (Status)(0), // 7: ia.v1beta1.Status - (*Rule)(nil), // 8: ia.v1beta1.Rule - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (*managementpb.PageParams)(nil), // 10: management.PageParams - (*managementpb.PageTotals)(nil), // 11: management.PageTotals - (managementpb.BooleanFlag)(0), // 12: managementpb.BooleanFlag -} +var ( + file_managementpb_ia_alerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_managementpb_ia_alerts_proto_goTypes = []interface{}{ + (*Alert)(nil), // 0: ia.v1beta1.Alert + (*ListAlertsRequest)(nil), // 1: ia.v1beta1.ListAlertsRequest + (*ListAlertsResponse)(nil), // 2: ia.v1beta1.ListAlertsResponse + (*ToggleAlertsRequest)(nil), // 3: ia.v1beta1.ToggleAlertsRequest + (*ToggleAlertsResponse)(nil), // 4: ia.v1beta1.ToggleAlertsResponse + nil, // 5: ia.v1beta1.Alert.LabelsEntry + (managementpb.Severity)(0), // 6: management.Severity + (Status)(0), // 7: ia.v1beta1.Status + (*Rule)(nil), // 8: ia.v1beta1.Rule + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*managementpb.PageParams)(nil), // 10: management.PageParams + (*managementpb.PageTotals)(nil), // 11: management.PageTotals + (managementpb.BooleanFlag)(0), // 12: managementpb.BooleanFlag + } +) + var file_managementpb_ia_alerts_proto_depIdxs = []int32{ 6, // 0: ia.v1beta1.Alert.severity:type_name -> management.Severity 7, // 1: ia.v1beta1.Alert.status:type_name -> ia.v1beta1.Status diff --git a/api/managementpb/ia/alerts.pb.gw.go b/api/managementpb/ia/alerts.pb.gw.go index 993d678a8c..00ed66298e 100644 --- a/api/managementpb/ia/alerts.pb.gw.go +++ b/api/managementpb/ia/alerts.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Marshaler, client AlertsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAlertsRequest @@ -45,7 +47,6 @@ func request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.ListAlerts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Marshaler, server AlertsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Alerts_ListAlerts_0(ctx context.Context, marshaler runtime.Ma msg, err := server.ListAlerts(ctx, &protoReq) return msg, metadata, err - } func request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime.Marshaler, client AlertsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.ToggleAlerts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime.Marshaler, server AlertsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime. msg, err := server.ToggleAlerts(ctx, &protoReq) return msg, metadata, err - } // RegisterAlertsHandlerServer registers the http handlers for service Alerts to "mux". @@ -104,7 +102,6 @@ func local_request_Alerts_ToggleAlerts_0(ctx context.Context, marshaler runtime. // 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 RegisterAlertsHandlerFromEndpoint instead. func RegisterAlertsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertsServer) error { - mux.Handle("POST", pattern_Alerts_ListAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -127,7 +124,6 @@ func RegisterAlertsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Alerts_ListAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerts_ToggleAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -152,7 +148,6 @@ func RegisterAlertsHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Alerts_ToggleAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -195,7 +190,6 @@ func RegisterAlertsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AlertsClient" to call the correct interceptors. func RegisterAlertsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertsClient) error { - mux.Handle("POST", pattern_Alerts_ListAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -215,7 +209,6 @@ func RegisterAlertsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Alerts_ListAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Alerts_ToggleAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -237,7 +230,6 @@ func RegisterAlertsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Alerts_ToggleAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/ia/alerts.swagger.json b/api/managementpb/ia/alerts.swagger.json deleted file mode 100644 index 50af528a20..0000000000 --- a/api/managementpb/ia/alerts.swagger.json +++ /dev/null @@ -1,716 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/ia/alerts.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Alerts" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/ia/Alerts/List": { - "post": { - "summary": "ListAlerts returns a list of all Alerts.", - "operationId": "ListAlerts", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListAlertsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListAlertsRequest" - } - } - ], - "tags": [ - "Alerts" - ], - "deprecated": true - } - }, - "/v1/management/ia/Alerts/Toggle": { - "post": { - "summary": "ToggleAlerts allows to switch alerts state between silenced and unsilenced.", - "description": "Pass empty list to apply toggle action to all existing alerts", - "operationId": "ToggleAlerts", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ToggleAlertsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ToggleAlertsRequest" - } - } - ], - "tags": [ - "Alerts" - ], - "deprecated": true - } - } - }, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "iav1beta1Filter": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/iav1beta1FilterType" - }, - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "description": "Filter repsents a single filter condition." - }, - "iav1beta1FilterType": { - "type": "string", - "enum": [ - "FILTER_TYPE_INVALID", - "EQUAL", - "REGEX" - ], - "default": "FILTER_TYPE_INVALID", - "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;" - }, - "iav1beta1ParamValue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "type": { - "$ref": "#/definitions/v1ParamType", - "description": "Parameter type." - }, - "bool": { - "type": "boolean", - "description": "Bool value." - }, - "float": { - "type": "number", - "format": "double", - "description": "Float value." - }, - "string": { - "type": "string", - "description": "String value." - } - }, - "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs." - }, - "iav1beta1Status": { - "type": "string", - "enum": [ - "STATUS_INVALID", - "CLEAR", - "PENDING", - "TRIGGERING", - "SILENCED" - ], - "default": "STATUS_INVALID", - "description": "Status represents Alert Rule's and Alert's combined status.\n\n - CLEAR: No alert.\n - PENDING: Pending, but not triggering alert.\n - TRIGGERING: Triggering (firing) alert.\n - SILENCED: Silenced alert." - }, - "managementPageParams": { - "type": "object", - "properties": { - "page_size": { - "type": "integer", - "format": "int32", - "description": "Maximum number of results per page." - }, - "index": { - "type": "integer", - "format": "int32", - "description": "Index of the requested page, starts from 0." - } - }, - "description": "PageParams represents page request parameters for pagination." - }, - "managementPageTotals": { - "type": "object", - "properties": { - "total_items": { - "type": "integer", - "format": "int32", - "description": "Total number of results." - }, - "total_pages": { - "type": "integer", - "format": "int32", - "description": "Total number of pages." - } - }, - "description": "PageTotals represents total values for pagination." - }, - "managementSeverity": { - "type": "string", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "default": "SEVERITY_INVALID", - "description": "Severity represents severity level of the check result or alert." - }, - "managementpbBooleanFlag": { - "type": "string", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "default": "DO_NOT_CHANGE", - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "v1BoolParamDefinition": { - "type": "object", - "properties": { - "default": { - "$ref": "#/definitions/managementpbBooleanFlag" - } - }, - "description": "BoolParamDefinition represents boolean parameter's default value." - }, - "v1FloatParamDefinition": { - "type": "object", - "properties": { - "has_default": { - "type": "boolean", - "description": "True if default value is set." - }, - "default": { - "type": "number", - "format": "double", - "description": "Default value if has_default is true." - }, - "has_min": { - "type": "boolean", - "description": "True if minimal valid value is set." - }, - "min": { - "type": "number", - "format": "double", - "description": "Minimal valid value (inclusive) if has_min is true." - }, - "has_max": { - "type": "boolean", - "description": "True if maximal valid value is set." - }, - "max": { - "type": "number", - "format": "double", - "description": "Maximal valid value (inclusive) if has_max is true." - } - }, - "description": "FloatParamDefinition represents float parameter's default value and valid range." - }, - "v1ParamDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "summary": { - "type": "string", - "description": "Short human-readable parameter summary." - }, - "unit": { - "$ref": "#/definitions/v1ParamUnit", - "description": "Parameter unit." - }, - "type": { - "$ref": "#/definitions/v1ParamType", - "description": "Parameter type." - }, - "bool": { - "$ref": "#/definitions/v1BoolParamDefinition", - "description": "Bool value." - }, - "float": { - "$ref": "#/definitions/v1FloatParamDefinition", - "description": "Float value." - }, - "string": { - "$ref": "#/definitions/v1StringParamDefinition", - "description": "String value." - } - }, - "description": "ParamDefinition represents a single query parameter." - }, - "v1ParamType": { - "type": "string", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "default": "PARAM_TYPE_INVALID", - "description": "ParamType represents template parameter type." - }, - "v1ParamUnit": { - "type": "string", - "enum": [ - "PARAM_UNIT_INVALID", - "PERCENTAGE", - "SECONDS" - ], - "default": "PARAM_UNIT_INVALID", - "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s" - }, - "v1StringParamDefinition": { - "type": "object", - "properties": { - "has_default": { - "type": "boolean", - "description": "True if default value is set." - }, - "default": { - "type": "string", - "description": "Default value if has_default is true." - } - }, - "description": "StringParamDefinition represents string parameter's default value." - }, - "v1beta1Alert": { - "type": "object", - "properties": { - "alert_id": { - "type": "string", - "description": "ID." - }, - "summary": { - "type": "string", - "description": "Human-readable summary." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Severity." - }, - "status": { - "$ref": "#/definitions/iav1beta1Status", - "description": "Status." - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Combined labels." - }, - "rule": { - "$ref": "#/definitions/v1beta1Rule", - "description": "The current Alert Rule." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Alert creation time." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Alert last update time." - } - }, - "description": "Alert represents Alert." - }, - "v1beta1BasicAuth": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "password_file": { - "type": "string" - } - }, - "description": "BasicAuth represents basic HTTP auth configuration." - }, - "v1beta1Channel": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "email_config": { - "$ref": "#/definitions/v1beta1EmailConfig" - }, - "pagerduty_config": { - "$ref": "#/definitions/v1beta1PagerDutyConfig" - }, - "slack_config": { - "$ref": "#/definitions/v1beta1SlackConfig" - }, - "webhook_config": { - "$ref": "#/definitions/v1beta1WebhookConfig" - }, - "disabled": { - "type": "boolean", - "description": "True if that channel is disabled." - } - }, - "description": "Channel represents a single Notification Channel." - }, - "v1beta1EmailConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "to": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "EmailConfig represents email configuration." - }, - "v1beta1HTTPConfig": { - "type": "object", - "properties": { - "basic_auth": { - "$ref": "#/definitions/v1beta1BasicAuth", - "description": "Basic HTTP auth configuration. Zero value will remove it." - }, - "bearer_token": { - "type": "string" - }, - "bearer_token_file": { - "type": "string" - }, - "tls_config": { - "$ref": "#/definitions/v1beta1TLSConfig", - "description": "TLS configuration. Zero value will remove it." - }, - "proxy_url": { - "type": "string" - } - }, - "description": "HTTPConfig represents HTTP client configuration." - }, - "v1beta1ListAlertsRequest": { - "type": "object", - "properties": { - "page_params": { - "$ref": "#/definitions/managementPageParams", - "description": "Page request." - } - } - }, - "v1beta1ListAlertsResponse": { - "type": "object", - "properties": { - "alerts": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Alert" - } - }, - "totals": { - "$ref": "#/definitions/managementPageTotals", - "description": "Total items and pages." - } - } - }, - "v1beta1PagerDutyConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "routing_key": { - "type": "string", - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set." - }, - "service_key": { - "type": "string", - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set." - } - }, - "description": "PagerDutyConfig represents PagerDuty configuration." - }, - "v1beta1Rule": { - "type": "object", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - }, - "name": { - "type": "string", - "description": "Rule name." - }, - "summary": { - "type": "string", - "description": "Rule human-readable summary." - }, - "template_name": { - "type": "string", - "description": "Template used for this rule." - }, - "disabled": { - "type": "boolean", - "description": "True if that rule is disabled." - }, - "expr_template": { - "type": "string", - "description": "Expression template." - }, - "expr": { - "type": "string", - "description": "Expression filled with parameters." - }, - "params_definitions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1ParamDefinition" - }, - "description": "Expression parameters definitions." - }, - "params_values": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1ParamValue" - }, - "description": "Expression parameters values." - }, - "default_for": { - "type": "string", - "description": "Default for duration." - }, - "for": { - "type": "string", - "description": "For duration." - }, - "default_severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Default severity." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Severity." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom labels." - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Labels." - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Annotations." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1Filter" - }, - "description": "Filters." - }, - "channels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Channel" - }, - "description": "Channels." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Rule creation time." - } - }, - "description": "Rule represents Alert Rule." - }, - "v1beta1SlackConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "channel": { - "type": "string" - } - }, - "description": "SlackConfig represents Slack configuration." - }, - "v1beta1TLSConfig": { - "type": "object", - "properties": { - "ca_file": { - "type": "string", - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." - }, - "cert_file": { - "type": "string", - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." - }, - "key_file": { - "type": "string", - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." - }, - "server_name": { - "type": "string", - "description": "Name of the server." - }, - "insecure_skip_verify": { - "type": "boolean", - "description": "Disable validation of the server certificate." - }, - "ca_file_content": { - "type": "string", - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." - }, - "cert_file_content": { - "type": "string", - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." - }, - "key_file_content": { - "type": "string", - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." - } - }, - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config" - }, - "v1beta1ToggleAlertsRequest": { - "type": "object", - "properties": { - "alert_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of alerts that silence state should be switched. If provided array is empty than all\nexisting alerts are switched." - }, - "silenced": { - "$ref": "#/definitions/managementpbBooleanFlag", - "description": "Silences or unsilences alert if set." - } - } - }, - "v1beta1ToggleAlertsResponse": { - "type": "object" - }, - "v1beta1WebhookConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/v1beta1HTTPConfig" - }, - "max_alerts": { - "type": "integer", - "format": "int32" - } - }, - "description": "WebhookConfig represents webhook configuration." - } - } -} diff --git a/api/managementpb/ia/alerts_grpc.pb.go b/api/managementpb/ia/alerts_grpc.pb.go index c094ffa8fb..33c9513f7a 100644 --- a/api/managementpb/ia/alerts_grpc.pb.go +++ b/api/managementpb/ia/alerts_grpc.pb.go @@ -8,6 +8,7 @@ package iav1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -77,12 +78,12 @@ type AlertsServer interface { } // UnimplementedAlertsServer must be embedded to have forward compatible implementations. -type UnimplementedAlertsServer struct { -} +type UnimplementedAlertsServer struct{} func (UnimplementedAlertsServer) ListAlerts(context.Context, *ListAlertsRequest) (*ListAlertsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAlerts not implemented") } + func (UnimplementedAlertsServer) ToggleAlerts(context.Context, *ToggleAlertsRequest) (*ToggleAlertsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ToggleAlerts not implemented") } diff --git a/api/managementpb/ia/channels.pb.go b/api/managementpb/ia/channels.pb.go index 78cdb04a8b..70636dd1af 100644 --- a/api/managementpb/ia/channels.pb.go +++ b/api/managementpb/ia/channels.pb.go @@ -7,14 +7,16 @@ package iav1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - managementpb "github.com/percona/pmm/api/managementpb" _ "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" + + managementpb "github.com/percona/pmm/api/managementpb" ) const ( @@ -1408,27 +1410,30 @@ func file_managementpb_ia_channels_proto_rawDescGZIP() []byte { return file_managementpb_ia_channels_proto_rawDescData } -var file_managementpb_ia_channels_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_managementpb_ia_channels_proto_goTypes = []interface{}{ - (*BasicAuth)(nil), // 0: ia.v1beta1.BasicAuth - (*TLSConfig)(nil), // 1: ia.v1beta1.TLSConfig - (*HTTPConfig)(nil), // 2: ia.v1beta1.HTTPConfig - (*EmailConfig)(nil), // 3: ia.v1beta1.EmailConfig - (*PagerDutyConfig)(nil), // 4: ia.v1beta1.PagerDutyConfig - (*SlackConfig)(nil), // 5: ia.v1beta1.SlackConfig - (*WebhookConfig)(nil), // 6: ia.v1beta1.WebhookConfig - (*Channel)(nil), // 7: ia.v1beta1.Channel - (*ListChannelsRequest)(nil), // 8: ia.v1beta1.ListChannelsRequest - (*ListChannelsResponse)(nil), // 9: ia.v1beta1.ListChannelsResponse - (*AddChannelRequest)(nil), // 10: ia.v1beta1.AddChannelRequest - (*AddChannelResponse)(nil), // 11: ia.v1beta1.AddChannelResponse - (*ChangeChannelRequest)(nil), // 12: ia.v1beta1.ChangeChannelRequest - (*ChangeChannelResponse)(nil), // 13: ia.v1beta1.ChangeChannelResponse - (*RemoveChannelRequest)(nil), // 14: ia.v1beta1.RemoveChannelRequest - (*RemoveChannelResponse)(nil), // 15: ia.v1beta1.RemoveChannelResponse - (*managementpb.PageParams)(nil), // 16: management.PageParams - (*managementpb.PageTotals)(nil), // 17: management.PageTotals -} +var ( + file_managementpb_ia_channels_proto_msgTypes = make([]protoimpl.MessageInfo, 16) + file_managementpb_ia_channels_proto_goTypes = []interface{}{ + (*BasicAuth)(nil), // 0: ia.v1beta1.BasicAuth + (*TLSConfig)(nil), // 1: ia.v1beta1.TLSConfig + (*HTTPConfig)(nil), // 2: ia.v1beta1.HTTPConfig + (*EmailConfig)(nil), // 3: ia.v1beta1.EmailConfig + (*PagerDutyConfig)(nil), // 4: ia.v1beta1.PagerDutyConfig + (*SlackConfig)(nil), // 5: ia.v1beta1.SlackConfig + (*WebhookConfig)(nil), // 6: ia.v1beta1.WebhookConfig + (*Channel)(nil), // 7: ia.v1beta1.Channel + (*ListChannelsRequest)(nil), // 8: ia.v1beta1.ListChannelsRequest + (*ListChannelsResponse)(nil), // 9: ia.v1beta1.ListChannelsResponse + (*AddChannelRequest)(nil), // 10: ia.v1beta1.AddChannelRequest + (*AddChannelResponse)(nil), // 11: ia.v1beta1.AddChannelResponse + (*ChangeChannelRequest)(nil), // 12: ia.v1beta1.ChangeChannelRequest + (*ChangeChannelResponse)(nil), // 13: ia.v1beta1.ChangeChannelResponse + (*RemoveChannelRequest)(nil), // 14: ia.v1beta1.RemoveChannelRequest + (*RemoveChannelResponse)(nil), // 15: ia.v1beta1.RemoveChannelResponse + (*managementpb.PageParams)(nil), // 16: management.PageParams + (*managementpb.PageTotals)(nil), // 17: management.PageTotals + } +) + var file_managementpb_ia_channels_proto_depIdxs = []int32{ 0, // 0: ia.v1beta1.HTTPConfig.basic_auth:type_name -> ia.v1beta1.BasicAuth 1, // 1: ia.v1beta1.HTTPConfig.tls_config:type_name -> ia.v1beta1.TLSConfig diff --git a/api/managementpb/ia/channels.pb.gw.go b/api/managementpb/ia/channels.pb.gw.go index 3975c6a3de..f47eb473a1 100644 --- a/api/managementpb/ia/channels.pb.gw.go +++ b/api/managementpb/ia/channels.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Channels_ListChannels_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListChannelsRequest @@ -45,7 +47,6 @@ func request_Channels_ListChannels_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListChannels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Channels_ListChannels_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Channels_ListChannels_0(ctx context.Context, marshaler runtim msg, err := server.ListChannels(ctx, &protoReq) return msg, metadata, err - } func request_Channels_AddChannel_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Channels_AddChannel_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.AddChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Channels_AddChannel_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Channels_AddChannel_0(ctx context.Context, marshaler runtime. msg, err := server.AddChannel(ctx, &protoReq) return msg, metadata, err - } func request_Channels_ChangeChannel_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Channels_ChangeChannel_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ChangeChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Channels_ChangeChannel_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Channels_ChangeChannel_0(ctx context.Context, marshaler runti msg, err := server.ChangeChannel(ctx, &protoReq) return msg, metadata, err - } func request_Channels_RemoveChannel_0(ctx context.Context, marshaler runtime.Marshaler, client ChannelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Channels_RemoveChannel_0(ctx context.Context, marshaler runtime.Mar msg, err := client.RemoveChannel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Channels_RemoveChannel_0(ctx context.Context, marshaler runtime.Marshaler, server ChannelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Channels_RemoveChannel_0(ctx context.Context, marshaler runti msg, err := server.RemoveChannel(ctx, &protoReq) return msg, metadata, err - } // RegisterChannelsHandlerServer registers the http handlers for service Channels to "mux". @@ -172,7 +166,6 @@ func local_request_Channels_RemoveChannel_0(ctx context.Context, marshaler runti // 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 RegisterChannelsHandlerFromEndpoint instead. func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChannelsServer) error { - mux.Handle("POST", pattern_Channels_ListChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -195,7 +188,6 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_ListChannels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Channels_AddChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -220,7 +212,6 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_AddChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Channels_ChangeChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -245,7 +236,6 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_ChangeChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Channels_RemoveChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -270,7 +260,6 @@ func RegisterChannelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Channels_RemoveChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -313,7 +302,6 @@ func RegisterChannelsHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ChannelsClient" to call the correct interceptors. func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChannelsClient) error { - mux.Handle("POST", pattern_Channels_ListChannels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -333,7 +321,6 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_ListChannels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Channels_AddChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -355,7 +342,6 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_AddChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Channels_ChangeChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -377,7 +363,6 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_ChangeChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Channels_RemoveChannel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -399,7 +384,6 @@ func RegisterChannelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Channels_RemoveChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/ia/channels.swagger.json b/api/managementpb/ia/channels.swagger.json deleted file mode 100644 index 845d5df45e..0000000000 --- a/api/managementpb/ia/channels.swagger.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/ia/channels.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Channels" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/ia/Channels/Add": { - "post": { - "summary": "AddChannel adds notification channel.", - "operationId": "AddChannel", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1AddChannelResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1AddChannelRequest" - } - } - ], - "tags": [ - "Channels" - ], - "deprecated": true - } - }, - "/v1/management/ia/Channels/Change": { - "post": { - "summary": "ChangeChannel changes notification channel.", - "operationId": "ChangeChannel", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ChangeChannelResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ChangeChannelRequest" - } - } - ], - "tags": [ - "Channels" - ], - "deprecated": true - } - }, - "/v1/management/ia/Channels/List": { - "post": { - "summary": "ListChannels returns a list of all notifation channels.", - "operationId": "ListChannels", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListChannelsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListChannelsRequest" - } - } - ], - "tags": [ - "Channels" - ], - "deprecated": true - } - }, - "/v1/management/ia/Channels/Remove": { - "post": { - "summary": "RemoveChannel removes notification channel.", - "operationId": "RemoveChannel", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1RemoveChannelResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1RemoveChannelRequest" - } - } - ], - "tags": [ - "Channels" - ], - "deprecated": true - } - } - }, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "managementPageParams": { - "type": "object", - "properties": { - "page_size": { - "type": "integer", - "format": "int32", - "description": "Maximum number of results per page." - }, - "index": { - "type": "integer", - "format": "int32", - "description": "Index of the requested page, starts from 0." - } - }, - "description": "PageParams represents page request parameters for pagination." - }, - "managementPageTotals": { - "type": "object", - "properties": { - "total_items": { - "type": "integer", - "format": "int32", - "description": "Total number of results." - }, - "total_pages": { - "type": "integer", - "format": "int32", - "description": "Total number of pages." - } - }, - "description": "PageTotals represents total values for pagination." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "v1beta1AddChannelRequest": { - "type": "object", - "properties": { - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "email_config": { - "$ref": "#/definitions/v1beta1EmailConfig", - "description": "Email configuration. Exactly one config should be set." - }, - "pagerduty_config": { - "$ref": "#/definitions/v1beta1PagerDutyConfig", - "description": "PagerDuty configuration. Exactly one config should be set." - }, - "slack_config": { - "$ref": "#/definitions/v1beta1SlackConfig", - "description": "Slack configuration. Exactly one config should be set." - }, - "webhook_config": { - "$ref": "#/definitions/v1beta1WebhookConfig", - "description": "Webhook configuration. Exactly one config should be set." - }, - "disabled": { - "type": "boolean", - "description": "New channel status." - } - } - }, - "v1beta1AddChannelResponse": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "description": "Machine-readable ID." - } - } - }, - "v1beta1BasicAuth": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "password_file": { - "type": "string" - } - }, - "description": "BasicAuth represents basic HTTP auth configuration." - }, - "v1beta1ChangeChannelRequest": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary. Empty value will not change it." - }, - "email_config": { - "$ref": "#/definitions/v1beta1EmailConfig", - "description": "Email configuration. Exactly one config should be set." - }, - "pagerduty_config": { - "$ref": "#/definitions/v1beta1PagerDutyConfig", - "description": "PagerDuty configuration. Exactly one config should be set." - }, - "slack_config": { - "$ref": "#/definitions/v1beta1SlackConfig", - "description": "Slack configuration. Exactly one config should be set." - }, - "webhook_config": { - "$ref": "#/definitions/v1beta1WebhookConfig", - "description": "Webhook configuration. Exactly one config should be set." - }, - "disabled": { - "type": "boolean", - "description": "Enables or disables that channel. Should be set." - } - } - }, - "v1beta1ChangeChannelResponse": { - "type": "object" - }, - "v1beta1Channel": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "email_config": { - "$ref": "#/definitions/v1beta1EmailConfig" - }, - "pagerduty_config": { - "$ref": "#/definitions/v1beta1PagerDutyConfig" - }, - "slack_config": { - "$ref": "#/definitions/v1beta1SlackConfig" - }, - "webhook_config": { - "$ref": "#/definitions/v1beta1WebhookConfig" - }, - "disabled": { - "type": "boolean", - "description": "True if that channel is disabled." - } - }, - "description": "Channel represents a single Notification Channel." - }, - "v1beta1EmailConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "to": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "EmailConfig represents email configuration." - }, - "v1beta1HTTPConfig": { - "type": "object", - "properties": { - "basic_auth": { - "$ref": "#/definitions/v1beta1BasicAuth", - "description": "Basic HTTP auth configuration. Zero value will remove it." - }, - "bearer_token": { - "type": "string" - }, - "bearer_token_file": { - "type": "string" - }, - "tls_config": { - "$ref": "#/definitions/v1beta1TLSConfig", - "description": "TLS configuration. Zero value will remove it." - }, - "proxy_url": { - "type": "string" - } - }, - "description": "HTTPConfig represents HTTP client configuration." - }, - "v1beta1ListChannelsRequest": { - "type": "object", - "properties": { - "page_params": { - "$ref": "#/definitions/managementPageParams", - "description": "Page request." - } - } - }, - "v1beta1ListChannelsResponse": { - "type": "object", - "properties": { - "channels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Channel" - } - }, - "totals": { - "$ref": "#/definitions/managementPageTotals", - "description": "Total items and pages." - } - } - }, - "v1beta1PagerDutyConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "routing_key": { - "type": "string", - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set." - }, - "service_key": { - "type": "string", - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set." - } - }, - "description": "PagerDutyConfig represents PagerDuty configuration." - }, - "v1beta1RemoveChannelRequest": { - "type": "object", - "properties": { - "channel_id": { - "type": "string" - } - } - }, - "v1beta1RemoveChannelResponse": { - "type": "object" - }, - "v1beta1SlackConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "channel": { - "type": "string" - } - }, - "description": "SlackConfig represents Slack configuration." - }, - "v1beta1TLSConfig": { - "type": "object", - "properties": { - "ca_file": { - "type": "string", - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." - }, - "cert_file": { - "type": "string", - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." - }, - "key_file": { - "type": "string", - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." - }, - "server_name": { - "type": "string", - "description": "Name of the server." - }, - "insecure_skip_verify": { - "type": "boolean", - "description": "Disable validation of the server certificate." - }, - "ca_file_content": { - "type": "string", - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." - }, - "cert_file_content": { - "type": "string", - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." - }, - "key_file_content": { - "type": "string", - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." - } - }, - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config" - }, - "v1beta1WebhookConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/v1beta1HTTPConfig" - }, - "max_alerts": { - "type": "integer", - "format": "int32" - } - }, - "description": "WebhookConfig represents webhook configuration." - } - } -} diff --git a/api/managementpb/ia/channels_grpc.pb.go b/api/managementpb/ia/channels_grpc.pb.go index aac562030f..48806962f5 100644 --- a/api/managementpb/ia/channels_grpc.pb.go +++ b/api/managementpb/ia/channels_grpc.pb.go @@ -8,6 +8,7 @@ package iav1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -111,18 +112,20 @@ type ChannelsServer interface { } // UnimplementedChannelsServer must be embedded to have forward compatible implementations. -type UnimplementedChannelsServer struct { -} +type UnimplementedChannelsServer struct{} func (UnimplementedChannelsServer) ListChannels(context.Context, *ListChannelsRequest) (*ListChannelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListChannels not implemented") } + func (UnimplementedChannelsServer) AddChannel(context.Context, *AddChannelRequest) (*AddChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddChannel not implemented") } + func (UnimplementedChannelsServer) ChangeChannel(context.Context, *ChangeChannelRequest) (*ChangeChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeChannel not implemented") } + func (UnimplementedChannelsServer) RemoveChannel(context.Context, *RemoveChannelRequest) (*RemoveChannelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveChannel not implemented") } diff --git a/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go b/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go index aa37053416..b2937ec92e 100644 --- a/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go +++ b/api/managementpb/ia/json/client/alerts/list_alerts_parameters.go @@ -60,7 +60,6 @@ ListAlertsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAlertsParams struct { - // Body. Body ListAlertsBody @@ -130,7 +129,6 @@ func (o *ListAlertsParams) SetBody(body ListAlertsBody) { // WriteToRequest writes these params to a swagger request func (o *ListAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/alerts/list_alerts_responses.go b/api/managementpb/ia/json/client/alerts/list_alerts_responses.go index a7f186de3f..e1728b1587 100644 --- a/api/managementpb/ia/json/client/alerts/list_alerts_responses.go +++ b/api/managementpb/ia/json/client/alerts/list_alerts_responses.go @@ -62,12 +62,12 @@ type ListAlertsOK struct { func (o *ListAlertsOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/List][%d] listAlertsOk %+v", 200, o.Payload) } + func (o *ListAlertsOK) GetPayload() *ListAlertsOKBody { return o.Payload } func (o *ListAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAlertsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAlertsDefault) Code() int { func (o *ListAlertsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/List][%d] ListAlerts default %+v", o._statusCode, o.Payload) } + func (o *ListAlertsDefault) GetPayload() *ListAlertsDefaultBody { return o.Payload } func (o *ListAlertsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAlertsDefaultBody) // response payload @@ -125,7 +125,6 @@ ListAlertsBody list alerts body swagger:model ListAlertsBody */ type ListAlertsBody struct { - // page params PageParams *ListAlertsParamsBodyPageParams `json:"page_params,omitempty"` } @@ -178,7 +177,6 @@ func (o *ListAlertsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *ListAlertsBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { - if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -216,7 +214,6 @@ ListAlertsDefaultBody list alerts default body swagger:model ListAlertsDefaultBody */ type ListAlertsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -282,9 +279,7 @@ func (o *ListAlertsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAlertsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -295,7 +290,6 @@ func (o *ListAlertsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -324,7 +318,6 @@ ListAlertsDefaultBodyDetailsItems0 list alerts default body details items0 swagger:model ListAlertsDefaultBodyDetailsItems0 */ type ListAlertsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -362,7 +355,6 @@ ListAlertsOKBody list alerts OK body swagger:model ListAlertsOKBody */ type ListAlertsOKBody struct { - // alerts Alerts []*ListAlertsOKBodyAlertsItems0 `json:"alerts"` @@ -452,9 +444,7 @@ func (o *ListAlertsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAlertsOKBody) contextValidateAlerts(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Alerts); i++ { - if o.Alerts[i] != nil { if err := o.Alerts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -465,14 +455,12 @@ func (o *ListAlertsOKBody) contextValidateAlerts(ctx context.Context, formats st return err } } - } return nil } func (o *ListAlertsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { - if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -510,7 +498,6 @@ ListAlertsOKBodyAlertsItems0 Alert represents Alert. swagger:model ListAlertsOKBodyAlertsItems0 */ type ListAlertsOKBodyAlertsItems0 struct { - // ID. AlertID string `json:"alert_id,omitempty"` @@ -747,7 +734,6 @@ func (o *ListAlertsOKBodyAlertsItems0) ContextValidate(ctx context.Context, form } func (o *ListAlertsOKBodyAlertsItems0) contextValidateRule(ctx context.Context, formats strfmt.Registry) error { - if o.Rule != nil { if err := o.Rule.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -785,7 +771,6 @@ ListAlertsOKBodyAlertsItems0Rule Rule represents Alert Rule. swagger:model ListAlertsOKBodyAlertsItems0Rule */ type ListAlertsOKBodyAlertsItems0Rule struct { - // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -1154,9 +1139,7 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) ContextValidate(ctx context.Context, } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsDefinitions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ParamsDefinitions); i++ { - if o.ParamsDefinitions[i] != nil { if err := o.ParamsDefinitions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1167,16 +1150,13 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsDefinitions(ctx return err } } - } return nil } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsValues(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ParamsValues); i++ { - if o.ParamsValues[i] != nil { if err := o.ParamsValues[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1187,16 +1167,13 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateParamsValues(ctx conte return err } } - } return nil } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Filters); i++ { - if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1207,16 +1184,13 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateFilters(ctx context.Co return err } } - } return nil } func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Channels); i++ { - if o.Channels[i] != nil { if err := o.Channels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1227,7 +1201,6 @@ func (o *ListAlertsOKBodyAlertsItems0Rule) contextValidateChannels(ctx context.C return err } } - } return nil @@ -1256,7 +1229,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0 Channel represents a single Notif swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0 */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0 struct { - // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -1408,7 +1380,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) ContextValidate(ctx con } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { - if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1424,7 +1395,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateEmailCon } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { - if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1440,7 +1410,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidatePagerdut } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { - if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1456,7 +1425,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateSlackCon } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { - if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1494,7 +1462,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0EmailConfig EmailConfig represents swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0EmailConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0EmailConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1535,7 +1502,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0PagerdutyConfig PagerDutyConfig re swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0PagerdutyConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0PagerdutyConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1579,7 +1545,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0SlackConfig SlackConfig represents swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0SlackConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0SlackConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1620,7 +1585,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig WebhookConfig repres swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1682,7 +1646,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig) ContextVal } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { - if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1720,7 +1683,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig HTTPConfig swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig struct { - // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -1812,7 +1774,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1828,7 +1789,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) } func (o *ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { - if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1866,7 +1826,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigBasicAuth B swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigBasicAuth */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigBasicAuth struct { - // username Username string `json:"username,omitempty"` @@ -1911,7 +1870,6 @@ ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigTLSConfig T swagger:model ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigTLSConfig */ type ListAlertsOKBodyAlertsItems0RuleChannelsItems0WebhookConfigHTTPConfigTLSConfig struct { - // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` @@ -1976,7 +1934,6 @@ ListAlertsOKBodyAlertsItems0RuleFiltersItems0 Filter repsents a single filter co swagger:model ListAlertsOKBodyAlertsItems0RuleFiltersItems0 */ type ListAlertsOKBodyAlertsItems0RuleFiltersItems0 struct { - // FilterType represents filter matching type. // // - EQUAL: = @@ -2084,7 +2041,6 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0 ParamDefinition represen swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0 */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2316,7 +2272,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) ContextValidat } func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { - if o.Bool != nil { if err := o.Bool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2332,7 +2287,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidat } func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { - if o.Float != nil { if err := o.Float.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2348,7 +2302,6 @@ func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidat } func (o *ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { - if o.String != nil { if err := o.String.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2386,7 +2339,6 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Bool BoolParamDefinition swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Bool */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Bool struct { - // BooleanFlag represent a command to set some boolean property to true, // to false, or avoid changing that property. // @@ -2484,7 +2436,6 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Float FloatParamDefinitio swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Float */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0Float struct { - // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2537,7 +2488,6 @@ ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0String StringParamDefinit swagger:model ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0String */ type ListAlertsOKBodyAlertsItems0RuleParamsDefinitionsItems0String struct { - // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2578,7 +2528,6 @@ ListAlertsOKBodyAlertsItems0RuleParamsValuesItems0 ParamValue represents a singl swagger:model ListAlertsOKBodyAlertsItems0RuleParamsValuesItems0 */ type ListAlertsOKBodyAlertsItems0RuleParamsValuesItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2686,7 +2635,6 @@ ListAlertsOKBodyTotals PageTotals represents total values for pagination. swagger:model ListAlertsOKBodyTotals */ type ListAlertsOKBodyTotals struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -2727,7 +2675,6 @@ ListAlertsParamsBodyPageParams PageParams represents page request parameters for swagger:model ListAlertsParamsBodyPageParams */ type ListAlertsParamsBodyPageParams struct { - // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go b/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go index 994425b487..91f845542b 100644 --- a/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go +++ b/api/managementpb/ia/json/client/alerts/toggle_alerts_parameters.go @@ -60,7 +60,6 @@ ToggleAlertsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ToggleAlertsParams struct { - // Body. Body ToggleAlertsBody @@ -130,7 +129,6 @@ func (o *ToggleAlertsParams) SetBody(body ToggleAlertsBody) { // WriteToRequest writes these params to a swagger request func (o *ToggleAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go b/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go index d2dcb850d7..bba76b097d 100644 --- a/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go +++ b/api/managementpb/ia/json/client/alerts/toggle_alerts_responses.go @@ -62,12 +62,12 @@ type ToggleAlertsOK struct { func (o *ToggleAlertsOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/Toggle][%d] toggleAlertsOk %+v", 200, o.Payload) } + func (o *ToggleAlertsOK) GetPayload() interface{} { return o.Payload } func (o *ToggleAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *ToggleAlertsDefault) Code() int { func (o *ToggleAlertsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Alerts/Toggle][%d] ToggleAlerts default %+v", o._statusCode, o.Payload) } + func (o *ToggleAlertsDefault) GetPayload() *ToggleAlertsDefaultBody { return o.Payload } func (o *ToggleAlertsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ToggleAlertsDefaultBody) // response payload @@ -123,7 +123,6 @@ ToggleAlertsBody toggle alerts body swagger:model ToggleAlertsBody */ type ToggleAlertsBody struct { - // List of alerts that silence state should be switched. If provided array is empty than all // existing alerts are switched. AlertIds []string `json:"alert_ids"` @@ -225,7 +224,6 @@ ToggleAlertsDefaultBody toggle alerts default body swagger:model ToggleAlertsDefaultBody */ type ToggleAlertsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -291,9 +289,7 @@ func (o *ToggleAlertsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ToggleAlertsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -304,7 +300,6 @@ func (o *ToggleAlertsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -333,7 +328,6 @@ ToggleAlertsDefaultBodyDetailsItems0 toggle alerts default body details items0 swagger:model ToggleAlertsDefaultBodyDetailsItems0 */ type ToggleAlertsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/channels/add_channel_parameters.go b/api/managementpb/ia/json/client/channels/add_channel_parameters.go index e44b4a0b07..dda611d4a5 100644 --- a/api/managementpb/ia/json/client/channels/add_channel_parameters.go +++ b/api/managementpb/ia/json/client/channels/add_channel_parameters.go @@ -60,7 +60,6 @@ AddChannelParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddChannelParams struct { - // Body. Body AddChannelBody @@ -130,7 +129,6 @@ func (o *AddChannelParams) SetBody(body AddChannelBody) { // WriteToRequest writes these params to a swagger request func (o *AddChannelParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/add_channel_responses.go b/api/managementpb/ia/json/client/channels/add_channel_responses.go index 2ccd14ea0f..96a7a1f087 100644 --- a/api/managementpb/ia/json/client/channels/add_channel_responses.go +++ b/api/managementpb/ia/json/client/channels/add_channel_responses.go @@ -60,12 +60,12 @@ type AddChannelOK struct { func (o *AddChannelOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Add][%d] addChannelOk %+v", 200, o.Payload) } + func (o *AddChannelOK) GetPayload() *AddChannelOKBody { return o.Payload } func (o *AddChannelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddChannelOKBody) // response payload @@ -102,12 +102,12 @@ func (o *AddChannelDefault) Code() int { func (o *AddChannelDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Add][%d] AddChannel default %+v", o._statusCode, o.Payload) } + func (o *AddChannelDefault) GetPayload() *AddChannelDefaultBody { return o.Payload } func (o *AddChannelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddChannelDefaultBody) // response payload @@ -123,7 +123,6 @@ AddChannelBody add channel body swagger:model AddChannelBody */ type AddChannelBody struct { - // Short human-readable summary. Summary string `json:"summary,omitempty"` @@ -272,7 +271,6 @@ func (o *AddChannelBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddChannelBody) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { - if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -288,7 +286,6 @@ func (o *AddChannelBody) contextValidateEmailConfig(ctx context.Context, formats } func (o *AddChannelBody) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { - if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -304,7 +301,6 @@ func (o *AddChannelBody) contextValidatePagerdutyConfig(ctx context.Context, for } func (o *AddChannelBody) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { - if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -320,7 +316,6 @@ func (o *AddChannelBody) contextValidateSlackConfig(ctx context.Context, formats } func (o *AddChannelBody) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { - if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -358,7 +353,6 @@ AddChannelDefaultBody add channel default body swagger:model AddChannelDefaultBody */ type AddChannelDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -424,9 +418,7 @@ func (o *AddChannelDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddChannelDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -437,7 +429,6 @@ func (o *AddChannelDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -466,7 +457,6 @@ AddChannelDefaultBodyDetailsItems0 add channel default body details items0 swagger:model AddChannelDefaultBodyDetailsItems0 */ type AddChannelDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -504,7 +494,6 @@ AddChannelOKBody add channel OK body swagger:model AddChannelOKBody */ type AddChannelOKBody struct { - // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` } @@ -542,7 +531,6 @@ AddChannelParamsBodyEmailConfig EmailConfig represents email configuration. swagger:model AddChannelParamsBodyEmailConfig */ type AddChannelParamsBodyEmailConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -583,7 +571,6 @@ AddChannelParamsBodyPagerdutyConfig PagerDutyConfig represents PagerDuty configu swagger:model AddChannelParamsBodyPagerdutyConfig */ type AddChannelParamsBodyPagerdutyConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -627,7 +614,6 @@ AddChannelParamsBodySlackConfig SlackConfig represents Slack configuration. swagger:model AddChannelParamsBodySlackConfig */ type AddChannelParamsBodySlackConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -668,7 +654,6 @@ AddChannelParamsBodyWebhookConfig WebhookConfig represents webhook configuration swagger:model AddChannelParamsBodyWebhookConfig */ type AddChannelParamsBodyWebhookConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -730,7 +715,6 @@ func (o *AddChannelParamsBodyWebhookConfig) ContextValidate(ctx context.Context, } func (o *AddChannelParamsBodyWebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { - if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -768,7 +752,6 @@ AddChannelParamsBodyWebhookConfigHTTPConfig HTTPConfig represents HTTP client co swagger:model AddChannelParamsBodyWebhookConfigHTTPConfig */ type AddChannelParamsBodyWebhookConfigHTTPConfig struct { - // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -860,7 +843,6 @@ func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) ContextValidate(ctx contex } func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -876,7 +858,6 @@ func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAuth(c } func (o *AddChannelParamsBodyWebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { - if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -914,7 +895,6 @@ AddChannelParamsBodyWebhookConfigHTTPConfigBasicAuth BasicAuth represents basic swagger:model AddChannelParamsBodyWebhookConfigHTTPConfigBasicAuth */ type AddChannelParamsBodyWebhookConfigHTTPConfigBasicAuth struct { - // username Username string `json:"username,omitempty"` @@ -959,7 +939,6 @@ AddChannelParamsBodyWebhookConfigHTTPConfigTLSConfig TLSConfig represents TLS co swagger:model AddChannelParamsBodyWebhookConfigHTTPConfigTLSConfig */ type AddChannelParamsBodyWebhookConfigHTTPConfigTLSConfig struct { - // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` diff --git a/api/managementpb/ia/json/client/channels/change_channel_parameters.go b/api/managementpb/ia/json/client/channels/change_channel_parameters.go index a6c229806e..569379c6b6 100644 --- a/api/managementpb/ia/json/client/channels/change_channel_parameters.go +++ b/api/managementpb/ia/json/client/channels/change_channel_parameters.go @@ -60,7 +60,6 @@ ChangeChannelParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeChannelParams struct { - // Body. Body ChangeChannelBody @@ -130,7 +129,6 @@ func (o *ChangeChannelParams) SetBody(body ChangeChannelBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeChannelParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/change_channel_responses.go b/api/managementpb/ia/json/client/channels/change_channel_responses.go index 653b6672be..d4fb8eea19 100644 --- a/api/managementpb/ia/json/client/channels/change_channel_responses.go +++ b/api/managementpb/ia/json/client/channels/change_channel_responses.go @@ -60,12 +60,12 @@ type ChangeChannelOK struct { func (o *ChangeChannelOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Change][%d] changeChannelOk %+v", 200, o.Payload) } + func (o *ChangeChannelOK) GetPayload() interface{} { return o.Payload } func (o *ChangeChannelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ChangeChannelDefault) Code() int { func (o *ChangeChannelDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Change][%d] ChangeChannel default %+v", o._statusCode, o.Payload) } + func (o *ChangeChannelDefault) GetPayload() *ChangeChannelDefaultBody { return o.Payload } func (o *ChangeChannelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeChannelDefaultBody) // response payload @@ -121,7 +121,6 @@ ChangeChannelBody change channel body swagger:model ChangeChannelBody */ type ChangeChannelBody struct { - // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -273,7 +272,6 @@ func (o *ChangeChannelBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeChannelBody) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { - if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -289,7 +287,6 @@ func (o *ChangeChannelBody) contextValidateEmailConfig(ctx context.Context, form } func (o *ChangeChannelBody) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { - if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -305,7 +302,6 @@ func (o *ChangeChannelBody) contextValidatePagerdutyConfig(ctx context.Context, } func (o *ChangeChannelBody) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { - if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -321,7 +317,6 @@ func (o *ChangeChannelBody) contextValidateSlackConfig(ctx context.Context, form } func (o *ChangeChannelBody) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { - if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -359,7 +354,6 @@ ChangeChannelDefaultBody change channel default body swagger:model ChangeChannelDefaultBody */ type ChangeChannelDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -425,9 +419,7 @@ func (o *ChangeChannelDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeChannelDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -438,7 +430,6 @@ func (o *ChangeChannelDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -467,7 +458,6 @@ ChangeChannelDefaultBodyDetailsItems0 change channel default body details items0 swagger:model ChangeChannelDefaultBodyDetailsItems0 */ type ChangeChannelDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -505,7 +495,6 @@ ChangeChannelParamsBodyEmailConfig EmailConfig represents email configuration. swagger:model ChangeChannelParamsBodyEmailConfig */ type ChangeChannelParamsBodyEmailConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -546,7 +535,6 @@ ChangeChannelParamsBodyPagerdutyConfig PagerDutyConfig represents PagerDuty conf swagger:model ChangeChannelParamsBodyPagerdutyConfig */ type ChangeChannelParamsBodyPagerdutyConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -590,7 +578,6 @@ ChangeChannelParamsBodySlackConfig SlackConfig represents Slack configuration. swagger:model ChangeChannelParamsBodySlackConfig */ type ChangeChannelParamsBodySlackConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -631,7 +618,6 @@ ChangeChannelParamsBodyWebhookConfig WebhookConfig represents webhook configurat swagger:model ChangeChannelParamsBodyWebhookConfig */ type ChangeChannelParamsBodyWebhookConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -693,7 +679,6 @@ func (o *ChangeChannelParamsBodyWebhookConfig) ContextValidate(ctx context.Conte } func (o *ChangeChannelParamsBodyWebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { - if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -731,7 +716,6 @@ ChangeChannelParamsBodyWebhookConfigHTTPConfig HTTPConfig represents HTTP client swagger:model ChangeChannelParamsBodyWebhookConfigHTTPConfig */ type ChangeChannelParamsBodyWebhookConfigHTTPConfig struct { - // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -823,7 +807,6 @@ func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) ContextValidate(ctx con } func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -839,7 +822,6 @@ func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) contextValidateBasicAut } func (o *ChangeChannelParamsBodyWebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { - if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -877,7 +859,6 @@ ChangeChannelParamsBodyWebhookConfigHTTPConfigBasicAuth BasicAuth represents bas swagger:model ChangeChannelParamsBodyWebhookConfigHTTPConfigBasicAuth */ type ChangeChannelParamsBodyWebhookConfigHTTPConfigBasicAuth struct { - // username Username string `json:"username,omitempty"` @@ -922,7 +903,6 @@ ChangeChannelParamsBodyWebhookConfigHTTPConfigTLSConfig TLSConfig represents TLS swagger:model ChangeChannelParamsBodyWebhookConfigHTTPConfigTLSConfig */ type ChangeChannelParamsBodyWebhookConfigHTTPConfigTLSConfig struct { - // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` diff --git a/api/managementpb/ia/json/client/channels/list_channels_parameters.go b/api/managementpb/ia/json/client/channels/list_channels_parameters.go index 9e2504e37f..4f6948c977 100644 --- a/api/managementpb/ia/json/client/channels/list_channels_parameters.go +++ b/api/managementpb/ia/json/client/channels/list_channels_parameters.go @@ -60,7 +60,6 @@ ListChannelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListChannelsParams struct { - // Body. Body ListChannelsBody @@ -130,7 +129,6 @@ func (o *ListChannelsParams) SetBody(body ListChannelsBody) { // WriteToRequest writes these params to a swagger request func (o *ListChannelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/list_channels_responses.go b/api/managementpb/ia/json/client/channels/list_channels_responses.go index 85df129ef9..ec672a76db 100644 --- a/api/managementpb/ia/json/client/channels/list_channels_responses.go +++ b/api/managementpb/ia/json/client/channels/list_channels_responses.go @@ -60,12 +60,12 @@ type ListChannelsOK struct { func (o *ListChannelsOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/List][%d] listChannelsOk %+v", 200, o.Payload) } + func (o *ListChannelsOK) GetPayload() *ListChannelsOKBody { return o.Payload } func (o *ListChannelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListChannelsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListChannelsDefault) Code() int { func (o *ListChannelsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/List][%d] ListChannels default %+v", o._statusCode, o.Payload) } + func (o *ListChannelsDefault) GetPayload() *ListChannelsDefaultBody { return o.Payload } func (o *ListChannelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListChannelsDefaultBody) // response payload @@ -123,7 +123,6 @@ ListChannelsBody list channels body swagger:model ListChannelsBody */ type ListChannelsBody struct { - // page params PageParams *ListChannelsParamsBodyPageParams `json:"page_params,omitempty"` } @@ -176,7 +175,6 @@ func (o *ListChannelsBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListChannelsBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { - if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -214,7 +212,6 @@ ListChannelsDefaultBody list channels default body swagger:model ListChannelsDefaultBody */ type ListChannelsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -280,9 +277,7 @@ func (o *ListChannelsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListChannelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -293,7 +288,6 @@ func (o *ListChannelsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -322,7 +316,6 @@ ListChannelsDefaultBodyDetailsItems0 list channels default body details items0 swagger:model ListChannelsDefaultBodyDetailsItems0 */ type ListChannelsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -360,7 +353,6 @@ ListChannelsOKBody list channels OK body swagger:model ListChannelsOKBody */ type ListChannelsOKBody struct { - // channels Channels []*ListChannelsOKBodyChannelsItems0 `json:"channels"` @@ -450,9 +442,7 @@ func (o *ListChannelsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListChannelsOKBody) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Channels); i++ { - if o.Channels[i] != nil { if err := o.Channels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -463,14 +453,12 @@ func (o *ListChannelsOKBody) contextValidateChannels(ctx context.Context, format return err } } - } return nil } func (o *ListChannelsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { - if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -508,7 +496,6 @@ ListChannelsOKBodyChannelsItems0 Channel represents a single Notification Channe swagger:model ListChannelsOKBodyChannelsItems0 */ type ListChannelsOKBodyChannelsItems0 struct { - // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -660,7 +647,6 @@ func (o *ListChannelsOKBodyChannelsItems0) ContextValidate(ctx context.Context, } func (o *ListChannelsOKBodyChannelsItems0) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { - if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -676,7 +662,6 @@ func (o *ListChannelsOKBodyChannelsItems0) contextValidateEmailConfig(ctx contex } func (o *ListChannelsOKBodyChannelsItems0) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { - if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -692,7 +677,6 @@ func (o *ListChannelsOKBodyChannelsItems0) contextValidatePagerdutyConfig(ctx co } func (o *ListChannelsOKBodyChannelsItems0) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { - if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -708,7 +692,6 @@ func (o *ListChannelsOKBodyChannelsItems0) contextValidateSlackConfig(ctx contex } func (o *ListChannelsOKBodyChannelsItems0) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { - if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -746,7 +729,6 @@ ListChannelsOKBodyChannelsItems0EmailConfig EmailConfig represents email configu swagger:model ListChannelsOKBodyChannelsItems0EmailConfig */ type ListChannelsOKBodyChannelsItems0EmailConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -787,7 +769,6 @@ ListChannelsOKBodyChannelsItems0PagerdutyConfig PagerDutyConfig represents Pager swagger:model ListChannelsOKBodyChannelsItems0PagerdutyConfig */ type ListChannelsOKBodyChannelsItems0PagerdutyConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -831,7 +812,6 @@ ListChannelsOKBodyChannelsItems0SlackConfig SlackConfig represents Slack configu swagger:model ListChannelsOKBodyChannelsItems0SlackConfig */ type ListChannelsOKBodyChannelsItems0SlackConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -872,7 +852,6 @@ ListChannelsOKBodyChannelsItems0WebhookConfig WebhookConfig represents webhook c swagger:model ListChannelsOKBodyChannelsItems0WebhookConfig */ type ListChannelsOKBodyChannelsItems0WebhookConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -934,7 +913,6 @@ func (o *ListChannelsOKBodyChannelsItems0WebhookConfig) ContextValidate(ctx cont } func (o *ListChannelsOKBodyChannelsItems0WebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { - if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -972,7 +950,6 @@ ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig HTTPConfig represents HT swagger:model ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig */ type ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig struct { - // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -1064,7 +1041,6 @@ func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) ContextValidat } func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1080,7 +1056,6 @@ func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) contextValidat } func (o *ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { - if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1118,7 +1093,6 @@ ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigBasicAuth BasicAuth repre swagger:model ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigBasicAuth */ type ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigBasicAuth struct { - // username Username string `json:"username,omitempty"` @@ -1163,7 +1137,6 @@ ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigTLSConfig TLSConfig repre swagger:model ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigTLSConfig */ type ListChannelsOKBodyChannelsItems0WebhookConfigHTTPConfigTLSConfig struct { - // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` @@ -1228,7 +1201,6 @@ ListChannelsOKBodyTotals PageTotals represents total values for pagination. swagger:model ListChannelsOKBodyTotals */ type ListChannelsOKBodyTotals struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -1269,7 +1241,6 @@ ListChannelsParamsBodyPageParams PageParams represents page request parameters f swagger:model ListChannelsParamsBodyPageParams */ type ListChannelsParamsBodyPageParams struct { - // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/ia/json/client/channels/remove_channel_parameters.go b/api/managementpb/ia/json/client/channels/remove_channel_parameters.go index 60f0132346..bc094beef7 100644 --- a/api/managementpb/ia/json/client/channels/remove_channel_parameters.go +++ b/api/managementpb/ia/json/client/channels/remove_channel_parameters.go @@ -60,7 +60,6 @@ RemoveChannelParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveChannelParams struct { - // Body. Body RemoveChannelBody @@ -130,7 +129,6 @@ func (o *RemoveChannelParams) SetBody(body RemoveChannelBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveChannelParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/channels/remove_channel_responses.go b/api/managementpb/ia/json/client/channels/remove_channel_responses.go index 6f80dc95d9..eb6aa49b30 100644 --- a/api/managementpb/ia/json/client/channels/remove_channel_responses.go +++ b/api/managementpb/ia/json/client/channels/remove_channel_responses.go @@ -60,12 +60,12 @@ type RemoveChannelOK struct { func (o *RemoveChannelOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Remove][%d] removeChannelOk %+v", 200, o.Payload) } + func (o *RemoveChannelOK) GetPayload() interface{} { return o.Payload } func (o *RemoveChannelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *RemoveChannelDefault) Code() int { func (o *RemoveChannelDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Channels/Remove][%d] RemoveChannel default %+v", o._statusCode, o.Payload) } + func (o *RemoveChannelDefault) GetPayload() *RemoveChannelDefaultBody { return o.Payload } func (o *RemoveChannelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveChannelDefaultBody) // response payload @@ -121,7 +121,6 @@ RemoveChannelBody remove channel body swagger:model RemoveChannelBody */ type RemoveChannelBody struct { - // channel id ChannelID string `json:"channel_id,omitempty"` } @@ -159,7 +158,6 @@ RemoveChannelDefaultBody remove channel default body swagger:model RemoveChannelDefaultBody */ type RemoveChannelDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *RemoveChannelDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveChannelDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *RemoveChannelDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -267,7 +262,6 @@ RemoveChannelDefaultBodyDetailsItems0 remove channel default body details items0 swagger:model RemoveChannelDefaultBodyDetailsItems0 */ type RemoveChannelDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go index 1178c51528..c361a3c197 100644 --- a/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/create_alert_rule_parameters.go @@ -60,7 +60,6 @@ CreateAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateAlertRuleParams struct { - // Body. Body CreateAlertRuleBody @@ -130,7 +129,6 @@ func (o *CreateAlertRuleParams) SetBody(body CreateAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go index 6ad8aadd2b..d7102f2eb4 100644 --- a/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/create_alert_rule_responses.go @@ -62,12 +62,12 @@ type CreateAlertRuleOK struct { func (o *CreateAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Create][%d] createAlertRuleOk %+v", 200, o.Payload) } + func (o *CreateAlertRuleOK) GetPayload() *CreateAlertRuleOKBody { return o.Payload } func (o *CreateAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateAlertRuleOKBody) // response payload @@ -104,12 +104,12 @@ func (o *CreateAlertRuleDefault) Code() int { func (o *CreateAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Create][%d] CreateAlertRule default %+v", o._statusCode, o.Payload) } + func (o *CreateAlertRuleDefault) GetPayload() *CreateAlertRuleDefaultBody { return o.Payload } func (o *CreateAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateAlertRuleDefaultBody) // response payload @@ -125,7 +125,6 @@ CreateAlertRuleBody create alert rule body swagger:model CreateAlertRuleBody */ type CreateAlertRuleBody struct { - // Template name. Can't be specified simultaneously with source_rule_id. TemplateName string `json:"template_name,omitempty"` @@ -314,9 +313,7 @@ func (o *CreateAlertRuleBody) ContextValidate(ctx context.Context, formats strfm } func (o *CreateAlertRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -327,16 +324,13 @@ func (o *CreateAlertRuleBody) contextValidateParams(ctx context.Context, formats return err } } - } return nil } func (o *CreateAlertRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Filters); i++ { - if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -347,7 +341,6 @@ func (o *CreateAlertRuleBody) contextValidateFilters(ctx context.Context, format return err } } - } return nil @@ -376,7 +369,6 @@ CreateAlertRuleDefaultBody create alert rule default body swagger:model CreateAlertRuleDefaultBody */ type CreateAlertRuleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -442,9 +434,7 @@ func (o *CreateAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *CreateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -455,7 +445,6 @@ func (o *CreateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -484,7 +473,6 @@ CreateAlertRuleDefaultBodyDetailsItems0 create alert rule default body details i swagger:model CreateAlertRuleDefaultBodyDetailsItems0 */ type CreateAlertRuleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -522,7 +510,6 @@ CreateAlertRuleOKBody create alert rule OK body swagger:model CreateAlertRuleOKBody */ type CreateAlertRuleOKBody struct { - // Rule ID. RuleID string `json:"rule_id,omitempty"` } @@ -560,7 +547,6 @@ CreateAlertRuleParamsBodyFiltersItems0 Filter repsents a single filter condition swagger:model CreateAlertRuleParamsBodyFiltersItems0 */ type CreateAlertRuleParamsBodyFiltersItems0 struct { - // FilterType represents filter matching type. // // - EQUAL: = @@ -668,7 +654,6 @@ CreateAlertRuleParamsBodyParamsItems0 ParamValue represents a single rule parame swagger:model CreateAlertRuleParamsBodyParamsItems0 */ type CreateAlertRuleParamsBodyParamsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go index 9b740d644e..7b24bccb74 100644 --- a/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/delete_alert_rule_parameters.go @@ -60,7 +60,6 @@ DeleteAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteAlertRuleParams struct { - // Body. Body DeleteAlertRuleBody @@ -130,7 +129,6 @@ func (o *DeleteAlertRuleParams) SetBody(body DeleteAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go index fb62fa0197..accdebbdc8 100644 --- a/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/delete_alert_rule_responses.go @@ -60,12 +60,12 @@ type DeleteAlertRuleOK struct { func (o *DeleteAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Delete][%d] deleteAlertRuleOk %+v", 200, o.Payload) } + func (o *DeleteAlertRuleOK) GetPayload() interface{} { return o.Payload } func (o *DeleteAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteAlertRuleDefault) Code() int { func (o *DeleteAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Delete][%d] DeleteAlertRule default %+v", o._statusCode, o.Payload) } + func (o *DeleteAlertRuleDefault) GetPayload() *DeleteAlertRuleDefaultBody { return o.Payload } func (o *DeleteAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteAlertRuleDefaultBody) // response payload @@ -121,7 +121,6 @@ DeleteAlertRuleBody delete alert rule body swagger:model DeleteAlertRuleBody */ type DeleteAlertRuleBody struct { - // Rule ID. RuleID string `json:"rule_id,omitempty"` } @@ -159,7 +158,6 @@ DeleteAlertRuleDefaultBody delete alert rule default body swagger:model DeleteAlertRuleDefaultBody */ type DeleteAlertRuleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *DeleteAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *DeleteAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *DeleteAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -267,7 +262,6 @@ DeleteAlertRuleDefaultBodyDetailsItems0 delete alert rule default body details i swagger:model DeleteAlertRuleDefaultBodyDetailsItems0 */ type DeleteAlertRuleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go b/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go index b13ca0ae7b..324b22bb8c 100644 --- a/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go +++ b/api/managementpb/ia/json/client/rules/list_alert_rules_parameters.go @@ -60,7 +60,6 @@ ListAlertRulesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAlertRulesParams struct { - // Body. Body ListAlertRulesBody @@ -130,7 +129,6 @@ func (o *ListAlertRulesParams) SetBody(body ListAlertRulesBody) { // WriteToRequest writes these params to a swagger request func (o *ListAlertRulesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go b/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go index 9361df179d..2231679875 100644 --- a/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go +++ b/api/managementpb/ia/json/client/rules/list_alert_rules_responses.go @@ -62,12 +62,12 @@ type ListAlertRulesOK struct { func (o *ListAlertRulesOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/List][%d] listAlertRulesOk %+v", 200, o.Payload) } + func (o *ListAlertRulesOK) GetPayload() *ListAlertRulesOKBody { return o.Payload } func (o *ListAlertRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAlertRulesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAlertRulesDefault) Code() int { func (o *ListAlertRulesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/List][%d] ListAlertRules default %+v", o._statusCode, o.Payload) } + func (o *ListAlertRulesDefault) GetPayload() *ListAlertRulesDefaultBody { return o.Payload } func (o *ListAlertRulesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAlertRulesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListAlertRulesBody list alert rules body swagger:model ListAlertRulesBody */ type ListAlertRulesBody struct { - // page params PageParams *ListAlertRulesParamsBodyPageParams `json:"page_params,omitempty"` } @@ -178,7 +177,6 @@ func (o *ListAlertRulesBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAlertRulesBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { - if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -216,7 +214,6 @@ ListAlertRulesDefaultBody list alert rules default body swagger:model ListAlertRulesDefaultBody */ type ListAlertRulesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -282,9 +279,7 @@ func (o *ListAlertRulesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListAlertRulesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -295,7 +290,6 @@ func (o *ListAlertRulesDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -324,7 +318,6 @@ ListAlertRulesDefaultBodyDetailsItems0 list alert rules default body details ite swagger:model ListAlertRulesDefaultBodyDetailsItems0 */ type ListAlertRulesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -362,7 +355,6 @@ ListAlertRulesOKBody list alert rules OK body swagger:model ListAlertRulesOKBody */ type ListAlertRulesOKBody struct { - // rules Rules []*ListAlertRulesOKBodyRulesItems0 `json:"rules"` @@ -452,9 +444,7 @@ func (o *ListAlertRulesOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ListAlertRulesOKBody) contextValidateRules(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Rules); i++ { - if o.Rules[i] != nil { if err := o.Rules[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -465,14 +455,12 @@ func (o *ListAlertRulesOKBody) contextValidateRules(ctx context.Context, formats return err } } - } return nil } func (o *ListAlertRulesOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { - if o.Totals != nil { if err := o.Totals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -510,7 +498,6 @@ ListAlertRulesOKBodyRulesItems0 Rule represents Alert Rule. swagger:model ListAlertRulesOKBodyRulesItems0 */ type ListAlertRulesOKBodyRulesItems0 struct { - // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -879,9 +866,7 @@ func (o *ListAlertRulesOKBodyRulesItems0) ContextValidate(ctx context.Context, f } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsDefinitions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ParamsDefinitions); i++ { - if o.ParamsDefinitions[i] != nil { if err := o.ParamsDefinitions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -892,16 +877,13 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsDefinitions(ctx c return err } } - } return nil } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsValues(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ParamsValues); i++ { - if o.ParamsValues[i] != nil { if err := o.ParamsValues[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -912,16 +894,13 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateParamsValues(ctx contex return err } } - } return nil } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Filters); i++ { - if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -932,16 +911,13 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateFilters(ctx context.Con return err } } - } return nil } func (o *ListAlertRulesOKBodyRulesItems0) contextValidateChannels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Channels); i++ { - if o.Channels[i] != nil { if err := o.Channels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -952,7 +928,6 @@ func (o *ListAlertRulesOKBodyRulesItems0) contextValidateChannels(ctx context.Co return err } } - } return nil @@ -981,7 +956,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0 Channel represents a single Notifi swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0 */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0 struct { - // Machine-readable ID. ChannelID string `json:"channel_id,omitempty"` @@ -1133,7 +1107,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) ContextValidate(ctx cont } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateEmailConfig(ctx context.Context, formats strfmt.Registry) error { - if o.EmailConfig != nil { if err := o.EmailConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1149,7 +1122,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateEmailConf } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidatePagerdutyConfig(ctx context.Context, formats strfmt.Registry) error { - if o.PagerdutyConfig != nil { if err := o.PagerdutyConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1165,7 +1137,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidatePagerduty } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateSlackConfig(ctx context.Context, formats strfmt.Registry) error { - if o.SlackConfig != nil { if err := o.SlackConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1181,7 +1152,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateSlackConf } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0) contextValidateWebhookConfig(ctx context.Context, formats strfmt.Registry) error { - if o.WebhookConfig != nil { if err := o.WebhookConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1219,7 +1189,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0EmailConfig EmailConfig represents swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0EmailConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0EmailConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1260,7 +1229,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0PagerdutyConfig PagerDutyConfig rep swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0PagerdutyConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0PagerdutyConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1304,7 +1272,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0SlackConfig SlackConfig represents swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0SlackConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0SlackConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1345,7 +1312,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig WebhookConfig represe swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig struct { - // send resolved SendResolved bool `json:"send_resolved,omitempty"` @@ -1407,7 +1373,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig) ContextVali } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfig) contextValidateHTTPConfig(ctx context.Context, formats strfmt.Registry) error { - if o.HTTPConfig != nil { if err := o.HTTPConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1445,7 +1410,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig HTTPConfig swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig struct { - // bearer token BearerToken string `json:"bearer_token,omitempty"` @@ -1537,7 +1501,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) C } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - if o.BasicAuth != nil { if err := o.BasicAuth.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1553,7 +1516,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) c } func (o *ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfig) contextValidateTLSConfig(ctx context.Context, formats strfmt.Registry) error { - if o.TLSConfig != nil { if err := o.TLSConfig.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1591,7 +1553,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigBasicAuth Ba swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigBasicAuth */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigBasicAuth struct { - // username Username string `json:"username,omitempty"` @@ -1636,7 +1597,6 @@ ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigTLSConfig TL swagger:model ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigTLSConfig */ type ListAlertRulesOKBodyRulesItems0ChannelsItems0WebhookConfigHTTPConfigTLSConfig struct { - // A path to the CA certificate file to validate the server certificate with. // ca_file and ca_file_content should not be set at the same time. CaFile string `json:"ca_file,omitempty"` @@ -1701,7 +1661,6 @@ ListAlertRulesOKBodyRulesItems0FiltersItems0 Filter repsents a single filter con swagger:model ListAlertRulesOKBodyRulesItems0FiltersItems0 */ type ListAlertRulesOKBodyRulesItems0FiltersItems0 struct { - // FilterType represents filter matching type. // // - EQUAL: = @@ -1809,7 +1768,6 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0 ParamDefinition represent swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0 */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2041,7 +1999,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) ContextValidate } func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { - if o.Bool != nil { if err := o.Bool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2057,7 +2014,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidate } func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { - if o.Float != nil { if err := o.Float.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2073,7 +2029,6 @@ func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidate } func (o *ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { - if o.String != nil { if err := o.String.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -2111,7 +2066,6 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Bool BoolParamDefinition r swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Bool */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Bool struct { - // BooleanFlag represent a command to set some boolean property to true, // to false, or avoid changing that property. // @@ -2209,7 +2163,6 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Float FloatParamDefinition swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Float */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0Float struct { - // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2262,7 +2215,6 @@ ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0String StringParamDefiniti swagger:model ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0String */ type ListAlertRulesOKBodyRulesItems0ParamsDefinitionsItems0String struct { - // True if default value is set. HasDefault bool `json:"has_default,omitempty"` @@ -2303,7 +2255,6 @@ ListAlertRulesOKBodyRulesItems0ParamsValuesItems0 ParamValue represents a single swagger:model ListAlertRulesOKBodyRulesItems0ParamsValuesItems0 */ type ListAlertRulesOKBodyRulesItems0ParamsValuesItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -2411,7 +2362,6 @@ ListAlertRulesOKBodyTotals PageTotals represents total values for pagination. swagger:model ListAlertRulesOKBodyTotals */ type ListAlertRulesOKBodyTotals struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -2452,7 +2402,6 @@ ListAlertRulesParamsBodyPageParams PageParams represents page request parameters swagger:model ListAlertRulesParamsBodyPageParams */ type ListAlertRulesParamsBodyPageParams struct { - // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go index 3632436df6..98c9657468 100644 --- a/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/toggle_alert_rule_parameters.go @@ -60,7 +60,6 @@ ToggleAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ToggleAlertRuleParams struct { - // Body. Body ToggleAlertRuleBody @@ -130,7 +129,6 @@ func (o *ToggleAlertRuleParams) SetBody(body ToggleAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *ToggleAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go index e00f61fc71..afbd371436 100644 --- a/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/toggle_alert_rule_responses.go @@ -62,12 +62,12 @@ type ToggleAlertRuleOK struct { func (o *ToggleAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Toggle][%d] toggleAlertRuleOk %+v", 200, o.Payload) } + func (o *ToggleAlertRuleOK) GetPayload() interface{} { return o.Payload } func (o *ToggleAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *ToggleAlertRuleDefault) Code() int { func (o *ToggleAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Toggle][%d] ToggleAlertRule default %+v", o._statusCode, o.Payload) } + func (o *ToggleAlertRuleDefault) GetPayload() *ToggleAlertRuleDefaultBody { return o.Payload } func (o *ToggleAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ToggleAlertRuleDefaultBody) // response payload @@ -123,7 +123,6 @@ ToggleAlertRuleBody toggle alert rule body swagger:model ToggleAlertRuleBody */ type ToggleAlertRuleBody struct { - // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -224,7 +223,6 @@ ToggleAlertRuleDefaultBody toggle alert rule default body swagger:model ToggleAlertRuleDefaultBody */ type ToggleAlertRuleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -290,9 +288,7 @@ func (o *ToggleAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *ToggleAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -303,7 +299,6 @@ func (o *ToggleAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -332,7 +327,6 @@ ToggleAlertRuleDefaultBodyDetailsItems0 toggle alert rule default body details i swagger:model ToggleAlertRuleDefaultBodyDetailsItems0 */ type ToggleAlertRuleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go b/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go index 770e3df238..0e0b4d7bc6 100644 --- a/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go +++ b/api/managementpb/ia/json/client/rules/update_alert_rule_parameters.go @@ -60,7 +60,6 @@ UpdateAlertRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateAlertRuleParams struct { - // Body. Body UpdateAlertRuleBody @@ -130,7 +129,6 @@ func (o *UpdateAlertRuleParams) SetBody(body UpdateAlertRuleBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateAlertRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go b/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go index 07d2767319..13854b9415 100644 --- a/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go +++ b/api/managementpb/ia/json/client/rules/update_alert_rule_responses.go @@ -62,12 +62,12 @@ type UpdateAlertRuleOK struct { func (o *UpdateAlertRuleOK) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Update][%d] updateAlertRuleOk %+v", 200, o.Payload) } + func (o *UpdateAlertRuleOK) GetPayload() interface{} { return o.Payload } func (o *UpdateAlertRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *UpdateAlertRuleDefault) Code() int { func (o *UpdateAlertRuleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ia/Rules/Update][%d] UpdateAlertRule default %+v", o._statusCode, o.Payload) } + func (o *UpdateAlertRuleDefault) GetPayload() *UpdateAlertRuleDefaultBody { return o.Payload } func (o *UpdateAlertRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateAlertRuleDefaultBody) // response payload @@ -123,7 +123,6 @@ UpdateAlertRuleBody update alert rule body swagger:model UpdateAlertRuleBody */ type UpdateAlertRuleBody struct { - // Rule ID. RuleID string `json:"rule_id,omitempty"` @@ -309,9 +308,7 @@ func (o *UpdateAlertRuleBody) ContextValidate(ctx context.Context, formats strfm } func (o *UpdateAlertRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -322,16 +319,13 @@ func (o *UpdateAlertRuleBody) contextValidateParams(ctx context.Context, formats return err } } - } return nil } func (o *UpdateAlertRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Filters); i++ { - if o.Filters[i] != nil { if err := o.Filters[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -342,7 +336,6 @@ func (o *UpdateAlertRuleBody) contextValidateFilters(ctx context.Context, format return err } } - } return nil @@ -371,7 +364,6 @@ UpdateAlertRuleDefaultBody update alert rule default body swagger:model UpdateAlertRuleDefaultBody */ type UpdateAlertRuleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -437,9 +429,7 @@ func (o *UpdateAlertRuleDefaultBody) ContextValidate(ctx context.Context, format } func (o *UpdateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -450,7 +440,6 @@ func (o *UpdateAlertRuleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -479,7 +468,6 @@ UpdateAlertRuleDefaultBodyDetailsItems0 update alert rule default body details i swagger:model UpdateAlertRuleDefaultBodyDetailsItems0 */ type UpdateAlertRuleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -517,7 +505,6 @@ UpdateAlertRuleParamsBodyFiltersItems0 Filter repsents a single filter condition swagger:model UpdateAlertRuleParamsBodyFiltersItems0 */ type UpdateAlertRuleParamsBodyFiltersItems0 struct { - // FilterType represents filter matching type. // // - EQUAL: = @@ -625,7 +612,6 @@ UpdateAlertRuleParamsBodyParamsItems0 ParamValue represents a single rule parame swagger:model UpdateAlertRuleParamsBodyParamsItems0 */ type UpdateAlertRuleParamsBodyParamsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/ia/rules.pb.go b/api/managementpb/ia/rules.pb.go index dc91251e59..68a00efa00 100644 --- a/api/managementpb/ia/rules.pb.go +++ b/api/managementpb/ia/rules.pb.go @@ -7,17 +7,19 @@ package iav1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - managementpb "github.com/percona/pmm/api/managementpb" - alerting "github.com/percona/pmm/api/managementpb/alerting" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + managementpb "github.com/percona/pmm/api/managementpb" + alerting "github.com/percona/pmm/api/managementpb/alerting" ) const ( @@ -1397,38 +1399,41 @@ func file_managementpb_ia_rules_proto_rawDescGZIP() []byte { return file_managementpb_ia_rules_proto_rawDescData } -var file_managementpb_ia_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_ia_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_managementpb_ia_rules_proto_goTypes = []interface{}{ - (FilterType)(0), // 0: ia.v1beta1.FilterType - (*Filter)(nil), // 1: ia.v1beta1.Filter - (*ParamValue)(nil), // 2: ia.v1beta1.ParamValue - (*Rule)(nil), // 3: ia.v1beta1.Rule - (*ListAlertRulesRequest)(nil), // 4: ia.v1beta1.ListAlertRulesRequest - (*ListAlertRulesResponse)(nil), // 5: ia.v1beta1.ListAlertRulesResponse - (*CreateAlertRuleRequest)(nil), // 6: ia.v1beta1.CreateAlertRuleRequest - (*CreateAlertRuleResponse)(nil), // 7: ia.v1beta1.CreateAlertRuleResponse - (*UpdateAlertRuleRequest)(nil), // 8: ia.v1beta1.UpdateAlertRuleRequest - (*UpdateAlertRuleResponse)(nil), // 9: ia.v1beta1.UpdateAlertRuleResponse - (*ToggleAlertRuleRequest)(nil), // 10: ia.v1beta1.ToggleAlertRuleRequest - (*ToggleAlertRuleResponse)(nil), // 11: ia.v1beta1.ToggleAlertRuleResponse - (*DeleteAlertRuleRequest)(nil), // 12: ia.v1beta1.DeleteAlertRuleRequest - (*DeleteAlertRuleResponse)(nil), // 13: ia.v1beta1.DeleteAlertRuleResponse - nil, // 14: ia.v1beta1.Rule.CustomLabelsEntry - nil, // 15: ia.v1beta1.Rule.LabelsEntry - nil, // 16: ia.v1beta1.Rule.AnnotationsEntry - nil, // 17: ia.v1beta1.CreateAlertRuleRequest.CustomLabelsEntry - nil, // 18: ia.v1beta1.UpdateAlertRuleRequest.CustomLabelsEntry - (alerting.ParamType)(0), // 19: alerting.v1.ParamType - (*alerting.ParamDefinition)(nil), // 20: alerting.v1.ParamDefinition - (*durationpb.Duration)(nil), // 21: google.protobuf.Duration - (managementpb.Severity)(0), // 22: management.Severity - (*Channel)(nil), // 23: ia.v1beta1.Channel - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*managementpb.PageParams)(nil), // 25: management.PageParams - (*managementpb.PageTotals)(nil), // 26: management.PageTotals - (managementpb.BooleanFlag)(0), // 27: managementpb.BooleanFlag -} +var ( + file_managementpb_ia_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_ia_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 18) + file_managementpb_ia_rules_proto_goTypes = []interface{}{ + (FilterType)(0), // 0: ia.v1beta1.FilterType + (*Filter)(nil), // 1: ia.v1beta1.Filter + (*ParamValue)(nil), // 2: ia.v1beta1.ParamValue + (*Rule)(nil), // 3: ia.v1beta1.Rule + (*ListAlertRulesRequest)(nil), // 4: ia.v1beta1.ListAlertRulesRequest + (*ListAlertRulesResponse)(nil), // 5: ia.v1beta1.ListAlertRulesResponse + (*CreateAlertRuleRequest)(nil), // 6: ia.v1beta1.CreateAlertRuleRequest + (*CreateAlertRuleResponse)(nil), // 7: ia.v1beta1.CreateAlertRuleResponse + (*UpdateAlertRuleRequest)(nil), // 8: ia.v1beta1.UpdateAlertRuleRequest + (*UpdateAlertRuleResponse)(nil), // 9: ia.v1beta1.UpdateAlertRuleResponse + (*ToggleAlertRuleRequest)(nil), // 10: ia.v1beta1.ToggleAlertRuleRequest + (*ToggleAlertRuleResponse)(nil), // 11: ia.v1beta1.ToggleAlertRuleResponse + (*DeleteAlertRuleRequest)(nil), // 12: ia.v1beta1.DeleteAlertRuleRequest + (*DeleteAlertRuleResponse)(nil), // 13: ia.v1beta1.DeleteAlertRuleResponse + nil, // 14: ia.v1beta1.Rule.CustomLabelsEntry + nil, // 15: ia.v1beta1.Rule.LabelsEntry + nil, // 16: ia.v1beta1.Rule.AnnotationsEntry + nil, // 17: ia.v1beta1.CreateAlertRuleRequest.CustomLabelsEntry + nil, // 18: ia.v1beta1.UpdateAlertRuleRequest.CustomLabelsEntry + (alerting.ParamType)(0), // 19: alerting.v1.ParamType + (*alerting.ParamDefinition)(nil), // 20: alerting.v1.ParamDefinition + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration + (managementpb.Severity)(0), // 22: management.Severity + (*Channel)(nil), // 23: ia.v1beta1.Channel + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*managementpb.PageParams)(nil), // 25: management.PageParams + (*managementpb.PageTotals)(nil), // 26: management.PageTotals + (managementpb.BooleanFlag)(0), // 27: managementpb.BooleanFlag + } +) + var file_managementpb_ia_rules_proto_depIdxs = []int32{ 0, // 0: ia.v1beta1.Filter.type:type_name -> ia.v1beta1.FilterType 19, // 1: ia.v1beta1.ParamValue.type:type_name -> alerting.v1.ParamType diff --git a/api/managementpb/ia/rules.pb.gw.go b/api/managementpb/ia/rules.pb.gw.go index 50dd2b5b0e..8458714bcb 100644 --- a/api/managementpb/ia/rules.pb.gw.go +++ b/api/managementpb/ia/rules.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAlertRulesRequest @@ -45,7 +47,6 @@ func request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.ListAlertRules(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Rules_ListAlertRules_0(ctx context.Context, marshaler runtime msg, err := server.ListAlertRules(ctx, &protoReq) return msg, metadata, err - } func request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.CreateAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Rules_CreateAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.CreateAlertRule(ctx, &protoReq) return msg, metadata, err - } func request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.UpdateAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Rules_UpdateAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.UpdateAlertRule(ctx, &protoReq) return msg, metadata, err - } func request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ToggleAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Rules_ToggleAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.ToggleAlertRule(ctx, &protoReq) return msg, metadata, err - } func request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, client RulesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtime.Mars msg, err := client.DeleteAlertRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtime.Marshaler, server RulesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtim msg, err := server.DeleteAlertRule(ctx, &protoReq) return msg, metadata, err - } // RegisterRulesHandlerServer registers the http handlers for service Rules to "mux". @@ -206,7 +198,6 @@ func local_request_Rules_DeleteAlertRule_0(ctx context.Context, marshaler runtim // 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 RegisterRulesHandlerFromEndpoint instead. func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RulesServer) error { - mux.Handle("POST", pattern_Rules_ListAlertRules_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -229,7 +220,6 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_ListAlertRules_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_CreateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -254,7 +244,6 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_CreateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_UpdateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -279,7 +268,6 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_UpdateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_ToggleAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -304,7 +292,6 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_ToggleAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_DeleteAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -329,7 +316,6 @@ func RegisterRulesHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Rules_DeleteAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -372,7 +358,6 @@ func RegisterRulesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RulesClient" to call the correct interceptors. func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RulesClient) error { - mux.Handle("POST", pattern_Rules_ListAlertRules_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -392,7 +377,6 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_ListAlertRules_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_CreateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -414,7 +398,6 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_CreateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_UpdateAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,7 +419,6 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_UpdateAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_ToggleAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -458,7 +440,6 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_ToggleAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Rules_DeleteAlertRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -480,7 +461,6 @@ func RegisterRulesHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Rules_DeleteAlertRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/ia/rules.pb.validate.go b/api/managementpb/ia/rules.pb.validate.go index e53b8a2c46..03d92e46f4 100644 --- a/api/managementpb/ia/rules.pb.validate.go +++ b/api/managementpb/ia/rules.pb.validate.go @@ -18,9 +18,8 @@ import ( "google.golang.org/protobuf/types/known/anypb" - alertingv1 "github.com/percona/pmm/api/managementpb/alerting" - managementpb "github.com/percona/pmm/api/managementpb" + alertingv1 "github.com/percona/pmm/api/managementpb/alerting" ) // ensure the imports are used diff --git a/api/managementpb/ia/rules.swagger.json b/api/managementpb/ia/rules.swagger.json deleted file mode 100644 index d73a81d2a8..0000000000 --- a/api/managementpb/ia/rules.swagger.json +++ /dev/null @@ -1,897 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/ia/rules.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Rules" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/ia/Rules/Create": { - "post": { - "summary": "CreateAlertRule creates Alerting rule.", - "operationId": "CreateAlertRule", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1CreateAlertRuleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1CreateAlertRuleRequest" - } - } - ], - "tags": [ - "Rules" - ], - "deprecated": true - } - }, - "/v1/management/ia/Rules/Delete": { - "post": { - "summary": "DeleteAlertRule deletes Alerting rule.", - "operationId": "DeleteAlertRule", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteAlertRuleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1DeleteAlertRuleRequest" - } - } - ], - "tags": [ - "Rules" - ], - "deprecated": true - } - }, - "/v1/management/ia/Rules/List": { - "post": { - "summary": "ListAlertRules returns a list of all Alerting rules.", - "operationId": "ListAlertRules", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListAlertRulesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListAlertRulesRequest" - } - } - ], - "tags": [ - "Rules" - ], - "deprecated": true - } - }, - "/v1/management/ia/Rules/Toggle": { - "post": { - "summary": "ToggleAlertRule allows to switch between disabled and enabled states of an Alert Rule.", - "operationId": "ToggleAlertRule", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ToggleAlertRuleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ToggleAlertRuleRequest" - } - } - ], - "tags": [ - "Rules" - ], - "deprecated": true - } - }, - "/v1/management/ia/Rules/Update": { - "post": { - "summary": "UpdateAlertRule updates Alerting rule.", - "operationId": "UpdateAlertRule", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1UpdateAlertRuleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1UpdateAlertRuleRequest" - } - } - ], - "tags": [ - "Rules" - ], - "deprecated": true - } - } - }, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "iav1beta1Filter": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/iav1beta1FilterType" - }, - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "description": "Filter repsents a single filter condition." - }, - "iav1beta1FilterType": { - "type": "string", - "enum": [ - "FILTER_TYPE_INVALID", - "EQUAL", - "REGEX" - ], - "default": "FILTER_TYPE_INVALID", - "description": "FilterType represents filter matching type.\n\n - EQUAL: =\n\n!=\n NOT_EQUAL = 2;\n - REGEX: =~\n\n!~\n NOT_REGEX = 4;" - }, - "iav1beta1ParamValue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "type": { - "$ref": "#/definitions/v1ParamType", - "description": "Parameter type." - }, - "bool": { - "type": "boolean", - "description": "Bool value." - }, - "float": { - "type": "number", - "format": "double", - "description": "Float value." - }, - "string": { - "type": "string", - "description": "String value." - } - }, - "description": "ParamValue represents a single rule parameter value for List, Change and Update APIs." - }, - "managementPageParams": { - "type": "object", - "properties": { - "page_size": { - "type": "integer", - "format": "int32", - "description": "Maximum number of results per page." - }, - "index": { - "type": "integer", - "format": "int32", - "description": "Index of the requested page, starts from 0." - } - }, - "description": "PageParams represents page request parameters for pagination." - }, - "managementPageTotals": { - "type": "object", - "properties": { - "total_items": { - "type": "integer", - "format": "int32", - "description": "Total number of results." - }, - "total_pages": { - "type": "integer", - "format": "int32", - "description": "Total number of pages." - } - }, - "description": "PageTotals represents total values for pagination." - }, - "managementSeverity": { - "type": "string", - "enum": [ - "SEVERITY_INVALID", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "default": "SEVERITY_INVALID", - "description": "Severity represents severity level of the check result or alert." - }, - "managementpbBooleanFlag": { - "type": "string", - "enum": [ - "DO_NOT_CHANGE", - "TRUE", - "FALSE" - ], - "default": "DO_NOT_CHANGE", - "description": "BooleanFlag represent a command to set some boolean property to true,\nto false, or avoid changing that property.\n\n - DO_NOT_CHANGE: Do not change boolean property. Default value.\n - TRUE: True.\n - FALSE: False." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "v1BoolParamDefinition": { - "type": "object", - "properties": { - "default": { - "$ref": "#/definitions/managementpbBooleanFlag" - } - }, - "description": "BoolParamDefinition represents boolean parameter's default value." - }, - "v1FloatParamDefinition": { - "type": "object", - "properties": { - "has_default": { - "type": "boolean", - "description": "True if default value is set." - }, - "default": { - "type": "number", - "format": "double", - "description": "Default value if has_default is true." - }, - "has_min": { - "type": "boolean", - "description": "True if minimal valid value is set." - }, - "min": { - "type": "number", - "format": "double", - "description": "Minimal valid value (inclusive) if has_min is true." - }, - "has_max": { - "type": "boolean", - "description": "True if maximal valid value is set." - }, - "max": { - "type": "number", - "format": "double", - "description": "Maximal valid value (inclusive) if has_max is true." - } - }, - "description": "FloatParamDefinition represents float parameter's default value and valid range." - }, - "v1ParamDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Machine-readable name (ID) that is used in expression." - }, - "summary": { - "type": "string", - "description": "Short human-readable parameter summary." - }, - "unit": { - "$ref": "#/definitions/v1ParamUnit", - "description": "Parameter unit." - }, - "type": { - "$ref": "#/definitions/v1ParamType", - "description": "Parameter type." - }, - "bool": { - "$ref": "#/definitions/v1BoolParamDefinition", - "description": "Bool value." - }, - "float": { - "$ref": "#/definitions/v1FloatParamDefinition", - "description": "Float value." - }, - "string": { - "$ref": "#/definitions/v1StringParamDefinition", - "description": "String value." - } - }, - "description": "ParamDefinition represents a single query parameter." - }, - "v1ParamType": { - "type": "string", - "enum": [ - "PARAM_TYPE_INVALID", - "BOOL", - "FLOAT", - "STRING" - ], - "default": "PARAM_TYPE_INVALID", - "description": "ParamType represents template parameter type." - }, - "v1ParamUnit": { - "type": "string", - "enum": [ - "PARAM_UNIT_INVALID", - "PERCENTAGE", - "SECONDS" - ], - "default": "PARAM_UNIT_INVALID", - "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_INVALID: Invalid, unknown or absent.\n - PERCENTAGE: %\n - SECONDS: s" - }, - "v1StringParamDefinition": { - "type": "object", - "properties": { - "has_default": { - "type": "boolean", - "description": "True if default value is set." - }, - "default": { - "type": "string", - "description": "Default value if has_default is true." - } - }, - "description": "StringParamDefinition represents string parameter's default value." - }, - "v1beta1BasicAuth": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "password_file": { - "type": "string" - } - }, - "description": "BasicAuth represents basic HTTP auth configuration." - }, - "v1beta1Channel": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "description": "Machine-readable ID." - }, - "summary": { - "type": "string", - "description": "Short human-readable summary." - }, - "email_config": { - "$ref": "#/definitions/v1beta1EmailConfig" - }, - "pagerduty_config": { - "$ref": "#/definitions/v1beta1PagerDutyConfig" - }, - "slack_config": { - "$ref": "#/definitions/v1beta1SlackConfig" - }, - "webhook_config": { - "$ref": "#/definitions/v1beta1WebhookConfig" - }, - "disabled": { - "type": "boolean", - "description": "True if that channel is disabled." - } - }, - "description": "Channel represents a single Notification Channel." - }, - "v1beta1CreateAlertRuleRequest": { - "type": "object", - "properties": { - "template_name": { - "type": "string", - "description": "Template name. Can't be specified simultaneously with source_rule_id." - }, - "source_rule_id": { - "type": "string", - "description": "ID of the rule that will be used as source. Can't be specified simultaneously with template_name." - }, - "name": { - "type": "string", - "description": "Rule name." - }, - "disabled": { - "type": "boolean", - "description": "New rule status." - }, - "params": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1ParamValue" - }, - "description": "Rule parameters. All template parameters should be set." - }, - "for": { - "type": "string", - "description": "Rule duration. Should be set." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Rule severity. Should be set." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "All custom labels to add or remove (with empty values) to default labels from template." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1Filter" - }, - "description": "Filters. Should be set." - }, - "channel_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Channels. Should be set." - } - } - }, - "v1beta1CreateAlertRuleResponse": { - "type": "object", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - } - } - }, - "v1beta1DeleteAlertRuleRequest": { - "type": "object", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - } - } - }, - "v1beta1DeleteAlertRuleResponse": { - "type": "object" - }, - "v1beta1EmailConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "to": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "EmailConfig represents email configuration." - }, - "v1beta1HTTPConfig": { - "type": "object", - "properties": { - "basic_auth": { - "$ref": "#/definitions/v1beta1BasicAuth", - "description": "Basic HTTP auth configuration. Zero value will remove it." - }, - "bearer_token": { - "type": "string" - }, - "bearer_token_file": { - "type": "string" - }, - "tls_config": { - "$ref": "#/definitions/v1beta1TLSConfig", - "description": "TLS configuration. Zero value will remove it." - }, - "proxy_url": { - "type": "string" - } - }, - "description": "HTTPConfig represents HTTP client configuration." - }, - "v1beta1ListAlertRulesRequest": { - "type": "object", - "properties": { - "page_params": { - "$ref": "#/definitions/managementPageParams", - "description": "Page request." - } - } - }, - "v1beta1ListAlertRulesResponse": { - "type": "object", - "properties": { - "rules": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Rule" - } - }, - "totals": { - "$ref": "#/definitions/managementPageTotals", - "description": "Total items and pages." - } - } - }, - "v1beta1PagerDutyConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "routing_key": { - "type": "string", - "description": "The PagerDuty key for \"Events API v2\" integration type. Exactly one key should be set." - }, - "service_key": { - "type": "string", - "description": "The PagerDuty key for \"Prometheus\" integration type. Exactly one key should be set." - } - }, - "description": "PagerDutyConfig represents PagerDuty configuration." - }, - "v1beta1Rule": { - "type": "object", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - }, - "name": { - "type": "string", - "description": "Rule name." - }, - "summary": { - "type": "string", - "description": "Rule human-readable summary." - }, - "template_name": { - "type": "string", - "description": "Template used for this rule." - }, - "disabled": { - "type": "boolean", - "description": "True if that rule is disabled." - }, - "expr_template": { - "type": "string", - "description": "Expression template." - }, - "expr": { - "type": "string", - "description": "Expression filled with parameters." - }, - "params_definitions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1ParamDefinition" - }, - "description": "Expression parameters definitions." - }, - "params_values": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1ParamValue" - }, - "description": "Expression parameters values." - }, - "default_for": { - "type": "string", - "description": "Default for duration." - }, - "for": { - "type": "string", - "description": "For duration." - }, - "default_severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Default severity." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Severity." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom labels." - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Labels." - }, - "annotations": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Annotations." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1Filter" - }, - "description": "Filters." - }, - "channels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Channel" - }, - "description": "Channels." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Rule creation time." - } - }, - "description": "Rule represents Alert Rule." - }, - "v1beta1SlackConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "channel": { - "type": "string" - } - }, - "description": "SlackConfig represents Slack configuration." - }, - "v1beta1TLSConfig": { - "type": "object", - "properties": { - "ca_file": { - "type": "string", - "description": "A path to the CA certificate file to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." - }, - "cert_file": { - "type": "string", - "description": "A path to the certificate file for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." - }, - "key_file": { - "type": "string", - "description": "A path to the key file for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." - }, - "server_name": { - "type": "string", - "description": "Name of the server." - }, - "insecure_skip_verify": { - "type": "boolean", - "description": "Disable validation of the server certificate." - }, - "ca_file_content": { - "type": "string", - "description": "CA certificate to validate the server certificate with.\nca_file and ca_file_content should not be set at the same time." - }, - "cert_file_content": { - "type": "string", - "description": "A certificate for client cert authentication to the server.\ncert_file and cert_file_content should not be set at the same time." - }, - "key_file_content": { - "type": "string", - "description": "A key for client cert authentication to the server.\nkey_file and key_file_content should not be set at the same time." - } - }, - "title": "TLSConfig represents TLS configuration for alertmanager\nhttps://prometheus.io/docs/alerting/latest/configuration/#tls_config" - }, - "v1beta1ToggleAlertRuleRequest": { - "type": "object", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - }, - "disabled": { - "$ref": "#/definitions/managementpbBooleanFlag", - "description": "New rule status, if set." - } - } - }, - "v1beta1ToggleAlertRuleResponse": { - "type": "object" - }, - "v1beta1UpdateAlertRuleRequest": { - "type": "object", - "properties": { - "rule_id": { - "type": "string", - "description": "Rule ID." - }, - "name": { - "type": "string", - "description": "Rule name. Should be set." - }, - "disabled": { - "type": "boolean", - "description": "New rule status. Should be set." - }, - "params": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1ParamValue" - }, - "description": "Rule parameters. All template parameters should be set." - }, - "for": { - "type": "string", - "description": "Rule duration. Should be set." - }, - "severity": { - "$ref": "#/definitions/managementSeverity", - "description": "Rule severity. Should be set." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "All custom labels to add or remove (with empty values) to default labels from template." - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/iav1beta1Filter" - }, - "description": "Filters. Should be set." - }, - "channel_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Channels. Should be set." - } - } - }, - "v1beta1UpdateAlertRuleResponse": { - "type": "object" - }, - "v1beta1WebhookConfig": { - "type": "object", - "properties": { - "send_resolved": { - "type": "boolean" - }, - "url": { - "type": "string" - }, - "http_config": { - "$ref": "#/definitions/v1beta1HTTPConfig" - }, - "max_alerts": { - "type": "integer", - "format": "int32" - } - }, - "description": "WebhookConfig represents webhook configuration." - } - } -} diff --git a/api/managementpb/ia/rules_grpc.pb.go b/api/managementpb/ia/rules_grpc.pb.go index 7ca27c80e1..786492a856 100644 --- a/api/managementpb/ia/rules_grpc.pb.go +++ b/api/managementpb/ia/rules_grpc.pb.go @@ -8,6 +8,7 @@ package iav1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -128,21 +129,24 @@ type RulesServer interface { } // UnimplementedRulesServer must be embedded to have forward compatible implementations. -type UnimplementedRulesServer struct { -} +type UnimplementedRulesServer struct{} func (UnimplementedRulesServer) ListAlertRules(context.Context, *ListAlertRulesRequest) (*ListAlertRulesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAlertRules not implemented") } + func (UnimplementedRulesServer) CreateAlertRule(context.Context, *CreateAlertRuleRequest) (*CreateAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateAlertRule not implemented") } + func (UnimplementedRulesServer) UpdateAlertRule(context.Context, *UpdateAlertRuleRequest) (*UpdateAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAlertRule not implemented") } + func (UnimplementedRulesServer) ToggleAlertRule(context.Context, *ToggleAlertRuleRequest) (*ToggleAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ToggleAlertRule not implemented") } + func (UnimplementedRulesServer) DeleteAlertRule(context.Context, *DeleteAlertRuleRequest) (*DeleteAlertRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAlertRule not implemented") } diff --git a/api/managementpb/ia/status.pb.go b/api/managementpb/ia/status.pb.go index ab96f0277d..681fef5a4e 100644 --- a/api/managementpb/ia/status.pb.go +++ b/api/managementpb/ia/status.pb.go @@ -7,10 +7,11 @@ package iav1beta1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -118,10 +119,13 @@ func file_managementpb_ia_status_proto_rawDescGZIP() []byte { return file_managementpb_ia_status_proto_rawDescData } -var file_managementpb_ia_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_ia_status_proto_goTypes = []interface{}{ - (Status)(0), // 0: ia.v1beta1.Status -} +var ( + file_managementpb_ia_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_ia_status_proto_goTypes = []interface{}{ + (Status)(0), // 0: ia.v1beta1.Status + } +) + var file_managementpb_ia_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/ia/status.swagger.json b/api/managementpb/ia/status.swagger.json deleted file mode 100644 index 7f2c791081..0000000000 --- a/api/managementpb/ia/status.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/ia/status.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - } - } -} diff --git a/api/managementpb/json/client/actions/cancel_action_parameters.go b/api/managementpb/json/client/actions/cancel_action_parameters.go index 64a13fef98..f89e277a27 100644 --- a/api/managementpb/json/client/actions/cancel_action_parameters.go +++ b/api/managementpb/json/client/actions/cancel_action_parameters.go @@ -60,7 +60,6 @@ CancelActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CancelActionParams struct { - // Body. Body CancelActionBody @@ -130,7 +129,6 @@ func (o *CancelActionParams) SetBody(body CancelActionBody) { // WriteToRequest writes these params to a swagger request func (o *CancelActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/cancel_action_responses.go b/api/managementpb/json/client/actions/cancel_action_responses.go index f336f42d75..0816b2f0b2 100644 --- a/api/managementpb/json/client/actions/cancel_action_responses.go +++ b/api/managementpb/json/client/actions/cancel_action_responses.go @@ -60,12 +60,12 @@ type CancelActionOK struct { func (o *CancelActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Cancel][%d] cancelActionOk %+v", 200, o.Payload) } + func (o *CancelActionOK) GetPayload() interface{} { return o.Payload } func (o *CancelActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *CancelActionDefault) Code() int { func (o *CancelActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Cancel][%d] CancelAction default %+v", o._statusCode, o.Payload) } + func (o *CancelActionDefault) GetPayload() *CancelActionDefaultBody { return o.Payload } func (o *CancelActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CancelActionDefaultBody) // response payload @@ -121,7 +121,6 @@ CancelActionBody cancel action body swagger:model CancelActionBody */ type CancelActionBody struct { - // Unique Action ID. Required. ActionID string `json:"action_id,omitempty"` } @@ -159,7 +158,6 @@ CancelActionDefaultBody cancel action default body swagger:model CancelActionDefaultBody */ type CancelActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *CancelActionDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -267,7 +262,6 @@ CancelActionDefaultBodyDetailsItems0 cancel action default body details items0 swagger:model CancelActionDefaultBodyDetailsItems0 */ type CancelActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/actions/get_action_parameters.go b/api/managementpb/json/client/actions/get_action_parameters.go index 68bc7cd52b..b3a87a7fcb 100644 --- a/api/managementpb/json/client/actions/get_action_parameters.go +++ b/api/managementpb/json/client/actions/get_action_parameters.go @@ -60,7 +60,6 @@ GetActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetActionParams struct { - // Body. Body GetActionBody @@ -130,7 +129,6 @@ func (o *GetActionParams) SetBody(body GetActionBody) { // WriteToRequest writes these params to a swagger request func (o *GetActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/get_action_responses.go b/api/managementpb/json/client/actions/get_action_responses.go index 11e9b642be..f8819af27a 100644 --- a/api/managementpb/json/client/actions/get_action_responses.go +++ b/api/managementpb/json/client/actions/get_action_responses.go @@ -60,12 +60,12 @@ type GetActionOK struct { func (o *GetActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Get][%d] getActionOk %+v", 200, o.Payload) } + func (o *GetActionOK) GetPayload() *GetActionOKBody { return o.Payload } func (o *GetActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetActionDefault) Code() int { func (o *GetActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/Get][%d] GetAction default %+v", o._statusCode, o.Payload) } + func (o *GetActionDefault) GetPayload() *GetActionDefaultBody { return o.Payload } func (o *GetActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetActionDefaultBody) // response payload @@ -123,7 +123,6 @@ GetActionBody get action body swagger:model GetActionBody */ type GetActionBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` } @@ -161,7 +160,6 @@ GetActionDefaultBody get action default body swagger:model GetActionDefaultBody */ type GetActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -227,9 +225,7 @@ func (o *GetActionDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +236,6 @@ func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -269,7 +264,6 @@ GetActionDefaultBodyDetailsItems0 get action default body details items0 swagger:model GetActionDefaultBodyDetailsItems0 */ type GetActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -307,7 +301,6 @@ GetActionOKBody get action OK body swagger:model GetActionOKBody */ type GetActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go b/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go index 645603cb1d..dfe69462d0 100644 --- a/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go +++ b/api/managementpb/json/client/actions/start_mongo_db_explain_action_parameters.go @@ -60,7 +60,6 @@ StartMongoDBExplainActionParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type StartMongoDBExplainActionParams struct { - // Body. Body StartMongoDBExplainActionBody @@ -130,7 +129,6 @@ func (o *StartMongoDBExplainActionParams) SetBody(body StartMongoDBExplainAction // WriteToRequest writes these params to a swagger request func (o *StartMongoDBExplainActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go b/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go index 7492987ad8..68531bf73c 100644 --- a/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go +++ b/api/managementpb/json/client/actions/start_mongo_db_explain_action_responses.go @@ -60,12 +60,12 @@ type StartMongoDBExplainActionOK struct { func (o *StartMongoDBExplainActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMongoDBExplain][%d] startMongoDbExplainActionOk %+v", 200, o.Payload) } + func (o *StartMongoDBExplainActionOK) GetPayload() *StartMongoDBExplainActionOKBody { return o.Payload } func (o *StartMongoDBExplainActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMongoDBExplainActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMongoDBExplainActionDefault) Code() int { func (o *StartMongoDBExplainActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMongoDBExplain][%d] StartMongoDBExplainAction default %+v", o._statusCode, o.Payload) } + func (o *StartMongoDBExplainActionDefault) GetPayload() *StartMongoDBExplainActionDefaultBody { return o.Payload } func (o *StartMongoDBExplainActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMongoDBExplainActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMongoDBExplainActionBody start mongo DB explain action body swagger:model StartMongoDBExplainActionBody */ type StartMongoDBExplainActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -167,7 +166,6 @@ StartMongoDBExplainActionDefaultBody start mongo DB explain action default body swagger:model StartMongoDBExplainActionDefaultBody */ type StartMongoDBExplainActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -233,9 +231,7 @@ func (o *StartMongoDBExplainActionDefaultBody) ContextValidate(ctx context.Conte } func (o *StartMongoDBExplainActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -246,7 +242,6 @@ func (o *StartMongoDBExplainActionDefaultBody) contextValidateDetails(ctx contex return err } } - } return nil @@ -275,7 +270,6 @@ StartMongoDBExplainActionDefaultBodyDetailsItems0 start mongo DB explain action swagger:model StartMongoDBExplainActionDefaultBodyDetailsItems0 */ type StartMongoDBExplainActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -313,7 +307,6 @@ StartMongoDBExplainActionOKBody start mongo DB explain action OK body swagger:model StartMongoDBExplainActionOKBody */ type StartMongoDBExplainActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go index 53a5e5575b..c6046f432b 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_action_parameters.go @@ -60,7 +60,6 @@ StartMySQLExplainActionParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type StartMySQLExplainActionParams struct { - // Body. Body StartMySQLExplainActionBody @@ -130,7 +129,6 @@ func (o *StartMySQLExplainActionParams) SetBody(body StartMySQLExplainActionBody // WriteToRequest writes these params to a swagger request func (o *StartMySQLExplainActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go index 0cbc508c57..d115b52d62 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLExplainActionOK struct { func (o *StartMySQLExplainActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplain][%d] startMySqlExplainActionOk %+v", 200, o.Payload) } + func (o *StartMySQLExplainActionOK) GetPayload() *StartMySQLExplainActionOKBody { return o.Payload } func (o *StartMySQLExplainActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLExplainActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLExplainActionDefault) Code() int { func (o *StartMySQLExplainActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplain][%d] StartMySQLExplainAction default %+v", o._statusCode, o.Payload) } + func (o *StartMySQLExplainActionDefault) GetPayload() *StartMySQLExplainActionDefaultBody { return o.Payload } func (o *StartMySQLExplainActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLExplainActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMySQLExplainActionBody start my SQL explain action body swagger:model StartMySQLExplainActionBody */ type StartMySQLExplainActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -177,7 +176,6 @@ StartMySQLExplainActionDefaultBody start my SQL explain action default body swagger:model StartMySQLExplainActionDefaultBody */ type StartMySQLExplainActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -243,9 +241,7 @@ func (o *StartMySQLExplainActionDefaultBody) ContextValidate(ctx context.Context } func (o *StartMySQLExplainActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -256,7 +252,6 @@ func (o *StartMySQLExplainActionDefaultBody) contextValidateDetails(ctx context. return err } } - } return nil @@ -285,7 +280,6 @@ StartMySQLExplainActionDefaultBodyDetailsItems0 start my SQL explain action defa swagger:model StartMySQLExplainActionDefaultBodyDetailsItems0 */ type StartMySQLExplainActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -323,7 +317,6 @@ StartMySQLExplainActionOKBody start my SQL explain action OK body swagger:model StartMySQLExplainActionOKBody */ type StartMySQLExplainActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go index dff9e0b6eb..03d9f224b7 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_parameters.go @@ -60,7 +60,6 @@ StartMySQLExplainJSONActionParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type StartMySQLExplainJSONActionParams struct { - // Body. Body StartMySQLExplainJSONActionBody @@ -130,7 +129,6 @@ func (o *StartMySQLExplainJSONActionParams) SetBody(body StartMySQLExplainJSONAc // WriteToRequest writes these params to a swagger request func (o *StartMySQLExplainJSONActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go index c723166405..779788fbf4 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_json_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLExplainJSONActionOK struct { func (o *StartMySQLExplainJSONActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainJSON][%d] startMySqlExplainJsonActionOk %+v", 200, o.Payload) } + func (o *StartMySQLExplainJSONActionOK) GetPayload() *StartMySQLExplainJSONActionOKBody { return o.Payload } func (o *StartMySQLExplainJSONActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLExplainJSONActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLExplainJSONActionDefault) Code() int { func (o *StartMySQLExplainJSONActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainJSON][%d] StartMySQLExplainJSONAction default %+v", o._statusCode, o.Payload) } + func (o *StartMySQLExplainJSONActionDefault) GetPayload() *StartMySQLExplainJSONActionDefaultBody { return o.Payload } func (o *StartMySQLExplainJSONActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLExplainJSONActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMySQLExplainJSONActionBody start my SQL explain JSON action body swagger:model StartMySQLExplainJSONActionBody */ type StartMySQLExplainJSONActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -177,7 +176,6 @@ StartMySQLExplainJSONActionDefaultBody start my SQL explain JSON action default swagger:model StartMySQLExplainJSONActionDefaultBody */ type StartMySQLExplainJSONActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -243,9 +241,7 @@ func (o *StartMySQLExplainJSONActionDefaultBody) ContextValidate(ctx context.Con } func (o *StartMySQLExplainJSONActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -256,7 +252,6 @@ func (o *StartMySQLExplainJSONActionDefaultBody) contextValidateDetails(ctx cont return err } } - } return nil @@ -285,7 +280,6 @@ StartMySQLExplainJSONActionDefaultBodyDetailsItems0 start my SQL explain JSON ac swagger:model StartMySQLExplainJSONActionDefaultBodyDetailsItems0 */ type StartMySQLExplainJSONActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -323,7 +317,6 @@ StartMySQLExplainJSONActionOKBody start my SQL explain JSON action OK body swagger:model StartMySQLExplainJSONActionOKBody */ type StartMySQLExplainJSONActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go index d1ee5323aa..d182205d2b 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_parameters.go @@ -60,7 +60,6 @@ StartMySQLExplainTraditionalJSONActionParams contains all the parameters to send Typically these are written to a http.Request. */ type StartMySQLExplainTraditionalJSONActionParams struct { - // Body. Body StartMySQLExplainTraditionalJSONActionBody @@ -130,7 +129,6 @@ func (o *StartMySQLExplainTraditionalJSONActionParams) SetBody(body StartMySQLEx // WriteToRequest writes these params to a swagger request func (o *StartMySQLExplainTraditionalJSONActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go index 9eaf4d0c77..42787c093e 100644 --- a/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_explain_traditional_json_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLExplainTraditionalJSONActionOK struct { func (o *StartMySQLExplainTraditionalJSONActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainTraditionalJSON][%d] startMySqlExplainTraditionalJsonActionOk %+v", 200, o.Payload) } + func (o *StartMySQLExplainTraditionalJSONActionOK) GetPayload() *StartMySQLExplainTraditionalJSONActionOKBody { return o.Payload } func (o *StartMySQLExplainTraditionalJSONActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLExplainTraditionalJSONActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLExplainTraditionalJSONActionDefault) Code() int { func (o *StartMySQLExplainTraditionalJSONActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLExplainTraditionalJSON][%d] StartMySQLExplainTraditionalJSONAction default %+v", o._statusCode, o.Payload) } + func (o *StartMySQLExplainTraditionalJSONActionDefault) GetPayload() *StartMySQLExplainTraditionalJSONActionDefaultBody { return o.Payload } func (o *StartMySQLExplainTraditionalJSONActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLExplainTraditionalJSONActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMySQLExplainTraditionalJSONActionBody start my SQL explain traditional JSON swagger:model StartMySQLExplainTraditionalJSONActionBody */ type StartMySQLExplainTraditionalJSONActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -177,7 +176,6 @@ StartMySQLExplainTraditionalJSONActionDefaultBody start my SQL explain tradition swagger:model StartMySQLExplainTraditionalJSONActionDefaultBody */ type StartMySQLExplainTraditionalJSONActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -243,9 +241,7 @@ func (o *StartMySQLExplainTraditionalJSONActionDefaultBody) ContextValidate(ctx } func (o *StartMySQLExplainTraditionalJSONActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -256,7 +252,6 @@ func (o *StartMySQLExplainTraditionalJSONActionDefaultBody) contextValidateDetai return err } } - } return nil @@ -285,7 +280,6 @@ StartMySQLExplainTraditionalJSONActionDefaultBodyDetailsItems0 start my SQL expl swagger:model StartMySQLExplainTraditionalJSONActionDefaultBodyDetailsItems0 */ type StartMySQLExplainTraditionalJSONActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -323,7 +317,6 @@ StartMySQLExplainTraditionalJSONActionOKBody start my SQL explain traditional JS swagger:model StartMySQLExplainTraditionalJSONActionOKBody */ type StartMySQLExplainTraditionalJSONActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go index 3925d5e0b1..cdb30a1274 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_parameters.go @@ -60,7 +60,6 @@ StartMySQLShowCreateTableActionParams contains all the parameters to send to the Typically these are written to a http.Request. */ type StartMySQLShowCreateTableActionParams struct { - // Body. Body StartMySQLShowCreateTableActionBody @@ -130,7 +129,6 @@ func (o *StartMySQLShowCreateTableActionParams) SetBody(body StartMySQLShowCreat // WriteToRequest writes these params to a swagger request func (o *StartMySQLShowCreateTableActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go index da0e9f818b..3115a5efbf 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_create_table_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLShowCreateTableActionOK struct { func (o *StartMySQLShowCreateTableActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowCreateTable][%d] startMySqlShowCreateTableActionOk %+v", 200, o.Payload) } + func (o *StartMySQLShowCreateTableActionOK) GetPayload() *StartMySQLShowCreateTableActionOKBody { return o.Payload } func (o *StartMySQLShowCreateTableActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLShowCreateTableActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLShowCreateTableActionDefault) Code() int { func (o *StartMySQLShowCreateTableActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowCreateTable][%d] StartMySQLShowCreateTableAction default %+v", o._statusCode, o.Payload) } + func (o *StartMySQLShowCreateTableActionDefault) GetPayload() *StartMySQLShowCreateTableActionDefaultBody { return o.Payload } func (o *StartMySQLShowCreateTableActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLShowCreateTableActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMySQLShowCreateTableActionBody start my SQL show create table action body swagger:model StartMySQLShowCreateTableActionBody */ type StartMySQLShowCreateTableActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -170,7 +169,6 @@ StartMySQLShowCreateTableActionDefaultBody start my SQL show create table action swagger:model StartMySQLShowCreateTableActionDefaultBody */ type StartMySQLShowCreateTableActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -236,9 +234,7 @@ func (o *StartMySQLShowCreateTableActionDefaultBody) ContextValidate(ctx context } func (o *StartMySQLShowCreateTableActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +245,6 @@ func (o *StartMySQLShowCreateTableActionDefaultBody) contextValidateDetails(ctx return err } } - } return nil @@ -278,7 +273,6 @@ StartMySQLShowCreateTableActionDefaultBodyDetailsItems0 start my SQL show create swagger:model StartMySQLShowCreateTableActionDefaultBodyDetailsItems0 */ type StartMySQLShowCreateTableActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -316,7 +310,6 @@ StartMySQLShowCreateTableActionOKBody start my SQL show create table action OK b swagger:model StartMySQLShowCreateTableActionOKBody */ type StartMySQLShowCreateTableActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go index 084c7e3303..a21d88fb3a 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_index_action_parameters.go @@ -60,7 +60,6 @@ StartMySQLShowIndexActionParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type StartMySQLShowIndexActionParams struct { - // Body. Body StartMySQLShowIndexActionBody @@ -130,7 +129,6 @@ func (o *StartMySQLShowIndexActionParams) SetBody(body StartMySQLShowIndexAction // WriteToRequest writes these params to a swagger request func (o *StartMySQLShowIndexActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go index 4ab5d4e157..b82022dd6d 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_index_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLShowIndexActionOK struct { func (o *StartMySQLShowIndexActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowIndex][%d] startMySqlShowIndexActionOk %+v", 200, o.Payload) } + func (o *StartMySQLShowIndexActionOK) GetPayload() *StartMySQLShowIndexActionOKBody { return o.Payload } func (o *StartMySQLShowIndexActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLShowIndexActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLShowIndexActionDefault) Code() int { func (o *StartMySQLShowIndexActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowIndex][%d] StartMySQLShowIndexAction default %+v", o._statusCode, o.Payload) } + func (o *StartMySQLShowIndexActionDefault) GetPayload() *StartMySQLShowIndexActionDefaultBody { return o.Payload } func (o *StartMySQLShowIndexActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLShowIndexActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMySQLShowIndexActionBody start my SQL show index action body swagger:model StartMySQLShowIndexActionBody */ type StartMySQLShowIndexActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -170,7 +169,6 @@ StartMySQLShowIndexActionDefaultBody start my SQL show index action default body swagger:model StartMySQLShowIndexActionDefaultBody */ type StartMySQLShowIndexActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -236,9 +234,7 @@ func (o *StartMySQLShowIndexActionDefaultBody) ContextValidate(ctx context.Conte } func (o *StartMySQLShowIndexActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +245,6 @@ func (o *StartMySQLShowIndexActionDefaultBody) contextValidateDetails(ctx contex return err } } - } return nil @@ -278,7 +273,6 @@ StartMySQLShowIndexActionDefaultBodyDetailsItems0 start my SQL show index action swagger:model StartMySQLShowIndexActionDefaultBodyDetailsItems0 */ type StartMySQLShowIndexActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -316,7 +310,6 @@ StartMySQLShowIndexActionOKBody start my SQL show index action OK body swagger:model StartMySQLShowIndexActionOKBody */ type StartMySQLShowIndexActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go index fe206c8b70..9aca846274 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_parameters.go @@ -60,7 +60,6 @@ StartMySQLShowTableStatusActionParams contains all the parameters to send to the Typically these are written to a http.Request. */ type StartMySQLShowTableStatusActionParams struct { - // Body. Body StartMySQLShowTableStatusActionBody @@ -130,7 +129,6 @@ func (o *StartMySQLShowTableStatusActionParams) SetBody(body StartMySQLShowTable // WriteToRequest writes these params to a swagger request func (o *StartMySQLShowTableStatusActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go index ce045b702e..d3403dc057 100644 --- a/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go +++ b/api/managementpb/json/client/actions/start_my_sql_show_table_status_action_responses.go @@ -60,12 +60,12 @@ type StartMySQLShowTableStatusActionOK struct { func (o *StartMySQLShowTableStatusActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowTableStatus][%d] startMySqlShowTableStatusActionOk %+v", 200, o.Payload) } + func (o *StartMySQLShowTableStatusActionOK) GetPayload() *StartMySQLShowTableStatusActionOKBody { return o.Payload } func (o *StartMySQLShowTableStatusActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLShowTableStatusActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartMySQLShowTableStatusActionDefault) Code() int { func (o *StartMySQLShowTableStatusActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartMySQLShowTableStatus][%d] StartMySQLShowTableStatusAction default %+v", o._statusCode, o.Payload) } + func (o *StartMySQLShowTableStatusActionDefault) GetPayload() *StartMySQLShowTableStatusActionDefaultBody { return o.Payload } func (o *StartMySQLShowTableStatusActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartMySQLShowTableStatusActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartMySQLShowTableStatusActionBody start my SQL show table status action body swagger:model StartMySQLShowTableStatusActionBody */ type StartMySQLShowTableStatusActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -170,7 +169,6 @@ StartMySQLShowTableStatusActionDefaultBody start my SQL show table status action swagger:model StartMySQLShowTableStatusActionDefaultBody */ type StartMySQLShowTableStatusActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -236,9 +234,7 @@ func (o *StartMySQLShowTableStatusActionDefaultBody) ContextValidate(ctx context } func (o *StartMySQLShowTableStatusActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +245,6 @@ func (o *StartMySQLShowTableStatusActionDefaultBody) contextValidateDetails(ctx return err } } - } return nil @@ -278,7 +273,6 @@ StartMySQLShowTableStatusActionDefaultBodyDetailsItems0 start my SQL show table swagger:model StartMySQLShowTableStatusActionDefaultBodyDetailsItems0 */ type StartMySQLShowTableStatusActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -316,7 +310,6 @@ StartMySQLShowTableStatusActionOKBody start my SQL show table status action OK b swagger:model StartMySQLShowTableStatusActionOKBody */ type StartMySQLShowTableStatusActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go index 5245d3004d..bd14d9a514 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_parameters.go @@ -60,7 +60,6 @@ StartPostgreSQLShowCreateTableActionParams contains all the parameters to send t Typically these are written to a http.Request. */ type StartPostgreSQLShowCreateTableActionParams struct { - // Body. Body StartPostgreSQLShowCreateTableActionBody @@ -130,7 +129,6 @@ func (o *StartPostgreSQLShowCreateTableActionParams) SetBody(body StartPostgreSQ // WriteToRequest writes these params to a swagger request func (o *StartPostgreSQLShowCreateTableActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go index 3fb66062e4..97260190f8 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_create_table_action_responses.go @@ -60,12 +60,12 @@ type StartPostgreSQLShowCreateTableActionOK struct { func (o *StartPostgreSQLShowCreateTableActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowCreateTable][%d] startPostgreSqlShowCreateTableActionOk %+v", 200, o.Payload) } + func (o *StartPostgreSQLShowCreateTableActionOK) GetPayload() *StartPostgreSQLShowCreateTableActionOKBody { return o.Payload } func (o *StartPostgreSQLShowCreateTableActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPostgreSQLShowCreateTableActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPostgreSQLShowCreateTableActionDefault) Code() int { func (o *StartPostgreSQLShowCreateTableActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowCreateTable][%d] StartPostgreSQLShowCreateTableAction default %+v", o._statusCode, o.Payload) } + func (o *StartPostgreSQLShowCreateTableActionDefault) GetPayload() *StartPostgreSQLShowCreateTableActionDefaultBody { return o.Payload } func (o *StartPostgreSQLShowCreateTableActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPostgreSQLShowCreateTableActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartPostgreSQLShowCreateTableActionBody start postgre SQL show create table act swagger:model StartPostgreSQLShowCreateTableActionBody */ type StartPostgreSQLShowCreateTableActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -170,7 +169,6 @@ StartPostgreSQLShowCreateTableActionDefaultBody start postgre SQL show create ta swagger:model StartPostgreSQLShowCreateTableActionDefaultBody */ type StartPostgreSQLShowCreateTableActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -236,9 +234,7 @@ func (o *StartPostgreSQLShowCreateTableActionDefaultBody) ContextValidate(ctx co } func (o *StartPostgreSQLShowCreateTableActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +245,6 @@ func (o *StartPostgreSQLShowCreateTableActionDefaultBody) contextValidateDetails return err } } - } return nil @@ -278,7 +273,6 @@ StartPostgreSQLShowCreateTableActionDefaultBodyDetailsItems0 start postgre SQL s swagger:model StartPostgreSQLShowCreateTableActionDefaultBodyDetailsItems0 */ type StartPostgreSQLShowCreateTableActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -316,7 +310,6 @@ StartPostgreSQLShowCreateTableActionOKBody start postgre SQL show create table a swagger:model StartPostgreSQLShowCreateTableActionOKBody */ type StartPostgreSQLShowCreateTableActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go index a856b6602c..c124c400d3 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_parameters.go @@ -60,7 +60,6 @@ StartPostgreSQLShowIndexActionParams contains all the parameters to send to the Typically these are written to a http.Request. */ type StartPostgreSQLShowIndexActionParams struct { - // Body. Body StartPostgreSQLShowIndexActionBody @@ -130,7 +129,6 @@ func (o *StartPostgreSQLShowIndexActionParams) SetBody(body StartPostgreSQLShowI // WriteToRequest writes these params to a swagger request func (o *StartPostgreSQLShowIndexActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go index b971a606d0..767c1aa85a 100644 --- a/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go +++ b/api/managementpb/json/client/actions/start_postgre_sql_show_index_action_responses.go @@ -60,12 +60,12 @@ type StartPostgreSQLShowIndexActionOK struct { func (o *StartPostgreSQLShowIndexActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowIndex][%d] startPostgreSqlShowIndexActionOk %+v", 200, o.Payload) } + func (o *StartPostgreSQLShowIndexActionOK) GetPayload() *StartPostgreSQLShowIndexActionOKBody { return o.Payload } func (o *StartPostgreSQLShowIndexActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPostgreSQLShowIndexActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPostgreSQLShowIndexActionDefault) Code() int { func (o *StartPostgreSQLShowIndexActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPostgreSQLShowIndex][%d] StartPostgreSQLShowIndexAction default %+v", o._statusCode, o.Payload) } + func (o *StartPostgreSQLShowIndexActionDefault) GetPayload() *StartPostgreSQLShowIndexActionDefaultBody { return o.Payload } func (o *StartPostgreSQLShowIndexActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPostgreSQLShowIndexActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartPostgreSQLShowIndexActionBody start postgre SQL show index action body swagger:model StartPostgreSQLShowIndexActionBody */ type StartPostgreSQLShowIndexActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -170,7 +169,6 @@ StartPostgreSQLShowIndexActionDefaultBody start postgre SQL show index action de swagger:model StartPostgreSQLShowIndexActionDefaultBody */ type StartPostgreSQLShowIndexActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -236,9 +234,7 @@ func (o *StartPostgreSQLShowIndexActionDefaultBody) ContextValidate(ctx context. } func (o *StartPostgreSQLShowIndexActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +245,6 @@ func (o *StartPostgreSQLShowIndexActionDefaultBody) contextValidateDetails(ctx c return err } } - } return nil @@ -278,7 +273,6 @@ StartPostgreSQLShowIndexActionDefaultBodyDetailsItems0 start postgre SQL show in swagger:model StartPostgreSQLShowIndexActionDefaultBodyDetailsItems0 */ type StartPostgreSQLShowIndexActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -316,7 +310,6 @@ StartPostgreSQLShowIndexActionOKBody start postgre SQL show index action OK body swagger:model StartPostgreSQLShowIndexActionOKBody */ type StartPostgreSQLShowIndexActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go index 96eb6cab1c..c970df2211 100644 --- a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_parameters.go @@ -60,7 +60,6 @@ StartPTMongoDBSummaryActionParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type StartPTMongoDBSummaryActionParams struct { - // Body. Body StartPTMongoDBSummaryActionBody @@ -130,7 +129,6 @@ func (o *StartPTMongoDBSummaryActionParams) SetBody(body StartPTMongoDBSummaryAc // WriteToRequest writes these params to a swagger request func (o *StartPTMongoDBSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go index b14c02c25d..506059ad1f 100644 --- a/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_mongo_db_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTMongoDBSummaryActionOK struct { func (o *StartPTMongoDBSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMongoDBSummary][%d] startPtMongoDbSummaryActionOk %+v", 200, o.Payload) } + func (o *StartPTMongoDBSummaryActionOK) GetPayload() *StartPTMongoDBSummaryActionOKBody { return o.Payload } func (o *StartPTMongoDBSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTMongoDBSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTMongoDBSummaryActionDefault) Code() int { func (o *StartPTMongoDBSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMongoDBSummary][%d] StartPTMongoDBSummaryAction default %+v", o._statusCode, o.Payload) } + func (o *StartPTMongoDBSummaryActionDefault) GetPayload() *StartPTMongoDBSummaryActionDefaultBody { return o.Payload } func (o *StartPTMongoDBSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTMongoDBSummaryActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartPTMongoDBSummaryActionBody Message to prepare pt-mongodb-summary data swagger:model StartPTMongoDBSummaryActionBody */ type StartPTMongoDBSummaryActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -164,7 +163,6 @@ StartPTMongoDBSummaryActionDefaultBody start PT mongo DB summary action default swagger:model StartPTMongoDBSummaryActionDefaultBody */ type StartPTMongoDBSummaryActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *StartPTMongoDBSummaryActionDefaultBody) ContextValidate(ctx context.Con } func (o *StartPTMongoDBSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *StartPTMongoDBSummaryActionDefaultBody) contextValidateDetails(ctx cont return err } } - } return nil @@ -272,7 +267,6 @@ StartPTMongoDBSummaryActionDefaultBodyDetailsItems0 start PT mongo DB summary ac swagger:model StartPTMongoDBSummaryActionDefaultBodyDetailsItems0 */ type StartPTMongoDBSummaryActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ StartPTMongoDBSummaryActionOKBody Message to retrieve the prepared pt-mongodb-su swagger:model StartPTMongoDBSummaryActionOKBody */ type StartPTMongoDBSummaryActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go index 9f1f2000f6..ae4ddbcf89 100644 --- a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_parameters.go @@ -60,7 +60,6 @@ StartPTMySQLSummaryActionParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type StartPTMySQLSummaryActionParams struct { - // Body. Body StartPTMySQLSummaryActionBody @@ -130,7 +129,6 @@ func (o *StartPTMySQLSummaryActionParams) SetBody(body StartPTMySQLSummaryAction // WriteToRequest writes these params to a swagger request func (o *StartPTMySQLSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go index dfc628253f..dcd6b0a240 100644 --- a/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_my_sql_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTMySQLSummaryActionOK struct { func (o *StartPTMySQLSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMySQLSummary][%d] startPtMySqlSummaryActionOk %+v", 200, o.Payload) } + func (o *StartPTMySQLSummaryActionOK) GetPayload() *StartPTMySQLSummaryActionOKBody { return o.Payload } func (o *StartPTMySQLSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTMySQLSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTMySQLSummaryActionDefault) Code() int { func (o *StartPTMySQLSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTMySQLSummary][%d] StartPTMySQLSummaryAction default %+v", o._statusCode, o.Payload) } + func (o *StartPTMySQLSummaryActionDefault) GetPayload() *StartPTMySQLSummaryActionDefaultBody { return o.Payload } func (o *StartPTMySQLSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTMySQLSummaryActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartPTMySQLSummaryActionBody Message to prepare pt-mysql-summary data swagger:model StartPTMySQLSummaryActionBody */ type StartPTMySQLSummaryActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -164,7 +163,6 @@ StartPTMySQLSummaryActionDefaultBody start PT my SQL summary action default body swagger:model StartPTMySQLSummaryActionDefaultBody */ type StartPTMySQLSummaryActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *StartPTMySQLSummaryActionDefaultBody) ContextValidate(ctx context.Conte } func (o *StartPTMySQLSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *StartPTMySQLSummaryActionDefaultBody) contextValidateDetails(ctx contex return err } } - } return nil @@ -272,7 +267,6 @@ StartPTMySQLSummaryActionDefaultBodyDetailsItems0 start PT my SQL summary action swagger:model StartPTMySQLSummaryActionDefaultBodyDetailsItems0 */ type StartPTMySQLSummaryActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ StartPTMySQLSummaryActionOKBody Message to retrieve the prepared pt-mysql-summar swagger:model StartPTMySQLSummaryActionOKBody */ type StartPTMySQLSummaryActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go index e1571372d0..f2eff89d17 100644 --- a/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_pg_summary_action_parameters.go @@ -60,7 +60,6 @@ StartPTPgSummaryActionParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type StartPTPgSummaryActionParams struct { - // Body. Body StartPTPgSummaryActionBody @@ -130,7 +129,6 @@ func (o *StartPTPgSummaryActionParams) SetBody(body StartPTPgSummaryActionBody) // WriteToRequest writes these params to a swagger request func (o *StartPTPgSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go index 7cd914b581..92cf81cfbf 100644 --- a/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_pg_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTPgSummaryActionOK struct { func (o *StartPTPgSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTPgSummary][%d] startPtPgSummaryActionOk %+v", 200, o.Payload) } + func (o *StartPTPgSummaryActionOK) GetPayload() *StartPTPgSummaryActionOKBody { return o.Payload } func (o *StartPTPgSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTPgSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTPgSummaryActionDefault) Code() int { func (o *StartPTPgSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTPgSummary][%d] StartPTPgSummaryAction default %+v", o._statusCode, o.Payload) } + func (o *StartPTPgSummaryActionDefault) GetPayload() *StartPTPgSummaryActionDefaultBody { return o.Payload } func (o *StartPTPgSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTPgSummaryActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartPTPgSummaryActionBody Message to prepare pt-pg-summary data swagger:model StartPTPgSummaryActionBody */ type StartPTPgSummaryActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -164,7 +163,6 @@ StartPTPgSummaryActionDefaultBody start PT pg summary action default body swagger:model StartPTPgSummaryActionDefaultBody */ type StartPTPgSummaryActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *StartPTPgSummaryActionDefaultBody) ContextValidate(ctx context.Context, } func (o *StartPTPgSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *StartPTPgSummaryActionDefaultBody) contextValidateDetails(ctx context.C return err } } - } return nil @@ -272,7 +267,6 @@ StartPTPgSummaryActionDefaultBodyDetailsItems0 start PT pg summary action defaul swagger:model StartPTPgSummaryActionDefaultBodyDetailsItems0 */ type StartPTPgSummaryActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ StartPTPgSummaryActionOKBody Message to retrieve the prepared pt-pg-summary data swagger:model StartPTPgSummaryActionOKBody */ type StartPTPgSummaryActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go b/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go index 055d38f5ba..816c3e8e05 100644 --- a/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go +++ b/api/managementpb/json/client/actions/start_pt_summary_action_parameters.go @@ -60,7 +60,6 @@ StartPTSummaryActionParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type StartPTSummaryActionParams struct { - // Body. Body StartPTSummaryActionBody @@ -130,7 +129,6 @@ func (o *StartPTSummaryActionParams) SetBody(body StartPTSummaryActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartPTSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/actions/start_pt_summary_action_responses.go b/api/managementpb/json/client/actions/start_pt_summary_action_responses.go index 8be0539893..d935512a5c 100644 --- a/api/managementpb/json/client/actions/start_pt_summary_action_responses.go +++ b/api/managementpb/json/client/actions/start_pt_summary_action_responses.go @@ -60,12 +60,12 @@ type StartPTSummaryActionOK struct { func (o *StartPTSummaryActionOK) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTSummary][%d] startPtSummaryActionOk %+v", 200, o.Payload) } + func (o *StartPTSummaryActionOK) GetPayload() *StartPTSummaryActionOKBody { return o.Payload } func (o *StartPTSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTSummaryActionOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartPTSummaryActionDefault) Code() int { func (o *StartPTSummaryActionDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Actions/StartPTSummary][%d] StartPTSummaryAction default %+v", o._statusCode, o.Payload) } + func (o *StartPTSummaryActionDefault) GetPayload() *StartPTSummaryActionDefaultBody { return o.Payload } func (o *StartPTSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTSummaryActionDefaultBody) // response payload @@ -123,7 +123,6 @@ StartPTSummaryActionBody start PT summary action body swagger:model StartPTSummaryActionBody */ type StartPTSummaryActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -164,7 +163,6 @@ StartPTSummaryActionDefaultBody start PT summary action default body swagger:model StartPTSummaryActionDefaultBody */ type StartPTSummaryActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *StartPTSummaryActionDefaultBody) ContextValidate(ctx context.Context, f } func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -272,7 +267,6 @@ StartPTSummaryActionDefaultBodyDetailsItems0 start PT summary action default bod swagger:model StartPTSummaryActionDefaultBodyDetailsItems0 */ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ StartPTSummaryActionOKBody start PT summary action OK body swagger:model StartPTSummaryActionOKBody */ type StartPTSummaryActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/managementpb/json/client/annotation/add_annotation_parameters.go b/api/managementpb/json/client/annotation/add_annotation_parameters.go index a3c3439116..dfd1c36bc5 100644 --- a/api/managementpb/json/client/annotation/add_annotation_parameters.go +++ b/api/managementpb/json/client/annotation/add_annotation_parameters.go @@ -60,7 +60,6 @@ AddAnnotationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAnnotationParams struct { - /* Body. AddAnnotationRequest is a params to add new annotation. @@ -133,7 +132,6 @@ func (o *AddAnnotationParams) SetBody(body AddAnnotationBody) { // WriteToRequest writes these params to a swagger request func (o *AddAnnotationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/annotation/add_annotation_responses.go b/api/managementpb/json/client/annotation/add_annotation_responses.go index 3701159fc5..6f9cf3e3e1 100644 --- a/api/managementpb/json/client/annotation/add_annotation_responses.go +++ b/api/managementpb/json/client/annotation/add_annotation_responses.go @@ -60,12 +60,12 @@ type AddAnnotationOK struct { func (o *AddAnnotationOK) Error() string { return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] addAnnotationOk %+v", 200, o.Payload) } + func (o *AddAnnotationOK) GetPayload() interface{} { return o.Payload } func (o *AddAnnotationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AddAnnotationDefault) Code() int { func (o *AddAnnotationDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] AddAnnotation default %+v", o._statusCode, o.Payload) } + func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { return o.Payload } func (o *AddAnnotationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAnnotationDefaultBody) // response payload @@ -121,7 +121,6 @@ AddAnnotationBody AddAnnotationRequest is a params to add new annotation. swagger:model AddAnnotationBody */ type AddAnnotationBody struct { - // An annotation description. Required. Text string `json:"text,omitempty"` @@ -168,7 +167,6 @@ AddAnnotationDefaultBody add annotation default body swagger:model AddAnnotationDefaultBody */ type AddAnnotationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -234,9 +232,7 @@ func (o *AddAnnotationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -247,7 +243,6 @@ func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -276,7 +271,6 @@ AddAnnotationDefaultBodyDetailsItems0 add annotation default body details items0 swagger:model AddAnnotationDefaultBodyDetailsItems0 */ type AddAnnotationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/external/add_external_parameters.go b/api/managementpb/json/client/external/add_external_parameters.go index e965c9d141..f58a91ff4f 100644 --- a/api/managementpb/json/client/external/add_external_parameters.go +++ b/api/managementpb/json/client/external/add_external_parameters.go @@ -60,7 +60,6 @@ AddExternalParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddExternalParams struct { - // Body. Body AddExternalBody @@ -130,7 +129,6 @@ func (o *AddExternalParams) SetBody(body AddExternalBody) { // WriteToRequest writes these params to a swagger request func (o *AddExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/external/add_external_responses.go b/api/managementpb/json/client/external/add_external_responses.go index e64cd798b8..3fa642bb18 100644 --- a/api/managementpb/json/client/external/add_external_responses.go +++ b/api/managementpb/json/client/external/add_external_responses.go @@ -62,12 +62,12 @@ type AddExternalOK struct { func (o *AddExternalOK) Error() string { return fmt.Sprintf("[POST /v1/management/External/Add][%d] addExternalOk %+v", 200, o.Payload) } + func (o *AddExternalOK) GetPayload() *AddExternalOKBody { return o.Payload } func (o *AddExternalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddExternalDefault) Code() int { func (o *AddExternalDefault) Error() string { return fmt.Sprintf("[POST /v1/management/External/Add][%d] AddExternal default %+v", o._statusCode, o.Payload) } + func (o *AddExternalDefault) GetPayload() *AddExternalDefaultBody { return o.Payload } func (o *AddExternalDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalDefaultBody) // response payload @@ -125,7 +125,6 @@ AddExternalBody add external body swagger:model AddExternalBody */ type AddExternalBody struct { - // Node identifier on which an external exporter is been running. // runs_on_node_id always should be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. @@ -285,7 +284,6 @@ func (o *AddExternalBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddExternalBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -323,7 +321,6 @@ AddExternalDefaultBody add external default body swagger:model AddExternalDefaultBody */ type AddExternalDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -389,9 +386,7 @@ func (o *AddExternalDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddExternalDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -402,7 +397,6 @@ func (o *AddExternalDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -431,7 +425,6 @@ AddExternalDefaultBodyDetailsItems0 add external default body details items0 swagger:model AddExternalDefaultBodyDetailsItems0 */ type AddExternalDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -469,7 +462,6 @@ AddExternalOKBody add external OK body swagger:model AddExternalOKBody */ type AddExternalOKBody struct { - // external exporter ExternalExporter *AddExternalOKBodyExternalExporter `json:"external_exporter,omitempty"` @@ -552,7 +544,6 @@ func (o *AddExternalOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddExternalOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -568,7 +559,6 @@ func (o *AddExternalOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *AddExternalOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -606,7 +596,6 @@ AddExternalOKBodyExternalExporter ExternalExporter runs on any Node type, includ swagger:model AddExternalOKBodyExternalExporter */ type AddExternalOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -674,7 +663,6 @@ AddExternalOKBodyService ExternalService represents a generic External service i swagger:model AddExternalOKBodyService */ type AddExternalOKBodyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -733,7 +721,6 @@ AddExternalParamsBodyAddNode AddNodeParams holds node params and is used to add swagger:model AddExternalParamsBodyAddNode */ type AddExternalParamsBodyAddNode struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go b/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go index aeacacdc0b..ac06a0fc9d 100644 --- a/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go +++ b/api/managementpb/json/client/ha_proxy/add_ha_proxy_parameters.go @@ -60,7 +60,6 @@ AddHAProxyParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddHAProxyParams struct { - // Body. Body AddHAProxyBody @@ -130,7 +129,6 @@ func (o *AddHAProxyParams) SetBody(body AddHAProxyBody) { // WriteToRequest writes these params to a swagger request func (o *AddHAProxyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go b/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go index 1acc8473c1..b32ca5d114 100644 --- a/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go +++ b/api/managementpb/json/client/ha_proxy/add_ha_proxy_responses.go @@ -62,12 +62,12 @@ type AddHAProxyOK struct { func (o *AddHAProxyOK) Error() string { return fmt.Sprintf("[POST /v1/management/HAProxy/Add][%d] addHaProxyOk %+v", 200, o.Payload) } + func (o *AddHAProxyOK) GetPayload() *AddHAProxyOKBody { return o.Payload } func (o *AddHAProxyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddHAProxyOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddHAProxyDefault) Code() int { func (o *AddHAProxyDefault) Error() string { return fmt.Sprintf("[POST /v1/management/HAProxy/Add][%d] AddHAProxy default %+v", o._statusCode, o.Payload) } + func (o *AddHAProxyDefault) GetPayload() *AddHAProxyDefaultBody { return o.Payload } func (o *AddHAProxyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddHAProxyDefaultBody) // response payload @@ -125,7 +125,6 @@ AddHAProxyBody add HA proxy body swagger:model AddHAProxyBody */ type AddHAProxyBody struct { - // Node identifier on which an external exporter is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -277,7 +276,6 @@ func (o *AddHAProxyBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddHAProxyBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -315,7 +313,6 @@ AddHAProxyDefaultBody add HA proxy default body swagger:model AddHAProxyDefaultBody */ type AddHAProxyDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -381,9 +378,7 @@ func (o *AddHAProxyDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddHAProxyDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -394,7 +389,6 @@ func (o *AddHAProxyDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -423,7 +417,6 @@ AddHAProxyDefaultBodyDetailsItems0 add HA proxy default body details items0 swagger:model AddHAProxyDefaultBodyDetailsItems0 */ type AddHAProxyDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -461,7 +454,6 @@ AddHAProxyOKBody add HA proxy OK body swagger:model AddHAProxyOKBody */ type AddHAProxyOKBody struct { - // external exporter ExternalExporter *AddHAProxyOKBodyExternalExporter `json:"external_exporter,omitempty"` @@ -544,7 +536,6 @@ func (o *AddHAProxyOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddHAProxyOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -560,7 +551,6 @@ func (o *AddHAProxyOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *AddHAProxyOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -598,7 +588,6 @@ AddHAProxyOKBodyExternalExporter ExternalExporter runs on any Node type, includi swagger:model AddHAProxyOKBodyExternalExporter */ type AddHAProxyOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -666,7 +655,6 @@ AddHAProxyOKBodyService HAProxyService represents a generic HAProxy service inst swagger:model AddHAProxyOKBodyService */ type AddHAProxyOKBodyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -722,7 +710,6 @@ AddHAProxyParamsBodyAddNode AddNodeParams holds node params and is used to add n swagger:model AddHAProxyParamsBodyAddNode */ type AddHAProxyParamsBodyAddNode struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go b/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go index 7990ce64f6..d232151552 100644 --- a/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go +++ b/api/managementpb/json/client/mongo_db/add_mongo_db_parameters.go @@ -60,7 +60,6 @@ AddMongoDBParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMongoDBParams struct { - // Body. Body AddMongoDBBody @@ -130,7 +129,6 @@ func (o *AddMongoDBParams) SetBody(body AddMongoDBBody) { // WriteToRequest writes these params to a swagger request func (o *AddMongoDBParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go b/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go index 2d6ad741e2..786557c464 100644 --- a/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go +++ b/api/managementpb/json/client/mongo_db/add_mongo_db_responses.go @@ -62,12 +62,12 @@ type AddMongoDBOK struct { func (o *AddMongoDBOK) Error() string { return fmt.Sprintf("[POST /v1/management/MongoDB/Add][%d] addMongoDbOk %+v", 200, o.Payload) } + func (o *AddMongoDBOK) GetPayload() *AddMongoDBOKBody { return o.Payload } func (o *AddMongoDBOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMongoDBDefault) Code() int { func (o *AddMongoDBDefault) Error() string { return fmt.Sprintf("[POST /v1/management/MongoDB/Add][%d] AddMongoDB default %+v", o._statusCode, o.Payload) } + func (o *AddMongoDBDefault) GetPayload() *AddMongoDBDefaultBody { return o.Payload } func (o *AddMongoDBDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBDefaultBody) // response payload @@ -125,7 +125,6 @@ AddMongoDBBody add mongo DB body swagger:model AddMongoDBBody */ type AddMongoDBBody struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -389,7 +388,6 @@ func (o *AddMongoDBBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddMongoDBBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -427,7 +425,6 @@ AddMongoDBDefaultBody add mongo DB default body swagger:model AddMongoDBDefaultBody */ type AddMongoDBDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -493,9 +490,7 @@ func (o *AddMongoDBDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddMongoDBDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -506,7 +501,6 @@ func (o *AddMongoDBDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -535,7 +529,6 @@ AddMongoDBDefaultBodyDetailsItems0 add mongo DB default body details items0 swagger:model AddMongoDBDefaultBodyDetailsItems0 */ type AddMongoDBDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -573,7 +566,6 @@ AddMongoDBOKBody add mongo DB OK body swagger:model AddMongoDBOKBody */ type AddMongoDBOKBody struct { - // mongodb exporter MongodbExporter *AddMongoDBOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` @@ -686,7 +678,6 @@ func (o *AddMongoDBOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddMongoDBOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -702,7 +693,6 @@ func (o *AddMongoDBOKBody) contextValidateMongodbExporter(ctx context.Context, f } func (o *AddMongoDBOKBody) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfiler != nil { if err := o.QANMongodbProfiler.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -718,7 +708,6 @@ func (o *AddMongoDBOKBody) contextValidateQANMongodbProfiler(ctx context.Context } func (o *AddMongoDBOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -756,7 +745,6 @@ AddMongoDBOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Nod swagger:model AddMongoDBOKBodyMongodbExporter */ type AddMongoDBOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -978,7 +966,6 @@ AddMongoDBOKBodyQANMongodbProfiler QANMongoDBProfilerAgent runs within pmm-agent swagger:model AddMongoDBOKBodyQANMongodbProfiler */ type AddMongoDBOKBodyQANMongodbProfiler struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1187,7 +1174,6 @@ AddMongoDBOKBodyService MongoDBService represents a generic MongoDB instance. swagger:model AddMongoDBOKBodyService */ type AddMongoDBOKBodyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1255,7 +1241,6 @@ AddMongoDBParamsBodyAddNode AddNodeParams holds node params and is used to add n swagger:model AddMongoDBParamsBodyAddNode */ type AddMongoDBParamsBodyAddNode struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/my_sql/add_my_sql_parameters.go b/api/managementpb/json/client/my_sql/add_my_sql_parameters.go index 569c9f5949..6055393fdc 100644 --- a/api/managementpb/json/client/my_sql/add_my_sql_parameters.go +++ b/api/managementpb/json/client/my_sql/add_my_sql_parameters.go @@ -60,7 +60,6 @@ AddMySQLParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddMySQLParams struct { - // Body. Body AddMySQLBody @@ -130,7 +129,6 @@ func (o *AddMySQLParams) SetBody(body AddMySQLBody) { // WriteToRequest writes these params to a swagger request func (o *AddMySQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/my_sql/add_my_sql_responses.go b/api/managementpb/json/client/my_sql/add_my_sql_responses.go index 5a7964a0e2..97d0ea9998 100644 --- a/api/managementpb/json/client/my_sql/add_my_sql_responses.go +++ b/api/managementpb/json/client/my_sql/add_my_sql_responses.go @@ -62,12 +62,12 @@ type AddMySQLOK struct { func (o *AddMySQLOK) Error() string { return fmt.Sprintf("[POST /v1/management/MySQL/Add][%d] addMySqlOk %+v", 200, o.Payload) } + func (o *AddMySQLOK) GetPayload() *AddMySQLOKBody { return o.Payload } func (o *AddMySQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddMySQLDefault) Code() int { func (o *AddMySQLDefault) Error() string { return fmt.Sprintf("[POST /v1/management/MySQL/Add][%d] AddMySQL default %+v", o._statusCode, o.Payload) } + func (o *AddMySQLDefault) GetPayload() *AddMySQLDefaultBody { return o.Payload } func (o *AddMySQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLDefaultBody) // response payload @@ -125,7 +125,6 @@ AddMySQLBody add my SQL body swagger:model AddMySQLBody */ type AddMySQLBody struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -387,7 +386,6 @@ func (o *AddMySQLBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddMySQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -425,7 +423,6 @@ AddMySQLDefaultBody add my SQL default body swagger:model AddMySQLDefaultBody */ type AddMySQLDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -491,9 +488,7 @@ func (o *AddMySQLDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddMySQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -504,7 +499,6 @@ func (o *AddMySQLDefaultBody) contextValidateDetails(ctx context.Context, format return err } } - } return nil @@ -533,7 +527,6 @@ AddMySQLDefaultBodyDetailsItems0 add my SQL default body details items0 swagger:model AddMySQLDefaultBodyDetailsItems0 */ type AddMySQLDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -571,7 +564,6 @@ AddMySQLOKBody add my SQL OK body swagger:model AddMySQLOKBody */ type AddMySQLOKBody struct { - // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -717,7 +709,6 @@ func (o *AddMySQLOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddMySQLOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -733,7 +724,6 @@ func (o *AddMySQLOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *AddMySQLOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschema != nil { if err := o.QANMysqlPerfschema.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -749,7 +739,6 @@ func (o *AddMySQLOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, } func (o *AddMySQLOKBody) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlog != nil { if err := o.QANMysqlSlowlog.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -765,7 +754,6 @@ func (o *AddMySQLOKBody) contextValidateQANMysqlSlowlog(ctx context.Context, for } func (o *AddMySQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -803,7 +791,6 @@ AddMySQLOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model AddMySQLOKBodyMysqldExporter */ type AddMySQLOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1032,7 +1019,6 @@ AddMySQLOKBodyQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-agent a swagger:model AddMySQLOKBodyQANMysqlPerfschema */ type AddMySQLOKBodyQANMysqlPerfschema struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1253,7 +1239,6 @@ AddMySQLOKBodyQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent and sen swagger:model AddMySQLOKBodyQANMysqlSlowlog */ type AddMySQLOKBodyQANMysqlSlowlog struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1477,7 +1462,6 @@ AddMySQLOKBodyService MySQLService represents a generic MySQL instance. swagger:model AddMySQLOKBodyService */ type AddMySQLOKBodyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1545,7 +1529,6 @@ AddMySQLParamsBodyAddNode AddNodeParams holds node params and is used to add new swagger:model AddMySQLParamsBodyAddNode */ type AddMySQLParamsBodyAddNode struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/node/register_node_parameters.go b/api/managementpb/json/client/node/register_node_parameters.go index e50a9c1a89..df5bbc15e6 100644 --- a/api/managementpb/json/client/node/register_node_parameters.go +++ b/api/managementpb/json/client/node/register_node_parameters.go @@ -60,7 +60,6 @@ RegisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RegisterNodeParams struct { - // Body. Body RegisterNodeBody @@ -130,7 +129,6 @@ func (o *RegisterNodeParams) SetBody(body RegisterNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RegisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/node/register_node_responses.go b/api/managementpb/json/client/node/register_node_responses.go index 0fdaed8890..747c5965d7 100644 --- a/api/managementpb/json/client/node/register_node_responses.go +++ b/api/managementpb/json/client/node/register_node_responses.go @@ -62,12 +62,12 @@ type RegisterNodeOK struct { func (o *RegisterNodeOK) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Register][%d] registerNodeOk %+v", 200, o.Payload) } + func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { return o.Payload } func (o *RegisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RegisterNodeOKBody) // response payload @@ -104,12 +104,12 @@ func (o *RegisterNodeDefault) Code() int { func (o *RegisterNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Register][%d] RegisterNode default %+v", o._statusCode, o.Payload) } + func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { return o.Payload } func (o *RegisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RegisterNodeDefaultBody) // response payload @@ -125,7 +125,6 @@ RegisterNodeBody register node body swagger:model RegisterNodeBody */ type RegisterNodeBody struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` @@ -320,7 +319,6 @@ RegisterNodeDefaultBody register node default body swagger:model RegisterNodeDefaultBody */ type RegisterNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -386,9 +384,7 @@ func (o *RegisterNodeDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -399,7 +395,6 @@ func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -428,7 +423,6 @@ RegisterNodeDefaultBodyDetailsItems0 register node default body details items0 swagger:model RegisterNodeDefaultBodyDetailsItems0 */ type RegisterNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -466,7 +460,6 @@ RegisterNodeOKBody register node OK body swagger:model RegisterNodeOKBody */ type RegisterNodeOKBody struct { - // Token represents token for vmagent auth config. Token string `json:"token,omitempty"` @@ -582,7 +575,6 @@ func (o *RegisterNodeOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, formats strfmt.Registry) error { - if o.ContainerNode != nil { if err := o.ContainerNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -598,7 +590,6 @@ func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, f } func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, formats strfmt.Registry) error { - if o.GenericNode != nil { if err := o.GenericNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -614,7 +605,6 @@ func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, for } func (o *RegisterNodeOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if err := o.PMMAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -652,7 +642,6 @@ RegisterNodeOKBodyContainerNode ContainerNode represents a Docker container. swagger:model RegisterNodeOKBodyContainerNode */ type RegisterNodeOKBodyContainerNode struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -717,7 +706,6 @@ RegisterNodeOKBodyGenericNode GenericNode represents a bare metal server or virt swagger:model RegisterNodeOKBodyGenericNode */ type RegisterNodeOKBodyGenericNode struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -779,7 +767,6 @@ RegisterNodeOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model RegisterNodeOKBodyPMMAgent */ type RegisterNodeOKBodyPMMAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go b/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go index 7b16633d78..35e261e3fe 100644 --- a/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go +++ b/api/managementpb/json/client/postgre_sql/add_postgre_sql_parameters.go @@ -60,7 +60,6 @@ AddPostgreSQLParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddPostgreSQLParams struct { - // Body. Body AddPostgreSQLBody @@ -130,7 +129,6 @@ func (o *AddPostgreSQLParams) SetBody(body AddPostgreSQLBody) { // WriteToRequest writes these params to a swagger request func (o *AddPostgreSQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go b/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go index a1391fd222..ba2ec37478 100644 --- a/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go +++ b/api/managementpb/json/client/postgre_sql/add_postgre_sql_responses.go @@ -62,12 +62,12 @@ type AddPostgreSQLOK struct { func (o *AddPostgreSQLOK) Error() string { return fmt.Sprintf("[POST /v1/management/PostgreSQL/Add][%d] addPostgreSqlOk %+v", 200, o.Payload) } + func (o *AddPostgreSQLOK) GetPayload() *AddPostgreSQLOKBody { return o.Payload } func (o *AddPostgreSQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgreSQLOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddPostgreSQLDefault) Code() int { func (o *AddPostgreSQLDefault) Error() string { return fmt.Sprintf("[POST /v1/management/PostgreSQL/Add][%d] AddPostgreSQL default %+v", o._statusCode, o.Payload) } + func (o *AddPostgreSQLDefault) GetPayload() *AddPostgreSQLDefaultBody { return o.Payload } func (o *AddPostgreSQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgreSQLDefaultBody) // response payload @@ -125,7 +125,6 @@ AddPostgreSQLBody add postgre SQL body swagger:model AddPostgreSQLBody */ type AddPostgreSQLBody struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -380,7 +379,6 @@ func (o *AddPostgreSQLBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddPostgreSQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -418,7 +416,6 @@ AddPostgreSQLDefaultBody add postgre SQL default body swagger:model AddPostgreSQLDefaultBody */ type AddPostgreSQLDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -484,9 +481,7 @@ func (o *AddPostgreSQLDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddPostgreSQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -497,7 +492,6 @@ func (o *AddPostgreSQLDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -526,7 +520,6 @@ AddPostgreSQLDefaultBodyDetailsItems0 add postgre SQL default body details items swagger:model AddPostgreSQLDefaultBodyDetailsItems0 */ type AddPostgreSQLDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -564,7 +557,6 @@ AddPostgreSQLOKBody add postgre SQL OK body swagger:model AddPostgreSQLOKBody */ type AddPostgreSQLOKBody struct { - // postgres exporter PostgresExporter *AddPostgreSQLOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` @@ -707,7 +699,6 @@ func (o *AddPostgreSQLOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddPostgreSQLOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -723,7 +714,6 @@ func (o *AddPostgreSQLOKBody) contextValidatePostgresExporter(ctx context.Contex } func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -739,7 +729,6 @@ func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx } func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -755,7 +744,6 @@ func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx } func (o *AddPostgreSQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -793,7 +781,6 @@ AddPostgreSQLOKBodyPostgresExporter PostgresExporter runs on Generic or Containe swagger:model AddPostgreSQLOKBodyPostgresExporter */ type AddPostgreSQLOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1003,7 +990,6 @@ AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent swagger:model AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent */ type AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1212,7 +1198,6 @@ AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAge swagger:model AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent */ type AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1424,7 +1409,6 @@ AddPostgreSQLOKBodyService PostgreSQLService represents a generic PostgreSQL ins swagger:model AddPostgreSQLOKBodyService */ type AddPostgreSQLOKBodyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1495,7 +1479,6 @@ AddPostgreSQLParamsBodyAddNode AddNodeParams holds node params and is used to ad swagger:model AddPostgreSQLParamsBodyAddNode */ type AddPostgreSQLParamsBodyAddNode struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go b/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go index f212574e29..7857dd35b2 100644 --- a/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go +++ b/api/managementpb/json/client/proxy_sql/add_proxy_sql_parameters.go @@ -60,7 +60,6 @@ AddProxySQLParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddProxySQLParams struct { - // Body. Body AddProxySQLBody @@ -130,7 +129,6 @@ func (o *AddProxySQLParams) SetBody(body AddProxySQLBody) { // WriteToRequest writes these params to a swagger request func (o *AddProxySQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go b/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go index 144c99236c..f653aa22f4 100644 --- a/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go +++ b/api/managementpb/json/client/proxy_sql/add_proxy_sql_responses.go @@ -62,12 +62,12 @@ type AddProxySQLOK struct { func (o *AddProxySQLOK) Error() string { return fmt.Sprintf("[POST /v1/management/ProxySQL/Add][%d] addProxySqlOk %+v", 200, o.Payload) } + func (o *AddProxySQLOK) GetPayload() *AddProxySQLOKBody { return o.Payload } func (o *AddProxySQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddProxySQLOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddProxySQLDefault) Code() int { func (o *AddProxySQLDefault) Error() string { return fmt.Sprintf("[POST /v1/management/ProxySQL/Add][%d] AddProxySQL default %+v", o._statusCode, o.Payload) } + func (o *AddProxySQLDefault) GetPayload() *AddProxySQLDefaultBody { return o.Payload } func (o *AddProxySQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddProxySQLDefaultBody) // response payload @@ -125,7 +125,6 @@ AddProxySQLBody add proxy SQL body swagger:model AddProxySQLBody */ type AddProxySQLBody struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -353,7 +352,6 @@ func (o *AddProxySQLBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddProxySQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if err := o.AddNode.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -391,7 +389,6 @@ AddProxySQLDefaultBody add proxy SQL default body swagger:model AddProxySQLDefaultBody */ type AddProxySQLDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -457,9 +454,7 @@ func (o *AddProxySQLDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddProxySQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -470,7 +465,6 @@ func (o *AddProxySQLDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -499,7 +493,6 @@ AddProxySQLDefaultBodyDetailsItems0 add proxy SQL default body details items0 swagger:model AddProxySQLDefaultBodyDetailsItems0 */ type AddProxySQLDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -537,7 +530,6 @@ AddProxySQLOKBody add proxy SQL OK body swagger:model AddProxySQLOKBody */ type AddProxySQLOKBody struct { - // proxysql exporter ProxysqlExporter *AddProxySQLOKBodyProxysqlExporter `json:"proxysql_exporter,omitempty"` @@ -620,7 +612,6 @@ func (o *AddProxySQLOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddProxySQLOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if err := o.ProxysqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -636,7 +627,6 @@ func (o *AddProxySQLOKBody) contextValidateProxysqlExporter(ctx context.Context, } func (o *AddProxySQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if err := o.Service.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -674,7 +664,6 @@ AddProxySQLOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container swagger:model AddProxySQLOKBodyProxysqlExporter */ type AddProxySQLOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -886,7 +875,6 @@ AddProxySQLOKBodyService ProxySQLService represents a generic ProxySQL instance. swagger:model AddProxySQLOKBodyService */ type AddProxySQLOKBodyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -954,7 +942,6 @@ AddProxySQLParamsBodyAddNode AddNodeParams holds node params and is used to add swagger:model AddProxySQLParamsBodyAddNode */ type AddProxySQLParamsBodyAddNode struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` diff --git a/api/managementpb/json/client/rds/add_rds_parameters.go b/api/managementpb/json/client/rds/add_rds_parameters.go index 8d9148608c..a2dc2089bf 100644 --- a/api/managementpb/json/client/rds/add_rds_parameters.go +++ b/api/managementpb/json/client/rds/add_rds_parameters.go @@ -60,7 +60,6 @@ AddRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddRDSParams struct { - // Body. Body AddRDSBody @@ -130,7 +129,6 @@ func (o *AddRDSParams) SetBody(body AddRDSBody) { // WriteToRequest writes these params to a swagger request func (o *AddRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/rds/add_rds_responses.go b/api/managementpb/json/client/rds/add_rds_responses.go index 4d0d86021f..0c5c17da70 100644 --- a/api/managementpb/json/client/rds/add_rds_responses.go +++ b/api/managementpb/json/client/rds/add_rds_responses.go @@ -62,12 +62,12 @@ type AddRDSOK struct { func (o *AddRDSOK) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Add][%d] addRdsOk %+v", 200, o.Payload) } + func (o *AddRDSOK) GetPayload() *AddRDSOKBody { return o.Payload } func (o *AddRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRDSOKBody) // response payload @@ -104,12 +104,12 @@ func (o *AddRDSDefault) Code() int { func (o *AddRDSDefault) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Add][%d] AddRDS default %+v", o._statusCode, o.Payload) } + func (o *AddRDSDefault) GetPayload() *AddRDSDefaultBody { return o.Payload } func (o *AddRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddRDSDefaultBody) // response payload @@ -125,7 +125,6 @@ AddRDSBody add RDS body swagger:model AddRDSBody */ type AddRDSBody struct { - // AWS region. Region string `json:"region,omitempty"` @@ -358,7 +357,6 @@ AddRDSDefaultBody add RDS default body swagger:model AddRDSDefaultBody */ type AddRDSDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -424,9 +422,7 @@ func (o *AddRDSDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *AddRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -437,7 +433,6 @@ func (o *AddRDSDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -466,7 +461,6 @@ AddRDSDefaultBodyDetailsItems0 add RDS default body details items0 swagger:model AddRDSDefaultBodyDetailsItems0 */ type AddRDSDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -504,7 +498,6 @@ AddRDSOKBody add RDS OK body swagger:model AddRDSOKBody */ type AddRDSOKBody struct { - // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -770,7 +763,6 @@ func (o *AddRDSOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddRDSOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if err := o.Mysql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -786,7 +778,6 @@ func (o *AddRDSOKBody) contextValidateMysql(ctx context.Context, formats strfmt. } func (o *AddRDSOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -802,7 +793,6 @@ func (o *AddRDSOKBody) contextValidateMysqldExporter(ctx context.Context, format } func (o *AddRDSOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { - if o.Node != nil { if err := o.Node.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -818,7 +808,6 @@ func (o *AddRDSOKBody) contextValidateNode(ctx context.Context, formats strfmt.R } func (o *AddRDSOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -834,7 +823,6 @@ func (o *AddRDSOKBody) contextValidatePostgresql(ctx context.Context, formats st } func (o *AddRDSOKBody) contextValidatePostgresqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlExporter != nil { if err := o.PostgresqlExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -850,7 +838,6 @@ func (o *AddRDSOKBody) contextValidatePostgresqlExporter(ctx context.Context, fo } func (o *AddRDSOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschema != nil { if err := o.QANMysqlPerfschema.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -866,7 +853,6 @@ func (o *AddRDSOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, fo } func (o *AddRDSOKBody) contextValidateQANPostgresqlPgstatements(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatements != nil { if err := o.QANPostgresqlPgstatements.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -882,7 +868,6 @@ func (o *AddRDSOKBody) contextValidateQANPostgresqlPgstatements(ctx context.Cont } func (o *AddRDSOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if err := o.RDSExporter.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -920,7 +905,6 @@ AddRDSOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddRDSOKBodyMysql */ type AddRDSOKBodyMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -988,7 +972,6 @@ AddRDSOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node and swagger:model AddRDSOKBodyMysqldExporter */ type AddRDSOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1217,7 +1200,6 @@ AddRDSOKBodyNode RemoteRDSNode represents remote RDS Node. Agents can't run on R swagger:model AddRDSOKBodyNode */ type AddRDSOKBodyNode struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1277,7 +1259,6 @@ AddRDSOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL instanc swagger:model AddRDSOKBodyPostgresql */ type AddRDSOKBodyPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1348,7 +1329,6 @@ AddRDSOKBodyPostgresqlExporter PostgresExporter runs on Generic or Container Nod swagger:model AddRDSOKBodyPostgresqlExporter */ type AddRDSOKBodyPostgresqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1558,7 +1538,6 @@ AddRDSOKBodyQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-agent and swagger:model AddRDSOKBodyQANMysqlPerfschema */ type AddRDSOKBodyQANMysqlPerfschema struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1779,7 +1758,6 @@ AddRDSOKBodyQANPostgresqlPgstatements QANPostgreSQLPgStatementsAgent runs within swagger:model AddRDSOKBodyQANPostgresqlPgstatements */ type AddRDSOKBodyQANPostgresqlPgstatements struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1988,7 +1966,6 @@ AddRDSOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expose swagger:model AddRDSOKBodyRDSExporter */ type AddRDSOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/managementpb/json/client/rds/discover_rds_parameters.go b/api/managementpb/json/client/rds/discover_rds_parameters.go index 0d74bf2782..2866e7202c 100644 --- a/api/managementpb/json/client/rds/discover_rds_parameters.go +++ b/api/managementpb/json/client/rds/discover_rds_parameters.go @@ -60,7 +60,6 @@ DiscoverRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DiscoverRDSParams struct { - // Body. Body DiscoverRDSBody @@ -130,7 +129,6 @@ func (o *DiscoverRDSParams) SetBody(body DiscoverRDSBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/rds/discover_rds_responses.go b/api/managementpb/json/client/rds/discover_rds_responses.go index 43bb9fe549..aab13344e2 100644 --- a/api/managementpb/json/client/rds/discover_rds_responses.go +++ b/api/managementpb/json/client/rds/discover_rds_responses.go @@ -62,12 +62,12 @@ type DiscoverRDSOK struct { func (o *DiscoverRDSOK) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Discover][%d] discoverRdsOk %+v", 200, o.Payload) } + func (o *DiscoverRDSOK) GetPayload() *DiscoverRDSOKBody { return o.Payload } func (o *DiscoverRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverRDSOKBody) // response payload @@ -104,12 +104,12 @@ func (o *DiscoverRDSDefault) Code() int { func (o *DiscoverRDSDefault) Error() string { return fmt.Sprintf("[POST /v1/management/RDS/Discover][%d] DiscoverRDS default %+v", o._statusCode, o.Payload) } + func (o *DiscoverRDSDefault) GetPayload() *DiscoverRDSDefaultBody { return o.Payload } func (o *DiscoverRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverRDSDefaultBody) // response payload @@ -125,7 +125,6 @@ DiscoverRDSBody discover RDS body swagger:model DiscoverRDSBody */ type DiscoverRDSBody struct { - // AWS Access key. Optional. AWSAccessKey string `json:"aws_access_key,omitempty"` @@ -166,7 +165,6 @@ DiscoverRDSDefaultBody discover RDS default body swagger:model DiscoverRDSDefaultBody */ type DiscoverRDSDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -232,9 +230,7 @@ func (o *DiscoverRDSDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -245,7 +241,6 @@ func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -274,7 +269,6 @@ DiscoverRDSDefaultBodyDetailsItems0 discover RDS default body details items0 swagger:model DiscoverRDSDefaultBodyDetailsItems0 */ type DiscoverRDSDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -312,7 +306,6 @@ DiscoverRDSOKBody discover RDS OK body swagger:model DiscoverRDSOKBody */ type DiscoverRDSOKBody struct { - // rds instances RDSInstances []*DiscoverRDSOKBodyRDSInstancesItems0 `json:"rds_instances"` } @@ -372,9 +365,7 @@ func (o *DiscoverRDSOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RDSInstances); i++ { - if o.RDSInstances[i] != nil { if err := o.RDSInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -385,7 +376,6 @@ func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, for return err } } - } return nil @@ -414,7 +404,6 @@ DiscoverRDSOKBodyRDSInstancesItems0 DiscoverRDSInstance models an unique RDS ins swagger:model DiscoverRDSOKBodyRDSInstancesItems0 */ type DiscoverRDSOKBodyRDSInstancesItems0 struct { - // AWS region. Region string `json:"region,omitempty"` diff --git a/api/managementpb/json/client/security_checks/change_security_checks_parameters.go b/api/managementpb/json/client/security_checks/change_security_checks_parameters.go index 8120533c57..36cfeac04a 100644 --- a/api/managementpb/json/client/security_checks/change_security_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/change_security_checks_parameters.go @@ -60,7 +60,6 @@ ChangeSecurityChecksParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type ChangeSecurityChecksParams struct { - // Body. Body ChangeSecurityChecksBody @@ -130,7 +129,6 @@ func (o *ChangeSecurityChecksParams) SetBody(body ChangeSecurityChecksBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/change_security_checks_responses.go b/api/managementpb/json/client/security_checks/change_security_checks_responses.go index cda296b947..01c8381711 100644 --- a/api/managementpb/json/client/security_checks/change_security_checks_responses.go +++ b/api/managementpb/json/client/security_checks/change_security_checks_responses.go @@ -62,12 +62,12 @@ type ChangeSecurityChecksOK struct { func (o *ChangeSecurityChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Change][%d] changeSecurityChecksOk %+v", 200, o.Payload) } + func (o *ChangeSecurityChecksOK) GetPayload() interface{} { return o.Payload } func (o *ChangeSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *ChangeSecurityChecksDefault) Code() int { func (o *ChangeSecurityChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Change][%d] ChangeSecurityChecks default %+v", o._statusCode, o.Payload) } + func (o *ChangeSecurityChecksDefault) GetPayload() *ChangeSecurityChecksDefaultBody { return o.Payload } func (o *ChangeSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeSecurityChecksDefaultBody) // response payload @@ -123,7 +123,6 @@ ChangeSecurityChecksBody change security checks body swagger:model ChangeSecurityChecksBody */ type ChangeSecurityChecksBody struct { - // params Params []*ChangeSecurityChecksParamsBodyParamsItems0 `json:"params"` } @@ -183,9 +182,7 @@ func (o *ChangeSecurityChecksBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSecurityChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if err := o.Params[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -196,7 +193,6 @@ func (o *ChangeSecurityChecksBody) contextValidateParams(ctx context.Context, fo return err } } - } return nil @@ -225,7 +221,6 @@ ChangeSecurityChecksDefaultBody change security checks default body swagger:model ChangeSecurityChecksDefaultBody */ type ChangeSecurityChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -291,9 +286,7 @@ func (o *ChangeSecurityChecksDefaultBody) ContextValidate(ctx context.Context, f } func (o *ChangeSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -304,7 +297,6 @@ func (o *ChangeSecurityChecksDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -333,7 +325,6 @@ ChangeSecurityChecksDefaultBodyDetailsItems0 change security checks default body swagger:model ChangeSecurityChecksDefaultBodyDetailsItems0 */ type ChangeSecurityChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -371,7 +362,6 @@ ChangeSecurityChecksParamsBodyParamsItems0 ChangeSecurityCheckParams specifies a swagger:model ChangeSecurityChecksParamsBodyParamsItems0 */ type ChangeSecurityChecksParamsBodyParamsItems0 struct { - // The name of the check to change. Name string `json:"name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go b/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go index 607838916c..5cfe658f09 100644 --- a/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/get_failed_checks_parameters.go @@ -60,7 +60,6 @@ GetFailedChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetFailedChecksParams struct { - // Body. Body GetFailedChecksBody @@ -130,7 +129,6 @@ func (o *GetFailedChecksParams) SetBody(body GetFailedChecksBody) { // WriteToRequest writes these params to a swagger request func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/get_failed_checks_responses.go b/api/managementpb/json/client/security_checks/get_failed_checks_responses.go index d8a5c38d34..f095ef0be5 100644 --- a/api/managementpb/json/client/security_checks/get_failed_checks_responses.go +++ b/api/managementpb/json/client/security_checks/get_failed_checks_responses.go @@ -62,12 +62,12 @@ type GetFailedChecksOK struct { func (o *GetFailedChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/FailedChecks][%d] getFailedChecksOk %+v", 200, o.Payload) } + func (o *GetFailedChecksOK) GetPayload() *GetFailedChecksOKBody { return o.Payload } func (o *GetFailedChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetFailedChecksOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetFailedChecksDefault) Code() int { func (o *GetFailedChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/FailedChecks][%d] GetFailedChecks default %+v", o._statusCode, o.Payload) } + func (o *GetFailedChecksDefault) GetPayload() *GetFailedChecksDefaultBody { return o.Payload } func (o *GetFailedChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetFailedChecksDefaultBody) // response payload @@ -125,7 +125,6 @@ GetFailedChecksBody get failed checks body swagger:model GetFailedChecksBody */ type GetFailedChecksBody struct { - // service id ServiceID string `json:"service_id,omitempty"` @@ -181,7 +180,6 @@ func (o *GetFailedChecksBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetFailedChecksBody) contextValidatePageParams(ctx context.Context, formats strfmt.Registry) error { - if o.PageParams != nil { if err := o.PageParams.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -219,7 +217,6 @@ GetFailedChecksDefaultBody get failed checks default body swagger:model GetFailedChecksDefaultBody */ type GetFailedChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -285,9 +282,7 @@ func (o *GetFailedChecksDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -298,7 +293,6 @@ func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -327,7 +321,6 @@ GetFailedChecksDefaultBodyDetailsItems0 get failed checks default body details i swagger:model GetFailedChecksDefaultBodyDetailsItems0 */ type GetFailedChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -365,7 +358,6 @@ GetFailedChecksOKBody get failed checks OK body swagger:model GetFailedChecksOKBody */ type GetFailedChecksOKBody struct { - // results Results []*GetFailedChecksOKBodyResultsItems0 `json:"results"` @@ -455,9 +447,7 @@ func (o *GetFailedChecksOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Results); i++ { - if o.Results[i] != nil { if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -468,14 +458,12 @@ func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, form return err } } - } return nil } func (o *GetFailedChecksOKBody) contextValidatePageTotals(ctx context.Context, formats strfmt.Registry) error { - if o.PageTotals != nil { if err := o.PageTotals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -513,7 +501,6 @@ GetFailedChecksOKBodyPageTotals PageTotals represents total values for paginatio swagger:model GetFailedChecksOKBodyPageTotals */ type GetFailedChecksOKBodyPageTotals struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -554,7 +541,6 @@ GetFailedChecksOKBodyResultsItems0 CheckResult represents the check results for swagger:model GetFailedChecksOKBodyResultsItems0 */ type GetFailedChecksOKBodyResultsItems0 struct { - // summary Summary string `json:"summary,omitempty"` @@ -692,7 +678,6 @@ GetFailedChecksParamsBodyPageParams PageParams represents page request parameter swagger:model GetFailedChecksParamsBodyPageParams */ type GetFailedChecksParamsBodyPageParams struct { - // Maximum number of results per page. PageSize int32 `json:"page_size,omitempty"` diff --git a/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go b/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go index 197bcab662..36c1b70857 100644 --- a/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go +++ b/api/managementpb/json/client/security_checks/get_security_check_results_parameters.go @@ -60,7 +60,6 @@ GetSecurityCheckResultsParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type GetSecurityCheckResultsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *GetSecurityCheckResultsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetSecurityCheckResultsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/get_security_check_results_responses.go b/api/managementpb/json/client/security_checks/get_security_check_results_responses.go index 432fa0919a..aa03b1b477 100644 --- a/api/managementpb/json/client/security_checks/get_security_check_results_responses.go +++ b/api/managementpb/json/client/security_checks/get_security_check_results_responses.go @@ -62,12 +62,12 @@ type GetSecurityCheckResultsOK struct { func (o *GetSecurityCheckResultsOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/GetCheckResults][%d] getSecurityCheckResultsOk %+v", 200, o.Payload) } + func (o *GetSecurityCheckResultsOK) GetPayload() *GetSecurityCheckResultsOKBody { return o.Payload } func (o *GetSecurityCheckResultsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetSecurityCheckResultsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetSecurityCheckResultsDefault) Code() int { func (o *GetSecurityCheckResultsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/GetCheckResults][%d] GetSecurityCheckResults default %+v", o._statusCode, o.Payload) } + func (o *GetSecurityCheckResultsDefault) GetPayload() *GetSecurityCheckResultsDefaultBody { return o.Payload } func (o *GetSecurityCheckResultsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetSecurityCheckResultsDefaultBody) // response payload @@ -125,7 +125,6 @@ GetSecurityCheckResultsDefaultBody get security check results default body swagger:model GetSecurityCheckResultsDefaultBody */ type GetSecurityCheckResultsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *GetSecurityCheckResultsDefaultBody) ContextValidate(ctx context.Context } func (o *GetSecurityCheckResultsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *GetSecurityCheckResultsDefaultBody) contextValidateDetails(ctx context. return err } } - } return nil @@ -233,7 +229,6 @@ GetSecurityCheckResultsDefaultBodyDetailsItems0 get security check results defau swagger:model GetSecurityCheckResultsDefaultBodyDetailsItems0 */ type GetSecurityCheckResultsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ GetSecurityCheckResultsOKBody get security check results OK body swagger:model GetSecurityCheckResultsOKBody */ type GetSecurityCheckResultsOKBody struct { - // results Results []*GetSecurityCheckResultsOKBodyResultsItems0 `json:"results"` } @@ -331,9 +325,7 @@ func (o *GetSecurityCheckResultsOKBody) ContextValidate(ctx context.Context, for } func (o *GetSecurityCheckResultsOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Results); i++ { - if o.Results[i] != nil { if err := o.Results[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,7 +336,6 @@ func (o *GetSecurityCheckResultsOKBody) contextValidateResults(ctx context.Conte return err } } - } return nil @@ -373,7 +364,6 @@ GetSecurityCheckResultsOKBodyResultsItems0 SecurityCheckResult represents the ch swagger:model GetSecurityCheckResultsOKBodyResultsItems0 */ type GetSecurityCheckResultsOKBodyResultsItems0 struct { - // summary Summary string `json:"summary,omitempty"` diff --git a/api/managementpb/json/client/security_checks/list_advisors_parameters.go b/api/managementpb/json/client/security_checks/list_advisors_parameters.go index e5f97cf934..a426d57d4c 100644 --- a/api/managementpb/json/client/security_checks/list_advisors_parameters.go +++ b/api/managementpb/json/client/security_checks/list_advisors_parameters.go @@ -60,7 +60,6 @@ ListAdvisorsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAdvisorsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListAdvisorsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/list_advisors_responses.go b/api/managementpb/json/client/security_checks/list_advisors_responses.go index 6d72edeef1..cc98f1942d 100644 --- a/api/managementpb/json/client/security_checks/list_advisors_responses.go +++ b/api/managementpb/json/client/security_checks/list_advisors_responses.go @@ -62,12 +62,12 @@ type ListAdvisorsOK struct { func (o *ListAdvisorsOK) Error() string { return fmt.Sprintf("[POST /v1/management/Advisors/List][%d] listAdvisorsOk %+v", 200, o.Payload) } + func (o *ListAdvisorsOK) GetPayload() *ListAdvisorsOKBody { return o.Payload } func (o *ListAdvisorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAdvisorsOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListAdvisorsDefault) Code() int { func (o *ListAdvisorsDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Advisors/List][%d] ListAdvisors default %+v", o._statusCode, o.Payload) } + func (o *ListAdvisorsDefault) GetPayload() *ListAdvisorsDefaultBody { return o.Payload } func (o *ListAdvisorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAdvisorsDefaultBody) // response payload @@ -125,7 +125,6 @@ ListAdvisorsDefaultBody list advisors default body swagger:model ListAdvisorsDefaultBody */ type ListAdvisorsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *ListAdvisorsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -233,7 +229,6 @@ ListAdvisorsDefaultBodyDetailsItems0 list advisors default body details items0 swagger:model ListAdvisorsDefaultBodyDetailsItems0 */ type ListAdvisorsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ ListAdvisorsOKBody list advisors OK body swagger:model ListAdvisorsOKBody */ type ListAdvisorsOKBody struct { - // advisors Advisors []*ListAdvisorsOKBodyAdvisorsItems0 `json:"advisors"` } @@ -331,9 +325,7 @@ func (o *ListAdvisorsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Advisors); i++ { - if o.Advisors[i] != nil { if err := o.Advisors[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,7 +336,6 @@ func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, format return err } } - } return nil @@ -373,7 +364,6 @@ ListAdvisorsOKBodyAdvisorsItems0 list advisors OK body advisors items0 swagger:model ListAdvisorsOKBodyAdvisorsItems0 */ type ListAdvisorsOKBodyAdvisorsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -448,9 +438,7 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) ContextValidate(ctx context.Context, } func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Checks); i++ { - if o.Checks[i] != nil { if err := o.Checks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -461,7 +449,6 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Con return err } } - } return nil @@ -490,7 +477,6 @@ ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 SecurityCheck contains check name a swagger:model ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 */ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/list_failed_services_parameters.go b/api/managementpb/json/client/security_checks/list_failed_services_parameters.go index 38f79dc68c..72d842a5c6 100644 --- a/api/managementpb/json/client/security_checks/list_failed_services_parameters.go +++ b/api/managementpb/json/client/security_checks/list_failed_services_parameters.go @@ -60,7 +60,6 @@ ListFailedServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListFailedServicesParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListFailedServicesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListFailedServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/list_failed_services_responses.go b/api/managementpb/json/client/security_checks/list_failed_services_responses.go index 5b4a499acc..5720854349 100644 --- a/api/managementpb/json/client/security_checks/list_failed_services_responses.go +++ b/api/managementpb/json/client/security_checks/list_failed_services_responses.go @@ -60,12 +60,12 @@ type ListFailedServicesOK struct { func (o *ListFailedServicesOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ListFailedServices][%d] listFailedServicesOk %+v", 200, o.Payload) } + func (o *ListFailedServicesOK) GetPayload() *ListFailedServicesOKBody { return o.Payload } func (o *ListFailedServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListFailedServicesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListFailedServicesDefault) Code() int { func (o *ListFailedServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ListFailedServices][%d] ListFailedServices default %+v", o._statusCode, o.Payload) } + func (o *ListFailedServicesDefault) GetPayload() *ListFailedServicesDefaultBody { return o.Payload } func (o *ListFailedServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListFailedServicesDefaultBody) // response payload @@ -123,7 +123,6 @@ ListFailedServicesDefaultBody list failed services default body swagger:model ListFailedServicesDefaultBody */ type ListFailedServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *ListFailedServicesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -231,7 +227,6 @@ ListFailedServicesDefaultBodyDetailsItems0 list failed services default body det swagger:model ListFailedServicesDefaultBodyDetailsItems0 */ type ListFailedServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ ListFailedServicesOKBody list failed services OK body swagger:model ListFailedServicesOKBody */ type ListFailedServicesOKBody struct { - // result Result []*ListFailedServicesOKBodyResultItems0 `json:"result"` } @@ -329,9 +323,7 @@ func (o *ListFailedServicesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Result); i++ { - if o.Result[i] != nil { if err := o.Result[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -342,7 +334,6 @@ func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, fo return err } } - } return nil @@ -371,7 +362,6 @@ ListFailedServicesOKBodyResultItems0 CheckResultSummary is a summary of check re swagger:model ListFailedServicesOKBodyResultItems0 */ type ListFailedServicesOKBodyResultItems0 struct { - // service name ServiceName string `json:"service_name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/list_security_checks_parameters.go b/api/managementpb/json/client/security_checks/list_security_checks_parameters.go index 5ca872ec7b..cee211cf84 100644 --- a/api/managementpb/json/client/security_checks/list_security_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/list_security_checks_parameters.go @@ -60,7 +60,6 @@ ListSecurityChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListSecurityChecksParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListSecurityChecksParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/list_security_checks_responses.go b/api/managementpb/json/client/security_checks/list_security_checks_responses.go index 0f1bd25fe3..dd59c7333b 100644 --- a/api/managementpb/json/client/security_checks/list_security_checks_responses.go +++ b/api/managementpb/json/client/security_checks/list_security_checks_responses.go @@ -62,12 +62,12 @@ type ListSecurityChecksOK struct { func (o *ListSecurityChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/List][%d] listSecurityChecksOk %+v", 200, o.Payload) } + func (o *ListSecurityChecksOK) GetPayload() *ListSecurityChecksOKBody { return o.Payload } func (o *ListSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListSecurityChecksOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListSecurityChecksDefault) Code() int { func (o *ListSecurityChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/List][%d] ListSecurityChecks default %+v", o._statusCode, o.Payload) } + func (o *ListSecurityChecksDefault) GetPayload() *ListSecurityChecksDefaultBody { return o.Payload } func (o *ListSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListSecurityChecksDefaultBody) // response payload @@ -125,7 +125,6 @@ ListSecurityChecksDefaultBody list security checks default body swagger:model ListSecurityChecksDefaultBody */ type ListSecurityChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *ListSecurityChecksDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *ListSecurityChecksDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -233,7 +229,6 @@ ListSecurityChecksDefaultBodyDetailsItems0 list security checks default body det swagger:model ListSecurityChecksDefaultBodyDetailsItems0 */ type ListSecurityChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ ListSecurityChecksOKBody list security checks OK body swagger:model ListSecurityChecksOKBody */ type ListSecurityChecksOKBody struct { - // checks Checks []*ListSecurityChecksOKBodyChecksItems0 `json:"checks"` } @@ -331,9 +325,7 @@ func (o *ListSecurityChecksOKBody) ContextValidate(ctx context.Context, formats } func (o *ListSecurityChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Checks); i++ { - if o.Checks[i] != nil { if err := o.Checks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -344,7 +336,6 @@ func (o *ListSecurityChecksOKBody) contextValidateChecks(ctx context.Context, fo return err } } - } return nil @@ -373,7 +364,6 @@ ListSecurityChecksOKBodyChecksItems0 SecurityCheck contains check name and statu swagger:model ListSecurityChecksOKBodyChecksItems0 */ type ListSecurityChecksOKBodyChecksItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/managementpb/json/client/security_checks/start_security_checks_parameters.go b/api/managementpb/json/client/security_checks/start_security_checks_parameters.go index ef322b5fe7..71f2f60549 100644 --- a/api/managementpb/json/client/security_checks/start_security_checks_parameters.go +++ b/api/managementpb/json/client/security_checks/start_security_checks_parameters.go @@ -60,7 +60,6 @@ StartSecurityChecksParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type StartSecurityChecksParams struct { - // Body. Body StartSecurityChecksBody @@ -130,7 +129,6 @@ func (o *StartSecurityChecksParams) SetBody(body StartSecurityChecksBody) { // WriteToRequest writes these params to a swagger request func (o *StartSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/start_security_checks_responses.go b/api/managementpb/json/client/security_checks/start_security_checks_responses.go index 7857206ea2..8ca64fa631 100644 --- a/api/managementpb/json/client/security_checks/start_security_checks_responses.go +++ b/api/managementpb/json/client/security_checks/start_security_checks_responses.go @@ -60,12 +60,12 @@ type StartSecurityChecksOK struct { func (o *StartSecurityChecksOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Start][%d] startSecurityChecksOk %+v", 200, o.Payload) } + func (o *StartSecurityChecksOK) GetPayload() interface{} { return o.Payload } func (o *StartSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *StartSecurityChecksDefault) Code() int { func (o *StartSecurityChecksDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/Start][%d] StartSecurityChecks default %+v", o._statusCode, o.Payload) } + func (o *StartSecurityChecksDefault) GetPayload() *StartSecurityChecksDefaultBody { return o.Payload } func (o *StartSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartSecurityChecksDefaultBody) // response payload @@ -121,7 +121,6 @@ StartSecurityChecksBody start security checks body swagger:model StartSecurityChecksBody */ type StartSecurityChecksBody struct { - // Names of the checks that should be started. Names []string `json:"names"` } @@ -159,7 +158,6 @@ StartSecurityChecksDefaultBody start security checks default body swagger:model StartSecurityChecksDefaultBody */ type StartSecurityChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *StartSecurityChecksDefaultBody) ContextValidate(ctx context.Context, fo } func (o *StartSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *StartSecurityChecksDefaultBody) contextValidateDetails(ctx context.Cont return err } } - } return nil @@ -267,7 +262,6 @@ StartSecurityChecksDefaultBodyDetailsItems0 start security checks default body d swagger:model StartSecurityChecksDefaultBodyDetailsItems0 */ type StartSecurityChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go b/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go index e75fc485f0..9ebd6258a3 100644 --- a/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go +++ b/api/managementpb/json/client/security_checks/toggle_check_alert_parameters.go @@ -60,7 +60,6 @@ ToggleCheckAlertParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ToggleCheckAlertParams struct { - // Body. Body ToggleCheckAlertBody @@ -130,7 +129,6 @@ func (o *ToggleCheckAlertParams) SetBody(body ToggleCheckAlertBody) { // WriteToRequest writes these params to a swagger request func (o *ToggleCheckAlertParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go b/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go index 4b08115b05..7ef640998f 100644 --- a/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go +++ b/api/managementpb/json/client/security_checks/toggle_check_alert_responses.go @@ -60,12 +60,12 @@ type ToggleCheckAlertOK struct { func (o *ToggleCheckAlertOK) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ToggleCheckAlert][%d] toggleCheckAlertOk %+v", 200, o.Payload) } + func (o *ToggleCheckAlertOK) GetPayload() interface{} { return o.Payload } func (o *ToggleCheckAlertOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ToggleCheckAlertDefault) Code() int { func (o *ToggleCheckAlertDefault) Error() string { return fmt.Sprintf("[POST /v1/management/SecurityChecks/ToggleCheckAlert][%d] ToggleCheckAlert default %+v", o._statusCode, o.Payload) } + func (o *ToggleCheckAlertDefault) GetPayload() *ToggleCheckAlertDefaultBody { return o.Payload } func (o *ToggleCheckAlertDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ToggleCheckAlertDefaultBody) // response payload @@ -121,7 +121,6 @@ ToggleCheckAlertBody toggle check alert body swagger:model ToggleCheckAlertBody */ type ToggleCheckAlertBody struct { - // Alert ID of the check result. AlertID string `json:"alert_id,omitempty"` @@ -162,7 +161,6 @@ ToggleCheckAlertDefaultBody toggle check alert default body swagger:model ToggleCheckAlertDefaultBody */ type ToggleCheckAlertDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *ToggleCheckAlertDefaultBody) ContextValidate(ctx context.Context, forma } func (o *ToggleCheckAlertDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *ToggleCheckAlertDefaultBody) contextValidateDetails(ctx context.Context return err } } - } return nil @@ -270,7 +265,6 @@ ToggleCheckAlertDefaultBodyDetailsItems0 toggle check alert default body details swagger:model ToggleCheckAlertDefaultBodyDetailsItems0 */ type ToggleCheckAlertDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/json/client/service/remove_service_parameters.go b/api/managementpb/json/client/service/remove_service_parameters.go index ecf4d056b8..8e50ba2a18 100644 --- a/api/managementpb/json/client/service/remove_service_parameters.go +++ b/api/managementpb/json/client/service/remove_service_parameters.go @@ -60,7 +60,6 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { - // Body. Body RemoveServiceBody @@ -130,7 +129,6 @@ func (o *RemoveServiceParams) SetBody(body RemoveServiceBody) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/json/client/service/remove_service_responses.go b/api/managementpb/json/client/service/remove_service_responses.go index 4e197ba1ed..054bb9437b 100644 --- a/api/managementpb/json/client/service/remove_service_responses.go +++ b/api/managementpb/json/client/service/remove_service_responses.go @@ -62,12 +62,12 @@ type RemoveServiceOK struct { func (o *RemoveServiceOK) Error() string { return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] removeServiceOk %+v", 200, o.Payload) } + func (o *RemoveServiceOK) GetPayload() interface{} { return o.Payload } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +102,12 @@ func (o *RemoveServiceDefault) Code() int { func (o *RemoveServiceDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] RemoveService default %+v", o._statusCode, o.Payload) } + func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { return o.Payload } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -123,7 +123,6 @@ RemoveServiceBody remove service body swagger:model RemoveServiceBody */ type RemoveServiceBody struct { - // ServiceType describes supported Service types. // Enum: [SERVICE_TYPE_INVALID MYSQL_SERVICE MONGODB_SERVICE POSTGRESQL_SERVICE PROXYSQL_SERVICE HAPROXY_SERVICE EXTERNAL_SERVICE] ServiceType *string `json:"service_type,omitempty"` @@ -235,7 +234,6 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -301,9 +299,7 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -314,7 +310,6 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -343,7 +338,6 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/metrics.pb.go b/api/managementpb/metrics.pb.go index d4d99240b2..9587c1862a 100644 --- a/api/managementpb/metrics.pb.go +++ b/api/managementpb/metrics.pb.go @@ -7,10 +7,11 @@ package managementpb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -103,10 +104,13 @@ func file_managementpb_metrics_proto_rawDescGZIP() []byte { return file_managementpb_metrics_proto_rawDescData } -var file_managementpb_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_metrics_proto_goTypes = []interface{}{ - (MetricsMode)(0), // 0: management.MetricsMode -} +var ( + file_managementpb_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_metrics_proto_goTypes = []interface{}{ + (MetricsMode)(0), // 0: management.MetricsMode + } +) + var file_managementpb_metrics_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/metrics.swagger.json b/api/managementpb/metrics.swagger.json deleted file mode 100644 index 8357e126c0..0000000000 --- a/api/managementpb/metrics.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/metrics.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/mongodb.pb.go b/api/managementpb/mongodb.pb.go index ba30117443..cf351f3a90 100644 --- a/api/managementpb/mongodb.pb.go +++ b/api/managementpb/mongodb.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -588,18 +590,21 @@ func file_managementpb_mongodb_proto_rawDescGZIP() []byte { return file_managementpb_mongodb_proto_rawDescData } -var file_managementpb_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_mongodb_proto_goTypes = []interface{}{ - (*AddMongoDBRequest)(nil), // 0: management.AddMongoDBRequest - (*AddMongoDBResponse)(nil), // 1: management.AddMongoDBResponse - nil, // 2: management.AddMongoDBRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.MongoDBService)(nil), // 6: inventory.MongoDBService - (*inventorypb.MongoDBExporter)(nil), // 7: inventory.MongoDBExporter - (*inventorypb.QANMongoDBProfilerAgent)(nil), // 8: inventory.QANMongoDBProfilerAgent -} +var ( + file_managementpb_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_mongodb_proto_goTypes = []interface{}{ + (*AddMongoDBRequest)(nil), // 0: management.AddMongoDBRequest + (*AddMongoDBResponse)(nil), // 1: management.AddMongoDBResponse + nil, // 2: management.AddMongoDBRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.MongoDBService)(nil), // 6: inventory.MongoDBService + (*inventorypb.MongoDBExporter)(nil), // 7: inventory.MongoDBExporter + (*inventorypb.QANMongoDBProfilerAgent)(nil), // 8: inventory.QANMongoDBProfilerAgent + } +) + var file_managementpb_mongodb_proto_depIdxs = []int32{ 3, // 0: management.AddMongoDBRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddMongoDBRequest.custom_labels:type_name -> management.AddMongoDBRequest.CustomLabelsEntry diff --git a/api/managementpb/mongodb.pb.gw.go b/api/managementpb/mongodb.pb.gw.go index a9be5d60a1..bf71ae102f 100644 --- a/api/managementpb/mongodb.pb.gw.go +++ b/api/managementpb/mongodb.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshaler, client MongoDBClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddMongoDBRequest @@ -45,7 +47,6 @@ func request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.AddMongoDB(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshaler, server MongoDBServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.M msg, err := server.AddMongoDB(ctx, &protoReq) return msg, metadata, err - } // RegisterMongoDBHandlerServer registers the http handlers for service MongoDB to "mux". @@ -70,7 +70,6 @@ func local_request_MongoDB_AddMongoDB_0(ctx context.Context, marshaler runtime.M // 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 RegisterMongoDBHandlerFromEndpoint instead. func RegisterMongoDBHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MongoDBServer) error { - mux.Handle("POST", pattern_MongoDB_AddMongoDB_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterMongoDBHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_MongoDB_AddMongoDB_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterMongoDBHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MongoDBClient" to call the correct interceptors. func RegisterMongoDBHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MongoDBClient) error { - mux.Handle("POST", pattern_MongoDB_AddMongoDB_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterMongoDBHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_MongoDB_AddMongoDB_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_MongoDB_AddMongoDB_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MongoDB", "Add"}, "")) -) +var pattern_MongoDB_AddMongoDB_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MongoDB", "Add"}, "")) -var ( - forward_MongoDB_AddMongoDB_0 = runtime.ForwardResponseMessage -) +var forward_MongoDB_AddMongoDB_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/mongodb.swagger.json b/api/managementpb/mongodb.swagger.json deleted file mode 100644 index 4d0662e58c..0000000000 --- a/api/managementpb/mongodb.swagger.json +++ /dev/null @@ -1,531 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/mongodb.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "MongoDB" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/MongoDB/Add": { - "post": { - "summary": "Add MongoDB", - "description": "Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mongodb_exporter\", and \"qan_mongodb_profiler\" agents with the provided \"pmm_agent_id\" and other parameters.", - "operationId": "AddMongoDB", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddMongoDBResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddMongoDBRequest" - } - } - ], - "tags": [ - "MongoDB" - ] - } - } - }, - "definitions": { - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryLogLevel": { - "type": "string", - "enum": [ - "auto", - "fatal", - "error", - "warn", - "info", - "debug" - ], - "default": "auto", - "title": "Log level for exporters" - }, - "inventoryMongoDBExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MongoDB username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "stats_collections": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of colletions to get stats from. Can use *" - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" - }, - "enable_all_collectors": { - "type": "boolean", - "description": "Enable All collectors." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics." - }, - "inventoryMongoDBService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MongoDBService represents a generic MongoDB instance." - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "inventoryQANMongoDBProfilerAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MongoDB username for getting profiler data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit).\n\nTrue if query examples are disabled.\n bool query_examples_disabled = 8; TODO https://jira.percona.com/browse/PMM-4650" - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." - }, - "managementAddMongoDBRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "node_name": { - "type": "string", - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "add_node": { - "$ref": "#/definitions/managementAddNodeParams", - "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "address": { - "type": "string", - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Service Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Service Access socket.\nAddress (and port) or socket is required." - }, - "pmm_agent_id": { - "type": "string", - "description": "The \"pmm-agent\" identifier which should run agents. Required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "username": { - "type": "string", - "description": "MongoDB username for exporter and QAN agent access." - }, - "password": { - "type": "string", - "description": "MongoDB password for exporter and QAN agent access." - }, - "qan_mongodb_profiler": { - "type": "boolean", - "description": "If true, adds qan-mongodb-profiler-agent for provided service." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check.\n\nDisable query examples.\n bool disable_query_examples = 16; TODO https://jira.percona.com/browse/PMM-4650" - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_certificate_key": { - "type": "string", - "description": "Client certificate and key." - }, - "tls_certificate_key_file_password": { - "type": "string", - "description": "Password for decrypting tls_certificate_key." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "authentication_mechanism": { - "type": "string", - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." - }, - "authentication_database": { - "type": "string", - "description": "Authentication database." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "stats_collections": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collections to get stats from. Can use * ." - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit" - }, - "enable_all_collectors": { - "type": "boolean", - "title": "Enable all collectors" - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "title": "Exporter log level" - } - } - }, - "managementAddMongoDBResponse": { - "type": "object", - "properties": { - "service": { - "$ref": "#/definitions/inventoryMongoDBService" - }, - "mongodb_exporter": { - "$ref": "#/definitions/inventoryMongoDBExporter" - }, - "qan_mongodb_profiler": { - "$ref": "#/definitions/inventoryQANMongoDBProfilerAgent" - } - } - }, - "managementAddNodeParams": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - } - }, - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/mongodb_grpc.pb.go b/api/managementpb/mongodb_grpc.pb.go index 9b83ee0c7f..43f024bc66 100644 --- a/api/managementpb/mongodb_grpc.pb.go +++ b/api/managementpb/mongodb_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -63,8 +64,7 @@ type MongoDBServer interface { } // UnimplementedMongoDBServer must be embedded to have forward compatible implementations. -type UnimplementedMongoDBServer struct { -} +type UnimplementedMongoDBServer struct{} func (UnimplementedMongoDBServer) AddMongoDB(context.Context, *AddMongoDBRequest) (*AddMongoDBResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMongoDB not implemented") diff --git a/api/managementpb/mysql.pb.go b/api/managementpb/mysql.pb.go index 540abc8049..773e63da5b 100644 --- a/api/managementpb/mysql.pb.go +++ b/api/managementpb/mysql.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -608,19 +610,22 @@ func file_managementpb_mysql_proto_rawDescGZIP() []byte { return file_managementpb_mysql_proto_rawDescData } -var file_managementpb_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_mysql_proto_goTypes = []interface{}{ - (*AddMySQLRequest)(nil), // 0: management.AddMySQLRequest - (*AddMySQLResponse)(nil), // 1: management.AddMySQLResponse - nil, // 2: management.AddMySQLRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.MySQLService)(nil), // 6: inventory.MySQLService - (*inventorypb.MySQLdExporter)(nil), // 7: inventory.MySQLdExporter - (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent - (*inventorypb.QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent -} +var ( + file_managementpb_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_mysql_proto_goTypes = []interface{}{ + (*AddMySQLRequest)(nil), // 0: management.AddMySQLRequest + (*AddMySQLResponse)(nil), // 1: management.AddMySQLResponse + nil, // 2: management.AddMySQLRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.MySQLService)(nil), // 6: inventory.MySQLService + (*inventorypb.MySQLdExporter)(nil), // 7: inventory.MySQLdExporter + (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.QANMySQLPerfSchemaAgent + (*inventorypb.QANMySQLSlowlogAgent)(nil), // 9: inventory.QANMySQLSlowlogAgent + } +) + var file_managementpb_mysql_proto_depIdxs = []int32{ 3, // 0: management.AddMySQLRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddMySQLRequest.custom_labels:type_name -> management.AddMySQLRequest.CustomLabelsEntry diff --git a/api/managementpb/mysql.pb.gw.go b/api/managementpb/mysql.pb.gw.go index b0a9152a08..bde4f775fe 100644 --- a/api/managementpb/mysql.pb.gw.go +++ b/api/managementpb/mysql.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, client MySQLClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddMySQLRequest @@ -45,7 +47,6 @@ func request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.AddMySQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, server MySQLServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.AddMySQL(ctx, &protoReq) return msg, metadata, err - } // RegisterMySQLHandlerServer registers the http handlers for service MySQL to "mux". @@ -70,7 +70,6 @@ func local_request_MySQL_AddMySQL_0(ctx context.Context, marshaler runtime.Marsh // 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 RegisterMySQLHandlerFromEndpoint instead. func RegisterMySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MySQLServer) error { - mux.Handle("POST", pattern_MySQL_AddMySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterMySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_MySQL_AddMySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterMySQLHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MySQLClient" to call the correct interceptors. func RegisterMySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MySQLClient) error { - mux.Handle("POST", pattern_MySQL_AddMySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterMySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_MySQL_AddMySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_MySQL_AddMySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MySQL", "Add"}, "")) -) +var pattern_MySQL_AddMySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MySQL", "Add"}, "")) -var ( - forward_MySQL_AddMySQL_0 = runtime.ForwardResponseMessage -) +var forward_MySQL_AddMySQL_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/mysql.swagger.json b/api/managementpb/mysql.swagger.json deleted file mode 100644 index aac6fd98e5..0000000000 --- a/api/managementpb/mysql.swagger.json +++ /dev/null @@ -1,645 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/mysql.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "MySQL" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/MySQL/Add": { - "post": { - "summary": "Add MySQL", - "description": "Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mysqld_exporter\", and \"qan_mysql_perfschema\" agents with the provided \"pmm_agent_id\" and other parameters.", - "operationId": "AddMySQL", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddMySQLResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddMySQLRequest" - } - } - ], - "tags": [ - "MySQL" - ] - } - } - }, - "definitions": { - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryLogLevel": { - "type": "string", - "enum": [ - "auto", - "fatal", - "error", - "warn", - "info", - "debug" - ], - "default": "auto", - "title": "Log level for exporters" - }, - "inventoryMySQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MySQLService represents a generic MySQL instance." - }, - "inventoryMySQLdExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "tablestats_group_disabled": { - "type": "boolean", - "description": "True if tablestats group collectors are currently disabled." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "inventoryQANMySQLPerfSchemaAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting performance data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." - }, - "inventoryQANMySQLSlowlogAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting performance data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)" - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "max_slowlog_file_size": { - "type": "string", - "format": "int64", - "description": "Slowlog file is rotated at this size if \u003e 0." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "title": "mod tidy" - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." - }, - "managementAddMySQLRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "node_name": { - "type": "string", - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "add_node": { - "$ref": "#/definitions/managementAddNodeParams", - "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "address": { - "type": "string", - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Service Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Service Access socket.\nAddress (and port) or socket is required." - }, - "pmm_agent_id": { - "type": "string", - "description": "The \"pmm-agent\" identifier which should run agents. Required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "username": { - "type": "string", - "description": "MySQL username for scraping metrics." - }, - "password": { - "type": "string", - "description": "MySQL password for scraping metrics." - }, - "qan_mysql_perfschema": { - "type": "boolean", - "description": "If true, adds qan-mysql-perfschema-agent for provided service." - }, - "qan_mysql_slowlog": { - "type": "boolean", - "description": "If true, adds qan-mysql-slowlog-agent for provided service." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "max_slowlog_file_size": { - "type": "string", - "format": "int64", - "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "title": "Exporter log level" - } - } - }, - "managementAddMySQLResponse": { - "type": "object", - "properties": { - "service": { - "$ref": "#/definitions/inventoryMySQLService" - }, - "mysqld_exporter": { - "$ref": "#/definitions/inventoryMySQLdExporter" - }, - "qan_mysql_perfschema": { - "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" - }, - "qan_mysql_slowlog": { - "$ref": "#/definitions/inventoryQANMySQLSlowlogAgent" - }, - "table_count": { - "type": "integer", - "format": "int32", - "description": "Actual table count at the moment of adding." - } - } - }, - "managementAddNodeParams": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - } - }, - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/mysql_grpc.pb.go b/api/managementpb/mysql_grpc.pb.go index af4039782c..3451910944 100644 --- a/api/managementpb/mysql_grpc.pb.go +++ b/api/managementpb/mysql_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -63,8 +64,7 @@ type MySQLServer interface { } // UnimplementedMySQLServer must be embedded to have forward compatible implementations. -type UnimplementedMySQLServer struct { -} +type UnimplementedMySQLServer struct{} func (UnimplementedMySQLServer) AddMySQL(context.Context, *AddMySQLRequest) (*AddMySQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddMySQL not implemented") diff --git a/api/managementpb/node.pb.go b/api/managementpb/node.pb.go index 87de85bd39..2f557c0dab 100644 --- a/api/managementpb/node.pb.go +++ b/api/managementpb/node.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -380,17 +382,20 @@ func file_managementpb_node_proto_rawDescGZIP() []byte { return file_managementpb_node_proto_rawDescData } -var file_managementpb_node_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_node_proto_goTypes = []interface{}{ - (*RegisterNodeRequest)(nil), // 0: management.RegisterNodeRequest - (*RegisterNodeResponse)(nil), // 1: management.RegisterNodeResponse - nil, // 2: management.RegisterNodeRequest.CustomLabelsEntry - (inventorypb.NodeType)(0), // 3: inventory.NodeType - (MetricsMode)(0), // 4: management.MetricsMode - (*inventorypb.GenericNode)(nil), // 5: inventory.GenericNode - (*inventorypb.ContainerNode)(nil), // 6: inventory.ContainerNode - (*inventorypb.PMMAgent)(nil), // 7: inventory.PMMAgent -} +var ( + file_managementpb_node_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_node_proto_goTypes = []interface{}{ + (*RegisterNodeRequest)(nil), // 0: management.RegisterNodeRequest + (*RegisterNodeResponse)(nil), // 1: management.RegisterNodeResponse + nil, // 2: management.RegisterNodeRequest.CustomLabelsEntry + (inventorypb.NodeType)(0), // 3: inventory.NodeType + (MetricsMode)(0), // 4: management.MetricsMode + (*inventorypb.GenericNode)(nil), // 5: inventory.GenericNode + (*inventorypb.ContainerNode)(nil), // 6: inventory.ContainerNode + (*inventorypb.PMMAgent)(nil), // 7: inventory.PMMAgent + } +) + var file_managementpb_node_proto_depIdxs = []int32{ 3, // 0: management.RegisterNodeRequest.node_type:type_name -> inventory.NodeType 2, // 1: management.RegisterNodeRequest.custom_labels:type_name -> management.RegisterNodeRequest.CustomLabelsEntry diff --git a/api/managementpb/node.pb.gw.go b/api/managementpb/node.pb.gw.go index ea170a0c85..3107389032 100644 --- a/api/managementpb/node.pb.gw.go +++ b/api/managementpb/node.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RegisterNodeRequest @@ -45,7 +47,6 @@ func request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Ma msg, err := server.RegisterNode(ctx, &protoReq) return msg, metadata, err - } // RegisterNodeHandlerServer registers the http handlers for service Node to "mux". @@ -70,7 +70,6 @@ func local_request_Node_RegisterNode_0(ctx context.Context, marshaler runtime.Ma // 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 RegisterNodeHandlerFromEndpoint instead. func RegisterNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodeServer) error { - mux.Handle("POST", pattern_Node_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Node_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodeClient" to call the correct interceptors. func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeClient) error { - mux.Handle("POST", pattern_Node_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Node_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_Node_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) -) +var pattern_Node_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) -var ( - forward_Node_RegisterNode_0 = runtime.ForwardResponseMessage -) +var forward_Node_RegisterNode_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/node.swagger.json b/api/managementpb/node.swagger.json deleted file mode 100644 index ecbcb8bc78..0000000000 --- a/api/managementpb/node.swagger.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/node.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Node" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Node/Register": { - "post": { - "summary": "Register Node", - "description": "Registers a new Node and pmm-agent.", - "operationId": "RegisterNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementRegisterNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementRegisterNodeRequest" - } - } - ], - "tags": [ - "Node" - ] - } - } - }, - "definitions": { - "inventoryContainerNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id of the Generic Node where this Container Node runs." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "ContainerNode represents a Docker container." - }, - "inventoryGenericNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "GenericNode represents a bare metal server or virtual machine." - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "inventoryPMMAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "connected": { - "type": "boolean", - "description": "True if Agent is running and connected to pmm-managed." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - } - }, - "description": "PMMAgent runs on Generic or Container Node." - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "managementRegisterNodeRequest": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - }, - "reregister": { - "type": "boolean", - "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for node_exporter being added by this request.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - } - } - }, - "managementRegisterNodeResponse": { - "type": "object", - "properties": { - "generic_node": { - "$ref": "#/definitions/inventoryGenericNode" - }, - "container_node": { - "$ref": "#/definitions/inventoryContainerNode" - }, - "pmm_agent": { - "$ref": "#/definitions/inventoryPMMAgent" - }, - "token": { - "type": "string", - "description": "Token represents token for vmagent auth config." - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go b/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go index ea3e696461..01d945a85b 100644 --- a/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go +++ b/api/managementpb/node/json/client/mgmt_node/get_node_parameters.go @@ -60,7 +60,6 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { - // Body. Body GetNodeBody @@ -130,7 +129,6 @@ func (o *GetNodeParams) SetBody(body GetNodeBody) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/node/json/client/mgmt_node/get_node_responses.go b/api/managementpb/node/json/client/mgmt_node/get_node_responses.go index 46fde0d57c..8168ec3df5 100644 --- a/api/managementpb/node/json/client/mgmt_node/get_node_responses.go +++ b/api/managementpb/node/json/client/mgmt_node/get_node_responses.go @@ -62,12 +62,12 @@ type GetNodeOK struct { func (o *GetNodeOK) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Get][%d] getNodeOk %+v", 200, o.Payload) } + func (o *GetNodeOK) GetPayload() *GetNodeOKBody { return o.Payload } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetNodeDefault) Code() int { func (o *GetNodeDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Node/Get][%d] GetNode default %+v", o._statusCode, o.Payload) } + func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { return o.Payload } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeDefaultBody) // response payload @@ -125,7 +125,6 @@ GetNodeBody get node body swagger:model GetNodeBody */ type GetNodeBody struct { - // Unique Node identifier. NodeID string `json:"node_id,omitempty"` } @@ -163,7 +162,6 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -229,9 +227,7 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -242,7 +238,6 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -271,7 +266,6 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -309,7 +303,6 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { - // node Node *GetNodeOKBodyNode `json:"node,omitempty"` } @@ -362,7 +355,6 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { - if o.Node != nil { if err := o.Node.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -400,7 +392,6 @@ GetNodeOKBodyNode get node OK body node swagger:model GetNodeOKBodyNode */ type GetNodeOKBodyNode struct { - // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -634,9 +625,7 @@ func (o *GetNodeOKBodyNode) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -647,16 +636,13 @@ func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats s return err } } - } return nil } func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Services); i++ { - if o.Services[i] != nil { if err := o.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -667,7 +653,6 @@ func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats return err } } - } return nil @@ -696,7 +681,6 @@ GetNodeOKBodyNodeAgentsItems0 get node OK body node agents items0 swagger:model GetNodeOKBodyNodeAgentsItems0 */ type GetNodeOKBodyNodeAgentsItems0 struct { - // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -743,7 +727,6 @@ GetNodeOKBodyNodeServicesItems0 Service represents a service running on a node. swagger:model GetNodeOKBodyNodeServicesItems0 */ type GetNodeOKBodyNodeServicesItems0 struct { - // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go b/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go index 43f3f5b97b..b60cd62ce8 100644 --- a/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go +++ b/api/managementpb/node/json/client/mgmt_node/list_nodes_parameters.go @@ -60,7 +60,6 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { - // Body. Body ListNodesBody @@ -130,7 +129,6 @@ func (o *ListNodesParams) SetBody(body ListNodesBody) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go b/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go index 294ee26e00..26974fdbac 100644 --- a/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go +++ b/api/managementpb/node/json/client/mgmt_node/list_nodes_responses.go @@ -62,12 +62,12 @@ type ListNodesOK struct { func (o *ListNodesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Node/List][%d] listNodesOk %+v", 200, o.Payload) } + func (o *ListNodesOK) GetPayload() *ListNodesOKBody { return o.Payload } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListNodesDefault) Code() int { func (o *ListNodesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Node/List][%d] ListNodes default %+v", o._statusCode, o.Payload) } + func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { return o.Payload } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListNodesBody list nodes body swagger:model ListNodesBody */ type ListNodesBody struct { - // NodeType describes supported Node types. // Enum: [NODE_TYPE_INVALID GENERIC_NODE CONTAINER_NODE REMOTE_NODE REMOTE_RDS_NODE REMOTE_AZURE_DATABASE_NODE] NodeType *string `json:"node_type,omitempty"` @@ -227,7 +226,6 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -293,9 +291,7 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -306,7 +302,6 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -335,7 +330,6 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -373,7 +367,6 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { - // nodes Nodes []*ListNodesOKBodyNodesItems0 `json:"nodes"` } @@ -433,9 +426,7 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Nodes); i++ { - if o.Nodes[i] != nil { if err := o.Nodes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -446,7 +437,6 @@ func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strf return err } } - } return nil @@ -475,7 +465,6 @@ ListNodesOKBodyNodesItems0 list nodes OK body nodes items0 swagger:model ListNodesOKBodyNodesItems0 */ type ListNodesOKBodyNodesItems0 struct { - // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -709,9 +698,7 @@ func (o *ListNodesOKBodyNodesItems0) ContextValidate(ctx context.Context, format } func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -722,16 +709,13 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, return err } } - } return nil } func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Services); i++ { - if o.Services[i] != nil { if err := o.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -742,7 +726,6 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context return err } } - } return nil @@ -771,7 +754,6 @@ ListNodesOKBodyNodesItems0AgentsItems0 list nodes OK body nodes items0 agents it swagger:model ListNodesOKBodyNodesItems0AgentsItems0 */ type ListNodesOKBodyNodesItems0AgentsItems0 struct { - // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -818,7 +800,6 @@ ListNodesOKBodyNodesItems0ServicesItems0 Service represents a service running on swagger:model ListNodesOKBodyNodesItems0ServicesItems0 */ type ListNodesOKBodyNodesItems0ServicesItems0 struct { - // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/managementpb/node/node.pb.go b/api/managementpb/node/node.pb.go index 3080963d3c..6f1f081347 100644 --- a/api/managementpb/node/node.pb.go +++ b/api/managementpb/node/node.pb.go @@ -7,16 +7,18 @@ package nodev1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" - _ "github.com/percona/pmm/api/managementpb/agent" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + inventorypb "github.com/percona/pmm/api/inventorypb" + _ "github.com/percona/pmm/api/managementpb/agent" ) const ( @@ -756,21 +758,24 @@ func file_managementpb_node_node_proto_rawDescGZIP() []byte { return file_managementpb_node_node_proto_rawDescData } -var file_managementpb_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_managementpb_node_node_proto_goTypes = []interface{}{ - (UniversalNode_Status)(0), // 0: node.v1beta1.UniversalNode.Status - (*UniversalNode)(nil), // 1: node.v1beta1.UniversalNode - (*ListNodeRequest)(nil), // 2: node.v1beta1.ListNodeRequest - (*ListNodeResponse)(nil), // 3: node.v1beta1.ListNodeResponse - (*GetNodeRequest)(nil), // 4: node.v1beta1.GetNodeRequest - (*GetNodeResponse)(nil), // 5: node.v1beta1.GetNodeResponse - (*UniversalNode_Service)(nil), // 6: node.v1beta1.UniversalNode.Service - (*UniversalNode_Agent)(nil), // 7: node.v1beta1.UniversalNode.Agent - nil, // 8: node.v1beta1.UniversalNode.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (inventorypb.NodeType)(0), // 10: inventory.NodeType -} +var ( + file_managementpb_node_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_node_node_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_managementpb_node_node_proto_goTypes = []interface{}{ + (UniversalNode_Status)(0), // 0: node.v1beta1.UniversalNode.Status + (*UniversalNode)(nil), // 1: node.v1beta1.UniversalNode + (*ListNodeRequest)(nil), // 2: node.v1beta1.ListNodeRequest + (*ListNodeResponse)(nil), // 3: node.v1beta1.ListNodeResponse + (*GetNodeRequest)(nil), // 4: node.v1beta1.GetNodeRequest + (*GetNodeResponse)(nil), // 5: node.v1beta1.GetNodeResponse + (*UniversalNode_Service)(nil), // 6: node.v1beta1.UniversalNode.Service + (*UniversalNode_Agent)(nil), // 7: node.v1beta1.UniversalNode.Agent + nil, // 8: node.v1beta1.UniversalNode.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (inventorypb.NodeType)(0), // 10: inventory.NodeType + } +) + var file_managementpb_node_node_proto_depIdxs = []int32{ 8, // 0: node.v1beta1.UniversalNode.custom_labels:type_name -> node.v1beta1.UniversalNode.CustomLabelsEntry 9, // 1: node.v1beta1.UniversalNode.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/node/node.pb.gw.go b/api/managementpb/node/node.pb.gw.go index 845e3eba2d..13c3ff3c92 100644 --- a/api/managementpb/node/node.pb.gw.go +++ b/api/managementpb/node/node.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client MgmtNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodeRequest @@ -45,7 +47,6 @@ func request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server MgmtNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_MgmtNode_ListNodes_0(ctx context.Context, marshaler runtime.M msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err - } func request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client MgmtNodeClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server MgmtNodeServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Mar msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err - } // RegisterMgmtNodeHandlerServer registers the http handlers for service MgmtNode to "mux". @@ -104,7 +102,6 @@ func local_request_MgmtNode_GetNode_0(ctx context.Context, marshaler runtime.Mar // 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 RegisterMgmtNodeHandlerFromEndpoint instead. func RegisterMgmtNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MgmtNodeServer) error { - mux.Handle("POST", pattern_MgmtNode_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -127,7 +124,6 @@ func RegisterMgmtNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_MgmtNode_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_MgmtNode_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -152,7 +148,6 @@ func RegisterMgmtNodeHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_MgmtNode_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -195,7 +190,6 @@ func RegisterMgmtNodeHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MgmtNodeClient" to call the correct interceptors. func RegisterMgmtNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MgmtNodeClient) error { - mux.Handle("POST", pattern_MgmtNode_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -215,7 +209,6 @@ func RegisterMgmtNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_MgmtNode_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_MgmtNode_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -237,7 +230,6 @@ func RegisterMgmtNodeHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_MgmtNode_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/node/node.swagger.json b/api/managementpb/node/node.swagger.json deleted file mode 100644 index 9c8ed81a51..0000000000 --- a/api/managementpb/node/node.swagger.json +++ /dev/null @@ -1,305 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/node/node.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "MgmtNode" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Node/Get": { - "post": { - "summary": "Get Node", - "description": "Returns a single Node by ID.", - "operationId": "GetNode", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/nodev1beta1GetNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/nodev1beta1GetNodeRequest" - } - } - ], - "tags": [ - "MgmtNode" - ] - } - }, - "/v1/management/Node/List": { - "post": { - "summary": "List Nodes", - "description": "Returns a filtered list of Nodes.", - "operationId": "ListNodes", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListNodeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListNodeRequest" - } - } - ], - "tags": [ - "MgmtNode" - ] - } - } - }, - "definitions": { - "UniversalNodeAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique Agent identifier." - }, - "agent_type": { - "type": "string", - "description": "Agent type." - }, - "status": { - "type": "string", - "description": "Actual Agent status." - }, - "is_connected": { - "type": "boolean", - "description": "True if Agent is running and connected to pmm-managed." - } - } - }, - "UniversalNodeService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique Service identifier." - }, - "service_type": { - "type": "string", - "description": "Service type." - }, - "service_name": { - "type": "string", - "description": "Service name." - } - }, - "description": "Service represents a service running on a node." - }, - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "nodev1beta1GetNodeRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique Node identifier." - } - } - }, - "nodev1beta1GetNodeResponse": { - "type": "object", - "properties": { - "node": { - "$ref": "#/definitions/v1beta1UniversalNode" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "v1beta1ListNodeRequest": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be filtered out." - } - } - }, - "v1beta1ListNodeResponse": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1UniversalNode" - } - } - } - }, - "v1beta1UniversalNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique Node identifier." - }, - "node_type": { - "type": "string", - "description": "Node type." - }, - "node_name": { - "type": "string", - "description": "User-defined node name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "container_id": { - "type": "string", - "description": "A node's unique docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "address": { - "type": "string", - "description": "Node address (DNS name or IP)." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp." - }, - "status": { - "$ref": "#/definitions/v1beta1UniversalNodeStatus", - "description": "The health status of the node." - }, - "agents": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/UniversalNodeAgent" - }, - "description": "List of agents related to this node." - }, - "services": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/UniversalNodeService" - }, - "description": "List of services running on this node." - } - } - }, - "v1beta1UniversalNodeStatus": { - "type": "string", - "enum": [ - "STATUS_INVALID", - "UP", - "DOWN", - "UNKNOWN" - ], - "default": "STATUS_INVALID", - "description": "Node status.\n\n - STATUS_INVALID: Invalid status.\n - UP: The node is up.\n - DOWN: The node is down.\n - UNKNOWN: The node's status cannot be known (e.g. there are no metrics yet)." - } - } -} diff --git a/api/managementpb/node/node_grpc.pb.go b/api/managementpb/node/node_grpc.pb.go index 611084078c..14e4f461d1 100644 --- a/api/managementpb/node/node_grpc.pb.go +++ b/api/managementpb/node/node_grpc.pb.go @@ -8,6 +8,7 @@ package nodev1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -71,12 +72,12 @@ type MgmtNodeServer interface { } // UnimplementedMgmtNodeServer must be embedded to have forward compatible implementations. -type UnimplementedMgmtNodeServer struct { -} +type UnimplementedMgmtNodeServer struct{} func (UnimplementedMgmtNodeServer) ListNodes(context.Context, *ListNodeRequest) (*ListNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } + func (UnimplementedMgmtNodeServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } diff --git a/api/managementpb/node_grpc.pb.go b/api/managementpb/node_grpc.pb.go index aca765aa4f..ee9850d2aa 100644 --- a/api/managementpb/node_grpc.pb.go +++ b/api/managementpb/node_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type NodeServer interface { } // UnimplementedNodeServer must be embedded to have forward compatible implementations. -type UnimplementedNodeServer struct { -} +type UnimplementedNodeServer struct{} func (UnimplementedNodeServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") diff --git a/api/managementpb/pagination.pb.go b/api/managementpb/pagination.pb.go index e1d0b3d5f6..69716872ad 100644 --- a/api/managementpb/pagination.pb.go +++ b/api/managementpb/pagination.pb.go @@ -7,11 +7,12 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -179,11 +180,14 @@ func file_managementpb_pagination_proto_rawDescGZIP() []byte { return file_managementpb_pagination_proto_rawDescData } -var file_managementpb_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_managementpb_pagination_proto_goTypes = []interface{}{ - (*PageParams)(nil), // 0: management.PageParams - (*PageTotals)(nil), // 1: management.PageTotals -} +var ( + file_managementpb_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 2) + file_managementpb_pagination_proto_goTypes = []interface{}{ + (*PageParams)(nil), // 0: management.PageParams + (*PageTotals)(nil), // 1: management.PageTotals + } +) + var file_managementpb_pagination_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/pagination.swagger.json b/api/managementpb/pagination.swagger.json deleted file mode 100644 index 7f1e50c833..0000000000 --- a/api/managementpb/pagination.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/pagination.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/postgresql.pb.go b/api/managementpb/postgresql.pb.go index 761fed2dec..f9e679c139 100644 --- a/api/managementpb/postgresql.pb.go +++ b/api/managementpb/postgresql.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -589,19 +591,22 @@ func file_managementpb_postgresql_proto_rawDescGZIP() []byte { return file_managementpb_postgresql_proto_rawDescData } -var file_managementpb_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_postgresql_proto_goTypes = []interface{}{ - (*AddPostgreSQLRequest)(nil), // 0: management.AddPostgreSQLRequest - (*AddPostgreSQLResponse)(nil), // 1: management.AddPostgreSQLResponse - nil, // 2: management.AddPostgreSQLRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.PostgreSQLService)(nil), // 6: inventory.PostgreSQLService - (*inventorypb.PostgresExporter)(nil), // 7: inventory.PostgresExporter - (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.QANPostgreSQLPgStatementsAgent - (*inventorypb.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.QANPostgreSQLPgStatMonitorAgent -} +var ( + file_managementpb_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_postgresql_proto_goTypes = []interface{}{ + (*AddPostgreSQLRequest)(nil), // 0: management.AddPostgreSQLRequest + (*AddPostgreSQLResponse)(nil), // 1: management.AddPostgreSQLResponse + nil, // 2: management.AddPostgreSQLRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.PostgreSQLService)(nil), // 6: inventory.PostgreSQLService + (*inventorypb.PostgresExporter)(nil), // 7: inventory.PostgresExporter + (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.QANPostgreSQLPgStatementsAgent + (*inventorypb.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.QANPostgreSQLPgStatMonitorAgent + } +) + var file_managementpb_postgresql_proto_depIdxs = []int32{ 3, // 0: management.AddPostgreSQLRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddPostgreSQLRequest.custom_labels:type_name -> management.AddPostgreSQLRequest.CustomLabelsEntry diff --git a/api/managementpb/postgresql.pb.gw.go b/api/managementpb/postgresql.pb.gw.go index f6c3bdfe8f..85b4b2ee38 100644 --- a/api/managementpb/postgresql.pb.gw.go +++ b/api/managementpb/postgresql.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler runtime.Marshaler, client PostgreSQLClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddPostgreSQLRequest @@ -45,7 +47,6 @@ func request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler runtime.M msg, err := client.AddPostgreSQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler runtime.Marshaler, server PostgreSQLServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler run msg, err := server.AddPostgreSQL(ctx, &protoReq) return msg, metadata, err - } // RegisterPostgreSQLHandlerServer registers the http handlers for service PostgreSQL to "mux". @@ -70,7 +70,6 @@ func local_request_PostgreSQL_AddPostgreSQL_0(ctx context.Context, marshaler run // 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 RegisterPostgreSQLHandlerFromEndpoint instead. func RegisterPostgreSQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PostgreSQLServer) error { - mux.Handle("POST", pattern_PostgreSQL_AddPostgreSQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterPostgreSQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_PostgreSQL_AddPostgreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterPostgreSQLHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PostgreSQLClient" to call the correct interceptors. func RegisterPostgreSQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PostgreSQLClient) error { - mux.Handle("POST", pattern_PostgreSQL_AddPostgreSQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterPostgreSQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_PostgreSQL_AddPostgreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_PostgreSQL_AddPostgreSQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "PostgreSQL", "Add"}, "")) -) +var pattern_PostgreSQL_AddPostgreSQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "PostgreSQL", "Add"}, "")) -var ( - forward_PostgreSQL_AddPostgreSQL_0 = runtime.ForwardResponseMessage -) +var forward_PostgreSQL_AddPostgreSQL_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/postgresql.swagger.json b/api/managementpb/postgresql.swagger.json deleted file mode 100644 index bbd0bbe906..0000000000 --- a/api/managementpb/postgresql.swagger.json +++ /dev/null @@ -1,584 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/postgresql.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "PostgreSQL" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/PostgreSQL/Add": { - "post": { - "summary": "Add PostgreSQL", - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "operationId": "AddPostgreSQL", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddPostgreSQLResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddPostgreSQLRequest" - } - } - ], - "tags": [ - "PostgreSQL" - ] - } - } - }, - "definitions": { - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryLogLevel": { - "type": "string", - "enum": [ - "auto", - "fatal", - "error", - "warn", - "info", - "debug" - ], - "default": "auto", - "title": "Log level for exporters" - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "inventoryPostgreSQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "database_name": { - "type": "string", - "description": "Database name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "PostgreSQLService represents a generic PostgreSQL instance." - }, - "inventoryPostgresExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." - }, - "inventoryQANPostgreSQLPgStatMonitorAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat monitor data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." - }, - "inventoryQANPostgreSQLPgStatementsAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat statements data." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." - }, - "managementAddNodeParams": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - } - }, - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." - }, - "managementAddPostgreSQLRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "node_name": { - "type": "string", - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "add_node": { - "$ref": "#/definitions/managementAddNodeParams", - "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "address": { - "type": "string", - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Service Access port.\nPort is required when the address present." - }, - "database": { - "type": "string", - "description": "Database name." - }, - "socket": { - "type": "string", - "description": "Service Access socket.\nAddress (and port) or socket is required." - }, - "pmm_agent_id": { - "type": "string", - "description": "The \"pmm-agent\" identifier which should run agents. Required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for scraping metrics." - }, - "password": { - "type": "string", - "description": "PostgreSQL password for scraping metrics." - }, - "qan_postgresql_pgstatements_agent": { - "type": "boolean", - "description": "If true, adds qan-postgresql-pgstatements-agent for provided service." - }, - "qan_postgresql_pgstatmonitor_agent": { - "type": "boolean", - "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "tls_cert": { - "type": "string", - "description": "TLS Certifcate." - }, - "tls_key": { - "type": "string", - "description": "TLS Certificate Key." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "title": "Exporter log level" - } - } - }, - "managementAddPostgreSQLResponse": { - "type": "object", - "properties": { - "service": { - "$ref": "#/definitions/inventoryPostgreSQLService" - }, - "postgres_exporter": { - "$ref": "#/definitions/inventoryPostgresExporter" - }, - "qan_postgresql_pgstatements_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" - }, - "qan_postgresql_pgstatmonitor_agent": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatMonitorAgent" - } - } - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/postgresql_grpc.pb.go b/api/managementpb/postgresql_grpc.pb.go index 28c9f301c0..1852de174a 100644 --- a/api/managementpb/postgresql_grpc.pb.go +++ b/api/managementpb/postgresql_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -61,8 +62,7 @@ type PostgreSQLServer interface { } // UnimplementedPostgreSQLServer must be embedded to have forward compatible implementations. -type UnimplementedPostgreSQLServer struct { -} +type UnimplementedPostgreSQLServer struct{} func (UnimplementedPostgreSQLServer) AddPostgreSQL(context.Context, *AddPostgreSQLRequest) (*AddPostgreSQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPostgreSQL not implemented") diff --git a/api/managementpb/proxysql.pb.go b/api/managementpb/proxysql.pb.go index 06ea06d55c..6a499d59c2 100644 --- a/api/managementpb/proxysql.pb.go +++ b/api/managementpb/proxysql.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -450,17 +452,20 @@ func file_managementpb_proxysql_proto_rawDescGZIP() []byte { return file_managementpb_proxysql_proto_rawDescData } -var file_managementpb_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_managementpb_proxysql_proto_goTypes = []interface{}{ - (*AddProxySQLRequest)(nil), // 0: management.AddProxySQLRequest - (*AddProxySQLResponse)(nil), // 1: management.AddProxySQLResponse - nil, // 2: management.AddProxySQLRequest.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.AddNodeParams - (MetricsMode)(0), // 4: management.MetricsMode - (inventorypb.LogLevel)(0), // 5: inventory.LogLevel - (*inventorypb.ProxySQLService)(nil), // 6: inventory.ProxySQLService - (*inventorypb.ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter -} +var ( + file_managementpb_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_managementpb_proxysql_proto_goTypes = []interface{}{ + (*AddProxySQLRequest)(nil), // 0: management.AddProxySQLRequest + (*AddProxySQLResponse)(nil), // 1: management.AddProxySQLResponse + nil, // 2: management.AddProxySQLRequest.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.AddNodeParams + (MetricsMode)(0), // 4: management.MetricsMode + (inventorypb.LogLevel)(0), // 5: inventory.LogLevel + (*inventorypb.ProxySQLService)(nil), // 6: inventory.ProxySQLService + (*inventorypb.ProxySQLExporter)(nil), // 7: inventory.ProxySQLExporter + } +) + var file_managementpb_proxysql_proto_depIdxs = []int32{ 3, // 0: management.AddProxySQLRequest.add_node:type_name -> management.AddNodeParams 2, // 1: management.AddProxySQLRequest.custom_labels:type_name -> management.AddProxySQLRequest.CustomLabelsEntry diff --git a/api/managementpb/proxysql.pb.gw.go b/api/managementpb/proxysql.pb.gw.go index 85f99f2db8..3101c325a3 100644 --- a/api/managementpb/proxysql.pb.gw.go +++ b/api/managementpb/proxysql.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime.Marshaler, client ProxySQLClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddProxySQLRequest @@ -45,7 +47,6 @@ func request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddProxySQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime.Marshaler, server ProxySQLServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime msg, err := server.AddProxySQL(ctx, &protoReq) return msg, metadata, err - } // RegisterProxySQLHandlerServer registers the http handlers for service ProxySQL to "mux". @@ -70,7 +70,6 @@ func local_request_ProxySQL_AddProxySQL_0(ctx context.Context, marshaler runtime // 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 RegisterProxySQLHandlerFromEndpoint instead. func RegisterProxySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProxySQLServer) error { - mux.Handle("POST", pattern_ProxySQL_AddProxySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterProxySQLHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_ProxySQL_AddProxySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterProxySQLHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ProxySQLClient" to call the correct interceptors. func RegisterProxySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProxySQLClient) error { - mux.Handle("POST", pattern_ProxySQL_AddProxySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterProxySQLHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_ProxySQL_AddProxySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_ProxySQL_AddProxySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "ProxySQL", "Add"}, "")) -) +var pattern_ProxySQL_AddProxySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "ProxySQL", "Add"}, "")) -var ( - forward_ProxySQL_AddProxySQL_0 = runtime.ForwardResponseMessage -) +var forward_ProxySQL_AddProxySQL_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/proxysql.swagger.json b/api/managementpb/proxysql.swagger.json deleted file mode 100644 index d2c72a7519..0000000000 --- a/api/managementpb/proxysql.swagger.json +++ /dev/null @@ -1,409 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/proxysql.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "ProxySQL" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/ProxySQL/Add": { - "post": { - "summary": "Add ProxySQL", - "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "operationId": "AddProxySQL", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddProxySQLResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddProxySQLRequest" - } - } - ], - "tags": [ - "ProxySQL" - ] - } - } - }, - "definitions": { - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryLogLevel": { - "type": "string", - "enum": [ - "auto", - "fatal", - "error", - "warn", - "info", - "debug" - ], - "default": "auto", - "title": "Log level for exporters" - }, - "inventoryNodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_INVALID", - "GENERIC_NODE", - "CONTAINER_NODE", - "REMOTE_NODE", - "REMOTE_RDS_NODE", - "REMOTE_AZURE_DATABASE_NODE" - ], - "default": "NODE_TYPE_INVALID", - "description": "NodeType describes supported Node types." - }, - "inventoryProxySQLExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "ProxySQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics." - }, - "inventoryProxySQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "ProxySQLService represents a generic ProxySQL instance." - }, - "managementAddNodeParams": { - "type": "object", - "properties": { - "node_type": { - "$ref": "#/definitions/inventoryNodeType", - "description": "Node type to be registered." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "machine_id": { - "type": "string", - "description": "Linux machine-id." - }, - "distro": { - "type": "string", - "description": "Linux distribution name and version." - }, - "container_id": { - "type": "string", - "description": "Container identifier. If specified, must be a unique Docker container identifier." - }, - "container_name": { - "type": "string", - "description": "Container name." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node." - } - }, - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." - }, - "managementAddProxySQLRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "node_name": { - "type": "string", - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "add_node": { - "$ref": "#/definitions/managementAddNodeParams", - "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Required." - }, - "address": { - "type": "string", - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Service Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Service Access socket.\nAddress (and port) or socket is required." - }, - "pmm_agent_id": { - "type": "string", - "description": "The \"pmm-agent\" identifier which should run agents. Required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "username": { - "type": "string", - "description": "ProxySQL username for scraping metrics." - }, - "password": { - "type": "string", - "description": "ProxySQL password for scraping metrics." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." - }, - "disable_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of collector names to disable in this exporter." - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "title": "Exporter log level" - } - } - }, - "managementAddProxySQLResponse": { - "type": "object", - "properties": { - "service": { - "$ref": "#/definitions/inventoryProxySQLService" - }, - "proxysql_exporter": { - "$ref": "#/definitions/inventoryProxySQLExporter" - } - } - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/proxysql_grpc.pb.go b/api/managementpb/proxysql_grpc.pb.go index c9f0b5d12a..197f0f2498 100644 --- a/api/managementpb/proxysql_grpc.pb.go +++ b/api/managementpb/proxysql_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -61,8 +62,7 @@ type ProxySQLServer interface { } // UnimplementedProxySQLServer must be embedded to have forward compatible implementations. -type UnimplementedProxySQLServer struct { -} +type UnimplementedProxySQLServer struct{} func (UnimplementedProxySQLServer) AddProxySQL(context.Context, *AddProxySQLRequest) (*AddProxySQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQL not implemented") diff --git a/api/managementpb/rds.pb.go b/api/managementpb/rds.pb.go index 286b39ddff..8214ca2777 100644 --- a/api/managementpb/rds.pb.go +++ b/api/managementpb/rds.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -931,26 +933,29 @@ func file_managementpb_rds_proto_rawDescGZIP() []byte { return file_managementpb_rds_proto_rawDescData } -var file_managementpb_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_managementpb_rds_proto_goTypes = []interface{}{ - (DiscoverRDSEngine)(0), // 0: management.DiscoverRDSEngine - (*DiscoverRDSInstance)(nil), // 1: management.DiscoverRDSInstance - (*DiscoverRDSRequest)(nil), // 2: management.DiscoverRDSRequest - (*DiscoverRDSResponse)(nil), // 3: management.DiscoverRDSResponse - (*AddRDSRequest)(nil), // 4: management.AddRDSRequest - (*AddRDSResponse)(nil), // 5: management.AddRDSResponse - nil, // 6: management.AddRDSRequest.CustomLabelsEntry - (MetricsMode)(0), // 7: management.MetricsMode - (*inventorypb.RemoteRDSNode)(nil), // 8: inventory.RemoteRDSNode - (*inventorypb.RDSExporter)(nil), // 9: inventory.RDSExporter - (*inventorypb.MySQLService)(nil), // 10: inventory.MySQLService - (*inventorypb.MySQLdExporter)(nil), // 11: inventory.MySQLdExporter - (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.QANMySQLPerfSchemaAgent - (*inventorypb.PostgreSQLService)(nil), // 13: inventory.PostgreSQLService - (*inventorypb.PostgresExporter)(nil), // 14: inventory.PostgresExporter - (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.QANPostgreSQLPgStatementsAgent -} +var ( + file_managementpb_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_managementpb_rds_proto_goTypes = []interface{}{ + (DiscoverRDSEngine)(0), // 0: management.DiscoverRDSEngine + (*DiscoverRDSInstance)(nil), // 1: management.DiscoverRDSInstance + (*DiscoverRDSRequest)(nil), // 2: management.DiscoverRDSRequest + (*DiscoverRDSResponse)(nil), // 3: management.DiscoverRDSResponse + (*AddRDSRequest)(nil), // 4: management.AddRDSRequest + (*AddRDSResponse)(nil), // 5: management.AddRDSResponse + nil, // 6: management.AddRDSRequest.CustomLabelsEntry + (MetricsMode)(0), // 7: management.MetricsMode + (*inventorypb.RemoteRDSNode)(nil), // 8: inventory.RemoteRDSNode + (*inventorypb.RDSExporter)(nil), // 9: inventory.RDSExporter + (*inventorypb.MySQLService)(nil), // 10: inventory.MySQLService + (*inventorypb.MySQLdExporter)(nil), // 11: inventory.MySQLdExporter + (*inventorypb.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.QANMySQLPerfSchemaAgent + (*inventorypb.PostgreSQLService)(nil), // 13: inventory.PostgreSQLService + (*inventorypb.PostgresExporter)(nil), // 14: inventory.PostgresExporter + (*inventorypb.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.QANPostgreSQLPgStatementsAgent + } +) + var file_managementpb_rds_proto_depIdxs = []int32{ 0, // 0: management.DiscoverRDSInstance.engine:type_name -> management.DiscoverRDSEngine 1, // 1: management.DiscoverRDSResponse.rds_instances:type_name -> management.DiscoverRDSInstance diff --git a/api/managementpb/rds.pb.gw.go b/api/managementpb/rds.pb.gw.go index ece18ea2d6..b07e7b7196 100644 --- a/api/managementpb/rds.pb.gw.go +++ b/api/managementpb/rds.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, client RDSClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DiscoverRDSRequest @@ -45,7 +47,6 @@ func request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.DiscoverRDS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, server RDSServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_RDS_DiscoverRDS_0(ctx context.Context, marshaler runtime.Mars msg, err := server.DiscoverRDS(ctx, &protoReq) return msg, metadata, err - } func request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler, client RDSClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler, clie msg, err := client.AddRDS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler, server RDSServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler msg, err := server.AddRDS(ctx, &protoReq) return msg, metadata, err - } // RegisterRDSHandlerServer registers the http handlers for service RDS to "mux". @@ -104,7 +102,6 @@ func local_request_RDS_AddRDS_0(ctx context.Context, marshaler runtime.Marshaler // 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 RegisterRDSHandlerFromEndpoint instead. func RegisterRDSHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RDSServer) error { - mux.Handle("POST", pattern_RDS_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -127,7 +124,6 @@ func RegisterRDSHandlerServer(ctx context.Context, mux *runtime.ServeMux, server } forward_RDS_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_RDS_AddRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -152,7 +148,6 @@ func RegisterRDSHandlerServer(ctx context.Context, mux *runtime.ServeMux, server } forward_RDS_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -195,7 +190,6 @@ func RegisterRDSHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.C // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RDSClient" to call the correct interceptors. func RegisterRDSHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RDSClient) error { - mux.Handle("POST", pattern_RDS_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -215,7 +209,6 @@ func RegisterRDSHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } forward_RDS_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_RDS_AddRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -237,7 +230,6 @@ func RegisterRDSHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } forward_RDS_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/rds.swagger.json b/api/managementpb/rds.swagger.json deleted file mode 100644 index 4fac77be84..0000000000 --- a/api/managementpb/rds.swagger.json +++ /dev/null @@ -1,895 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/rds.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "RDS" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/RDS/Add": { - "post": { - "summary": "Add RDS", - "description": "Adds RDS instance.", - "operationId": "AddRDS", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementAddRDSResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementAddRDSRequest" - } - } - ], - "tags": [ - "RDS" - ] - } - }, - "/v1/management/RDS/Discover": { - "post": { - "summary": "Discover RDS", - "description": "Discovers RDS instances.", - "operationId": "DiscoverRDS", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementDiscoverRDSResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementDiscoverRDSRequest" - } - } - ], - "tags": [ - "RDS" - ] - } - } - }, - "definitions": { - "inventoryAgentStatus": { - "type": "string", - "enum": [ - "AGENT_STATUS_INVALID", - "STARTING", - "RUNNING", - "WAITING", - "STOPPING", - "DONE", - "UNKNOWN" - ], - "default": "AGENT_STATUS_INVALID", - "description": "AgentStatus represents actual Agent status.\n\n - STARTING: Agent is starting.\n - RUNNING: Agent is running.\n - WAITING: Agent encountered error and will be restarted automatically soon.\n - STOPPING: Agent is stopping.\n - DONE: Agent finished.\n - UNKNOWN: Agent is not connected, we don't know anything about it's state." - }, - "inventoryLogLevel": { - "type": "string", - "enum": [ - "auto", - "fatal", - "error", - "warn", - "info", - "debug" - ], - "default": "auto", - "title": "Log level for exporters" - }, - "inventoryMySQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "MySQLService represents a generic MySQL instance." - }, - "inventoryMySQLdExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "tablestats_group_disabled": { - "type": "boolean", - "description": "True if tablestats group collectors are currently disabled." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." - }, - "inventoryPostgreSQLService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - }, - "database_name": { - "type": "string", - "description": "Database name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - } - }, - "description": "PostgreSQLService represents a generic PostgreSQL instance." - }, - "inventoryPostgresExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for scraping metrics." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." - }, - "inventoryQANMySQLPerfSchemaAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "MySQL username for getting performance data." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "tls_ca": { - "type": "string", - "description": "Certificate Authority certificate chain." - }, - "tls_cert": { - "type": "string", - "description": "Client certificate." - }, - "tls_key": { - "type": "string", - "description": "Password for decrypting tls_cert." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." - }, - "inventoryQANPostgreSQLPgStatementsAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "username": { - "type": "string", - "description": "PostgreSQL username for getting pg stat statements data." - }, - "disable_comments_parsing": { - "type": "boolean", - "description": "Disable parsing comments from queries and showing them in QAN." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN (default: server-defined; -1: no limit)." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." - }, - "inventoryRDSExporter": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier which runs this instance." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "node_id": { - "type": "string", - "description": "Node identifier." - }, - "aws_access_key": { - "type": "string", - "description": "AWS Access Key." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nStatus fields below." - }, - "status": { - "$ref": "#/definitions/inventoryAgentStatus", - "description": "Actual Agent status (the same for several configurations)." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics (the same for several configurations).\n\nMetric collections flags below." - }, - "basic_metrics_disabled": { - "type": "boolean", - "description": "Basic metrics are disabled." - }, - "enhanced_metrics_disabled": { - "type": "boolean", - "description": "Enhanced metrics are disabled." - }, - "push_metrics_enabled": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "log_level": { - "$ref": "#/definitions/inventoryLogLevel", - "description": "Log level for exporter." - } - }, - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics." - }, - "inventoryRemoteRDSNode": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Unique randomly generated instance identifier." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name." - }, - "address": { - "type": "string", - "description": "DB instance identifier." - }, - "node_model": { - "type": "string", - "description": "Node model." - }, - "region": { - "type": "string", - "description": "Node region." - }, - "az": { - "type": "string", - "description": "Node availability zone." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels.\n\nTODO https://jira.percona.com/browse/PMM-4314\n string az = 8;\n string node_model = 9;" - } - }, - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes." - }, - "managementAddRDSRequest": { - "type": "object", - "properties": { - "region": { - "type": "string", - "description": "AWS region." - }, - "az": { - "type": "string", - "description": "AWS availability zone." - }, - "instance_id": { - "type": "string", - "description": "AWS instance ID." - }, - "node_model": { - "type": "string", - "description": "AWS instance class." - }, - "address": { - "type": "string", - "description": "Address used to connect to it." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port." - }, - "engine": { - "$ref": "#/definitions/managementDiscoverRDSEngine", - "description": "Instance engine." - }, - "node_name": { - "type": "string", - "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name. Defaults to AWS instance ID." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "username": { - "type": "string", - "description": "Username for scraping metrics." - }, - "password": { - "type": "string", - "description": "Password for scraping metrics." - }, - "aws_access_key": { - "type": "string", - "description": "AWS Access key." - }, - "aws_secret_key": { - "type": "string", - "description": "AWS Secret key." - }, - "rds_exporter": { - "type": "boolean", - "description": "If true, adds rds_exporter." - }, - "qan_mysql_perfschema": { - "type": "boolean", - "description": "If true, adds qan-mysql-perfschema-agent." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Node and Service." - }, - "skip_connection_check": { - "type": "boolean", - "description": "Skip connection check." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "disable_query_examples": { - "type": "boolean", - "description": "Disable query examples." - }, - "tablestats_group_table_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them." - }, - "disable_basic_metrics": { - "type": "boolean", - "description": "Disable basic metrics." - }, - "disable_enhanced_metrics": { - "type": "boolean", - "description": "Disable enhanced metrics." - }, - "metrics_mode": { - "$ref": "#/definitions/managementMetricsMode", - "description": "Defines metrics flow model for this exporter.\nPush metrics mode is not allowed." - }, - "qan_postgresql_pgstatements": { - "type": "boolean", - "title": "If true, add qan-pgstatements" - }, - "agent_password": { - "type": "string", - "description": "Custom password for exporter endpoint /metrics." - }, - "database": { - "type": "string", - "description": "Database name." - } - } - }, - "managementAddRDSResponse": { - "type": "object", - "properties": { - "node": { - "$ref": "#/definitions/inventoryRemoteRDSNode" - }, - "rds_exporter": { - "$ref": "#/definitions/inventoryRDSExporter" - }, - "mysql": { - "$ref": "#/definitions/inventoryMySQLService" - }, - "mysqld_exporter": { - "$ref": "#/definitions/inventoryMySQLdExporter" - }, - "qan_mysql_perfschema": { - "$ref": "#/definitions/inventoryQANMySQLPerfSchemaAgent" - }, - "table_count": { - "type": "integer", - "format": "int32", - "description": "Actual table count at the moment of adding." - }, - "postgresql": { - "$ref": "#/definitions/inventoryPostgreSQLService" - }, - "postgresql_exporter": { - "$ref": "#/definitions/inventoryPostgresExporter" - }, - "qan_postgresql_pgstatements": { - "$ref": "#/definitions/inventoryQANPostgreSQLPgStatementsAgent" - } - } - }, - "managementDiscoverRDSEngine": { - "type": "string", - "enum": [ - "DISCOVER_RDS_ENGINE_INVALID", - "DISCOVER_RDS_MYSQL", - "DISCOVER_RDS_POSTGRESQL" - ], - "default": "DISCOVER_RDS_ENGINE_INVALID", - "description": "DiscoverRDSEngine describes supported RDS instance engines." - }, - "managementDiscoverRDSInstance": { - "type": "object", - "properties": { - "region": { - "type": "string", - "description": "AWS region." - }, - "az": { - "type": "string", - "description": "AWS availability zone." - }, - "instance_id": { - "type": "string", - "description": "AWS instance ID." - }, - "node_model": { - "type": "string", - "description": "AWS instance class." - }, - "address": { - "type": "string", - "description": "Address used to connect to it." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port." - }, - "engine": { - "$ref": "#/definitions/managementDiscoverRDSEngine", - "description": "Instance engine." - }, - "engine_version": { - "type": "string", - "description": "Engine version." - } - }, - "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery." - }, - "managementDiscoverRDSRequest": { - "type": "object", - "properties": { - "aws_access_key": { - "type": "string", - "description": "AWS Access key. Optional." - }, - "aws_secret_key": { - "type": "string", - "description": "AWS Secret key. Optional." - } - } - }, - "managementDiscoverRDSResponse": { - "type": "object", - "properties": { - "rds_instances": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/managementDiscoverRDSInstance" - } - } - } - }, - "managementMetricsMode": { - "type": "string", - "enum": [ - "AUTO", - "PULL", - "PUSH" - ], - "default": "AUTO", - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/rds_grpc.pb.go b/api/managementpb/rds_grpc.pb.go index 1ac9d05f14..68e6fb4950 100644 --- a/api/managementpb/rds_grpc.pb.go +++ b/api/managementpb/rds_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -71,12 +72,12 @@ type RDSServer interface { } // UnimplementedRDSServer must be embedded to have forward compatible implementations. -type UnimplementedRDSServer struct { -} +type UnimplementedRDSServer struct{} func (UnimplementedRDSServer) DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverRDS not implemented") } + func (UnimplementedRDSServer) AddRDS(context.Context, *AddRDSRequest) (*AddRDSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRDS not implemented") } diff --git a/api/managementpb/role/json/client/role/assign_roles_parameters.go b/api/managementpb/role/json/client/role/assign_roles_parameters.go index 7a9b3c6bbe..9e36296a7d 100644 --- a/api/managementpb/role/json/client/role/assign_roles_parameters.go +++ b/api/managementpb/role/json/client/role/assign_roles_parameters.go @@ -60,7 +60,6 @@ AssignRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AssignRolesParams struct { - // Body. Body AssignRolesBody @@ -130,7 +129,6 @@ func (o *AssignRolesParams) SetBody(body AssignRolesBody) { // WriteToRequest writes these params to a swagger request func (o *AssignRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/assign_roles_responses.go b/api/managementpb/role/json/client/role/assign_roles_responses.go index d792e42480..65b8223e78 100644 --- a/api/managementpb/role/json/client/role/assign_roles_responses.go +++ b/api/managementpb/role/json/client/role/assign_roles_responses.go @@ -60,12 +60,12 @@ type AssignRolesOK struct { func (o *AssignRolesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Assign][%d] assignRolesOk %+v", 200, o.Payload) } + func (o *AssignRolesOK) GetPayload() interface{} { return o.Payload } func (o *AssignRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AssignRolesDefault) Code() int { func (o *AssignRolesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Assign][%d] AssignRoles default %+v", o._statusCode, o.Payload) } + func (o *AssignRolesDefault) GetPayload() *AssignRolesDefaultBody { return o.Payload } func (o *AssignRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AssignRolesDefaultBody) // response payload @@ -121,7 +121,6 @@ AssignRolesBody assign roles body swagger:model AssignRolesBody */ type AssignRolesBody struct { - // role ids RoleIds []int64 `json:"role_ids"` @@ -162,7 +161,6 @@ AssignRolesDefaultBody assign roles default body swagger:model AssignRolesDefaultBody */ type AssignRolesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *AssignRolesDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -270,7 +265,6 @@ AssignRolesDefaultBodyDetailsItems0 assign roles default body details items0 swagger:model AssignRolesDefaultBodyDetailsItems0 */ type AssignRolesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/json/client/role/create_role_parameters.go b/api/managementpb/role/json/client/role/create_role_parameters.go index d54637d6c7..15dcde77e8 100644 --- a/api/managementpb/role/json/client/role/create_role_parameters.go +++ b/api/managementpb/role/json/client/role/create_role_parameters.go @@ -60,7 +60,6 @@ CreateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRoleParams struct { - // Body. Body CreateRoleBody @@ -130,7 +129,6 @@ func (o *CreateRoleParams) SetBody(body CreateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/create_role_responses.go b/api/managementpb/role/json/client/role/create_role_responses.go index 6c8e8b8539..dd98247388 100644 --- a/api/managementpb/role/json/client/role/create_role_responses.go +++ b/api/managementpb/role/json/client/role/create_role_responses.go @@ -60,12 +60,12 @@ type CreateRoleOK struct { func (o *CreateRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Create][%d] createRoleOk %+v", 200, o.Payload) } + func (o *CreateRoleOK) GetPayload() *CreateRoleOKBody { return o.Payload } func (o *CreateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateRoleOKBody) // response payload @@ -102,12 +102,12 @@ func (o *CreateRoleDefault) Code() int { func (o *CreateRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Create][%d] CreateRole default %+v", o._statusCode, o.Payload) } + func (o *CreateRoleDefault) GetPayload() *CreateRoleDefaultBody { return o.Payload } func (o *CreateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateRoleDefaultBody) // response payload @@ -123,7 +123,6 @@ CreateRoleBody create role body swagger:model CreateRoleBody */ type CreateRoleBody struct { - // title Title string `json:"title,omitempty"` @@ -167,7 +166,6 @@ CreateRoleDefaultBody create role default body swagger:model CreateRoleDefaultBody */ type CreateRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -233,9 +231,7 @@ func (o *CreateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -246,7 +242,6 @@ func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -275,7 +270,6 @@ CreateRoleDefaultBodyDetailsItems0 create role default body details items0 swagger:model CreateRoleDefaultBodyDetailsItems0 */ type CreateRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -313,7 +307,6 @@ CreateRoleOKBody create role OK body swagger:model CreateRoleOKBody */ type CreateRoleOKBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` } diff --git a/api/managementpb/role/json/client/role/delete_role_parameters.go b/api/managementpb/role/json/client/role/delete_role_parameters.go index 2e6f585ac7..e1671af439 100644 --- a/api/managementpb/role/json/client/role/delete_role_parameters.go +++ b/api/managementpb/role/json/client/role/delete_role_parameters.go @@ -60,7 +60,6 @@ DeleteRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteRoleParams struct { - // Body. Body DeleteRoleBody @@ -130,7 +129,6 @@ func (o *DeleteRoleParams) SetBody(body DeleteRoleBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/delete_role_responses.go b/api/managementpb/role/json/client/role/delete_role_responses.go index 704ff7404d..9ecfa87e12 100644 --- a/api/managementpb/role/json/client/role/delete_role_responses.go +++ b/api/managementpb/role/json/client/role/delete_role_responses.go @@ -60,12 +60,12 @@ type DeleteRoleOK struct { func (o *DeleteRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Delete][%d] deleteRoleOk %+v", 200, o.Payload) } + func (o *DeleteRoleOK) GetPayload() interface{} { return o.Payload } func (o *DeleteRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DeleteRoleDefault) Code() int { func (o *DeleteRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Delete][%d] DeleteRole default %+v", o._statusCode, o.Payload) } + func (o *DeleteRoleDefault) GetPayload() *DeleteRoleDefaultBody { return o.Payload } func (o *DeleteRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteRoleDefaultBody) // response payload @@ -121,7 +121,6 @@ DeleteRoleBody delete role body swagger:model DeleteRoleBody */ type DeleteRoleBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` @@ -162,7 +161,6 @@ DeleteRoleDefaultBody delete role default body swagger:model DeleteRoleDefaultBody */ type DeleteRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *DeleteRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -270,7 +265,6 @@ DeleteRoleDefaultBodyDetailsItems0 delete role default body details items0 swagger:model DeleteRoleDefaultBodyDetailsItems0 */ type DeleteRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/json/client/role/get_role_parameters.go b/api/managementpb/role/json/client/role/get_role_parameters.go index 3d0a82e0ac..9ec0ede0d8 100644 --- a/api/managementpb/role/json/client/role/get_role_parameters.go +++ b/api/managementpb/role/json/client/role/get_role_parameters.go @@ -60,7 +60,6 @@ GetRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetRoleParams struct { - // Body. Body GetRoleBody @@ -130,7 +129,6 @@ func (o *GetRoleParams) SetBody(body GetRoleBody) { // WriteToRequest writes these params to a swagger request func (o *GetRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/get_role_responses.go b/api/managementpb/role/json/client/role/get_role_responses.go index 2c4fb2115d..0894f153d2 100644 --- a/api/managementpb/role/json/client/role/get_role_responses.go +++ b/api/managementpb/role/json/client/role/get_role_responses.go @@ -60,12 +60,12 @@ type GetRoleOK struct { func (o *GetRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Get][%d] getRoleOk %+v", 200, o.Payload) } + func (o *GetRoleOK) GetPayload() *GetRoleOKBody { return o.Payload } func (o *GetRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetRoleOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetRoleDefault) Code() int { func (o *GetRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Get][%d] GetRole default %+v", o._statusCode, o.Payload) } + func (o *GetRoleDefault) GetPayload() *GetRoleDefaultBody { return o.Payload } func (o *GetRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetRoleDefaultBody) // response payload @@ -123,7 +123,6 @@ GetRoleBody get role body swagger:model GetRoleBody */ type GetRoleBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` } @@ -161,7 +160,6 @@ GetRoleDefaultBody get role default body swagger:model GetRoleDefaultBody */ type GetRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -227,9 +225,7 @@ func (o *GetRoleDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +236,6 @@ func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -269,7 +264,6 @@ GetRoleDefaultBodyDetailsItems0 get role default body details items0 swagger:model GetRoleDefaultBodyDetailsItems0 */ type GetRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -307,7 +301,6 @@ GetRoleOKBody get role OK body swagger:model GetRoleOKBody */ type GetRoleOKBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/managementpb/role/json/client/role/list_roles_parameters.go b/api/managementpb/role/json/client/role/list_roles_parameters.go index f075523305..1f1a6cd85e 100644 --- a/api/managementpb/role/json/client/role/list_roles_parameters.go +++ b/api/managementpb/role/json/client/role/list_roles_parameters.go @@ -60,7 +60,6 @@ ListRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListRolesParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListRolesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/list_roles_responses.go b/api/managementpb/role/json/client/role/list_roles_responses.go index 209264b39a..964d08d8a0 100644 --- a/api/managementpb/role/json/client/role/list_roles_responses.go +++ b/api/managementpb/role/json/client/role/list_roles_responses.go @@ -60,12 +60,12 @@ type ListRolesOK struct { func (o *ListRolesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/List][%d] listRolesOk %+v", 200, o.Payload) } + func (o *ListRolesOK) GetPayload() *ListRolesOKBody { return o.Payload } func (o *ListRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRolesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListRolesDefault) Code() int { func (o *ListRolesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/List][%d] ListRoles default %+v", o._statusCode, o.Payload) } + func (o *ListRolesDefault) GetPayload() *ListRolesDefaultBody { return o.Payload } func (o *ListRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRolesDefaultBody) // response payload @@ -123,7 +123,6 @@ ListRolesDefaultBody list roles default body swagger:model ListRolesDefaultBody */ type ListRolesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *ListRolesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -231,7 +227,6 @@ ListRolesDefaultBodyDetailsItems0 list roles default body details items0 swagger:model ListRolesDefaultBodyDetailsItems0 */ type ListRolesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ ListRolesOKBody list roles OK body swagger:model ListRolesOKBody */ type ListRolesOKBody struct { - // roles Roles []*ListRolesOKBodyRolesItems0 `json:"roles"` } @@ -329,9 +323,7 @@ func (o *ListRolesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Roles); i++ { - if o.Roles[i] != nil { if err := o.Roles[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -342,7 +334,6 @@ func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strf return err } } - } return nil @@ -371,7 +362,6 @@ ListRolesOKBodyRolesItems0 list roles OK body roles items0 swagger:model ListRolesOKBodyRolesItems0 */ type ListRolesOKBodyRolesItems0 struct { - // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/managementpb/role/json/client/role/set_default_role_parameters.go b/api/managementpb/role/json/client/role/set_default_role_parameters.go index 030558fa9d..471e8d343d 100644 --- a/api/managementpb/role/json/client/role/set_default_role_parameters.go +++ b/api/managementpb/role/json/client/role/set_default_role_parameters.go @@ -60,7 +60,6 @@ SetDefaultRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SetDefaultRoleParams struct { - // Body. Body SetDefaultRoleBody @@ -130,7 +129,6 @@ func (o *SetDefaultRoleParams) SetBody(body SetDefaultRoleBody) { // WriteToRequest writes these params to a swagger request func (o *SetDefaultRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/set_default_role_responses.go b/api/managementpb/role/json/client/role/set_default_role_responses.go index bccbbef9ab..cb18ff70dc 100644 --- a/api/managementpb/role/json/client/role/set_default_role_responses.go +++ b/api/managementpb/role/json/client/role/set_default_role_responses.go @@ -60,12 +60,12 @@ type SetDefaultRoleOK struct { func (o *SetDefaultRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/SetDefault][%d] setDefaultRoleOk %+v", 200, o.Payload) } + func (o *SetDefaultRoleOK) GetPayload() interface{} { return o.Payload } func (o *SetDefaultRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *SetDefaultRoleDefault) Code() int { func (o *SetDefaultRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/SetDefault][%d] SetDefaultRole default %+v", o._statusCode, o.Payload) } + func (o *SetDefaultRoleDefault) GetPayload() *SetDefaultRoleDefaultBody { return o.Payload } func (o *SetDefaultRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SetDefaultRoleDefaultBody) // response payload @@ -121,7 +121,6 @@ SetDefaultRoleBody set default role body swagger:model SetDefaultRoleBody */ type SetDefaultRoleBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` } @@ -159,7 +158,6 @@ SetDefaultRoleDefaultBody set default role default body swagger:model SetDefaultRoleDefaultBody */ type SetDefaultRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *SetDefaultRoleDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -267,7 +262,6 @@ SetDefaultRoleDefaultBodyDetailsItems0 set default role default body details ite swagger:model SetDefaultRoleDefaultBodyDetailsItems0 */ type SetDefaultRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/json/client/role/update_role_parameters.go b/api/managementpb/role/json/client/role/update_role_parameters.go index acbe211722..f584f8c3b9 100644 --- a/api/managementpb/role/json/client/role/update_role_parameters.go +++ b/api/managementpb/role/json/client/role/update_role_parameters.go @@ -60,7 +60,6 @@ UpdateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateRoleParams struct { - // Body. Body UpdateRoleBody @@ -130,7 +129,6 @@ func (o *UpdateRoleParams) SetBody(body UpdateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/role/json/client/role/update_role_responses.go b/api/managementpb/role/json/client/role/update_role_responses.go index 36799c9752..809f3b65c0 100644 --- a/api/managementpb/role/json/client/role/update_role_responses.go +++ b/api/managementpb/role/json/client/role/update_role_responses.go @@ -60,12 +60,12 @@ type UpdateRoleOK struct { func (o *UpdateRoleOK) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Update][%d] updateRoleOk %+v", 200, o.Payload) } + func (o *UpdateRoleOK) GetPayload() interface{} { return o.Payload } func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *UpdateRoleDefault) Code() int { func (o *UpdateRoleDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Role/Update][%d] UpdateRole default %+v", o._statusCode, o.Payload) } + func (o *UpdateRoleDefault) GetPayload() *UpdateRoleDefaultBody { return o.Payload } func (o *UpdateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateRoleDefaultBody) // response payload @@ -121,7 +121,6 @@ UpdateRoleBody update role body swagger:model UpdateRoleBody */ type UpdateRoleBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` @@ -168,7 +167,6 @@ UpdateRoleDefaultBody update role default body swagger:model UpdateRoleDefaultBody */ type UpdateRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -234,9 +232,7 @@ func (o *UpdateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -247,7 +243,6 @@ func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -276,7 +271,6 @@ UpdateRoleDefaultBodyDetailsItems0 update role default body details items0 swagger:model UpdateRoleDefaultBodyDetailsItems0 */ type UpdateRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/managementpb/role/role.pb.go b/api/managementpb/role/role.pb.go index 58e80af348..96978fed8b 100644 --- a/api/managementpb/role/role.pb.go +++ b/api/managementpb/role/role.pb.go @@ -7,13 +7,14 @@ package rolev1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "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 ( @@ -964,24 +965,27 @@ func file_managementpb_role_role_proto_rawDescGZIP() []byte { return file_managementpb_role_role_proto_rawDescData } -var file_managementpb_role_role_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_managementpb_role_role_proto_goTypes = []interface{}{ - (*CreateRoleRequest)(nil), // 0: role.v1beta1.CreateRoleRequest - (*CreateRoleResponse)(nil), // 1: role.v1beta1.CreateRoleResponse - (*UpdateRoleRequest)(nil), // 2: role.v1beta1.UpdateRoleRequest - (*UpdateRoleResponse)(nil), // 3: role.v1beta1.UpdateRoleResponse - (*DeleteRoleRequest)(nil), // 4: role.v1beta1.DeleteRoleRequest - (*DeleteRoleResponse)(nil), // 5: role.v1beta1.DeleteRoleResponse - (*GetRoleRequest)(nil), // 6: role.v1beta1.GetRoleRequest - (*GetRoleResponse)(nil), // 7: role.v1beta1.GetRoleResponse - (*SetDefaultRoleRequest)(nil), // 8: role.v1beta1.SetDefaultRoleRequest - (*SetDefaultRoleResponse)(nil), // 9: role.v1beta1.SetDefaultRoleResponse - (*AssignRolesRequest)(nil), // 10: role.v1beta1.AssignRolesRequest - (*AssignRolesResponse)(nil), // 11: role.v1beta1.AssignRolesResponse - (*ListRolesRequest)(nil), // 12: role.v1beta1.ListRolesRequest - (*ListRolesResponse)(nil), // 13: role.v1beta1.ListRolesResponse - (*ListRolesResponse_RoleData)(nil), // 14: role.v1beta1.ListRolesResponse.RoleData -} +var ( + file_managementpb_role_role_proto_msgTypes = make([]protoimpl.MessageInfo, 15) + file_managementpb_role_role_proto_goTypes = []interface{}{ + (*CreateRoleRequest)(nil), // 0: role.v1beta1.CreateRoleRequest + (*CreateRoleResponse)(nil), // 1: role.v1beta1.CreateRoleResponse + (*UpdateRoleRequest)(nil), // 2: role.v1beta1.UpdateRoleRequest + (*UpdateRoleResponse)(nil), // 3: role.v1beta1.UpdateRoleResponse + (*DeleteRoleRequest)(nil), // 4: role.v1beta1.DeleteRoleRequest + (*DeleteRoleResponse)(nil), // 5: role.v1beta1.DeleteRoleResponse + (*GetRoleRequest)(nil), // 6: role.v1beta1.GetRoleRequest + (*GetRoleResponse)(nil), // 7: role.v1beta1.GetRoleResponse + (*SetDefaultRoleRequest)(nil), // 8: role.v1beta1.SetDefaultRoleRequest + (*SetDefaultRoleResponse)(nil), // 9: role.v1beta1.SetDefaultRoleResponse + (*AssignRolesRequest)(nil), // 10: role.v1beta1.AssignRolesRequest + (*AssignRolesResponse)(nil), // 11: role.v1beta1.AssignRolesResponse + (*ListRolesRequest)(nil), // 12: role.v1beta1.ListRolesRequest + (*ListRolesResponse)(nil), // 13: role.v1beta1.ListRolesResponse + (*ListRolesResponse_RoleData)(nil), // 14: role.v1beta1.ListRolesResponse.RoleData + } +) + var file_managementpb_role_role_proto_depIdxs = []int32{ 14, // 0: role.v1beta1.ListRolesResponse.roles:type_name -> role.v1beta1.ListRolesResponse.RoleData 0, // 1: role.v1beta1.Role.CreateRole:input_type -> role.v1beta1.CreateRoleRequest diff --git a/api/managementpb/role/role.pb.gw.go b/api/managementpb/role/role.pb.gw.go index e27f7d8eaa..08f67280cf 100644 --- a/api/managementpb/role/role.pb.gw.go +++ b/api/managementpb/role/role.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRoleRequest @@ -45,7 +47,6 @@ func request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Role_CreateRole_0(ctx context.Context, marshaler runtime.Mars msg, err := server.CreateRole(ctx, &protoReq) return msg, metadata, err - } func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Role_UpdateRole_0(ctx context.Context, marshaler runtime.Mars msg, err := server.UpdateRole(ctx, &protoReq) return msg, metadata, err - } func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Role_DeleteRole_0(ctx context.Context, marshaler runtime.Mars msg, err := server.DeleteRole(ctx, &protoReq) return msg, metadata, err - } func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, cl msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Role_GetRole_0(ctx context.Context, marshaler runtime.Marshal msg, err := server.GetRole(ctx, &protoReq) return msg, metadata, err - } func request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.ListRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Role_ListRoles_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.ListRoles(ctx, &protoReq) return msg, metadata, err - } func request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.AssignRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Role_AssignRoles_0(ctx context.Context, marshaler runtime.Mar msg, err := server.AssignRoles(ctx, &protoReq) return msg, metadata, err - } func request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, client RoleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.SetDefaultRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, server RoleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime. msg, err := server.SetDefaultRole(ctx, &protoReq) return msg, metadata, err - } // RegisterRoleHandlerServer registers the http handlers for service Role to "mux". @@ -274,7 +262,6 @@ func local_request_Role_SetDefaultRole_0(ctx context.Context, marshaler runtime. // 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 RegisterRoleHandlerFromEndpoint instead. func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RoleServer) error { - mux.Handle("POST", pattern_Role_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -297,7 +284,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -322,7 +308,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -347,7 +332,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -372,7 +356,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -397,7 +380,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -422,7 +404,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -447,7 +428,6 @@ func RegisterRoleHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_Role_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -490,7 +470,6 @@ func RegisterRoleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RoleClient" to call the correct interceptors. func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RoleClient) error { - mux.Handle("POST", pattern_Role_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -510,7 +489,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -532,7 +510,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -554,7 +531,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -576,7 +552,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -598,7 +573,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -620,7 +594,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Role_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -642,7 +615,6 @@ func RegisterRoleHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_Role_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/managementpb/role/role.swagger.json b/api/managementpb/role/role.swagger.json deleted file mode 100644 index 47a71ee981..0000000000 --- a/api/managementpb/role/role.swagger.json +++ /dev/null @@ -1,440 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/role/role.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Role" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Role/Assign": { - "post": { - "summary": "Assign Roles", - "description": "Assigns Roles replaces all existing Roles for a User.", - "operationId": "AssignRoles", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1AssignRolesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1AssignRolesRequest" - } - } - ], - "tags": [ - "Role" - ] - } - }, - "/v1/management/Role/Create": { - "post": { - "summary": "Create Role", - "description": "Creates a new Role.", - "operationId": "CreateRole", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1CreateRoleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1CreateRoleRequest" - } - } - ], - "tags": [ - "Role" - ] - } - }, - "/v1/management/Role/Delete": { - "post": { - "summary": "Delete Role", - "description": "Deletes a Role.", - "operationId": "DeleteRole", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteRoleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1DeleteRoleRequest" - } - } - ], - "tags": [ - "Role" - ] - } - }, - "/v1/management/Role/Get": { - "post": { - "summary": "Get Role", - "description": "Retrieves a Role by ID.", - "operationId": "GetRole", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1GetRoleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1GetRoleRequest" - } - } - ], - "tags": [ - "Role" - ] - } - }, - "/v1/management/Role/List": { - "post": { - "summary": "List Roles", - "description": "Lists Roles.", - "operationId": "ListRoles", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListRolesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListRolesRequest" - } - } - ], - "tags": [ - "Role" - ] - } - }, - "/v1/management/Role/SetDefault": { - "post": { - "summary": "Set default Role", - "description": "Configures default Role assigned to Users.", - "operationId": "SetDefaultRole", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1SetDefaultRoleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1SetDefaultRoleRequest" - } - } - ], - "tags": [ - "Role" - ] - } - }, - "/v1/management/Role/Update": { - "post": { - "summary": "Update Role", - "description": "Updates an existing Role.", - "operationId": "UpdateRole", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1UpdateRoleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1UpdateRoleRequest" - } - } - ], - "tags": [ - "Role" - ] - } - } - }, - "definitions": { - "ListRolesResponseRoleData": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - }, - "title": { - "type": "string" - }, - "filter": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1AssignRolesRequest": { - "type": "object", - "properties": { - "role_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "user_id": { - "type": "integer", - "format": "int64" - } - } - }, - "v1beta1AssignRolesResponse": { - "type": "object" - }, - "v1beta1CreateRoleRequest": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "filter": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "v1beta1CreateRoleResponse": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - } - } - }, - "v1beta1DeleteRoleRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - }, - "replacement_role_id": { - "type": "integer", - "format": "int64", - "description": "Role ID to be used as a replacement for the role. Additional logic applies." - } - } - }, - "v1beta1DeleteRoleResponse": { - "type": "object" - }, - "v1beta1GetRoleRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - } - } - }, - "v1beta1GetRoleResponse": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - }, - "title": { - "type": "string" - }, - "filter": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "v1beta1ListRolesRequest": { - "type": "object" - }, - "v1beta1ListRolesResponse": { - "type": "object", - "properties": { - "roles": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ListRolesResponseRoleData" - } - } - } - }, - "v1beta1SetDefaultRoleRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - } - } - }, - "v1beta1SetDefaultRoleResponse": { - "type": "object" - }, - "v1beta1UpdateRoleRequest": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64" - }, - "title": { - "type": "string" - }, - "filter": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "v1beta1UpdateRoleResponse": { - "type": "object" - } - } -} diff --git a/api/managementpb/role/role_grpc.pb.go b/api/managementpb/role/role_grpc.pb.go index 084d6e2276..84a7298d54 100644 --- a/api/managementpb/role/role_grpc.pb.go +++ b/api/managementpb/role/role_grpc.pb.go @@ -8,6 +8,7 @@ package rolev1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -141,27 +142,32 @@ type RoleServer interface { } // UnimplementedRoleServer must be embedded to have forward compatible implementations. -type UnimplementedRoleServer struct { -} +type UnimplementedRoleServer struct{} func (UnimplementedRoleServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") } + func (UnimplementedRoleServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } + func (UnimplementedRoleServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } + func (UnimplementedRoleServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") } + func (UnimplementedRoleServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented") } + func (UnimplementedRoleServer) AssignRoles(context.Context, *AssignRolesRequest) (*AssignRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AssignRoles not implemented") } + func (UnimplementedRoleServer) SetDefaultRole(context.Context, *SetDefaultRoleRequest) (*SetDefaultRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetDefaultRole not implemented") } diff --git a/api/managementpb/service.pb.go b/api/managementpb/service.pb.go index a09d4b3bf6..48647c2d68 100644 --- a/api/managementpb/service.pb.go +++ b/api/managementpb/service.pb.go @@ -7,14 +7,16 @@ package managementpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" _ "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" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -350,15 +352,18 @@ func file_managementpb_service_proto_rawDescGZIP() []byte { return file_managementpb_service_proto_rawDescData } -var file_managementpb_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_managementpb_service_proto_goTypes = []interface{}{ - (*AddNodeParams)(nil), // 0: management.AddNodeParams - (*RemoveServiceRequest)(nil), // 1: management.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 2: management.RemoveServiceResponse - nil, // 3: management.AddNodeParams.CustomLabelsEntry - (inventorypb.NodeType)(0), // 4: inventory.NodeType - (inventorypb.ServiceType)(0), // 5: inventory.ServiceType -} +var ( + file_managementpb_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) + file_managementpb_service_proto_goTypes = []interface{}{ + (*AddNodeParams)(nil), // 0: management.AddNodeParams + (*RemoveServiceRequest)(nil), // 1: management.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 2: management.RemoveServiceResponse + nil, // 3: management.AddNodeParams.CustomLabelsEntry + (inventorypb.NodeType)(0), // 4: inventory.NodeType + (inventorypb.ServiceType)(0), // 5: inventory.ServiceType + } +) + var file_managementpb_service_proto_depIdxs = []int32{ 4, // 0: management.AddNodeParams.node_type:type_name -> inventory.NodeType 3, // 1: management.AddNodeParams.custom_labels:type_name -> management.AddNodeParams.CustomLabelsEntry diff --git a/api/managementpb/service.pb.gw.go b/api/managementpb/service.pb.gw.go index 30d68dd5bd..c8998723c2 100644 --- a/api/managementpb/service.pb.gw.go +++ b/api/managementpb/service.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Service_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest @@ -45,7 +47,6 @@ func request_Service_RemoveService_0(ctx context.Context, marshaler runtime.Mars msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtim msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err - } // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". @@ -70,7 +70,6 @@ func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtim // 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 RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { - mux.Handle("POST", pattern_Service_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Service_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServiceClient" to call the correct interceptors. func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error { - mux.Handle("POST", pattern_Service_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Service_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_Service_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "Remove"}, "")) -) +var pattern_Service_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "Remove"}, "")) -var ( - forward_Service_RemoveService_0 = runtime.ForwardResponseMessage -) +var forward_Service_RemoveService_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/service.swagger.json b/api/managementpb/service.swagger.json deleted file mode 100644 index 7be4e886ac..0000000000 --- a/api/managementpb/service.swagger.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/service.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Service" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Service/Remove": { - "post": { - "summary": "Remove Service", - "description": "Removes a Service along with Agents.", - "operationId": "RemoveService", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/managementRemoveServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/managementRemoveServiceRequest" - } - } - ], - "tags": [ - "Service" - ] - } - } - }, - "definitions": { - "inventoryServiceType": { - "type": "string", - "enum": [ - "SERVICE_TYPE_INVALID", - "MYSQL_SERVICE", - "MONGODB_SERVICE", - "POSTGRESQL_SERVICE", - "PROXYSQL_SERVICE", - "HAPROXY_SERVICE", - "EXTERNAL_SERVICE" - ], - "default": "SERVICE_TYPE_INVALID", - "description": "ServiceType describes supported Service types." - }, - "managementRemoveServiceRequest": { - "type": "object", - "properties": { - "service_type": { - "$ref": "#/definitions/inventoryServiceType", - "description": "Service type." - }, - "service_id": { - "type": "string", - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier." - }, - "service_name": { - "type": "string", - "description": "Unique across all Services user-defined name." - } - } - }, - "managementRemoveServiceResponse": { - "type": "object" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go b/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go index 2b2361678f..5aa00c1906 100644 --- a/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go +++ b/api/managementpb/service/json/client/mgmt_service/list_services_parameters.go @@ -60,7 +60,6 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { - // Body. Body ListServicesBody @@ -130,7 +129,6 @@ func (o *ListServicesParams) SetBody(body ListServicesBody) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/managementpb/service/json/client/mgmt_service/list_services_responses.go b/api/managementpb/service/json/client/mgmt_service/list_services_responses.go index 69d235ac85..fdc3b2c330 100644 --- a/api/managementpb/service/json/client/mgmt_service/list_services_responses.go +++ b/api/managementpb/service/json/client/mgmt_service/list_services_responses.go @@ -62,12 +62,12 @@ type ListServicesOK struct { func (o *ListServicesOK) Error() string { return fmt.Sprintf("[POST /v1/management/Service/List][%d] listServicesOk %+v", 200, o.Payload) } + func (o *ListServicesOK) GetPayload() *ListServicesOKBody { return o.Payload } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesOKBody) // response payload @@ -104,12 +104,12 @@ func (o *ListServicesDefault) Code() int { func (o *ListServicesDefault) Error() string { return fmt.Sprintf("[POST /v1/management/Service/List][%d] ListServices default %+v", o._statusCode, o.Payload) } + func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { return o.Payload } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesDefaultBody) // response payload @@ -125,7 +125,6 @@ ListServicesBody list services body swagger:model ListServicesBody */ type ListServicesBody struct { - // Return only Services running on that Node. NodeID string `json:"node_id,omitempty"` @@ -236,7 +235,6 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -302,9 +300,7 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -315,7 +311,6 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -344,7 +339,6 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -382,7 +376,6 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { - // List of Services. Services []*ListServicesOKBodyServicesItems0 `json:"services"` } @@ -442,9 +435,7 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Services); i++ { - if o.Services[i] != nil { if err := o.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -455,7 +446,6 @@ func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, format return err } } - } return nil @@ -484,7 +474,6 @@ ListServicesOKBodyServicesItems0 list services OK body services items0 swagger:model ListServicesOKBodyServicesItems0 */ type ListServicesOKBodyServicesItems0 struct { - // Unique service identifier. ServiceID string `json:"service_id,omitempty"` @@ -690,9 +679,7 @@ func (o *ListServicesOKBodyServicesItems0) ContextValidate(ctx context.Context, } func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if err := o.Agents[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -703,7 +690,6 @@ func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Con return err } } - } return nil @@ -732,7 +718,6 @@ ListServicesOKBodyServicesItems0AgentsItems0 list services OK body services item swagger:model ListServicesOKBodyServicesItems0AgentsItems0 */ type ListServicesOKBodyServicesItems0AgentsItems0 struct { - // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -1016,7 +1001,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) ContextValidate(ctx conte } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { - if o.AzureOptions != nil { if err := o.AzureOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1032,7 +1016,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MongoDBOptions != nil { if err := o.MongoDBOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1048,7 +1031,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOpt } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlOptions != nil { if err := o.MysqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1064,7 +1046,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlOptions != nil { if err := o.PostgresqlOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1102,7 +1083,6 @@ ListServicesOKBodyServicesItems0AgentsItems0AzureOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0AzureOptions */ type ListServicesOKBodyServicesItems0AgentsItems0AzureOptions struct { - // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1152,7 +1132,6 @@ ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions list services OK body swagger:model ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions struct { - // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1211,7 +1190,6 @@ ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions struct { - // TLS CA certificate. TLSCa string `json:"tls_ca,omitempty"` @@ -1255,7 +1233,6 @@ ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions list services OK b swagger:model ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions struct { - // TLS CA certificate. SslCa string `json:"ssl_ca,omitempty"` diff --git a/api/managementpb/service/service.pb.go b/api/managementpb/service/service.pb.go index 6733be5fa4..46248b0da4 100644 --- a/api/managementpb/service/service.pb.go +++ b/api/managementpb/service/service.pb.go @@ -7,15 +7,17 @@ package servicev1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - inventorypb "github.com/percona/pmm/api/inventorypb" - agent "github.com/percona/pmm/api/managementpb/agent" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + inventorypb "github.com/percona/pmm/api/inventorypb" + agent "github.com/percona/pmm/api/managementpb/agent" ) const ( @@ -528,18 +530,21 @@ func file_managementpb_service_service_proto_rawDescGZIP() []byte { return file_managementpb_service_service_proto_rawDescData } -var file_managementpb_service_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_service_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_managementpb_service_service_proto_goTypes = []interface{}{ - (UniversalService_Status)(0), // 0: service.v1beta1.UniversalService.Status - (*UniversalService)(nil), // 1: service.v1beta1.UniversalService - (*ListServiceRequest)(nil), // 2: service.v1beta1.ListServiceRequest - (*ListServiceResponse)(nil), // 3: service.v1beta1.ListServiceResponse - nil, // 4: service.v1beta1.UniversalService.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*agent.UniversalAgent)(nil), // 6: agent.v1beta1.UniversalAgent - (inventorypb.ServiceType)(0), // 7: inventory.ServiceType -} +var ( + file_managementpb_service_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_service_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) + file_managementpb_service_service_proto_goTypes = []interface{}{ + (UniversalService_Status)(0), // 0: service.v1beta1.UniversalService.Status + (*UniversalService)(nil), // 1: service.v1beta1.UniversalService + (*ListServiceRequest)(nil), // 2: service.v1beta1.ListServiceRequest + (*ListServiceResponse)(nil), // 3: service.v1beta1.ListServiceResponse + nil, // 4: service.v1beta1.UniversalService.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*agent.UniversalAgent)(nil), // 6: agent.v1beta1.UniversalAgent + (inventorypb.ServiceType)(0), // 7: inventory.ServiceType + } +) + var file_managementpb_service_service_proto_depIdxs = []int32{ 4, // 0: service.v1beta1.UniversalService.custom_labels:type_name -> service.v1beta1.UniversalService.CustomLabelsEntry 5, // 1: service.v1beta1.UniversalService.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/managementpb/service/service.pb.gw.go b/api/managementpb/service/service.pb.gw.go index b7ff8d5458..12ebf2d2db 100644 --- a/api/managementpb/service/service.pb.gw.go +++ b/api/managementpb/service/service.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_MgmtService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client MgmtServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServiceRequest @@ -45,7 +47,6 @@ func request_MgmtService_ListServices_0(ctx context.Context, marshaler runtime.M msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_MgmtService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server MgmtServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_MgmtService_ListServices_0(ctx context.Context, marshaler run msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err - } // RegisterMgmtServiceHandlerServer registers the http handlers for service MgmtService to "mux". @@ -70,7 +70,6 @@ func local_request_MgmtService_ListServices_0(ctx context.Context, marshaler run // 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 RegisterMgmtServiceHandlerFromEndpoint instead. func RegisterMgmtServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MgmtServiceServer) error { - mux.Handle("POST", pattern_MgmtService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterMgmtServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_MgmtService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterMgmtServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MgmtServiceClient" to call the correct interceptors. func RegisterMgmtServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MgmtServiceClient) error { - mux.Handle("POST", pattern_MgmtService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterMgmtServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_MgmtService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_MgmtService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "List"}, "")) -) +var pattern_MgmtService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "List"}, "")) -var ( - forward_MgmtService_ListServices_0 = runtime.ForwardResponseMessage -) +var forward_MgmtService_ListServices_0 = runtime.ForwardResponseMessage diff --git a/api/managementpb/service/service.swagger.json b/api/managementpb/service/service.swagger.json deleted file mode 100644 index 20f84c862a..0000000000 --- a/api/managementpb/service/service.swagger.json +++ /dev/null @@ -1,500 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/service/service.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "MgmtService" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/management/Service/List": { - "post": { - "summary": "List Services", - "description": "Returns a filtered list of Services.", - "operationId": "ListServices", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListServiceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ListServiceRequest" - } - } - ], - "tags": [ - "MgmtService" - ] - } - } - }, - "definitions": { - "UniversalAgentAzureOptions": { - "type": "object", - "properties": { - "client_id": { - "type": "string", - "description": "Azure client ID." - }, - "is_client_secret_set": { - "type": "boolean", - "description": "True if Azure client secret is set." - }, - "resource_group": { - "type": "string", - "description": "Azure resource group." - }, - "subscription_id": { - "type": "string", - "description": "Azure subscription ID." - }, - "tenant_id": { - "type": "string", - "description": "Azure tenant ID." - } - } - }, - "UniversalAgentMongoDBOptions": { - "type": "object", - "properties": { - "is_tls_certificate_key_set": { - "type": "boolean", - "description": "True if TLS certificate is set." - }, - "is_tls_certificate_key_file_password_set": { - "type": "boolean", - "description": "True if TLS certificate file password is set." - }, - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "authentication_mechanism": { - "type": "string", - "description": "MongoDB auth mechanism." - }, - "authentication_database": { - "type": "string", - "description": "MongoDB auth database." - }, - "stats_collections": { - "type": "array", - "items": { - "type": "string" - }, - "description": "MongoDB stats collections." - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "description": "MongoDB collections limit." - }, - "enable_all_collectors": { - "type": "boolean", - "description": "True if all collectors are enabled." - } - } - }, - "UniversalAgentMySQLOptions": { - "type": "object", - "properties": { - "tls_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "tls_cert": { - "type": "string", - "description": "TLS certificate." - }, - "is_tls_key_set": { - "type": "boolean", - "description": "True if TLS key is set." - } - } - }, - "UniversalAgentPostgreSQLOptions": { - "type": "object", - "properties": { - "ssl_ca": { - "type": "string", - "description": "TLS CA certificate." - }, - "ssl_cert": { - "type": "string", - "description": "TLS certificate." - }, - "is_ssl_key_set": { - "type": "boolean", - "description": "True if TLS key is set." - } - } - }, - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "inventoryServiceType": { - "type": "string", - "enum": [ - "SERVICE_TYPE_INVALID", - "MYSQL_SERVICE", - "MONGODB_SERVICE", - "POSTGRESQL_SERVICE", - "PROXYSQL_SERVICE", - "HAPROXY_SERVICE", - "EXTERNAL_SERVICE" - ], - "default": "SERVICE_TYPE_INVALID", - "description": "ServiceType describes supported Service types." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "v1beta1ListServiceRequest": { - "type": "object", - "properties": { - "node_id": { - "type": "string", - "description": "Return only Services running on that Node." - }, - "service_type": { - "$ref": "#/definitions/inventoryServiceType", - "description": "Return only services filtered by service type." - }, - "external_group": { - "type": "string", - "description": "Return only services in this external group." - } - } - }, - "v1beta1ListServiceResponse": { - "type": "object", - "properties": { - "services": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1UniversalService" - }, - "description": "List of Services." - } - } - }, - "v1beta1UniversalAgent": { - "type": "object", - "properties": { - "agent_id": { - "type": "string", - "description": "Unique agent identifier." - }, - "is_agent_password_set": { - "type": "boolean", - "description": "True if the agent password is set." - }, - "agent_type": { - "type": "string", - "description": "Agent type." - }, - "aws_access_key": { - "type": "string", - "description": "AWS Access Key." - }, - "is_aws_secret_key_set": { - "type": "boolean", - "description": "True if AWS Secret Key is set." - }, - "azure_options": { - "$ref": "#/definitions/UniversalAgentAzureOptions", - "description": "Options used for connecting to Azure." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels." - }, - "disabled": { - "type": "boolean", - "description": "Desired Agent status: enabled (false) or disabled (true)." - }, - "disabled_collectors": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of disabled collector names." - }, - "listen_port": { - "type": "integer", - "format": "int64", - "description": "Listen port for scraping metrics." - }, - "log_level": { - "type": "string", - "description": "Log level for exporter." - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "description": "Limit query length in QAN." - }, - "max_query_log_size": { - "type": "string", - "format": "int64", - "description": "Limit query log size in QAN." - }, - "metrics_path": { - "type": "string", - "description": "Path under which metrics are exposed, used to generate URI." - }, - "metrics_scheme": { - "type": "string", - "description": "Scheme to generate URI to exporter metrics endpoints." - }, - "mongo_db_options": { - "$ref": "#/definitions/UniversalAgentMongoDBOptions", - "description": "TLS and other options for connecting to MongoDB." - }, - "mysql_options": { - "$ref": "#/definitions/UniversalAgentMySQLOptions", - "description": "TLS options for connecting to MySQL." - }, - "node_id": { - "type": "string", - "description": "A unique node identifier." - }, - "is_password_set": { - "type": "boolean", - "description": "True if password for connecting the agent to the database is set." - }, - "pmm_agent_id": { - "type": "string", - "description": "The pmm-agent identifier." - }, - "postgresql_options": { - "$ref": "#/definitions/UniversalAgentPostgreSQLOptions", - "description": "TLS options for connecting to PostgreSQL." - }, - "process_exec_path": { - "type": "string", - "description": "Path to exec process." - }, - "push_metrics": { - "type": "boolean", - "description": "True if exporter uses push metrics mode." - }, - "query_examples_disabled": { - "type": "boolean", - "description": "True if query examples are disabled." - }, - "comments_parsing_disabled": { - "type": "boolean", - "description": "True if query comments parsing is disabled." - }, - "rds_basic_metrics_disabled": { - "type": "boolean", - "description": "True if RDS basic metrics are disdabled." - }, - "rds_enhanced_metrics_disabled": { - "type": "boolean", - "description": "True if RDS enhanced metrics are disdabled." - }, - "runs_on_node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "service_id": { - "type": "string", - "description": "Service identifier." - }, - "status": { - "type": "string", - "description": "Actual Agent status." - }, - "table_count": { - "type": "integer", - "format": "int32", - "description": "Last known table count." - }, - "table_count_tablestats_group_limit": { - "type": "integer", - "format": "int32", - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled." - }, - "tls": { - "type": "boolean", - "description": "Use TLS for database connections." - }, - "tls_skip_verify": { - "type": "boolean", - "description": "Skip TLS certificate and hostname validation." - }, - "username": { - "type": "string", - "description": "HTTP basic auth username for collecting metrics." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp." - }, - "version": { - "type": "string", - "description": "Agent version." - }, - "is_connected": { - "type": "boolean", - "description": "True if Agent is running and connected to pmm-managed." - } - } - }, - "v1beta1UniversalService": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "description": "Unique service identifier." - }, - "service_type": { - "type": "string", - "description": "Service type." - }, - "service_name": { - "type": "string", - "description": "User-defined name unique across all Services." - }, - "database_name": { - "type": "string", - "description": "Database name." - }, - "node_id": { - "type": "string", - "description": "Node identifier where this instance runs." - }, - "node_name": { - "type": "string", - "description": "Node name where this instance runs." - }, - "environment": { - "type": "string", - "description": "Environment name." - }, - "cluster": { - "type": "string", - "description": "Cluster name." - }, - "replication_set": { - "type": "string", - "description": "Replication set name." - }, - "custom_labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom user-assigned labels for Service." - }, - "external_group": { - "type": "string", - "description": "External group name." - }, - "address": { - "type": "string", - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "Access port.\nPort is required when the address present." - }, - "socket": { - "type": "string", - "description": "Access unix socket.\nAddress (and port) or socket is required." - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Last update timestamp." - }, - "agents": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1UniversalAgent" - }, - "description": "List of agents related to this service." - }, - "status": { - "$ref": "#/definitions/v1beta1UniversalServiceStatus", - "description": "The health status of the service." - } - } - }, - "v1beta1UniversalServiceStatus": { - "type": "string", - "enum": [ - "STATUS_INVALID", - "UP", - "DOWN", - "UNKNOWN" - ], - "default": "STATUS_INVALID", - "description": "Service status.\n\n - STATUS_INVALID: In case we don't support the db vendor yet.\n - UP: The service is up.\n - DOWN: The service is down.\n - UNKNOWN: The service's status cannot be known (e.g. there are no metrics yet)." - } - } -} diff --git a/api/managementpb/service/service_grpc.pb.go b/api/managementpb/service/service_grpc.pb.go index 37486ce2f7..41509487cb 100644 --- a/api/managementpb/service/service_grpc.pb.go +++ b/api/managementpb/service/service_grpc.pb.go @@ -8,6 +8,7 @@ package servicev1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type MgmtServiceServer interface { } // UnimplementedMgmtServiceServer must be embedded to have forward compatible implementations. -type UnimplementedMgmtServiceServer struct { -} +type UnimplementedMgmtServiceServer struct{} func (UnimplementedMgmtServiceServer) ListServices(context.Context, *ListServiceRequest) (*ListServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") diff --git a/api/managementpb/service_grpc.pb.go b/api/managementpb/service_grpc.pb.go index 1e1ba99100..949cf2ebad 100644 --- a/api/managementpb/service_grpc.pb.go +++ b/api/managementpb/service_grpc.pb.go @@ -8,6 +8,7 @@ package managementpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type ServiceServer interface { } // UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} +type UnimplementedServiceServer struct{} func (UnimplementedServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") diff --git a/api/managementpb/severity.pb.go b/api/managementpb/severity.pb.go index 0f8281ef23..d7fa52c9c5 100644 --- a/api/managementpb/severity.pb.go +++ b/api/managementpb/severity.pb.go @@ -7,10 +7,11 @@ package managementpb import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -130,10 +131,13 @@ func file_managementpb_severity_proto_rawDescGZIP() []byte { return file_managementpb_severity_proto_rawDescData } -var file_managementpb_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_managementpb_severity_proto_goTypes = []interface{}{ - (Severity)(0), // 0: management.Severity -} +var ( + file_managementpb_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_managementpb_severity_proto_goTypes = []interface{}{ + (Severity)(0), // 0: management.Severity + } +) + var file_managementpb_severity_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/managementpb/severity.swagger.json b/api/managementpb/severity.swagger.json deleted file mode 100644 index 27c5fe7813..0000000000 --- a/api/managementpb/severity.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "managementpb/severity.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/platformpb/json/client/platform/connect_parameters.go b/api/platformpb/json/client/platform/connect_parameters.go index a12d7ec6ab..59a1edc83b 100644 --- a/api/platformpb/json/client/platform/connect_parameters.go +++ b/api/platformpb/json/client/platform/connect_parameters.go @@ -60,7 +60,6 @@ ConnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ConnectParams struct { - // Body. Body ConnectBody @@ -130,7 +129,6 @@ func (o *ConnectParams) SetBody(body ConnectBody) { // WriteToRequest writes these params to a swagger request func (o *ConnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/connect_responses.go b/api/platformpb/json/client/platform/connect_responses.go index b7c2a07bb7..20c28115f6 100644 --- a/api/platformpb/json/client/platform/connect_responses.go +++ b/api/platformpb/json/client/platform/connect_responses.go @@ -60,12 +60,12 @@ type ConnectOK struct { func (o *ConnectOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/Connect][%d] connectOk %+v", 200, o.Payload) } + func (o *ConnectOK) GetPayload() interface{} { return o.Payload } func (o *ConnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ConnectDefault) Code() int { func (o *ConnectDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/Connect][%d] Connect default %+v", o._statusCode, o.Payload) } + func (o *ConnectDefault) GetPayload() *ConnectDefaultBody { return o.Payload } func (o *ConnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ConnectDefaultBody) // response payload @@ -121,7 +121,6 @@ ConnectBody connect body swagger:model ConnectBody */ type ConnectBody struct { - // User defined human readable PMM Server Name. ServerName string `json:"server_name,omitempty"` @@ -168,7 +167,6 @@ ConnectDefaultBody connect default body swagger:model ConnectDefaultBody */ type ConnectDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -234,9 +232,7 @@ func (o *ConnectDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -247,7 +243,6 @@ func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -276,7 +271,6 @@ ConnectDefaultBodyDetailsItems0 connect default body details items0 swagger:model ConnectDefaultBodyDetailsItems0 */ type ConnectDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platformpb/json/client/platform/disconnect_parameters.go b/api/platformpb/json/client/platform/disconnect_parameters.go index 99956f968a..a7aa5c50e1 100644 --- a/api/platformpb/json/client/platform/disconnect_parameters.go +++ b/api/platformpb/json/client/platform/disconnect_parameters.go @@ -60,7 +60,6 @@ DisconnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DisconnectParams struct { - // Body. Body DisconnectBody @@ -130,7 +129,6 @@ func (o *DisconnectParams) SetBody(body DisconnectBody) { // WriteToRequest writes these params to a swagger request func (o *DisconnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/disconnect_responses.go b/api/platformpb/json/client/platform/disconnect_responses.go index f27f6052f4..6ea415058e 100644 --- a/api/platformpb/json/client/platform/disconnect_responses.go +++ b/api/platformpb/json/client/platform/disconnect_responses.go @@ -60,12 +60,12 @@ type DisconnectOK struct { func (o *DisconnectOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/Disconnect][%d] disconnectOk %+v", 200, o.Payload) } + func (o *DisconnectOK) GetPayload() interface{} { return o.Payload } func (o *DisconnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *DisconnectDefault) Code() int { func (o *DisconnectDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/Disconnect][%d] Disconnect default %+v", o._statusCode, o.Payload) } + func (o *DisconnectDefault) GetPayload() *DisconnectDefaultBody { return o.Payload } func (o *DisconnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DisconnectDefaultBody) // response payload @@ -121,7 +121,6 @@ DisconnectBody disconnect body swagger:model DisconnectBody */ type DisconnectBody struct { - // Forces the cleanup process for connected PMM instances regardless of the Portal API response Force bool `json:"force,omitempty"` } @@ -159,7 +158,6 @@ DisconnectDefaultBody disconnect default body swagger:model DisconnectDefaultBody */ type DisconnectDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *DisconnectDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -267,7 +262,6 @@ DisconnectDefaultBodyDetailsItems0 disconnect default body details items0 swagger:model DisconnectDefaultBodyDetailsItems0 */ type DisconnectDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platformpb/json/client/platform/get_contact_information_parameters.go b/api/platformpb/json/client/platform/get_contact_information_parameters.go index 9464f5e560..33c2ad7236 100644 --- a/api/platformpb/json/client/platform/get_contact_information_parameters.go +++ b/api/platformpb/json/client/platform/get_contact_information_parameters.go @@ -60,7 +60,6 @@ GetContactInformationParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type GetContactInformationParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *GetContactInformationParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetContactInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/get_contact_information_responses.go b/api/platformpb/json/client/platform/get_contact_information_responses.go index c1eb711c91..81cf1651b0 100644 --- a/api/platformpb/json/client/platform/get_contact_information_responses.go +++ b/api/platformpb/json/client/platform/get_contact_information_responses.go @@ -60,12 +60,12 @@ type GetContactInformationOK struct { func (o *GetContactInformationOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/GetContactInformation][%d] getContactInformationOk %+v", 200, o.Payload) } + func (o *GetContactInformationOK) GetPayload() *GetContactInformationOKBody { return o.Payload } func (o *GetContactInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetContactInformationOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetContactInformationDefault) Code() int { func (o *GetContactInformationDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/GetContactInformation][%d] GetContactInformation default %+v", o._statusCode, o.Payload) } + func (o *GetContactInformationDefault) GetPayload() *GetContactInformationDefaultBody { return o.Payload } func (o *GetContactInformationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetContactInformationDefaultBody) // response payload @@ -123,7 +123,6 @@ GetContactInformationDefaultBody get contact information default body swagger:model GetContactInformationDefaultBody */ type GetContactInformationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *GetContactInformationDefaultBody) ContextValidate(ctx context.Context, } func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -231,7 +227,6 @@ GetContactInformationDefaultBodyDetailsItems0 get contact information default bo swagger:model GetContactInformationDefaultBodyDetailsItems0 */ type GetContactInformationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ GetContactInformationOKBody get contact information OK body swagger:model GetContactInformationOKBody */ type GetContactInformationOKBody struct { - // URL to open a new support ticket. NewTicketURL string `json:"new_ticket_url,omitempty"` @@ -325,7 +319,6 @@ func (o *GetContactInformationOKBody) ContextValidate(ctx context.Context, forma } func (o *GetContactInformationOKBody) contextValidateCustomerSuccess(ctx context.Context, formats strfmt.Registry) error { - if o.CustomerSuccess != nil { if err := o.CustomerSuccess.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -363,7 +356,6 @@ GetContactInformationOKBodyCustomerSuccess CustomerSuccess contains the contanct swagger:model GetContactInformationOKBodyCustomerSuccess */ type GetContactInformationOKBodyCustomerSuccess struct { - // name Name string `json:"name,omitempty"` diff --git a/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go b/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go index e7ab2c3344..f13a953027 100644 --- a/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go +++ b/api/platformpb/json/client/platform/search_organization_entitlements_parameters.go @@ -60,7 +60,6 @@ SearchOrganizationEntitlementsParams contains all the parameters to send to the Typically these are written to a http.Request. */ type SearchOrganizationEntitlementsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *SearchOrganizationEntitlementsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationEntitlementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/search_organization_entitlements_responses.go b/api/platformpb/json/client/platform/search_organization_entitlements_responses.go index 5150f6824e..4b8dc1c532 100644 --- a/api/platformpb/json/client/platform/search_organization_entitlements_responses.go +++ b/api/platformpb/json/client/platform/search_organization_entitlements_responses.go @@ -61,12 +61,12 @@ type SearchOrganizationEntitlementsOK struct { func (o *SearchOrganizationEntitlementsOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationEntitlements][%d] searchOrganizationEntitlementsOk %+v", 200, o.Payload) } + func (o *SearchOrganizationEntitlementsOK) GetPayload() *SearchOrganizationEntitlementsOKBody { return o.Payload } func (o *SearchOrganizationEntitlementsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationEntitlementsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *SearchOrganizationEntitlementsDefault) Code() int { func (o *SearchOrganizationEntitlementsDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationEntitlements][%d] SearchOrganizationEntitlements default %+v", o._statusCode, o.Payload) } + func (o *SearchOrganizationEntitlementsDefault) GetPayload() *SearchOrganizationEntitlementsDefaultBody { return o.Payload } func (o *SearchOrganizationEntitlementsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationEntitlementsDefaultBody) // response payload @@ -124,7 +124,6 @@ SearchOrganizationEntitlementsDefaultBody search organization entitlements defau swagger:model SearchOrganizationEntitlementsDefaultBody */ type SearchOrganizationEntitlementsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -190,9 +189,7 @@ func (o *SearchOrganizationEntitlementsDefaultBody) ContextValidate(ctx context. } func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -203,7 +200,6 @@ func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx c return err } } - } return nil @@ -232,7 +228,6 @@ SearchOrganizationEntitlementsDefaultBodyDetailsItems0 search organization entit swagger:model SearchOrganizationEntitlementsDefaultBodyDetailsItems0 */ type SearchOrganizationEntitlementsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -270,7 +265,6 @@ SearchOrganizationEntitlementsOKBody search organization entitlements OK body swagger:model SearchOrganizationEntitlementsOKBody */ type SearchOrganizationEntitlementsOKBody struct { - // entitlements Entitlements []*SearchOrganizationEntitlementsOKBodyEntitlementsItems0 `json:"entitlements"` } @@ -330,9 +324,7 @@ func (o *SearchOrganizationEntitlementsOKBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Entitlements); i++ { - if o.Entitlements[i] != nil { if err := o.Entitlements[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -343,7 +335,6 @@ func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx c return err } } - } return nil @@ -372,7 +363,6 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0 OrganizationEntitlement c swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0 */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0 struct { - // Entitlement number. Number string `json:"number,omitempty"` @@ -491,7 +481,6 @@ func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) ContextValidate } func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) contextValidatePlatform(ctx context.Context, formats strfmt.Registry) error { - if o.Platform != nil { if err := o.Platform.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -529,7 +518,6 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform Platform indicate swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform struct { - // Flag indicates that security advisors are covered by this entitlement. SecurityAdvisor string `json:"security_advisor,omitempty"` diff --git a/api/platformpb/json/client/platform/search_organization_tickets_parameters.go b/api/platformpb/json/client/platform/search_organization_tickets_parameters.go index 72ef0b2a0c..61a7269406 100644 --- a/api/platformpb/json/client/platform/search_organization_tickets_parameters.go +++ b/api/platformpb/json/client/platform/search_organization_tickets_parameters.go @@ -60,7 +60,6 @@ SearchOrganizationTicketsParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type SearchOrganizationTicketsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *SearchOrganizationTicketsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/search_organization_tickets_responses.go b/api/platformpb/json/client/platform/search_organization_tickets_responses.go index 5fd1e2f7fb..36c5824177 100644 --- a/api/platformpb/json/client/platform/search_organization_tickets_responses.go +++ b/api/platformpb/json/client/platform/search_organization_tickets_responses.go @@ -61,12 +61,12 @@ type SearchOrganizationTicketsOK struct { func (o *SearchOrganizationTicketsOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationTickets][%d] searchOrganizationTicketsOk %+v", 200, o.Payload) } + func (o *SearchOrganizationTicketsOK) GetPayload() *SearchOrganizationTicketsOKBody { return o.Payload } func (o *SearchOrganizationTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationTicketsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *SearchOrganizationTicketsDefault) Code() int { func (o *SearchOrganizationTicketsDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/SearchOrganizationTickets][%d] SearchOrganizationTickets default %+v", o._statusCode, o.Payload) } + func (o *SearchOrganizationTicketsDefault) GetPayload() *SearchOrganizationTicketsDefaultBody { return o.Payload } func (o *SearchOrganizationTicketsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationTicketsDefaultBody) // response payload @@ -124,7 +124,6 @@ SearchOrganizationTicketsDefaultBody search organization tickets default body swagger:model SearchOrganizationTicketsDefaultBody */ type SearchOrganizationTicketsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -190,9 +189,7 @@ func (o *SearchOrganizationTicketsDefaultBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -203,7 +200,6 @@ func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx contex return err } } - } return nil @@ -232,7 +228,6 @@ SearchOrganizationTicketsDefaultBodyDetailsItems0 search organization tickets de swagger:model SearchOrganizationTicketsDefaultBodyDetailsItems0 */ type SearchOrganizationTicketsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -270,7 +265,6 @@ SearchOrganizationTicketsOKBody search organization tickets OK body swagger:model SearchOrganizationTicketsOKBody */ type SearchOrganizationTicketsOKBody struct { - // Support tickets belonging to the Percona Portal Organization. Tickets []*SearchOrganizationTicketsOKBodyTicketsItems0 `json:"tickets"` } @@ -330,9 +324,7 @@ func (o *SearchOrganizationTicketsOKBody) ContextValidate(ctx context.Context, f } func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Tickets); i++ { - if o.Tickets[i] != nil { if err := o.Tickets[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -343,7 +335,6 @@ func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Con return err } } - } return nil @@ -372,7 +363,6 @@ SearchOrganizationTicketsOKBodyTicketsItems0 OrganizationTicket contains informa swagger:model SearchOrganizationTicketsOKBodyTicketsItems0 */ type SearchOrganizationTicketsOKBodyTicketsItems0 struct { - // Ticket number. Number string `json:"number,omitempty"` diff --git a/api/platformpb/json/client/platform/server_info_parameters.go b/api/platformpb/json/client/platform/server_info_parameters.go index a3e7ec413f..895075df3b 100644 --- a/api/platformpb/json/client/platform/server_info_parameters.go +++ b/api/platformpb/json/client/platform/server_info_parameters.go @@ -60,7 +60,6 @@ ServerInfoParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ServerInfoParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ServerInfoParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ServerInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/server_info_responses.go b/api/platformpb/json/client/platform/server_info_responses.go index 394cd51d9b..96d64f9b2b 100644 --- a/api/platformpb/json/client/platform/server_info_responses.go +++ b/api/platformpb/json/client/platform/server_info_responses.go @@ -60,12 +60,12 @@ type ServerInfoOK struct { func (o *ServerInfoOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/ServerInfo][%d] serverInfoOk %+v", 200, o.Payload) } + func (o *ServerInfoOK) GetPayload() *ServerInfoOKBody { return o.Payload } func (o *ServerInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ServerInfoOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ServerInfoDefault) Code() int { func (o *ServerInfoDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/ServerInfo][%d] ServerInfo default %+v", o._statusCode, o.Payload) } + func (o *ServerInfoDefault) GetPayload() *ServerInfoDefaultBody { return o.Payload } func (o *ServerInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ServerInfoDefaultBody) // response payload @@ -123,7 +123,6 @@ ServerInfoDefaultBody server info default body swagger:model ServerInfoDefaultBody */ type ServerInfoDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *ServerInfoDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -231,7 +227,6 @@ ServerInfoDefaultBodyDetailsItems0 server info default body details items0 swagger:model ServerInfoDefaultBodyDetailsItems0 */ type ServerInfoDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ ServerInfoOKBody server info OK body swagger:model ServerInfoOKBody */ type ServerInfoOKBody struct { - // pmm server name PMMServerName string `json:"pmm_server_name,omitempty"` diff --git a/api/platformpb/json/client/platform/user_status_parameters.go b/api/platformpb/json/client/platform/user_status_parameters.go index 1e08b3597a..e8ef6ea0bf 100644 --- a/api/platformpb/json/client/platform/user_status_parameters.go +++ b/api/platformpb/json/client/platform/user_status_parameters.go @@ -60,7 +60,6 @@ UserStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UserStatusParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *UserStatusParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *UserStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platformpb/json/client/platform/user_status_responses.go b/api/platformpb/json/client/platform/user_status_responses.go index 6c262e490a..1456954c54 100644 --- a/api/platformpb/json/client/platform/user_status_responses.go +++ b/api/platformpb/json/client/platform/user_status_responses.go @@ -60,12 +60,12 @@ type UserStatusOK struct { func (o *UserStatusOK) Error() string { return fmt.Sprintf("[POST /v1/Platform/UserStatus][%d] userStatusOk %+v", 200, o.Payload) } + func (o *UserStatusOK) GetPayload() *UserStatusOKBody { return o.Payload } func (o *UserStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UserStatusOKBody) // response payload @@ -102,12 +102,12 @@ func (o *UserStatusDefault) Code() int { func (o *UserStatusDefault) Error() string { return fmt.Sprintf("[POST /v1/Platform/UserStatus][%d] UserStatus default %+v", o._statusCode, o.Payload) } + func (o *UserStatusDefault) GetPayload() *UserStatusDefaultBody { return o.Payload } func (o *UserStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UserStatusDefaultBody) // response payload @@ -123,7 +123,6 @@ UserStatusDefaultBody user status default body swagger:model UserStatusDefaultBody */ type UserStatusDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *UserStatusDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -231,7 +227,6 @@ UserStatusDefaultBodyDetailsItems0 user status default body details items0 swagger:model UserStatusDefaultBodyDetailsItems0 */ type UserStatusDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ UserStatusOKBody user status OK body swagger:model UserStatusOKBody */ type UserStatusOKBody struct { - // is platform user IsPlatformUser bool `json:"is_platform_user,omitempty"` } diff --git a/api/platformpb/platform.pb.go b/api/platformpb/platform.pb.go index 8454bafbce..24e107c697 100644 --- a/api/platformpb/platform.pb.go +++ b/api/platformpb/platform.pb.go @@ -7,6 +7,9 @@ package platformpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -14,8 +17,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( @@ -1360,30 +1361,33 @@ func file_platformpb_platform_proto_rawDescGZIP() []byte { return file_platformpb_platform_proto_rawDescData } -var file_platformpb_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_platformpb_platform_proto_goTypes = []interface{}{ - (*ConnectRequest)(nil), // 0: platform.ConnectRequest - (*ConnectResponse)(nil), // 1: platform.ConnectResponse - (*DisconnectRequest)(nil), // 2: platform.DisconnectRequest - (*DisconnectResponse)(nil), // 3: platform.DisconnectResponse - (*SearchOrganizationTicketsRequest)(nil), // 4: platform.SearchOrganizationTicketsRequest - (*SearchOrganizationTicketsResponse)(nil), // 5: platform.SearchOrganizationTicketsResponse - (*OrganizationTicket)(nil), // 6: platform.OrganizationTicket - (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.SearchOrganizationEntitlementsRequest - (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.SearchOrganizationEntitlementsResponse - (*OrganizationEntitlement)(nil), // 9: platform.OrganizationEntitlement - (*GetContactInformationRequest)(nil), // 10: platform.GetContactInformationRequest - (*GetContactInformationResponse)(nil), // 11: platform.GetContactInformationResponse - (*ServerInfoRequest)(nil), // 12: platform.ServerInfoRequest - (*ServerInfoResponse)(nil), // 13: platform.ServerInfoResponse - (*UserStatusRequest)(nil), // 14: platform.UserStatusRequest - (*UserStatusResponse)(nil), // 15: platform.UserStatusResponse - (*OrganizationEntitlement_Platform)(nil), // 16: platform.OrganizationEntitlement.Platform - (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.GetContactInformationResponse.CustomerSuccess - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*wrapperspb.StringValue)(nil), // 19: google.protobuf.StringValue - (*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue -} +var ( + file_platformpb_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) + file_platformpb_platform_proto_goTypes = []interface{}{ + (*ConnectRequest)(nil), // 0: platform.ConnectRequest + (*ConnectResponse)(nil), // 1: platform.ConnectResponse + (*DisconnectRequest)(nil), // 2: platform.DisconnectRequest + (*DisconnectResponse)(nil), // 3: platform.DisconnectResponse + (*SearchOrganizationTicketsRequest)(nil), // 4: platform.SearchOrganizationTicketsRequest + (*SearchOrganizationTicketsResponse)(nil), // 5: platform.SearchOrganizationTicketsResponse + (*OrganizationTicket)(nil), // 6: platform.OrganizationTicket + (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.SearchOrganizationEntitlementsRequest + (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.SearchOrganizationEntitlementsResponse + (*OrganizationEntitlement)(nil), // 9: platform.OrganizationEntitlement + (*GetContactInformationRequest)(nil), // 10: platform.GetContactInformationRequest + (*GetContactInformationResponse)(nil), // 11: platform.GetContactInformationResponse + (*ServerInfoRequest)(nil), // 12: platform.ServerInfoRequest + (*ServerInfoResponse)(nil), // 13: platform.ServerInfoResponse + (*UserStatusRequest)(nil), // 14: platform.UserStatusRequest + (*UserStatusResponse)(nil), // 15: platform.UserStatusResponse + (*OrganizationEntitlement_Platform)(nil), // 16: platform.OrganizationEntitlement.Platform + (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.GetContactInformationResponse.CustomerSuccess + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*wrapperspb.StringValue)(nil), // 19: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue + } +) + var file_platformpb_platform_proto_depIdxs = []int32{ 6, // 0: platform.SearchOrganizationTicketsResponse.tickets:type_name -> platform.OrganizationTicket 18, // 1: platform.OrganizationTicket.create_time:type_name -> google.protobuf.Timestamp diff --git a/api/platformpb/platform.pb.gw.go b/api/platformpb/platform.pb.gw.go index 99336535f5..914bb13a95 100644 --- a/api/platformpb/platform.pb.gw.go +++ b/api/platformpb/platform.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Platform_Connect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ConnectRequest @@ -45,7 +47,6 @@ func request_Platform_Connect_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.Connect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_Connect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Platform_Connect_0(ctx context.Context, marshaler runtime.Mar msg, err := server.Connect(ctx, &protoReq) return msg, metadata, err - } func request_Platform_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_Platform_Disconnect_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.Disconnect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_Platform_Disconnect_0(ctx context.Context, marshaler runtime. msg, err := server.Disconnect(ctx, &protoReq) return msg, metadata, err - } func request_Platform_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_Platform_SearchOrganizationTickets_0(ctx context.Context, marshaler msg, err := client.SearchOrganizationTickets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_Platform_SearchOrganizationTickets_0(ctx context.Context, mar msg, err := server.SearchOrganizationTickets(ctx, &protoReq) return msg, metadata, err - } func request_Platform_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_Platform_SearchOrganizationEntitlements_0(ctx context.Context, mars msg, err := client.SearchOrganizationEntitlements(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_Platform_SearchOrganizationEntitlements_0(ctx context.Context msg, err := server.SearchOrganizationEntitlements(ctx, &protoReq) return msg, metadata, err - } func request_Platform_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_Platform_GetContactInformation_0(ctx context.Context, marshaler run msg, err := client.GetContactInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_Platform_GetContactInformation_0(ctx context.Context, marshal msg, err := server.GetContactInformation(ctx, &protoReq) return msg, metadata, err - } func request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.ServerInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_Platform_ServerInfo_0(ctx context.Context, marshaler runtime. msg, err := server.ServerInfo(ctx, &protoReq) return msg, metadata, err - } func request_Platform_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_Platform_UserStatus_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.UserStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Platform_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_Platform_UserStatus_0(ctx context.Context, marshaler runtime. msg, err := server.UserStatus(ctx, &protoReq) return msg, metadata, err - } // RegisterPlatformHandlerServer registers the http handlers for service Platform to "mux". @@ -274,7 +262,6 @@ func local_request_Platform_UserStatus_0(ctx context.Context, marshaler runtime. // 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 RegisterPlatformHandlerFromEndpoint instead. func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PlatformServer) error { - mux.Handle("POST", pattern_Platform_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -297,7 +284,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -322,7 +308,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -347,7 +332,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -372,7 +356,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -397,7 +380,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -422,7 +404,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -447,7 +428,6 @@ func RegisterPlatformHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_Platform_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -490,7 +470,6 @@ func RegisterPlatformHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PlatformClient" to call the correct interceptors. func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PlatformClient) error { - mux.Handle("POST", pattern_Platform_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -510,7 +489,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -532,7 +510,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -554,7 +531,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -576,7 +552,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -598,7 +573,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -620,7 +594,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Platform_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -642,7 +615,6 @@ func RegisterPlatformHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_Platform_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/platformpb/platform.swagger.json b/api/platformpb/platform.swagger.json deleted file mode 100644 index 5326148d18..0000000000 --- a/api/platformpb/platform.swagger.json +++ /dev/null @@ -1,525 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Platform API", - "version": "version not set" - }, - "tags": [ - { - "name": "Platform" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/Platform/Connect": { - "post": { - "summary": "Connect", - "description": "Connect a PMM server to the organization created on Percona Portal. That allows the user to sign in to the PMM server with their Percona Account.", - "operationId": "Connect", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformConnectResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformConnectRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - }, - "/v1/Platform/Disconnect": { - "post": { - "summary": "Disconnect", - "description": "Disconnect a PMM server from the organization created on Percona Portal.", - "operationId": "Disconnect", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformDisconnectResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformDisconnectRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - }, - "/v1/Platform/GetContactInformation": { - "post": { - "summary": "GetContactInformation", - "description": "GetContactInformation fetches the contact details of the customer success employee handling the Percona customer account from Percona Platform.", - "operationId": "GetContactInformation", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformGetContactInformationResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformGetContactInformationRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - }, - "/v1/Platform/SearchOrganizationEntitlements": { - "post": { - "summary": "SearchOrganizationEntitlements", - "description": "SearchOrganizationEntitlements fetches details of the entitlement's available to the Portal organization that the PMM server is connected to.", - "operationId": "SearchOrganizationEntitlements", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformSearchOrganizationEntitlementsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformSearchOrganizationEntitlementsRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - }, - "/v1/Platform/SearchOrganizationTickets": { - "post": { - "summary": "SearchOrganizationTickets", - "description": "SearchOrganizationTickets searches support tickets belonging to the Percona Portal Organization that the PMM server is connected to.", - "operationId": "SearchOrganizationTickets", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformSearchOrganizationTicketsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformSearchOrganizationTicketsRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - }, - "/v1/Platform/ServerInfo": { - "post": { - "summary": "ServerInfo", - "description": "ServerInfo returns PMM server ID and name.", - "operationId": "ServerInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformServerInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformServerInfoRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - }, - "/v1/Platform/UserStatus": { - "post": { - "summary": "UserStatus", - "description": "UserStatus returns a boolean indicating whether the current user is logged in with their Percona Account or not.", - "operationId": "UserStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/platformUserStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/platformUserStatusRequest" - } - } - ], - "tags": [ - "Platform" - ] - } - } - }, - "definitions": { - "GetContactInformationResponseCustomerSuccess": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "description": "CustomerSuccess contains the contanct details of the customer success employee assigned to a customer's account." - }, - "OrganizationEntitlementPlatform": { - "type": "object", - "properties": { - "security_advisor": { - "type": "string", - "description": "Flag indicates that security advisors are covered by this entitlement." - }, - "config_advisor": { - "type": "string", - "description": "Flag indicates that config advisors are covered by this entitlement." - } - }, - "description": "Platform indicates platform specific entitlements." - }, - "platformConnectRequest": { - "type": "object", - "properties": { - "server_name": { - "type": "string", - "description": "User defined human readable PMM Server Name." - }, - "email": { - "type": "string", - "description": "Existing Percona Platform user's email." - }, - "password": { - "type": "string", - "description": "Existing Percona Platform user's password." - }, - "personal_access_token": { - "type": "string", - "description": "Personal Access Token that the user obtains from Percona Portal." - } - } - }, - "platformConnectResponse": { - "type": "object" - }, - "platformDisconnectRequest": { - "type": "object", - "properties": { - "force": { - "type": "boolean", - "title": "Forces the cleanup process for connected PMM instances regardless of the Portal API response" - } - } - }, - "platformDisconnectResponse": { - "type": "object" - }, - "platformGetContactInformationRequest": { - "type": "object" - }, - "platformGetContactInformationResponse": { - "type": "object", - "properties": { - "customer_success": { - "$ref": "#/definitions/GetContactInformationResponseCustomerSuccess" - }, - "new_ticket_url": { - "type": "string", - "description": "URL to open a new support ticket." - } - } - }, - "platformOrganizationEntitlement": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Entitlement number." - }, - "name": { - "type": "string", - "description": "Entitlement name." - }, - "summary": { - "type": "string", - "description": "Entitlement short summary." - }, - "tier": { - "type": "string", - "description": "Entitlement tier." - }, - "total_units": { - "type": "string", - "description": "Total units covered by this entitlement." - }, - "unlimited_units": { - "type": "boolean", - "description": "Flag indicates that unlimited units are covered." - }, - "support_level": { - "type": "string", - "description": "Support level covered by this entitlement." - }, - "software_families": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Percona product families covered by this entitlement." - }, - "start_date": { - "type": "string", - "format": "date-time", - "description": "Entitlement start data.\nNote: only date is used here but not time." - }, - "end_date": { - "type": "string", - "format": "date-time", - "description": "Entitlement end date.\nNote: only date is used here but not time." - }, - "platform": { - "$ref": "#/definitions/OrganizationEntitlementPlatform", - "description": "Platform specific options covered by this entitlement." - } - }, - "description": "OrganizationEntitlement contains information about Organization entitlement." - }, - "platformOrganizationTicket": { - "type": "object", - "properties": { - "number": { - "type": "string", - "description": "Ticket number." - }, - "short_description": { - "type": "string", - "description": "Ticket short description." - }, - "priority": { - "type": "string", - "description": "Ticket priority." - }, - "state": { - "type": "string", - "description": "Ticket state." - }, - "create_time": { - "type": "string", - "format": "date-time", - "description": "Ticket creation time." - }, - "department": { - "type": "string", - "description": "Department." - }, - "requester": { - "type": "string", - "description": "Ticket requester." - }, - "task_type": { - "type": "string", - "description": "Task type." - }, - "url": { - "type": "string", - "description": "Ticket url." - } - }, - "description": "OrganizationTicket contains information about the support ticket." - }, - "platformSearchOrganizationEntitlementsRequest": { - "type": "object" - }, - "platformSearchOrganizationEntitlementsResponse": { - "type": "object", - "properties": { - "entitlements": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/platformOrganizationEntitlement" - } - } - } - }, - "platformSearchOrganizationTicketsRequest": { - "type": "object" - }, - "platformSearchOrganizationTicketsResponse": { - "type": "object", - "properties": { - "tickets": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/platformOrganizationTicket" - }, - "description": "Support tickets belonging to the Percona Portal Organization." - } - } - }, - "platformServerInfoRequest": { - "type": "object" - }, - "platformServerInfoResponse": { - "type": "object", - "properties": { - "pmm_server_name": { - "type": "string" - }, - "pmm_server_id": { - "type": "string" - }, - "pmm_server_telemetry_id": { - "type": "string" - }, - "connected_to_portal": { - "type": "boolean" - } - } - }, - "platformUserStatusRequest": { - "type": "object" - }, - "platformUserStatusResponse": { - "type": "object", - "properties": { - "is_platform_user": { - "type": "boolean" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/platformpb/platform_grpc.pb.go b/api/platformpb/platform_grpc.pb.go index 88be1fed02..efa637bcae 100644 --- a/api/platformpb/platform_grpc.pb.go +++ b/api/platformpb/platform_grpc.pb.go @@ -8,6 +8,7 @@ package platformpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -141,27 +142,32 @@ type PlatformServer interface { } // UnimplementedPlatformServer must be embedded to have forward compatible implementations. -type UnimplementedPlatformServer struct { -} +type UnimplementedPlatformServer struct{} func (UnimplementedPlatformServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") } + func (UnimplementedPlatformServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Disconnect not implemented") } + func (UnimplementedPlatformServer) SearchOrganizationTickets(context.Context, *SearchOrganizationTicketsRequest) (*SearchOrganizationTicketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationTickets not implemented") } + func (UnimplementedPlatformServer) SearchOrganizationEntitlements(context.Context, *SearchOrganizationEntitlementsRequest) (*SearchOrganizationEntitlementsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationEntitlements not implemented") } + func (UnimplementedPlatformServer) GetContactInformation(context.Context, *GetContactInformationRequest) (*GetContactInformationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetContactInformation not implemented") } + func (UnimplementedPlatformServer) ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServerInfo not implemented") } + func (UnimplementedPlatformServer) UserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserStatus not implemented") } diff --git a/api/qanpb/collector.pb.go b/api/qanpb/collector.pb.go index dccdaa69d3..41552690e9 100644 --- a/api/qanpb/collector.pb.go +++ b/api/qanpb/collector.pb.go @@ -7,11 +7,13 @@ package qanv1beta1 import ( - inventorypb "github.com/percona/pmm/api/inventorypb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + inventorypb "github.com/percona/pmm/api/inventorypb" ) const ( @@ -2715,18 +2717,21 @@ func file_qanpb_collector_proto_rawDescGZIP() []byte { return file_qanpb_collector_proto_rawDescData } -var file_qanpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_qanpb_collector_proto_goTypes = []interface{}{ - (*CollectRequest)(nil), // 0: qan.v1beta1.CollectRequest - (*MetricsBucket)(nil), // 1: qan.v1beta1.MetricsBucket - (*CollectResponse)(nil), // 2: qan.v1beta1.CollectResponse - nil, // 3: qan.v1beta1.MetricsBucket.LabelsEntry - nil, // 4: qan.v1beta1.MetricsBucket.WarningsEntry - nil, // 5: qan.v1beta1.MetricsBucket.ErrorsEntry - (inventorypb.AgentType)(0), // 6: inventory.AgentType - (ExampleFormat)(0), // 7: qan.v1beta1.ExampleFormat - (ExampleType)(0), // 8: qan.v1beta1.ExampleType -} +var ( + file_qanpb_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_qanpb_collector_proto_goTypes = []interface{}{ + (*CollectRequest)(nil), // 0: qan.v1beta1.CollectRequest + (*MetricsBucket)(nil), // 1: qan.v1beta1.MetricsBucket + (*CollectResponse)(nil), // 2: qan.v1beta1.CollectResponse + nil, // 3: qan.v1beta1.MetricsBucket.LabelsEntry + nil, // 4: qan.v1beta1.MetricsBucket.WarningsEntry + nil, // 5: qan.v1beta1.MetricsBucket.ErrorsEntry + (inventorypb.AgentType)(0), // 6: inventory.AgentType + (ExampleFormat)(0), // 7: qan.v1beta1.ExampleFormat + (ExampleType)(0), // 8: qan.v1beta1.ExampleType + } +) + var file_qanpb_collector_proto_depIdxs = []int32{ 1, // 0: qan.v1beta1.CollectRequest.metrics_bucket:type_name -> qan.v1beta1.MetricsBucket 6, // 1: qan.v1beta1.MetricsBucket.agent_type:type_name -> inventory.AgentType diff --git a/api/qanpb/collector.swagger.json b/api/qanpb/collector.swagger.json deleted file mode 100644 index 968e4994af..0000000000 --- a/api/qanpb/collector.swagger.json +++ /dev/null @@ -1,1066 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "qanpb/collector.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Collector" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "inventoryAgentType": { - "type": "string", - "enum": [ - "AGENT_TYPE_INVALID", - "PMM_AGENT", - "VM_AGENT", - "NODE_EXPORTER", - "MYSQLD_EXPORTER", - "MONGODB_EXPORTER", - "POSTGRES_EXPORTER", - "PROXYSQL_EXPORTER", - "QAN_MYSQL_PERFSCHEMA_AGENT", - "QAN_MYSQL_SLOWLOG_AGENT", - "QAN_MONGODB_PROFILER_AGENT", - "QAN_POSTGRESQL_PGSTATEMENTS_AGENT", - "QAN_POSTGRESQL_PGSTATMONITOR_AGENT", - "RDS_EXPORTER", - "EXTERNAL_EXPORTER", - "AZURE_DATABASE_EXPORTER" - ], - "default": "AGENT_TYPE_INVALID", - "description": "AgentType describes supported Agent types." - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1CollectResponse": { - "type": "object" - }, - "v1beta1ExampleFormat": { - "type": "string", - "enum": [ - "EXAMPLE_FORMAT_INVALID", - "EXAMPLE", - "FINGERPRINT" - ], - "default": "EXAMPLE_FORMAT_INVALID", - "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed." - }, - "v1beta1ExampleType": { - "type": "string", - "enum": [ - "EXAMPLE_TYPE_INVALID", - "RANDOM", - "SLOWEST", - "FASTEST", - "WITH_ERROR" - ], - "default": "EXAMPLE_TYPE_INVALID", - "description": "ExampleType is a type of query example selected for this query class in given period of time." - }, - "v1beta1MetricsBucket": { - "type": "object", - "properties": { - "queryid": { - "type": "string", - "description": "md5 of digest_text/fingerprint." - }, - "explain_fingerprint": { - "type": "string", - "description": "contains fingerprint prepared by sql parser, which can be different than fingerprint." - }, - "placeholders_count": { - "type": "integer", - "format": "int64", - "description": "ammount of variables in query." - }, - "fingerprint": { - "type": "string", - "description": "digest_text - query signature. Query without values.\n\nDimension Group." - }, - "service_name": { - "type": "string", - "description": "Service Name (can be several Services on one Node)." - }, - "database": { - "type": "string", - "description": "MongoDB or PostgreSQL database.\nSeveral databases can't be combined in a single declarative query." - }, - "schema": { - "type": "string", - "description": "MySQL database or PostgreSQL schema.\nSeveral schemas can be combined in a single declarative query." - }, - "tables": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tables or Collections list." - }, - "username": { - "type": "string", - "description": "client user name." - }, - "client_host": { - "type": "string", - "description": "client IP or hostname.\n\nUnified Labels Group." - }, - "node_id": { - "type": "string", - "title": "Node identifier" - }, - "node_name": { - "type": "string", - "title": "Node name" - }, - "node_type": { - "type": "string", - "title": "Node type" - }, - "machine_id": { - "type": "string", - "title": "Machine identifier" - }, - "container_id": { - "type": "string", - "title": "Container identifier" - }, - "container_name": { - "type": "string", - "title": "Container name" - }, - "node_model": { - "type": "string", - "title": "Node model" - }, - "region": { - "type": "string", - "title": "Region name" - }, - "az": { - "type": "string", - "title": "Availability zone" - }, - "service_id": { - "type": "string", - "title": "Service identifier" - }, - "service_type": { - "type": "string", - "title": "Type of service" - }, - "environment": { - "type": "string", - "title": "Environment name" - }, - "cluster": { - "type": "string", - "title": "Cluster name" - }, - "replication_set": { - "type": "string", - "title": "Name of replication set" - }, - "agent_id": { - "type": "string", - "description": "Identifier of agent that collect and send metrics." - }, - "agent_type": { - "$ref": "#/definitions/inventoryAgentType", - "description": "Metrics source." - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Custom labels names:values.\n\nPeriod and Query Example Group." - }, - "period_start_unix_secs": { - "type": "integer", - "format": "int64", - "description": "Time when collection of bucket started." - }, - "period_length_secs": { - "type": "integer", - "format": "int64", - "description": "Duration of bucket." - }, - "example": { - "type": "string", - "description": "One of query example from set found in bucket." - }, - "example_format": { - "$ref": "#/definitions/v1beta1ExampleFormat", - "description": "Deprecated: should not be used, should be removed." - }, - "is_truncated": { - "type": "boolean", - "description": "Indicates if the query example is truncated." - }, - "example_type": { - "$ref": "#/definitions/v1beta1ExampleType" - }, - "example_metrics": { - "type": "string", - "description": "Metrics of query example in JSON format.\n\nMetrics." - }, - "num_queries_with_warnings": { - "type": "number", - "format": "float", - "description": "How many queries was with warnings in bucket." - }, - "warnings": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "uint64" - }, - "description": "List of warnings: {code: count}." - }, - "num_queries_with_errors": { - "type": "number", - "format": "float", - "description": "How many queries was with error in bucket." - }, - "errors": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "uint64" - }, - "description": "List of errors: {code: count}." - }, - "num_queries": { - "type": "number", - "format": "float", - "description": "Amount queries in this bucket." - }, - "m_query_time_cnt": { - "type": "number", - "format": "float", - "description": "How many times query_time was found." - }, - "m_query_time_sum": { - "type": "number", - "format": "float", - "description": "The statement execution time in seconds." - }, - "m_query_time_min": { - "type": "number", - "format": "float", - "description": "Smallest value of query_time in bucket." - }, - "m_query_time_max": { - "type": "number", - "format": "float", - "description": "Biggest value of query_time in bucket." - }, - "m_query_time_p99": { - "type": "number", - "format": "float", - "description": "99 percentile of value of query_time in bucket." - }, - "m_lock_time_cnt": { - "type": "number", - "format": "float" - }, - "m_lock_time_sum": { - "type": "number", - "format": "float", - "description": "The time to acquire locks in seconds." - }, - "m_lock_time_min": { - "type": "number", - "format": "float" - }, - "m_lock_time_max": { - "type": "number", - "format": "float" - }, - "m_lock_time_p99": { - "type": "number", - "format": "float" - }, - "m_rows_sent_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_sent_sum": { - "type": "number", - "format": "float", - "description": "The number of rows sent to the client." - }, - "m_rows_sent_min": { - "type": "number", - "format": "float" - }, - "m_rows_sent_max": { - "type": "number", - "format": "float" - }, - "m_rows_sent_p99": { - "type": "number", - "format": "float" - }, - "m_rows_examined_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_examined_sum": { - "type": "number", - "format": "float", - "description": "Number of rows scanned - SELECT." - }, - "m_rows_examined_min": { - "type": "number", - "format": "float" - }, - "m_rows_examined_max": { - "type": "number", - "format": "float" - }, - "m_rows_examined_p99": { - "type": "number", - "format": "float" - }, - "m_rows_affected_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_affected_sum": { - "type": "number", - "format": "float", - "description": "Number of rows changed - UPDATE, DELETE, INSERT." - }, - "m_rows_affected_min": { - "type": "number", - "format": "float" - }, - "m_rows_affected_max": { - "type": "number", - "format": "float" - }, - "m_rows_affected_p99": { - "type": "number", - "format": "float" - }, - "m_rows_read_cnt": { - "type": "number", - "format": "float" - }, - "m_rows_read_sum": { - "type": "number", - "format": "float", - "description": "The number of rows read from tables." - }, - "m_rows_read_min": { - "type": "number", - "format": "float" - }, - "m_rows_read_max": { - "type": "number", - "format": "float" - }, - "m_rows_read_p99": { - "type": "number", - "format": "float" - }, - "m_merge_passes_cnt": { - "type": "number", - "format": "float" - }, - "m_merge_passes_sum": { - "type": "number", - "format": "float", - "description": "The number of merge passes that the sort algorithm has had to do." - }, - "m_merge_passes_min": { - "type": "number", - "format": "float" - }, - "m_merge_passes_max": { - "type": "number", - "format": "float" - }, - "m_merge_passes_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_sum": { - "type": "number", - "format": "float", - "description": "Counts the number of page read operations scheduled." - }, - "m_innodb_io_r_ops_min": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_max": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_ops_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_sum": { - "type": "number", - "format": "float", - "description": "Similar to innodb_IO_r_ops, but the unit is bytes." - }, - "m_innodb_io_r_bytes_min": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_max": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_bytes_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_sum": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." - }, - "m_innodb_io_r_wait_min": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_max": { - "type": "number", - "format": "float" - }, - "m_innodb_io_r_wait_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_sum": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query waited for row locks." - }, - "m_innodb_rec_lock_wait_min": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_max": { - "type": "number", - "format": "float" - }, - "m_innodb_rec_lock_wait_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_sum": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." - }, - "m_innodb_queue_wait_min": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_max": { - "type": "number", - "format": "float" - }, - "m_innodb_queue_wait_p99": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_cnt": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_sum": { - "type": "number", - "format": "float", - "description": "Counts approximately the number of unique pages the query accessed." - }, - "m_innodb_pages_distinct_min": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_max": { - "type": "number", - "format": "float" - }, - "m_innodb_pages_distinct_p99": { - "type": "number", - "format": "float" - }, - "m_query_length_cnt": { - "type": "number", - "format": "float" - }, - "m_query_length_sum": { - "type": "number", - "format": "float", - "description": "Shows how long the query is." - }, - "m_query_length_min": { - "type": "number", - "format": "float" - }, - "m_query_length_max": { - "type": "number", - "format": "float" - }, - "m_query_length_p99": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_cnt": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_sum": { - "type": "number", - "format": "float", - "description": "The number of bytes sent to all clients." - }, - "m_bytes_sent_min": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_max": { - "type": "number", - "format": "float" - }, - "m_bytes_sent_p99": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_sum": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on memory for the query." - }, - "m_tmp_tables_min": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_max": { - "type": "number", - "format": "float" - }, - "m_tmp_tables_p99": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_sum": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on disk for the query." - }, - "m_tmp_disk_tables_min": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_max": { - "type": "number", - "format": "float" - }, - "m_tmp_disk_tables_p99": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_sum": { - "type": "number", - "format": "float", - "description": "Total Size in bytes for all temporary tables used in the query." - }, - "m_tmp_table_sizes_min": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_max": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sizes_p99": { - "type": "number", - "format": "float" - }, - "m_qc_hit_cnt": { - "type": "number", - "format": "float", - "description": "Boolean metrics:\n- *_cnt - how many times this matric was met.\n- *_sum - how many times this matric was true." - }, - "m_qc_hit_sum": { - "type": "number", - "format": "float", - "description": "Query Cache hits." - }, - "m_full_scan_cnt": { - "type": "number", - "format": "float" - }, - "m_full_scan_sum": { - "type": "number", - "format": "float", - "description": "The query performed a full table scan." - }, - "m_full_join_cnt": { - "type": "number", - "format": "float" - }, - "m_full_join_sum": { - "type": "number", - "format": "float", - "description": "The query performed a full join (a join without indexes)." - }, - "m_tmp_table_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_table_sum": { - "type": "number", - "format": "float", - "description": "The query created an implicit internal temporary table." - }, - "m_tmp_table_on_disk_cnt": { - "type": "number", - "format": "float" - }, - "m_tmp_table_on_disk_sum": { - "type": "number", - "format": "float", - "description": "The querys temporary table was stored on disk." - }, - "m_filesort_cnt": { - "type": "number", - "format": "float" - }, - "m_filesort_sum": { - "type": "number", - "format": "float", - "description": "The query used a filesort." - }, - "m_filesort_on_disk_cnt": { - "type": "number", - "format": "float" - }, - "m_filesort_on_disk_sum": { - "type": "number", - "format": "float", - "description": "The filesort was performed on disk." - }, - "m_select_full_range_join_cnt": { - "type": "number", - "format": "float" - }, - "m_select_full_range_join_sum": { - "type": "number", - "format": "float", - "description": "The number of joins that used a range search on a reference table." - }, - "m_select_range_cnt": { - "type": "number", - "format": "float" - }, - "m_select_range_sum": { - "type": "number", - "format": "float", - "description": "The number of joins that used ranges on the first table." - }, - "m_select_range_check_cnt": { - "type": "number", - "format": "float" - }, - "m_select_range_check_sum": { - "type": "number", - "format": "float", - "description": "The number of joins without keys that check for key usage after each row." - }, - "m_sort_range_cnt": { - "type": "number", - "format": "float" - }, - "m_sort_range_sum": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done using ranges." - }, - "m_sort_rows_cnt": { - "type": "number", - "format": "float" - }, - "m_sort_rows_sum": { - "type": "number", - "format": "float", - "description": "The number of sorted rows." - }, - "m_sort_scan_cnt": { - "type": "number", - "format": "float" - }, - "m_sort_scan_sum": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done by scanning the table." - }, - "m_no_index_used_cnt": { - "type": "number", - "format": "float" - }, - "m_no_index_used_sum": { - "type": "number", - "format": "float", - "description": "The number of queries without index." - }, - "m_no_good_index_used_cnt": { - "type": "number", - "format": "float" - }, - "m_no_good_index_used_sum": { - "type": "number", - "format": "float", - "description": "The number of queries without good index.\n\nMongoDB metrics." - }, - "m_docs_returned_cnt": { - "type": "number", - "format": "float" - }, - "m_docs_returned_sum": { - "type": "number", - "format": "float", - "description": "The number of returned documents." - }, - "m_docs_returned_min": { - "type": "number", - "format": "float" - }, - "m_docs_returned_max": { - "type": "number", - "format": "float" - }, - "m_docs_returned_p99": { - "type": "number", - "format": "float" - }, - "m_response_length_cnt": { - "type": "number", - "format": "float" - }, - "m_response_length_sum": { - "type": "number", - "format": "float", - "description": "The response length of the query result in bytes." - }, - "m_response_length_min": { - "type": "number", - "format": "float" - }, - "m_response_length_max": { - "type": "number", - "format": "float" - }, - "m_response_length_p99": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_cnt": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_sum": { - "type": "number", - "format": "float", - "description": "The number of scanned documents." - }, - "m_docs_scanned_min": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_max": { - "type": "number", - "format": "float" - }, - "m_docs_scanned_p99": { - "type": "number", - "format": "float", - "description": "PostgreSQL metrics." - }, - "m_shared_blks_hit_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_hit_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared block cache hits by the statement." - }, - "m_shared_blks_read_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_read_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks read by the statement." - }, - "m_shared_blks_dirtied_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_dirtied_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks dirtied by the statement." - }, - "m_shared_blks_written_cnt": { - "type": "number", - "format": "float" - }, - "m_shared_blks_written_sum": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks written by the statement." - }, - "m_local_blks_hit_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_hit_sum": { - "type": "number", - "format": "float", - "description": "Total number of local block cache hits by the statement." - }, - "m_local_blks_read_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_read_sum": { - "type": "number", - "format": "float", - "description": "Total number of local blocks read by the statement." - }, - "m_local_blks_dirtied_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_dirtied_sum": { - "type": "number", - "format": "float", - "description": "Total number of local blocks dirtied by the statement." - }, - "m_local_blks_written_cnt": { - "type": "number", - "format": "float" - }, - "m_local_blks_written_sum": { - "type": "number", - "format": "float", - "description": "Total number of local blocks written by the statement." - }, - "m_temp_blks_read_cnt": { - "type": "number", - "format": "float" - }, - "m_temp_blks_read_sum": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks read by the statement." - }, - "m_temp_blks_written_cnt": { - "type": "number", - "format": "float" - }, - "m_temp_blks_written_sum": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks written by the statement." - }, - "m_blk_read_time_cnt": { - "type": "number", - "format": "float" - }, - "m_blk_read_time_sum": { - "type": "number", - "format": "float", - "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_blk_write_time_cnt": { - "type": "number", - "format": "float" - }, - "m_blk_write_time_sum": { - "type": "number", - "format": "float", - "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_cpu_user_time_cnt": { - "type": "number", - "format": "float" - }, - "m_cpu_user_time_sum": { - "type": "number", - "format": "float", - "description": "Total time user spent in query." - }, - "m_cpu_sys_time_cnt": { - "type": "number", - "format": "float" - }, - "m_cpu_sys_time_sum": { - "type": "number", - "format": "float", - "description": "Total time system spent in query." - }, - "cmd_type": { - "type": "string", - "description": "Type of SQL command." - }, - "m_plans_calls_sum": { - "type": "number", - "format": "float", - "description": "Total number of planned calls.", - "title": "pg_stat_monitor 0.9 metrics" - }, - "m_plans_calls_cnt": { - "type": "number", - "format": "float" - }, - "m_wal_records_sum": { - "type": "number", - "format": "float", - "description": "Total number of WAL (Write-ahead logging) records." - }, - "m_wal_records_cnt": { - "type": "number", - "format": "float" - }, - "m_wal_fpi_sum": { - "type": "number", - "format": "float", - "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." - }, - "m_wal_fpi_cnt": { - "type": "number", - "format": "float" - }, - "m_wal_bytes_sum": { - "type": "number", - "format": "float", - "description": "Total bytes of WAL (Write-ahead logging) records." - }, - "m_wal_bytes_cnt": { - "type": "number", - "format": "float" - }, - "m_plan_time_sum": { - "type": "number", - "format": "float", - "description": "Sum, count, min, max of plan time." - }, - "m_plan_time_cnt": { - "type": "number", - "format": "float" - }, - "m_plan_time_min": { - "type": "number", - "format": "float" - }, - "m_plan_time_max": { - "type": "number", - "format": "float" - }, - "top_queryid": { - "type": "string", - "title": "Metrics skipped due to different bucket_time in pg_stat_monitor (1min in PMM, 5min in pg_stat_monitor):\nmin_time, max_time, mean_time\nplan_mean_time\nstddev_time\nOther metrics skipped (empty values, codes):\ncmd_type_text, elevel, sqlcode, message, state_code, state" - }, - "top_query": { - "type": "string" - }, - "application_name": { - "type": "string" - }, - "planid": { - "type": "string" - }, - "query_plan": { - "type": "string" - }, - "histogram_items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "MetricsBucket is aggregated message created by pmm-agent.\nContains information about one query selected in defined way from query class in specific period of time." - } - } -} diff --git a/api/qanpb/collector_grpc.pb.go b/api/qanpb/collector_grpc.pb.go index b3c75004f1..b1a42e7636 100644 --- a/api/qanpb/collector_grpc.pb.go +++ b/api/qanpb/collector_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type CollectorServer interface { } // UnimplementedCollectorServer must be embedded to have forward compatible implementations. -type UnimplementedCollectorServer struct { -} +type UnimplementedCollectorServer struct{} func (UnimplementedCollectorServer) Collect(context.Context, *CollectRequest) (*CollectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Collect not implemented") diff --git a/api/qanpb/filters.pb.go b/api/qanpb/filters.pb.go index 642b4ce72f..290ea68b52 100644 --- a/api/qanpb/filters.pb.go +++ b/api/qanpb/filters.pb.go @@ -7,12 +7,13 @@ package qanv1beta1 import ( + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -334,16 +335,19 @@ func file_qanpb_filters_proto_rawDescGZIP() []byte { return file_qanpb_filters_proto_rawDescData } -var file_qanpb_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_qanpb_filters_proto_goTypes = []interface{}{ - (*FiltersRequest)(nil), // 0: qan.v1beta1.FiltersRequest - (*FiltersReply)(nil), // 1: qan.v1beta1.FiltersReply - (*ListLabels)(nil), // 2: qan.v1beta1.ListLabels - (*Values)(nil), // 3: qan.v1beta1.Values - nil, // 4: qan.v1beta1.FiltersReply.LabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 6: qan.v1beta1.MapFieldEntry -} +var ( + file_qanpb_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) + file_qanpb_filters_proto_goTypes = []interface{}{ + (*FiltersRequest)(nil), // 0: qan.v1beta1.FiltersRequest + (*FiltersReply)(nil), // 1: qan.v1beta1.FiltersReply + (*ListLabels)(nil), // 2: qan.v1beta1.ListLabels + (*Values)(nil), // 3: qan.v1beta1.Values + nil, // 4: qan.v1beta1.FiltersReply.LabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 6: qan.v1beta1.MapFieldEntry + } +) + var file_qanpb_filters_proto_depIdxs = []int32{ 5, // 0: qan.v1beta1.FiltersRequest.period_start_from:type_name -> google.protobuf.Timestamp 5, // 1: qan.v1beta1.FiltersRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qanpb/filters.pb.gw.go b/api/qanpb/filters.pb.gw.go index 5fa71e0b11..74cec79c58 100644 --- a/api/qanpb/filters.pb.gw.go +++ b/api/qanpb/filters.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshaler, client FiltersClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq FiltersRequest @@ -45,7 +47,6 @@ func request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshaler, server FiltersServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshale msg, err := server.Get(ctx, &protoReq) return msg, metadata, err - } // RegisterFiltersHandlerServer registers the http handlers for service Filters to "mux". @@ -70,7 +70,6 @@ func local_request_Filters_Get_0(ctx context.Context, marshaler runtime.Marshale // 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 RegisterFiltersHandlerFromEndpoint instead. func RegisterFiltersHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FiltersServer) error { - mux.Handle("POST", pattern_Filters_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterFiltersHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Filters_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterFiltersHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "FiltersClient" to call the correct interceptors. func RegisterFiltersHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FiltersClient) error { - mux.Handle("POST", pattern_Filters_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterFiltersHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Filters_Get_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_Filters_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v0", "qan", "Filters", "Get"}, "")) -) +var pattern_Filters_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v0", "qan", "Filters", "Get"}, "")) -var ( - forward_Filters_Get_0 = runtime.ForwardResponseMessage -) +var forward_Filters_Get_0 = runtime.ForwardResponseMessage diff --git a/api/qanpb/filters.swagger.json b/api/qanpb/filters.swagger.json deleted file mode 100644 index 7178f77d08..0000000000 --- a/api/qanpb/filters.swagger.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "qanpb/filters.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Filters" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v0/qan/Filters/Get": { - "post": { - "summary": "Get gets map of metrics names.", - "operationId": "Get", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1FiltersReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "FiltersRequest contains period for which we need filters.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1FiltersRequest" - } - } - ], - "tags": [ - "Filters" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1FiltersReply": { - "type": "object", - "properties": { - "labels": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1beta1ListLabels" - } - } - }, - "description": "FiltersReply is map of labels for given period by key.\nKey is label's name and value is label's value and how many times it occur." - }, - "v1beta1FiltersRequest": { - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time" - }, - "period_start_to": { - "type": "string", - "format": "date-time" - }, - "main_metric_name": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1MapFieldEntry" - } - } - }, - "description": "FiltersRequest contains period for which we need filters." - }, - "v1beta1ListLabels": { - "type": "object", - "properties": { - "name": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Values" - } - } - }, - "description": "ListLabels is list of label's values: duplicates are impossible." - }, - "v1beta1MapFieldEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}." - }, - "v1beta1Values": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "main_metric_percent": { - "type": "number", - "format": "float" - }, - "main_metric_per_sec": { - "type": "number", - "format": "float" - } - }, - "description": "Values is label values and main metric percent and per second." - } - } -} diff --git a/api/qanpb/filters_grpc.pb.go b/api/qanpb/filters_grpc.pb.go index bd01706358..a68ca5847e 100644 --- a/api/qanpb/filters_grpc.pb.go +++ b/api/qanpb/filters_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type FiltersServer interface { } // UnimplementedFiltersServer must be embedded to have forward compatible implementations. -type UnimplementedFiltersServer struct { -} +type UnimplementedFiltersServer struct{} func (UnimplementedFiltersServer) Get(context.Context, *FiltersRequest) (*FiltersReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") diff --git a/api/qanpb/json/client/filters/get_parameters.go b/api/qanpb/json/client/filters/get_parameters.go index 30080f93a1..7f2a7635c0 100644 --- a/api/qanpb/json/client/filters/get_parameters.go +++ b/api/qanpb/json/client/filters/get_parameters.go @@ -60,7 +60,6 @@ GetParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetParams struct { - /* Body. FiltersRequest contains period for which we need filters. @@ -133,7 +132,6 @@ func (o *GetParams) SetBody(body GetBody) { // WriteToRequest writes these params to a swagger request func (o *GetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/filters/get_responses.go b/api/qanpb/json/client/filters/get_responses.go index 63f836cf5b..cfcee19800 100644 --- a/api/qanpb/json/client/filters/get_responses.go +++ b/api/qanpb/json/client/filters/get_responses.go @@ -61,12 +61,12 @@ type GetOK struct { func (o *GetOK) Error() string { return fmt.Sprintf("[POST /v0/qan/Filters/Get][%d] getOk %+v", 200, o.Payload) } + func (o *GetOK) GetPayload() *GetOKBody { return o.Payload } func (o *GetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetDefault) Code() int { func (o *GetDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/Filters/Get][%d] Get default %+v", o._statusCode, o.Payload) } + func (o *GetDefault) GetPayload() *GetDefaultBody { return o.Payload } func (o *GetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetDefaultBody) // response payload @@ -124,7 +124,6 @@ GetBody FiltersRequest contains period for which we need filters. swagger:model GetBody */ type GetBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -227,9 +226,7 @@ func (o *GetBody) ContextValidate(ctx context.Context, formats strfmt.Registry) } func (o *GetBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +237,6 @@ func (o *GetBody) contextValidateLabels(ctx context.Context, formats strfmt.Regi return err } } - } return nil @@ -269,7 +265,6 @@ GetDefaultBody get default body swagger:model GetDefaultBody */ type GetDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -335,9 +330,7 @@ func (o *GetDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,7 +341,6 @@ func (o *GetDefaultBody) contextValidateDetails(ctx context.Context, formats str return err } } - } return nil @@ -377,7 +369,6 @@ GetDefaultBodyDetailsItems0 get default body details items0 swagger:model GetDefaultBodyDetailsItems0 */ type GetDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -416,7 +407,6 @@ GetOKBody FiltersReply is map of labels for given period by key. swagger:model GetOKBody */ type GetOKBody struct { - // labels Labels map[string]GetOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -476,15 +466,12 @@ func (o *GetOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry } func (o *GetOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Labels { - if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil @@ -513,7 +500,6 @@ GetOKBodyLabelsAnon ListLabels is list of label's values: duplicates are impossi swagger:model GetOKBodyLabelsAnon */ type GetOKBodyLabelsAnon struct { - // name Name []*GetOKBodyLabelsAnonNameItems0 `json:"name"` } @@ -573,9 +559,7 @@ func (o *GetOKBodyLabelsAnon) ContextValidate(ctx context.Context, formats strfm } func (o *GetOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Name); i++ { - if o.Name[i] != nil { if err := o.Name[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -586,7 +570,6 @@ func (o *GetOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats s return err } } - } return nil @@ -615,7 +598,6 @@ GetOKBodyLabelsAnonNameItems0 Values is label values and main metric percent and swagger:model GetOKBodyLabelsAnonNameItems0 */ type GetOKBodyLabelsAnonNameItems0 struct { - // value Value string `json:"value,omitempty"` @@ -659,7 +641,6 @@ GetParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions in form swagger:model GetParamsBodyLabelsItems0 */ type GetParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go b/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go index 9ace427d25..a054ed1588 100644 --- a/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go +++ b/api/qanpb/json/client/metrics_names/get_metrics_names_parameters.go @@ -60,7 +60,6 @@ GetMetricsNamesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsNamesParams struct { - /* Body. MetricsNamesRequest is emty. @@ -133,7 +132,6 @@ func (o *GetMetricsNamesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go b/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go index ef925ae3cf..1902721a45 100644 --- a/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go +++ b/api/qanpb/json/client/metrics_names/get_metrics_names_responses.go @@ -60,12 +60,12 @@ type GetMetricsNamesOK struct { func (o *GetMetricsNamesOK) Error() string { return fmt.Sprintf("[POST /v0/qan/GetMetricsNames][%d] getMetricsNamesOk %+v", 200, o.Payload) } + func (o *GetMetricsNamesOK) GetPayload() *GetMetricsNamesOKBody { return o.Payload } func (o *GetMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsNamesOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetMetricsNamesDefault) Code() int { func (o *GetMetricsNamesDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/GetMetricsNames][%d] GetMetricsNames default %+v", o._statusCode, o.Payload) } + func (o *GetMetricsNamesDefault) GetPayload() *GetMetricsNamesDefaultBody { return o.Payload } func (o *GetMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsNamesDefaultBody) // response payload @@ -123,7 +123,6 @@ GetMetricsNamesDefaultBody get metrics names default body swagger:model GetMetricsNamesDefaultBody */ type GetMetricsNamesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *GetMetricsNamesDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -231,7 +227,6 @@ GetMetricsNamesDefaultBodyDetailsItems0 get metrics names default body details i swagger:model GetMetricsNamesDefaultBodyDetailsItems0 */ type GetMetricsNamesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -271,7 +266,6 @@ GetMetricsNamesOKBody MetricsNamesReply is map of stored metrics: swagger:model GetMetricsNamesOKBody */ type GetMetricsNamesOKBody struct { - // data Data map[string]string `json:"data,omitempty"` } diff --git a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go index 3a2c80aa3c..dfee8a0488 100644 --- a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go +++ b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_parameters.go @@ -60,7 +60,6 @@ ExplainFingerprintByQueryIDParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ExplainFingerprintByQueryIDParams struct { - /* Body. ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID. @@ -133,7 +132,6 @@ func (o *ExplainFingerprintByQueryIDParams) SetBody(body ExplainFingerprintByQue // WriteToRequest writes these params to a swagger request func (o *ExplainFingerprintByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go index 515a0efa01..b84de69c8c 100644 --- a/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go +++ b/api/qanpb/json/client/object_details/explain_fingerprint_by_query_id_responses.go @@ -60,12 +60,12 @@ type ExplainFingerprintByQueryIDOK struct { func (o *ExplainFingerprintByQueryIDOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/ExplainFingerprintByQueryID][%d] explainFingerprintByQueryIdOk %+v", 200, o.Payload) } + func (o *ExplainFingerprintByQueryIDOK) GetPayload() *ExplainFingerprintByQueryIDOKBody { return o.Payload } func (o *ExplainFingerprintByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ExplainFingerprintByQueryIDOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ExplainFingerprintByQueryIDDefault) Code() int { func (o *ExplainFingerprintByQueryIDDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/ExplainFingerprintByQueryID][%d] ExplainFingerprintByQueryID default %+v", o._statusCode, o.Payload) } + func (o *ExplainFingerprintByQueryIDDefault) GetPayload() *ExplainFingerprintByQueryIDDefaultBody { return o.Payload } func (o *ExplainFingerprintByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ExplainFingerprintByQueryIDDefaultBody) // response payload @@ -123,7 +123,6 @@ ExplainFingerprintByQueryIDBody ExplainFingerprintByQueryIDRequest get explain f swagger:model ExplainFingerprintByQueryIDBody */ type ExplainFingerprintByQueryIDBody struct { - // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -164,7 +163,6 @@ ExplainFingerprintByQueryIDDefaultBody explain fingerprint by query ID default b swagger:model ExplainFingerprintByQueryIDDefaultBody */ type ExplainFingerprintByQueryIDDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) ContextValidate(ctx context.Con } func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx cont return err } } - } return nil @@ -272,7 +267,6 @@ ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 explain fingerprint by query swagger:model ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 */ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ ExplainFingerprintByQueryIDOKBody ExplainFingerprintByQueryIDReply is explain fi swagger:model ExplainFingerprintByQueryIDOKBody */ type ExplainFingerprintByQueryIDOKBody struct { - // explain fingerprint ExplainFingerprint string `json:"explain_fingerprint,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_histogram_parameters.go b/api/qanpb/json/client/object_details/get_histogram_parameters.go index 92d9df13fd..ac3be7715b 100644 --- a/api/qanpb/json/client/object_details/get_histogram_parameters.go +++ b/api/qanpb/json/client/object_details/get_histogram_parameters.go @@ -60,7 +60,6 @@ GetHistogramParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetHistogramParams struct { - /* Body. HistogramRequest defines filtering by time range, labels and queryid. @@ -133,7 +132,6 @@ func (o *GetHistogramParams) SetBody(body GetHistogramBody) { // WriteToRequest writes these params to a swagger request func (o *GetHistogramParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_histogram_responses.go b/api/qanpb/json/client/object_details/get_histogram_responses.go index b6a8491e46..22441d3d85 100644 --- a/api/qanpb/json/client/object_details/get_histogram_responses.go +++ b/api/qanpb/json/client/object_details/get_histogram_responses.go @@ -61,12 +61,12 @@ type GetHistogramOK struct { func (o *GetHistogramOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetHistogram][%d] getHistogramOk %+v", 200, o.Payload) } + func (o *GetHistogramOK) GetPayload() *GetHistogramOKBody { return o.Payload } func (o *GetHistogramOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetHistogramOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetHistogramDefault) Code() int { func (o *GetHistogramDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetHistogram][%d] GetHistogram default %+v", o._statusCode, o.Payload) } + func (o *GetHistogramDefault) GetPayload() *GetHistogramDefaultBody { return o.Payload } func (o *GetHistogramDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetHistogramDefaultBody) // response payload @@ -124,7 +124,6 @@ GetHistogramBody HistogramRequest defines filtering by time range, labels and qu swagger:model GetHistogramBody */ type GetHistogramBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -227,9 +226,7 @@ func (o *GetHistogramBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +237,6 @@ func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats st return err } } - } return nil @@ -269,7 +265,6 @@ GetHistogramDefaultBody get histogram default body swagger:model GetHistogramDefaultBody */ type GetHistogramDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -335,9 +330,7 @@ func (o *GetHistogramDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -348,7 +341,6 @@ func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -377,7 +369,6 @@ GetHistogramDefaultBodyDetailsItems0 get histogram default body details items0 swagger:model GetHistogramDefaultBodyDetailsItems0 */ type GetHistogramDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -415,7 +406,6 @@ GetHistogramOKBody HistogramReply is histogram items as a list. swagger:model GetHistogramOKBody */ type GetHistogramOKBody struct { - // histogram items HistogramItems []*GetHistogramOKBodyHistogramItemsItems0 `json:"histogram_items"` } @@ -475,9 +465,7 @@ func (o *GetHistogramOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.HistogramItems); i++ { - if o.HistogramItems[i] != nil { if err := o.HistogramItems[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -488,7 +476,6 @@ func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, return err } } - } return nil @@ -517,7 +504,6 @@ GetHistogramOKBodyHistogramItemsItems0 HistogramItem represents one item in hist swagger:model GetHistogramOKBodyHistogramItemsItems0 */ type GetHistogramOKBodyHistogramItemsItems0 struct { - // range Range string `json:"range,omitempty"` @@ -558,7 +544,6 @@ GetHistogramParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimension swagger:model GetHistogramParamsBodyLabelsItems0 */ type GetHistogramParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_labels_parameters.go b/api/qanpb/json/client/object_details/get_labels_parameters.go index b706dec152..27cd5acdc7 100644 --- a/api/qanpb/json/client/object_details/get_labels_parameters.go +++ b/api/qanpb/json/client/object_details/get_labels_parameters.go @@ -60,7 +60,6 @@ GetLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLabelsParams struct { - /* Body. ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of @@ -134,7 +133,6 @@ func (o *GetLabelsParams) SetBody(body GetLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_labels_responses.go b/api/qanpb/json/client/object_details/get_labels_responses.go index 21194dcbc9..5022d06873 100644 --- a/api/qanpb/json/client/object_details/get_labels_responses.go +++ b/api/qanpb/json/client/object_details/get_labels_responses.go @@ -61,12 +61,12 @@ type GetLabelsOK struct { func (o *GetLabelsOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetLabels][%d] getLabelsOk %+v", 200, o.Payload) } + func (o *GetLabelsOK) GetPayload() *GetLabelsOKBody { return o.Payload } func (o *GetLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLabelsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetLabelsDefault) Code() int { func (o *GetLabelsDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetLabels][%d] GetLabels default %+v", o._statusCode, o.Payload) } + func (o *GetLabelsDefault) GetPayload() *GetLabelsDefaultBody { return o.Payload } func (o *GetLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLabelsDefaultBody) // response payload @@ -125,7 +125,6 @@ GetLabelsBody ObjectDetailsLabelsRequest defines filtering of object detail's la swagger:model GetLabelsBody */ type GetLabelsBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -211,7 +210,6 @@ GetLabelsDefaultBody get labels default body swagger:model GetLabelsDefaultBody */ type GetLabelsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -277,9 +275,7 @@ func (o *GetLabelsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -290,7 +286,6 @@ func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -319,7 +314,6 @@ GetLabelsDefaultBodyDetailsItems0 get labels default body details items0 swagger:model GetLabelsDefaultBodyDetailsItems0 */ type GetLabelsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +351,6 @@ GetLabelsOKBody ObjectDetailsLabelsReply is a map of labels names as keys and la swagger:model GetLabelsOKBody */ type GetLabelsOKBody struct { - // labels Labels map[string]GetLabelsOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -417,15 +410,12 @@ func (o *GetLabelsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetLabelsOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Labels { - if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil @@ -454,7 +444,6 @@ GetLabelsOKBodyLabelsAnon ListLabelValues is list of label's values. swagger:model GetLabelsOKBodyLabelsAnon */ type GetLabelsOKBodyLabelsAnon struct { - // values Values []string `json:"values"` } diff --git a/api/qanpb/json/client/object_details/get_metrics_parameters.go b/api/qanpb/json/client/object_details/get_metrics_parameters.go index ff8ab9f35f..f5d2589a16 100644 --- a/api/qanpb/json/client/object_details/get_metrics_parameters.go +++ b/api/qanpb/json/client/object_details/get_metrics_parameters.go @@ -60,7 +60,6 @@ GetMetricsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsParams struct { - /* Body. MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972. @@ -133,7 +132,6 @@ func (o *GetMetricsParams) SetBody(body GetMetricsBody) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_metrics_responses.go b/api/qanpb/json/client/object_details/get_metrics_responses.go index 8128588c7d..23bcd854fc 100644 --- a/api/qanpb/json/client/object_details/get_metrics_responses.go +++ b/api/qanpb/json/client/object_details/get_metrics_responses.go @@ -61,12 +61,12 @@ type GetMetricsOK struct { func (o *GetMetricsOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetMetrics][%d] getMetricsOk %+v", 200, o.Payload) } + func (o *GetMetricsOK) GetPayload() *GetMetricsOKBody { return o.Payload } func (o *GetMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetMetricsDefault) Code() int { func (o *GetMetricsDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetMetrics][%d] GetMetrics default %+v", o._statusCode, o.Payload) } + func (o *GetMetricsDefault) GetPayload() *GetMetricsDefaultBody { return o.Payload } func (o *GetMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsDefaultBody) // response payload @@ -124,7 +124,6 @@ GetMetricsBody MetricsRequest defines filtering of metrics for specific value of swagger:model GetMetricsBody */ type GetMetricsBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -236,9 +235,7 @@ func (o *GetMetricsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -249,7 +246,6 @@ func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strf return err } } - } return nil @@ -278,7 +274,6 @@ GetMetricsDefaultBody get metrics default body swagger:model GetMetricsDefaultBody */ type GetMetricsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -344,9 +339,7 @@ func (o *GetMetricsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -357,7 +350,6 @@ func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -386,7 +378,6 @@ GetMetricsDefaultBodyDetailsItems0 get metrics default body details items0 swagger:model GetMetricsDefaultBodyDetailsItems0 */ type GetMetricsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -424,7 +415,6 @@ GetMetricsOKBody MetricsReply defines metrics for specific value of dimension (e swagger:model GetMetricsOKBody */ type GetMetricsOKBody struct { - // metrics Metrics map[string]GetMetricsOKBodyMetricsAnon `json:"metrics,omitempty"` @@ -594,24 +584,19 @@ func (o *GetMetricsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetMetricsOKBody) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Metrics { - if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil } func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Sparkline); i++ { - if o.Sparkline[i] != nil { if err := o.Sparkline[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -622,29 +607,24 @@ func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats return err } } - } return nil } func (o *GetMetricsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Totals { - if val, ok := o.Totals[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil } func (o *GetMetricsOKBody) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - if o.Metadata != nil { if err := o.Metadata.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -682,7 +662,6 @@ GetMetricsOKBodyMetadata GetSlecetedQueryMetadataReply consists selected query m swagger:model GetMetricsOKBodyMetadata */ type GetMetricsOKBodyMetadata struct { - // service name ServiceName string `json:"service_name,omitempty"` @@ -753,7 +732,6 @@ GetMetricsOKBodyMetricsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyMetricsAnon */ type GetMetricsOKBodyMetricsAnon struct { - // rate Rate float32 `json:"rate,omitempty"` @@ -813,7 +791,6 @@ GetMetricsOKBodySparklineItems0 Point contains values that represents abscissa ( swagger:model GetMetricsOKBodySparklineItems0 */ type GetMetricsOKBodySparklineItems0 struct { - // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1043,7 +1020,6 @@ GetMetricsOKBodyTotalsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyTotalsAnon */ type GetMetricsOKBodyTotalsAnon struct { - // rate Rate float32 `json:"rate,omitempty"` @@ -1102,7 +1078,6 @@ GetMetricsParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions swagger:model GetMetricsParamsBodyLabelsItems0 */ type GetMetricsParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_query_example_parameters.go b/api/qanpb/json/client/object_details/get_query_example_parameters.go index a697cb319b..bccae86cac 100644 --- a/api/qanpb/json/client/object_details/get_query_example_parameters.go +++ b/api/qanpb/json/client/object_details/get_query_example_parameters.go @@ -60,7 +60,6 @@ GetQueryExampleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryExampleParams struct { - /* Body. QueryExampleRequest defines filtering of query examples for specific value of @@ -134,7 +133,6 @@ func (o *GetQueryExampleParams) SetBody(body GetQueryExampleBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryExampleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_query_example_responses.go b/api/qanpb/json/client/object_details/get_query_example_responses.go index 8606240a40..fee949c15c 100644 --- a/api/qanpb/json/client/object_details/get_query_example_responses.go +++ b/api/qanpb/json/client/object_details/get_query_example_responses.go @@ -62,12 +62,12 @@ type GetQueryExampleOK struct { func (o *GetQueryExampleOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryExample][%d] getQueryExampleOk %+v", 200, o.Payload) } + func (o *GetQueryExampleOK) GetPayload() *GetQueryExampleOKBody { return o.Payload } func (o *GetQueryExampleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryExampleOKBody) // response payload @@ -104,12 +104,12 @@ func (o *GetQueryExampleDefault) Code() int { func (o *GetQueryExampleDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryExample][%d] GetQueryExample default %+v", o._statusCode, o.Payload) } + func (o *GetQueryExampleDefault) GetPayload() *GetQueryExampleDefaultBody { return o.Payload } func (o *GetQueryExampleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryExampleDefaultBody) // response payload @@ -126,7 +126,6 @@ GetQueryExampleBody QueryExampleRequest defines filtering of query examples for swagger:model GetQueryExampleBody */ type GetQueryExampleBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -235,9 +234,7 @@ func (o *GetQueryExampleBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -248,7 +245,6 @@ func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats return err } } - } return nil @@ -277,7 +273,6 @@ GetQueryExampleDefaultBody get query example default body swagger:model GetQueryExampleDefaultBody */ type GetQueryExampleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -343,9 +338,7 @@ func (o *GetQueryExampleDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -356,7 +349,6 @@ func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -385,7 +377,6 @@ GetQueryExampleDefaultBodyDetailsItems0 get query example default body details i swagger:model GetQueryExampleDefaultBodyDetailsItems0 */ type GetQueryExampleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -423,7 +414,6 @@ GetQueryExampleOKBody QueryExampleReply list of query examples. swagger:model GetQueryExampleOKBody */ type GetQueryExampleOKBody struct { - // query examples QueryExamples []*GetQueryExampleOKBodyQueryExamplesItems0 `json:"query_examples"` } @@ -483,9 +473,7 @@ func (o *GetQueryExampleOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QueryExamples); i++ { - if o.QueryExamples[i] != nil { if err := o.QueryExamples[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -496,7 +484,6 @@ func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context return err } } - } return nil @@ -525,7 +512,6 @@ GetQueryExampleOKBodyQueryExamplesItems0 QueryExample shows query examples and t swagger:model GetQueryExampleOKBodyQueryExamplesItems0 */ type GetQueryExampleOKBodyQueryExamplesItems0 struct { - // example Example string `json:"example,omitempty"` @@ -709,7 +695,6 @@ GetQueryExampleParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimens swagger:model GetQueryExampleParamsBodyLabelsItems0 */ type GetQueryExampleParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/json/client/object_details/get_query_plan_parameters.go b/api/qanpb/json/client/object_details/get_query_plan_parameters.go index ec863f68f8..951332f0db 100644 --- a/api/qanpb/json/client/object_details/get_query_plan_parameters.go +++ b/api/qanpb/json/client/object_details/get_query_plan_parameters.go @@ -60,7 +60,6 @@ GetQueryPlanParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryPlanParams struct { - /* Body. QueryPlanRequest defines filtering by queryid. @@ -133,7 +132,6 @@ func (o *GetQueryPlanParams) SetBody(body GetQueryPlanBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/get_query_plan_responses.go b/api/qanpb/json/client/object_details/get_query_plan_responses.go index 4d562c717c..c0e5daf471 100644 --- a/api/qanpb/json/client/object_details/get_query_plan_responses.go +++ b/api/qanpb/json/client/object_details/get_query_plan_responses.go @@ -60,12 +60,12 @@ type GetQueryPlanOK struct { func (o *GetQueryPlanOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryPlan][%d] getQueryPlanOk %+v", 200, o.Payload) } + func (o *GetQueryPlanOK) GetPayload() *GetQueryPlanOKBody { return o.Payload } func (o *GetQueryPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryPlanOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetQueryPlanDefault) Code() int { func (o *GetQueryPlanDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/GetQueryPlan][%d] GetQueryPlan default %+v", o._statusCode, o.Payload) } + func (o *GetQueryPlanDefault) GetPayload() *GetQueryPlanDefaultBody { return o.Payload } func (o *GetQueryPlanDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryPlanDefaultBody) // response payload @@ -123,7 +123,6 @@ GetQueryPlanBody QueryPlanRequest defines filtering by queryid. swagger:model GetQueryPlanBody */ type GetQueryPlanBody struct { - // queryid Queryid string `json:"queryid,omitempty"` } @@ -161,7 +160,6 @@ GetQueryPlanDefaultBody get query plan default body swagger:model GetQueryPlanDefaultBody */ type GetQueryPlanDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -227,9 +225,7 @@ func (o *GetQueryPlanDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -240,7 +236,6 @@ func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -269,7 +264,6 @@ GetQueryPlanDefaultBodyDetailsItems0 get query plan default body details items0 swagger:model GetQueryPlanDefaultBodyDetailsItems0 */ type GetQueryPlanDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -307,7 +301,6 @@ GetQueryPlanOKBody QueryPlanReply contains planid and query_plan. swagger:model GetQueryPlanOKBody */ type GetQueryPlanOKBody struct { - // planid Planid string `json:"planid,omitempty"` diff --git a/api/qanpb/json/client/object_details/query_exists_parameters.go b/api/qanpb/json/client/object_details/query_exists_parameters.go index ec330d052a..3147a7c93c 100644 --- a/api/qanpb/json/client/object_details/query_exists_parameters.go +++ b/api/qanpb/json/client/object_details/query_exists_parameters.go @@ -60,7 +60,6 @@ QueryExistsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type QueryExistsParams struct { - /* Body. QueryExistsRequest check if provided query exists or not. @@ -133,7 +132,6 @@ func (o *QueryExistsParams) SetBody(body QueryExistsBody) { // WriteToRequest writes these params to a swagger request func (o *QueryExistsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/query_exists_responses.go b/api/qanpb/json/client/object_details/query_exists_responses.go index ac5541a701..4e05278cb4 100644 --- a/api/qanpb/json/client/object_details/query_exists_responses.go +++ b/api/qanpb/json/client/object_details/query_exists_responses.go @@ -60,12 +60,12 @@ type QueryExistsOK struct { func (o *QueryExistsOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/QueryExists][%d] queryExistsOk %+v", 200, o.Payload) } + func (o *QueryExistsOK) GetPayload() bool { return o.Payload } func (o *QueryExistsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *QueryExistsDefault) Code() int { func (o *QueryExistsDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/QueryExists][%d] QueryExists default %+v", o._statusCode, o.Payload) } + func (o *QueryExistsDefault) GetPayload() *QueryExistsDefaultBody { return o.Payload } func (o *QueryExistsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(QueryExistsDefaultBody) // response payload @@ -121,7 +121,6 @@ QueryExistsBody QueryExistsRequest check if provided query exists or not. swagger:model QueryExistsBody */ type QueryExistsBody struct { - // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -162,7 +161,6 @@ QueryExistsDefaultBody query exists default body swagger:model QueryExistsDefaultBody */ type QueryExistsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -228,9 +226,7 @@ func (o *QueryExistsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -241,7 +237,6 @@ func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -270,7 +265,6 @@ QueryExistsDefaultBodyDetailsItems0 query exists default body details items0 swagger:model QueryExistsDefaultBodyDetailsItems0 */ type QueryExistsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go b/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go index 05a40e6f21..71b0ad19b2 100644 --- a/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go +++ b/api/qanpb/json/client/object_details/schema_by_query_id_parameters.go @@ -60,7 +60,6 @@ SchemaByQueryIDParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SchemaByQueryIDParams struct { - /* Body. SchemaByQueryIDRequest returns schema for given query ID and service ID. @@ -133,7 +132,6 @@ func (o *SchemaByQueryIDParams) SetBody(body SchemaByQueryIDBody) { // WriteToRequest writes these params to a swagger request func (o *SchemaByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/object_details/schema_by_query_id_responses.go b/api/qanpb/json/client/object_details/schema_by_query_id_responses.go index c9fa6f3107..d0df17bfdc 100644 --- a/api/qanpb/json/client/object_details/schema_by_query_id_responses.go +++ b/api/qanpb/json/client/object_details/schema_by_query_id_responses.go @@ -60,12 +60,12 @@ type SchemaByQueryIDOK struct { func (o *SchemaByQueryIDOK) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/SchemaByQueryID][%d] schemaByQueryIdOk %+v", 200, o.Payload) } + func (o *SchemaByQueryIDOK) GetPayload() *SchemaByQueryIDOKBody { return o.Payload } func (o *SchemaByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SchemaByQueryIDOKBody) // response payload @@ -102,12 +102,12 @@ func (o *SchemaByQueryIDDefault) Code() int { func (o *SchemaByQueryIDDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/ObjectDetails/SchemaByQueryID][%d] SchemaByQueryID default %+v", o._statusCode, o.Payload) } + func (o *SchemaByQueryIDDefault) GetPayload() *SchemaByQueryIDDefaultBody { return o.Payload } func (o *SchemaByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SchemaByQueryIDDefaultBody) // response payload @@ -123,7 +123,6 @@ SchemaByQueryIDBody SchemaByQueryIDRequest returns schema for given query ID and swagger:model SchemaByQueryIDBody */ type SchemaByQueryIDBody struct { - // service id ServiceID string `json:"service_id,omitempty"` @@ -164,7 +163,6 @@ SchemaByQueryIDDefaultBody schema by query ID default body swagger:model SchemaByQueryIDDefaultBody */ type SchemaByQueryIDDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *SchemaByQueryIDDefaultBody) ContextValidate(ctx context.Context, format } func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -272,7 +267,6 @@ SchemaByQueryIDDefaultBodyDetailsItems0 schema by query ID default body details swagger:model SchemaByQueryIDDefaultBodyDetailsItems0 */ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ SchemaByQueryIDOKBody SchemaByQueryIDReply is schema for given query ID and serv swagger:model SchemaByQueryIDOKBody */ type SchemaByQueryIDOKBody struct { - // schema Schema string `json:"schema,omitempty"` } diff --git a/api/qanpb/json/client/profile/get_report_parameters.go b/api/qanpb/json/client/profile/get_report_parameters.go index adea6a5299..154ce458c2 100644 --- a/api/qanpb/json/client/profile/get_report_parameters.go +++ b/api/qanpb/json/client/profile/get_report_parameters.go @@ -60,7 +60,6 @@ GetReportParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetReportParams struct { - /* Body. ReportRequest defines filtering of metrics report for db server or other dimentions. @@ -133,7 +132,6 @@ func (o *GetReportParams) SetBody(body GetReportBody) { // WriteToRequest writes these params to a swagger request func (o *GetReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qanpb/json/client/profile/get_report_responses.go b/api/qanpb/json/client/profile/get_report_responses.go index 0835051be4..d72cc8a69f 100644 --- a/api/qanpb/json/client/profile/get_report_responses.go +++ b/api/qanpb/json/client/profile/get_report_responses.go @@ -61,12 +61,12 @@ type GetReportOK struct { func (o *GetReportOK) Error() string { return fmt.Sprintf("[POST /v0/qan/GetReport][%d] getReportOk %+v", 200, o.Payload) } + func (o *GetReportOK) GetPayload() *GetReportOKBody { return o.Payload } func (o *GetReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetReportOKBody) // response payload @@ -103,12 +103,12 @@ func (o *GetReportDefault) Code() int { func (o *GetReportDefault) Error() string { return fmt.Sprintf("[POST /v0/qan/GetReport][%d] GetReport default %+v", o._statusCode, o.Payload) } + func (o *GetReportDefault) GetPayload() *GetReportDefaultBody { return o.Payload } func (o *GetReportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetReportDefaultBody) // response payload @@ -124,7 +124,6 @@ GetReportBody ReportRequest defines filtering of metrics report for db server or swagger:model GetReportBody */ type GetReportBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -245,9 +244,7 @@ func (o *GetReportBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if err := o.Labels[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -258,7 +255,6 @@ func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfm return err } } - } return nil @@ -287,7 +283,6 @@ GetReportDefaultBody get report default body swagger:model GetReportDefaultBody */ type GetReportDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -353,9 +348,7 @@ func (o *GetReportDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -366,7 +359,6 @@ func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -395,7 +387,6 @@ GetReportDefaultBodyDetailsItems0 get report default body details items0 swagger:model GetReportDefaultBodyDetailsItems0 */ type GetReportDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -433,7 +424,6 @@ GetReportOKBody ReportReply is list of reports per quieryids, hosts etc. swagger:model GetReportOKBody */ type GetReportOKBody struct { - // total rows TotalRows int64 `json:"total_rows,omitempty"` @@ -502,9 +492,7 @@ func (o *GetReportOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Rows); i++ { - if o.Rows[i] != nil { if err := o.Rows[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -515,7 +503,6 @@ func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfm return err } } - } return nil @@ -544,7 +531,6 @@ GetReportOKBodyRowsItems0 Row define metrics for selected dimention. swagger:model GetReportOKBodyRowsItems0 */ type GetReportOKBodyRowsItems0 struct { - // rank Rank int64 `json:"rank,omitempty"` @@ -662,24 +648,19 @@ func (o *GetReportOKBodyRowsItems0) ContextValidate(ctx context.Context, formats } func (o *GetReportOKBodyRowsItems0) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Metrics { - if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil } func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Sparkline); i++ { - if o.Sparkline[i] != nil { if err := o.Sparkline[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -690,7 +671,6 @@ func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context return err } } - } return nil @@ -719,7 +699,6 @@ GetReportOKBodyRowsItems0MetricsAnon Metric cell. swagger:model GetReportOKBodyRowsItems0MetricsAnon */ type GetReportOKBodyRowsItems0MetricsAnon struct { - // stats Stats *GetReportOKBodyRowsItems0MetricsAnonStats `json:"stats,omitempty"` } @@ -772,7 +751,6 @@ func (o *GetReportOKBodyRowsItems0MetricsAnon) ContextValidate(ctx context.Conte } func (o *GetReportOKBodyRowsItems0MetricsAnon) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - if o.Stats != nil { if err := o.Stats.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -810,7 +788,6 @@ GetReportOKBodyRowsItems0MetricsAnonStats Stat is statistics of specific metric. swagger:model GetReportOKBodyRowsItems0MetricsAnonStats */ type GetReportOKBodyRowsItems0MetricsAnonStats struct { - // rate Rate float32 `json:"rate,omitempty"` @@ -870,7 +847,6 @@ GetReportOKBodyRowsItems0SparklineItems0 Point contains values that represents a swagger:model GetReportOKBodyRowsItems0SparklineItems0 */ type GetReportOKBodyRowsItems0SparklineItems0 struct { - // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1100,7 +1076,6 @@ GetReportParamsBodyLabelsItems0 ReportMapFieldEntry allows to pass labels/diment swagger:model GetReportParamsBodyLabelsItems0 */ type GetReportParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qanpb/metrics_names.pb.go b/api/qanpb/metrics_names.pb.go index 1bd08a5d1e..ed632783fe 100644 --- a/api/qanpb/metrics_names.pb.go +++ b/api/qanpb/metrics_names.pb.go @@ -7,11 +7,12 @@ package qanv1beta1 import ( + reflect "reflect" + sync "sync" + _ "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 ( @@ -161,12 +162,15 @@ func file_qanpb_metrics_names_proto_rawDescGZIP() []byte { return file_qanpb_metrics_names_proto_rawDescData } -var file_qanpb_metrics_names_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_qanpb_metrics_names_proto_goTypes = []interface{}{ - (*MetricsNamesRequest)(nil), // 0: qan.v1beta1.MetricsNamesRequest - (*MetricsNamesReply)(nil), // 1: qan.v1beta1.MetricsNamesReply - nil, // 2: qan.v1beta1.MetricsNamesReply.DataEntry -} +var ( + file_qanpb_metrics_names_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_qanpb_metrics_names_proto_goTypes = []interface{}{ + (*MetricsNamesRequest)(nil), // 0: qan.v1beta1.MetricsNamesRequest + (*MetricsNamesReply)(nil), // 1: qan.v1beta1.MetricsNamesReply + nil, // 2: qan.v1beta1.MetricsNamesReply.DataEntry + } +) + var file_qanpb_metrics_names_proto_depIdxs = []int32{ 2, // 0: qan.v1beta1.MetricsNamesReply.data:type_name -> qan.v1beta1.MetricsNamesReply.DataEntry 0, // 1: qan.v1beta1.MetricsNames.GetMetricsNames:input_type -> qan.v1beta1.MetricsNamesRequest diff --git a/api/qanpb/metrics_names.pb.gw.go b/api/qanpb/metrics_names.pb.gw.go index 0d68d488b3..fbe185c590 100644 --- a/api/qanpb/metrics_names.pb.gw.go +++ b/api/qanpb/metrics_names.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, client MetricsNamesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MetricsNamesRequest @@ -45,7 +47,6 @@ func request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler runti msg, err := client.GetMetricsNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, server MetricsNamesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler msg, err := server.GetMetricsNames(ctx, &protoReq) return msg, metadata, err - } // RegisterMetricsNamesHandlerServer registers the http handlers for service MetricsNames to "mux". @@ -70,7 +70,6 @@ func local_request_MetricsNames_GetMetricsNames_0(ctx context.Context, marshaler // 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 RegisterMetricsNamesHandlerFromEndpoint instead. func RegisterMetricsNamesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsNamesServer) error { - mux.Handle("POST", pattern_MetricsNames_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterMetricsNamesHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_MetricsNames_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterMetricsNamesHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "MetricsNamesClient" to call the correct interceptors. func RegisterMetricsNamesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsNamesClient) error { - mux.Handle("POST", pattern_MetricsNames_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterMetricsNamesHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_MetricsNames_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_MetricsNames_GetMetricsNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetMetricsNames"}, "")) -) +var pattern_MetricsNames_GetMetricsNames_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetMetricsNames"}, "")) -var ( - forward_MetricsNames_GetMetricsNames_0 = runtime.ForwardResponseMessage -) +var forward_MetricsNames_GetMetricsNames_0 = runtime.ForwardResponseMessage diff --git a/api/qanpb/metrics_names.swagger.json b/api/qanpb/metrics_names.swagger.json deleted file mode 100644 index 2c611a3b50..0000000000 --- a/api/qanpb/metrics_names.swagger.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "qanpb/metrics_names.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "MetricsNames" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v0/qan/GetMetricsNames": { - "post": { - "summary": "GetMetricsNames gets map of metrics names.", - "operationId": "GetMetricsNames", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1MetricsNamesReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "MetricsNamesRequest is emty.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1MetricsNamesRequest" - } - } - ], - "tags": [ - "MetricsNames" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1MetricsNamesReply": { - "type": "object", - "properties": { - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "description": "MetricsNamesReply is map of stored metrics:\nkey is root of metric name in db (Ex:. [m_]query_time[_sum]);\nvalue - Human readable name of metrics." - }, - "v1beta1MetricsNamesRequest": { - "type": "object", - "description": "MetricsNamesRequest is emty." - } - } -} diff --git a/api/qanpb/metrics_names_grpc.pb.go b/api/qanpb/metrics_names_grpc.pb.go index 164528b0f1..33a91a24dc 100644 --- a/api/qanpb/metrics_names_grpc.pb.go +++ b/api/qanpb/metrics_names_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type MetricsNamesServer interface { } // UnimplementedMetricsNamesServer must be embedded to have forward compatible implementations. -type UnimplementedMetricsNamesServer struct { -} +type UnimplementedMetricsNamesServer struct{} func (UnimplementedMetricsNamesServer) GetMetricsNames(context.Context, *MetricsNamesRequest) (*MetricsNamesReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetricsNames not implemented") diff --git a/api/qanpb/object_details.pb.go b/api/qanpb/object_details.pb.go index a702119145..782db83254 100644 --- a/api/qanpb/object_details.pb.go +++ b/api/qanpb/object_details.pb.go @@ -7,13 +7,14 @@ package qanv1beta1 import ( + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( @@ -1848,40 +1849,43 @@ func file_qanpb_object_details_proto_rawDescGZIP() []byte { return file_qanpb_object_details_proto_rawDescData } -var file_qanpb_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 25) -var file_qanpb_object_details_proto_goTypes = []interface{}{ - (*MetricsRequest)(nil), // 0: qan.v1beta1.MetricsRequest - (*MetricsReply)(nil), // 1: qan.v1beta1.MetricsReply - (*MetricValues)(nil), // 2: qan.v1beta1.MetricValues - (*Labels)(nil), // 3: qan.v1beta1.Labels - (*QueryExampleRequest)(nil), // 4: qan.v1beta1.QueryExampleRequest - (*QueryExampleReply)(nil), // 5: qan.v1beta1.QueryExampleReply - (*QueryExample)(nil), // 6: qan.v1beta1.QueryExample - (*ObjectDetailsLabelsRequest)(nil), // 7: qan.v1beta1.ObjectDetailsLabelsRequest - (*ObjectDetailsLabelsReply)(nil), // 8: qan.v1beta1.ObjectDetailsLabelsReply - (*ListLabelValues)(nil), // 9: qan.v1beta1.ListLabelValues - (*QueryPlanRequest)(nil), // 10: qan.v1beta1.QueryPlanRequest - (*QueryPlanReply)(nil), // 11: qan.v1beta1.QueryPlanReply - (*HistogramRequest)(nil), // 12: qan.v1beta1.HistogramRequest - (*HistogramReply)(nil), // 13: qan.v1beta1.HistogramReply - (*HistogramItem)(nil), // 14: qan.v1beta1.HistogramItem - (*QueryExistsRequest)(nil), // 15: qan.v1beta1.QueryExistsRequest - (*SchemaByQueryIDRequest)(nil), // 16: qan.v1beta1.SchemaByQueryIDRequest - (*SchemaByQueryIDReply)(nil), // 17: qan.v1beta1.SchemaByQueryIDReply - (*ExplainFingerprintByQueryIDRequest)(nil), // 18: qan.v1beta1.ExplainFingerprintByQueryIDRequest - (*ExplainFingerprintByQueryIDReply)(nil), // 19: qan.v1beta1.ExplainFingerprintByQueryIDReply - (*GetSelectedQueryMetadataReply)(nil), // 20: qan.v1beta1.GetSelectedQueryMetadataReply - nil, // 21: qan.v1beta1.MetricsReply.MetricsEntry - nil, // 22: qan.v1beta1.MetricsReply.TextMetricsEntry - nil, // 23: qan.v1beta1.MetricsReply.TotalsEntry - nil, // 24: qan.v1beta1.ObjectDetailsLabelsReply.LabelsEntry - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 26: qan.v1beta1.MapFieldEntry - (*Point)(nil), // 27: qan.v1beta1.Point - (ExampleFormat)(0), // 28: qan.v1beta1.ExampleFormat - (ExampleType)(0), // 29: qan.v1beta1.ExampleType - (*wrapperspb.BoolValue)(nil), // 30: google.protobuf.BoolValue -} +var ( + file_qanpb_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 25) + file_qanpb_object_details_proto_goTypes = []interface{}{ + (*MetricsRequest)(nil), // 0: qan.v1beta1.MetricsRequest + (*MetricsReply)(nil), // 1: qan.v1beta1.MetricsReply + (*MetricValues)(nil), // 2: qan.v1beta1.MetricValues + (*Labels)(nil), // 3: qan.v1beta1.Labels + (*QueryExampleRequest)(nil), // 4: qan.v1beta1.QueryExampleRequest + (*QueryExampleReply)(nil), // 5: qan.v1beta1.QueryExampleReply + (*QueryExample)(nil), // 6: qan.v1beta1.QueryExample + (*ObjectDetailsLabelsRequest)(nil), // 7: qan.v1beta1.ObjectDetailsLabelsRequest + (*ObjectDetailsLabelsReply)(nil), // 8: qan.v1beta1.ObjectDetailsLabelsReply + (*ListLabelValues)(nil), // 9: qan.v1beta1.ListLabelValues + (*QueryPlanRequest)(nil), // 10: qan.v1beta1.QueryPlanRequest + (*QueryPlanReply)(nil), // 11: qan.v1beta1.QueryPlanReply + (*HistogramRequest)(nil), // 12: qan.v1beta1.HistogramRequest + (*HistogramReply)(nil), // 13: qan.v1beta1.HistogramReply + (*HistogramItem)(nil), // 14: qan.v1beta1.HistogramItem + (*QueryExistsRequest)(nil), // 15: qan.v1beta1.QueryExistsRequest + (*SchemaByQueryIDRequest)(nil), // 16: qan.v1beta1.SchemaByQueryIDRequest + (*SchemaByQueryIDReply)(nil), // 17: qan.v1beta1.SchemaByQueryIDReply + (*ExplainFingerprintByQueryIDRequest)(nil), // 18: qan.v1beta1.ExplainFingerprintByQueryIDRequest + (*ExplainFingerprintByQueryIDReply)(nil), // 19: qan.v1beta1.ExplainFingerprintByQueryIDReply + (*GetSelectedQueryMetadataReply)(nil), // 20: qan.v1beta1.GetSelectedQueryMetadataReply + nil, // 21: qan.v1beta1.MetricsReply.MetricsEntry + nil, // 22: qan.v1beta1.MetricsReply.TextMetricsEntry + nil, // 23: qan.v1beta1.MetricsReply.TotalsEntry + nil, // 24: qan.v1beta1.ObjectDetailsLabelsReply.LabelsEntry + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 26: qan.v1beta1.MapFieldEntry + (*Point)(nil), // 27: qan.v1beta1.Point + (ExampleFormat)(0), // 28: qan.v1beta1.ExampleFormat + (ExampleType)(0), // 29: qan.v1beta1.ExampleType + (*wrapperspb.BoolValue)(nil), // 30: google.protobuf.BoolValue + } +) + var file_qanpb_object_details_proto_depIdxs = []int32{ 25, // 0: qan.v1beta1.MetricsRequest.period_start_from:type_name -> google.protobuf.Timestamp 25, // 1: qan.v1beta1.MetricsRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qanpb/object_details.pb.gw.go b/api/qanpb/object_details.pb.gw.go index 6502d7d596..08f454da3e 100644 --- a/api/qanpb/object_details.pb.gw.go +++ b/api/qanpb/object_details.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MetricsRequest @@ -45,7 +47,6 @@ func request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler runtime.M msg, err := client.GetMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_ObjectDetails_GetMetrics_0(ctx context.Context, marshaler run msg, err := server.GetMetrics(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,7 +79,6 @@ func request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshaler runt msg, err := client.GetQueryExample(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -96,7 +95,6 @@ func local_request_ObjectDetails_GetQueryExample_0(ctx context.Context, marshale msg, err := server.GetQueryExample(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,7 +111,6 @@ func request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -130,7 +127,6 @@ func local_request_ObjectDetails_GetLabels_0(ctx context.Context, marshaler runt msg, err := server.GetLabels(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,7 +143,6 @@ func request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler runtime msg, err := client.GetQueryPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -164,7 +159,6 @@ func local_request_ObjectDetails_GetQueryPlan_0(ctx context.Context, marshaler r msg, err := server.GetQueryPlan(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +175,6 @@ func request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler runtime msg, err := client.GetHistogram(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -198,7 +191,6 @@ func local_request_ObjectDetails_GetHistogram_0(ctx context.Context, marshaler r msg, err := server.GetHistogram(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler runtime. msg, err := client.QueryExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,7 +223,6 @@ func local_request_ObjectDetails_QueryExists_0(ctx context.Context, marshaler ru msg, err := server.QueryExists(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,7 +239,6 @@ func request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Context, ma msg, err := client.ExplainFingerprintByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +255,6 @@ func local_request_ObjectDetails_ExplainFingerprintByQueryID_0(ctx context.Conte msg, err := server.ExplainFingerprintByQueryID(ctx, &protoReq) return msg, metadata, err - } func request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client ObjectDetailsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -283,7 +271,6 @@ func request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshaler runt msg, err := client.SchemaByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server ObjectDetailsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -300,7 +287,6 @@ func local_request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshale msg, err := server.SchemaByQueryID(ctx, &protoReq) return msg, metadata, err - } // RegisterObjectDetailsHandlerServer registers the http handlers for service ObjectDetails to "mux". @@ -308,7 +294,6 @@ func local_request_ObjectDetails_SchemaByQueryID_0(ctx context.Context, marshale // 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 RegisterObjectDetailsHandlerFromEndpoint instead. func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ObjectDetailsServer) error { - mux.Handle("POST", pattern_ObjectDetails_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -331,7 +316,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -356,7 +340,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -381,7 +364,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -406,7 +388,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -431,7 +412,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -456,7 +436,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -481,7 +460,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -506,7 +484,6 @@ func RegisterObjectDetailsHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -549,7 +526,6 @@ func RegisterObjectDetailsHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ObjectDetailsClient" to call the correct interceptors. func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ObjectDetailsClient) error { - mux.Handle("POST", pattern_ObjectDetails_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -569,7 +545,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,7 +566,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -613,7 +587,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -635,7 +608,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -657,7 +629,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -679,7 +650,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -701,7 +671,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ObjectDetails_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -723,7 +692,6 @@ func RegisterObjectDetailsHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ObjectDetails_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/qanpb/object_details.swagger.json b/api/qanpb/object_details.swagger.json deleted file mode 100644 index d978f5837b..0000000000 --- a/api/qanpb/object_details.swagger.json +++ /dev/null @@ -1,1100 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "qanpb/object_details.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "ObjectDetails" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v0/qan/ObjectDetails/ExplainFingerprintByQueryID": { - "post": { - "summary": "ExplainFingerprintByQueryID get explain fingerprint for given query ID.", - "operationId": "ExplainFingerprintByQueryID", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ExplainFingerprintByQueryIDReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ExplainFingerprintByQueryIDRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/GetHistogram": { - "post": { - "summary": "GetHistogram gets histogram items for specific filtering.", - "operationId": "GetHistogram", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1HistogramReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "HistogramRequest defines filtering by time range, labels and queryid.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1HistogramRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/GetLabels": { - "post": { - "summary": "GetLabels gets list of labels for object details.", - "operationId": "GetLabels", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ObjectDetailsLabelsReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ObjectDetailsLabelsRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/GetMetrics": { - "post": { - "summary": "GetMetrics gets map of metrics for specific filtering.", - "operationId": "GetMetrics", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1MetricsReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1MetricsRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/GetQueryExample": { - "post": { - "summary": "GetQueryExample gets list of query examples.", - "operationId": "GetQueryExample", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1QueryExampleReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "QueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1QueryExampleRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/GetQueryPlan": { - "post": { - "summary": "GetQueryPlan gets query plan and plan id for specific filtering.", - "operationId": "GetQueryPlan", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1QueryPlanReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "QueryPlanRequest defines filtering by queryid.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1QueryPlanRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/QueryExists": { - "post": { - "summary": "QueryExists check if query exists in clickhouse.", - "operationId": "QueryExists", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "boolean" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "QueryExistsRequest check if provided query exists or not.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1QueryExistsRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - }, - "/v0/qan/ObjectDetails/SchemaByQueryID": { - "post": { - "summary": "SchemaByQueryID returns schema for given queryID and serviceID.", - "operationId": "SchemaByQueryID", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1SchemaByQueryIDReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "SchemaByQueryIDRequest returns schema for given query ID and service ID.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1SchemaByQueryIDRequest" - } - } - ], - "tags": [ - "ObjectDetails" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1ExampleFormat": { - "type": "string", - "enum": [ - "EXAMPLE_FORMAT_INVALID", - "EXAMPLE", - "FINGERPRINT" - ], - "default": "EXAMPLE_FORMAT_INVALID", - "description": "ExampleFormat is format of query example: real or query without values.\n\nDeprecated: is not used, should not be used, should be removed." - }, - "v1beta1ExampleType": { - "type": "string", - "enum": [ - "EXAMPLE_TYPE_INVALID", - "RANDOM", - "SLOWEST", - "FASTEST", - "WITH_ERROR" - ], - "default": "EXAMPLE_TYPE_INVALID", - "description": "ExampleType is a type of query example selected for this query class in given period of time." - }, - "v1beta1ExplainFingerprintByQueryIDReply": { - "type": "object", - "properties": { - "explain_fingerprint": { - "type": "string" - }, - "placeholders_count": { - "type": "integer", - "format": "int64" - } - }, - "description": "ExplainFingerprintByQueryIDReply is explain fingerprint and placeholders count for given query ID." - }, - "v1beta1ExplainFingerprintByQueryIDRequest": { - "type": "object", - "properties": { - "serviceid": { - "type": "string" - }, - "query_id": { - "type": "string" - } - }, - "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID." - }, - "v1beta1GetSelectedQueryMetadataReply": { - "type": "object", - "properties": { - "service_name": { - "type": "string" - }, - "database": { - "type": "string" - }, - "schema": { - "type": "string" - }, - "username": { - "type": "string" - }, - "replication_set": { - "type": "string" - }, - "cluster": { - "type": "string" - }, - "service_type": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "environment": { - "type": "string" - }, - "node_id": { - "type": "string" - }, - "node_name": { - "type": "string" - }, - "node_type": { - "type": "string" - } - }, - "description": "GetSlecetedQueryMetadataReply consists selected query metadata to show in details for given query ID." - }, - "v1beta1HistogramItem": { - "type": "object", - "properties": { - "range": { - "type": "string" - }, - "frequency": { - "type": "integer", - "format": "int64" - } - }, - "description": "HistogramItem represents one item in histogram." - }, - "v1beta1HistogramReply": { - "type": "object", - "properties": { - "histogram_items": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1HistogramItem" - } - } - }, - "description": "HistogramReply is histogram items as a list." - }, - "v1beta1HistogramRequest": { - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time" - }, - "period_start_to": { - "type": "string", - "format": "date-time" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1MapFieldEntry" - } - }, - "queryid": { - "type": "string" - } - }, - "description": "HistogramRequest defines filtering by time range, labels and queryid." - }, - "v1beta1ListLabelValues": { - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "ListLabelValues is list of label's values." - }, - "v1beta1MapFieldEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}." - }, - "v1beta1MetricValues": { - "type": "object", - "properties": { - "rate": { - "type": "number", - "format": "float" - }, - "cnt": { - "type": "number", - "format": "float" - }, - "sum": { - "type": "number", - "format": "float" - }, - "min": { - "type": "number", - "format": "float" - }, - "max": { - "type": "number", - "format": "float" - }, - "avg": { - "type": "number", - "format": "float" - }, - "p99": { - "type": "number", - "format": "float" - }, - "percent_of_total": { - "type": "number", - "format": "float" - } - }, - "description": "MetricValues is statistics of specific metric." - }, - "v1beta1MetricsReply": { - "type": "object", - "properties": { - "metrics": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1beta1MetricValues" - } - }, - "text_metrics": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "sparkline": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Point" - } - }, - "totals": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1beta1MetricValues" - } - }, - "fingerprint": { - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1beta1GetSelectedQueryMetadataReply" - } - }, - "description": "MetricsReply defines metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." - }, - "v1beta1MetricsRequest": { - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time" - }, - "period_start_to": { - "type": "string", - "format": "date-time" - }, - "filter_by": { - "type": "string", - "description": "dimension value: ex: queryid - 1D410B4BE5060972." - }, - "group_by": { - "type": "string", - "description": "one of dimension: queryid | host ..." - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1MapFieldEntry" - } - }, - "include_only_fields": { - "type": "array", - "items": { - "type": "string" - } - }, - "totals": { - "type": "boolean", - "title": "retrieve only values for totals, excluding N/A values" - } - }, - "description": "MetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." - }, - "v1beta1ObjectDetailsLabelsReply": { - "type": "object", - "properties": { - "labels": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1beta1ListLabelValues" - } - } - }, - "description": "ObjectDetailsLabelsReply is a map of labels names as keys and labels values as a list." - }, - "v1beta1ObjectDetailsLabelsRequest": { - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time" - }, - "period_start_to": { - "type": "string", - "format": "date-time" - }, - "filter_by": { - "type": "string", - "description": "dimension value: ex: queryid - 1D410B4BE5060972." - }, - "group_by": { - "type": "string", - "description": "one of dimension: queryid | host ..." - } - }, - "description": "ObjectDetailsLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." - }, - "v1beta1Point": { - "type": "object", - "properties": { - "point": { - "type": "integer", - "format": "int64", - "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range." - }, - "time_frame": { - "type": "integer", - "format": "int64", - "description": "Duration beetween two points." - }, - "timestamp": { - "type": "string", - "description": "Time of point in format RFC3339." - }, - "load": { - "type": "number", - "format": "float", - "description": "load is query_time / time_range." - }, - "num_queries_per_sec": { - "type": "number", - "format": "float", - "description": "number of queries in bucket." - }, - "num_queries_with_errors_per_sec": { - "type": "number", - "format": "float", - "description": "number of queries with errors." - }, - "num_queries_with_warnings_per_sec": { - "type": "number", - "format": "float", - "description": "number of queries with warnings." - }, - "m_query_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The statement execution time in seconds." - }, - "m_lock_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The time to acquire locks in seconds." - }, - "m_rows_sent_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of rows sent to the client." - }, - "m_rows_examined_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of rows scanned - SELECT." - }, - "m_rows_affected_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of rows changed - UPDATE, DELETE, INSERT." - }, - "m_rows_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of rows read from tables." - }, - "m_merge_passes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of merge passes that the sort algorithm has had to do." - }, - "m_innodb_io_r_ops_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Counts the number of page read operations scheduled." - }, - "m_innodb_io_r_bytes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Similar to innodb_IO_r_ops, but the unit is bytes." - }, - "m_innodb_io_r_wait_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." - }, - "m_innodb_rec_lock_wait_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query waited for row locks." - }, - "m_innodb_queue_wait_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." - }, - "m_innodb_pages_distinct_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Counts approximately the number of unique pages the query accessed." - }, - "m_query_length_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long the query is." - }, - "m_bytes_sent_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of bytes sent to all clients." - }, - "m_tmp_tables_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on memory for the query." - }, - "m_tmp_disk_tables_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on disk for the query." - }, - "m_tmp_table_sizes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total Size in bytes for all temporary tables used in the query." - }, - "m_qc_hit_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Boolean metrics:\n- *_sum_per_sec - how many times this matric was true.\n\nQuery Cache hits." - }, - "m_full_scan_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query performed a full table scan." - }, - "m_full_join_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query performed a full join (a join without indexes)." - }, - "m_tmp_table_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query created an implicit internal temporary table." - }, - "m_tmp_table_on_disk_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The querys temporary table was stored on disk." - }, - "m_filesort_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query used a filesort." - }, - "m_filesort_on_disk_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The filesort was performed on disk." - }, - "m_select_full_range_join_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of joins that used a range search on a reference table." - }, - "m_select_range_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of joins that used ranges on the first table." - }, - "m_select_range_check_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of joins without keys that check for key usage after each row." - }, - "m_sort_range_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done using ranges." - }, - "m_sort_rows_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of sorted rows." - }, - "m_sort_scan_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done by scanning the table." - }, - "m_no_index_used_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of queries without index." - }, - "m_no_good_index_used_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of queries without good index." - }, - "m_docs_returned_sum_per_sec": { - "type": "number", - "format": "float", - "description": "MongoDB metrics.\n\nThe number of returned documents." - }, - "m_response_length_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The response length of the query result in bytes." - }, - "m_docs_scanned_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of scanned documents." - }, - "m_shared_blks_hit_sum_per_sec": { - "type": "number", - "format": "float", - "description": "PostgreSQL metrics.\n\nTotal number of shared block cache hits by the statement." - }, - "m_shared_blks_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks read by the statement." - }, - "m_shared_blks_dirtied_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks dirtied by the statement." - }, - "m_shared_blks_written_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks written by the statement." - }, - "m_local_blks_hit_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local block cache hits by the statement." - }, - "m_local_blks_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local blocks read by the statement." - }, - "m_local_blks_dirtied_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local blocks dirtied by the statement." - }, - "m_local_blks_written_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local blocks written by the statement." - }, - "m_temp_blks_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks read by the statement." - }, - "m_temp_blks_written_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks written by the statement." - }, - "m_blk_read_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_blk_write_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_cpu_user_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time user spent in query." - }, - "m_cpu_sys_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time system spent in query." - }, - "m_plans_calls_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of planned calls.", - "title": "pg_stat_monitor 0.9 metrics" - }, - "m_wal_records_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of WAL (Write-ahead logging) records." - }, - "m_wal_fpi_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." - }, - "m_wal_bytes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total bytes of WAL (Write-ahead logging) records." - }, - "m_plan_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Plan time in per seconds." - } - }, - "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines." - }, - "v1beta1QueryExample": { - "type": "object", - "properties": { - "example": { - "type": "string" - }, - "example_format": { - "$ref": "#/definitions/v1beta1ExampleFormat", - "description": "Deprecated: should not be used, should be removed." - }, - "example_type": { - "$ref": "#/definitions/v1beta1ExampleType" - }, - "is_truncated": { - "type": "integer", - "format": "int64" - }, - "placeholders_count": { - "type": "integer", - "format": "int64" - }, - "explain_fingerprint": { - "type": "string" - }, - "query_id": { - "type": "string" - }, - "example_metrics": { - "type": "string" - }, - "service_id": { - "type": "string" - }, - "service_type": { - "type": "string" - }, - "schema": { - "type": "string" - }, - "tables": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "QueryExample shows query examples and their metrics." - }, - "v1beta1QueryExampleReply": { - "type": "object", - "properties": { - "query_examples": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1QueryExample" - } - } - }, - "description": "QueryExampleReply list of query examples." - }, - "v1beta1QueryExampleRequest": { - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time" - }, - "period_start_to": { - "type": "string", - "format": "date-time" - }, - "filter_by": { - "type": "string", - "description": "dimension value: ex: queryid - 1D410B4BE5060972." - }, - "group_by": { - "type": "string", - "description": "one of dimension: queryid | host ..." - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1MapFieldEntry" - } - }, - "limit": { - "type": "integer", - "format": "int64" - } - }, - "description": "QueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." - }, - "v1beta1QueryExistsRequest": { - "type": "object", - "properties": { - "serviceid": { - "type": "string" - }, - "query": { - "type": "string" - } - }, - "description": "QueryExistsRequest check if provided query exists or not." - }, - "v1beta1QueryPlanReply": { - "type": "object", - "properties": { - "planid": { - "type": "string" - }, - "query_plan": { - "type": "string" - } - }, - "description": "QueryPlanReply contains planid and query_plan." - }, - "v1beta1QueryPlanRequest": { - "type": "object", - "properties": { - "queryid": { - "type": "string" - } - }, - "description": "QueryPlanRequest defines filtering by queryid." - }, - "v1beta1SchemaByQueryIDReply": { - "type": "object", - "properties": { - "schema": { - "type": "string" - } - }, - "description": "SchemaByQueryIDReply is schema for given query ID and service ID." - }, - "v1beta1SchemaByQueryIDRequest": { - "type": "object", - "properties": { - "service_id": { - "type": "string" - }, - "query_id": { - "type": "string" - } - }, - "description": "SchemaByQueryIDRequest returns schema for given query ID and service ID." - } - } -} diff --git a/api/qanpb/object_details_grpc.pb.go b/api/qanpb/object_details_grpc.pb.go index 477bf53b25..26a2bbc5c2 100644 --- a/api/qanpb/object_details_grpc.pb.go +++ b/api/qanpb/object_details_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -156,30 +157,36 @@ type ObjectDetailsServer interface { } // UnimplementedObjectDetailsServer must be embedded to have forward compatible implementations. -type UnimplementedObjectDetailsServer struct { -} +type UnimplementedObjectDetailsServer struct{} func (UnimplementedObjectDetailsServer) GetMetrics(context.Context, *MetricsRequest) (*MetricsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") } + func (UnimplementedObjectDetailsServer) GetQueryExample(context.Context, *QueryExampleRequest) (*QueryExampleReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryExample not implemented") } + func (UnimplementedObjectDetailsServer) GetLabels(context.Context, *ObjectDetailsLabelsRequest) (*ObjectDetailsLabelsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented") } + func (UnimplementedObjectDetailsServer) GetQueryPlan(context.Context, *QueryPlanRequest) (*QueryPlanReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryPlan not implemented") } + func (UnimplementedObjectDetailsServer) GetHistogram(context.Context, *HistogramRequest) (*HistogramReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetHistogram not implemented") } + func (UnimplementedObjectDetailsServer) QueryExists(context.Context, *QueryExistsRequest) (*wrapperspb.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryExists not implemented") } + func (UnimplementedObjectDetailsServer) ExplainFingerprintByQueryID(context.Context, *ExplainFingerprintByQueryIDRequest) (*ExplainFingerprintByQueryIDReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ExplainFingerprintByQueryID not implemented") } + func (UnimplementedObjectDetailsServer) SchemaByQueryID(context.Context, *SchemaByQueryIDRequest) (*SchemaByQueryIDReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SchemaByQueryID not implemented") } diff --git a/api/qanpb/profile.pb.go b/api/qanpb/profile.pb.go index 036a2a6376..7dd2187f5d 100644 --- a/api/qanpb/profile.pb.go +++ b/api/qanpb/profile.pb.go @@ -7,12 +7,13 @@ package qanv1beta1 import ( + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -650,18 +651,21 @@ func file_qanpb_profile_proto_rawDescGZIP() []byte { return file_qanpb_profile_proto_rawDescData } -var file_qanpb_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_qanpb_profile_proto_goTypes = []interface{}{ - (*ReportRequest)(nil), // 0: qan.v1beta1.ReportRequest - (*ReportMapFieldEntry)(nil), // 1: qan.v1beta1.ReportMapFieldEntry - (*ReportReply)(nil), // 2: qan.v1beta1.ReportReply - (*Row)(nil), // 3: qan.v1beta1.Row - (*Metric)(nil), // 4: qan.v1beta1.Metric - (*Stat)(nil), // 5: qan.v1beta1.Stat - nil, // 6: qan.v1beta1.Row.MetricsEntry - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*Point)(nil), // 8: qan.v1beta1.Point -} +var ( + file_qanpb_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) + file_qanpb_profile_proto_goTypes = []interface{}{ + (*ReportRequest)(nil), // 0: qan.v1beta1.ReportRequest + (*ReportMapFieldEntry)(nil), // 1: qan.v1beta1.ReportMapFieldEntry + (*ReportReply)(nil), // 2: qan.v1beta1.ReportReply + (*Row)(nil), // 3: qan.v1beta1.Row + (*Metric)(nil), // 4: qan.v1beta1.Metric + (*Stat)(nil), // 5: qan.v1beta1.Stat + nil, // 6: qan.v1beta1.Row.MetricsEntry + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*Point)(nil), // 8: qan.v1beta1.Point + } +) + var file_qanpb_profile_proto_depIdxs = []int32{ 7, // 0: qan.v1beta1.ReportRequest.period_start_from:type_name -> google.protobuf.Timestamp 7, // 1: qan.v1beta1.ReportRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qanpb/profile.pb.gw.go b/api/qanpb/profile.pb.gw.go index 77dc8b1ae1..ae55db87db 100644 --- a/api/qanpb/profile.pb.gw.go +++ b/api/qanpb/profile.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ReportRequest @@ -45,7 +47,6 @@ func request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.GetReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Ma msg, err := server.GetReport(ctx, &protoReq) return msg, metadata, err - } // RegisterProfileHandlerServer registers the http handlers for service Profile to "mux". @@ -70,7 +70,6 @@ func local_request_Profile_GetReport_0(ctx context.Context, marshaler runtime.Ma // 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 RegisterProfileHandlerFromEndpoint instead. func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServer) error { - mux.Handle("POST", pattern_Profile_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterProfileHandlerServer(ctx context.Context, mux *runtime.ServeMux, se } forward_Profile_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterProfileHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ProfileClient" to call the correct interceptors. func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileClient) error { - mux.Handle("POST", pattern_Profile_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterProfileHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } forward_Profile_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_Profile_GetReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetReport"}, "")) -) +var pattern_Profile_GetReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "qan", "GetReport"}, "")) -var ( - forward_Profile_GetReport_0 = runtime.ForwardResponseMessage -) +var forward_Profile_GetReport_0 = runtime.ForwardResponseMessage diff --git a/api/qanpb/profile.swagger.json b/api/qanpb/profile.swagger.json deleted file mode 100644 index 3086720961..0000000000 --- a/api/qanpb/profile.swagger.json +++ /dev/null @@ -1,578 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "qanpb/profile.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Profile" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v0/qan/GetReport": { - "post": { - "summary": "GetReport returns list of metrics group by queryid or other dimentions.", - "operationId": "GetReport", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ReportReply" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "ReportRequest defines filtering of metrics report for db server or other dimentions.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1ReportRequest" - } - } - ], - "tags": [ - "Profile" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1Metric": { - "type": "object", - "properties": { - "stats": { - "$ref": "#/definitions/v1beta1Stat" - } - }, - "description": "Metric cell." - }, - "v1beta1Point": { - "type": "object", - "properties": { - "point": { - "type": "integer", - "format": "int64", - "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range." - }, - "time_frame": { - "type": "integer", - "format": "int64", - "description": "Duration beetween two points." - }, - "timestamp": { - "type": "string", - "description": "Time of point in format RFC3339." - }, - "load": { - "type": "number", - "format": "float", - "description": "load is query_time / time_range." - }, - "num_queries_per_sec": { - "type": "number", - "format": "float", - "description": "number of queries in bucket." - }, - "num_queries_with_errors_per_sec": { - "type": "number", - "format": "float", - "description": "number of queries with errors." - }, - "num_queries_with_warnings_per_sec": { - "type": "number", - "format": "float", - "description": "number of queries with warnings." - }, - "m_query_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The statement execution time in seconds." - }, - "m_lock_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The time to acquire locks in seconds." - }, - "m_rows_sent_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of rows sent to the client." - }, - "m_rows_examined_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of rows scanned - SELECT." - }, - "m_rows_affected_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of rows changed - UPDATE, DELETE, INSERT." - }, - "m_rows_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of rows read from tables." - }, - "m_merge_passes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of merge passes that the sort algorithm has had to do." - }, - "m_innodb_io_r_ops_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Counts the number of page read operations scheduled." - }, - "m_innodb_io_r_bytes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Similar to innodb_IO_r_ops, but the unit is bytes." - }, - "m_innodb_io_r_wait_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." - }, - "m_innodb_rec_lock_wait_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query waited for row locks." - }, - "m_innodb_queue_wait_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." - }, - "m_innodb_pages_distinct_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Counts approximately the number of unique pages the query accessed." - }, - "m_query_length_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Shows how long the query is." - }, - "m_bytes_sent_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of bytes sent to all clients." - }, - "m_tmp_tables_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on memory for the query." - }, - "m_tmp_disk_tables_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Number of temporary tables created on disk for the query." - }, - "m_tmp_table_sizes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total Size in bytes for all temporary tables used in the query." - }, - "m_qc_hit_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Boolean metrics:\n- *_sum_per_sec - how many times this matric was true.\n\nQuery Cache hits." - }, - "m_full_scan_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query performed a full table scan." - }, - "m_full_join_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query performed a full join (a join without indexes)." - }, - "m_tmp_table_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query created an implicit internal temporary table." - }, - "m_tmp_table_on_disk_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The querys temporary table was stored on disk." - }, - "m_filesort_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The query used a filesort." - }, - "m_filesort_on_disk_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The filesort was performed on disk." - }, - "m_select_full_range_join_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of joins that used a range search on a reference table." - }, - "m_select_range_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of joins that used ranges on the first table." - }, - "m_select_range_check_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of joins without keys that check for key usage after each row." - }, - "m_sort_range_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done using ranges." - }, - "m_sort_rows_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of sorted rows." - }, - "m_sort_scan_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of sorts that were done by scanning the table." - }, - "m_no_index_used_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of queries without index." - }, - "m_no_good_index_used_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of queries without good index." - }, - "m_docs_returned_sum_per_sec": { - "type": "number", - "format": "float", - "description": "MongoDB metrics.\n\nThe number of returned documents." - }, - "m_response_length_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The response length of the query result in bytes." - }, - "m_docs_scanned_sum_per_sec": { - "type": "number", - "format": "float", - "description": "The number of scanned documents." - }, - "m_shared_blks_hit_sum_per_sec": { - "type": "number", - "format": "float", - "description": "PostgreSQL metrics.\n\nTotal number of shared block cache hits by the statement." - }, - "m_shared_blks_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks read by the statement." - }, - "m_shared_blks_dirtied_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks dirtied by the statement." - }, - "m_shared_blks_written_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of shared blocks written by the statement." - }, - "m_local_blks_hit_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local block cache hits by the statement." - }, - "m_local_blks_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local blocks read by the statement." - }, - "m_local_blks_dirtied_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local blocks dirtied by the statement." - }, - "m_local_blks_written_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of local blocks written by the statement." - }, - "m_temp_blks_read_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks read by the statement." - }, - "m_temp_blks_written_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of temp blocks written by the statement." - }, - "m_blk_read_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_blk_write_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." - }, - "m_cpu_user_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time user spent in query." - }, - "m_cpu_sys_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total time system spent in query." - }, - "m_plans_calls_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of planned calls.", - "title": "pg_stat_monitor 0.9 metrics" - }, - "m_wal_records_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of WAL (Write-ahead logging) records." - }, - "m_wal_fpi_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." - }, - "m_wal_bytes_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Total bytes of WAL (Write-ahead logging) records." - }, - "m_plan_time_sum_per_sec": { - "type": "number", - "format": "float", - "description": "Plan time in per seconds." - } - }, - "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines." - }, - "v1beta1ReportMapFieldEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "description": "ReportMapFieldEntry allows to pass labels/dimentions in form like {\"server\": [\"db1\", \"db2\"...]}." - }, - "v1beta1ReportReply": { - "type": "object", - "properties": { - "total_rows": { - "type": "integer", - "format": "int64" - }, - "offset": { - "type": "integer", - "format": "int64" - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "rows": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Row" - } - } - }, - "description": "ReportReply is list of reports per quieryids, hosts etc." - }, - "v1beta1ReportRequest": { - "type": "object", - "properties": { - "period_start_from": { - "type": "string", - "format": "date-time" - }, - "period_start_to": { - "type": "string", - "format": "date-time" - }, - "group_by": { - "type": "string" - }, - "labels": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1ReportMapFieldEntry" - } - }, - "columns": { - "type": "array", - "items": { - "type": "string" - } - }, - "order_by": { - "type": "string" - }, - "offset": { - "type": "integer", - "format": "int64" - }, - "limit": { - "type": "integer", - "format": "int64" - }, - "main_metric": { - "type": "string" - }, - "search": { - "type": "string" - } - }, - "description": "ReportRequest defines filtering of metrics report for db server or other dimentions." - }, - "v1beta1Row": { - "type": "object", - "properties": { - "rank": { - "type": "integer", - "format": "int64" - }, - "dimension": { - "type": "string" - }, - "database": { - "type": "string" - }, - "metrics": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v1beta1Metric" - } - }, - "sparkline": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1beta1Point" - } - }, - "fingerprint": { - "type": "string" - }, - "num_queries": { - "type": "integer", - "format": "int64" - }, - "qps": { - "type": "number", - "format": "float" - }, - "load": { - "type": "number", - "format": "float" - } - }, - "description": "Row define metrics for selected dimention." - }, - "v1beta1Stat": { - "type": "object", - "properties": { - "rate": { - "type": "number", - "format": "float" - }, - "cnt": { - "type": "number", - "format": "float" - }, - "sum": { - "type": "number", - "format": "float" - }, - "min": { - "type": "number", - "format": "float" - }, - "max": { - "type": "number", - "format": "float" - }, - "p99": { - "type": "number", - "format": "float" - }, - "avg": { - "type": "number", - "format": "float" - }, - "sum_per_sec": { - "type": "number", - "format": "float" - } - }, - "description": "Stat is statistics of specific metric." - } - } -} diff --git a/api/qanpb/profile_grpc.pb.go b/api/qanpb/profile_grpc.pb.go index f0d7a3c7fd..bcabfb75b5 100644 --- a/api/qanpb/profile_grpc.pb.go +++ b/api/qanpb/profile_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type ProfileServer interface { } // UnimplementedProfileServer must be embedded to have forward compatible implementations. -type UnimplementedProfileServer struct { -} +type UnimplementedProfileServer struct{} func (UnimplementedProfileServer) GetReport(context.Context, *ReportRequest) (*ReportReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetReport not implemented") diff --git a/api/qanpb/qan.pb.go b/api/qanpb/qan.pb.go index a633f3578d..6e1c222061 100644 --- a/api/qanpb/qan.pb.go +++ b/api/qanpb/qan.pb.go @@ -7,10 +7,11 @@ package qanv1beta1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -1068,14 +1069,17 @@ func file_qanpb_qan_proto_rawDescGZIP() []byte { return file_qanpb_qan_proto_rawDescData } -var file_qanpb_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_qanpb_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_qanpb_qan_proto_goTypes = []interface{}{ - (ExampleFormat)(0), // 0: qan.v1beta1.ExampleFormat - (ExampleType)(0), // 1: qan.v1beta1.ExampleType - (*Point)(nil), // 2: qan.v1beta1.Point - (*MapFieldEntry)(nil), // 3: qan.v1beta1.MapFieldEntry -} +var ( + file_qanpb_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_qanpb_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) + file_qanpb_qan_proto_goTypes = []interface{}{ + (ExampleFormat)(0), // 0: qan.v1beta1.ExampleFormat + (ExampleType)(0), // 1: qan.v1beta1.ExampleType + (*Point)(nil), // 2: qan.v1beta1.Point + (*MapFieldEntry)(nil), // 3: qan.v1beta1.MapFieldEntry + } +) + var file_qanpb_qan_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/qanpb/qan.swagger.json b/api/qanpb/qan.swagger.json deleted file mode 100644 index 8fb0639b0c..0000000000 --- a/api/qanpb/qan.swagger.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "qanpb/qan.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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/serverpb/httperror.pb.go b/api/serverpb/httperror.pb.go index 4de4e86868..1493004782 100644 --- a/api/serverpb/httperror.pb.go +++ b/api/serverpb/httperror.pb.go @@ -7,11 +7,12 @@ package serverpb import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" ) const ( @@ -134,11 +135,14 @@ func file_serverpb_httperror_proto_rawDescGZIP() []byte { return file_serverpb_httperror_proto_rawDescData } -var file_serverpb_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_serverpb_httperror_proto_goTypes = []interface{}{ - (*HttpError)(nil), // 0: server.HttpError - (*anypb.Any)(nil), // 1: google.protobuf.Any -} +var ( + file_serverpb_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) + file_serverpb_httperror_proto_goTypes = []interface{}{ + (*HttpError)(nil), // 0: server.HttpError + (*anypb.Any)(nil), // 1: google.protobuf.Any + } +) + var file_serverpb_httperror_proto_depIdxs = []int32{ 1, // 0: server.HttpError.details:type_name -> google.protobuf.Any 1, // [1:1] is the sub-list for method output_type diff --git a/api/serverpb/httperror.swagger.json b/api/serverpb/httperror.swagger.json deleted file mode 100644 index 704f3f310f..0000000000 --- a/api/serverpb/httperror.swagger.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "serverpb/httperror.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - } - }, - "additionalProperties": {}, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - } - } -} diff --git a/api/serverpb/json/client/server/aws_instance_check_parameters.go b/api/serverpb/json/client/server/aws_instance_check_parameters.go index 5dc132624f..07381b0506 100644 --- a/api/serverpb/json/client/server/aws_instance_check_parameters.go +++ b/api/serverpb/json/client/server/aws_instance_check_parameters.go @@ -60,7 +60,6 @@ AWSInstanceCheckParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AWSInstanceCheckParams struct { - // Body. Body AWSInstanceCheckBody @@ -130,7 +129,6 @@ func (o *AWSInstanceCheckParams) SetBody(body AWSInstanceCheckBody) { // WriteToRequest writes these params to a swagger request func (o *AWSInstanceCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/aws_instance_check_responses.go b/api/serverpb/json/client/server/aws_instance_check_responses.go index 5e2cd9d040..84b4d576b0 100644 --- a/api/serverpb/json/client/server/aws_instance_check_responses.go +++ b/api/serverpb/json/client/server/aws_instance_check_responses.go @@ -60,12 +60,12 @@ type AWSInstanceCheckOK struct { func (o *AWSInstanceCheckOK) Error() string { return fmt.Sprintf("[POST /v1/AWSInstanceCheck][%d] awsInstanceCheckOk %+v", 200, o.Payload) } + func (o *AWSInstanceCheckOK) GetPayload() interface{} { return o.Payload } func (o *AWSInstanceCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *AWSInstanceCheckDefault) Code() int { func (o *AWSInstanceCheckDefault) Error() string { return fmt.Sprintf("[POST /v1/AWSInstanceCheck][%d] AWSInstanceCheck default %+v", o._statusCode, o.Payload) } + func (o *AWSInstanceCheckDefault) GetPayload() *AWSInstanceCheckDefaultBody { return o.Payload } func (o *AWSInstanceCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AWSInstanceCheckDefaultBody) // response payload @@ -121,7 +121,6 @@ AWSInstanceCheckBody AWS instance check body swagger:model AWSInstanceCheckBody */ type AWSInstanceCheckBody struct { - // AWS EC2 instance ID (i-1234567890abcdef0). InstanceID string `json:"instance_id,omitempty"` } @@ -159,7 +158,6 @@ AWSInstanceCheckDefaultBody AWS instance check default body swagger:model AWSInstanceCheckDefaultBody */ type AWSInstanceCheckDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -225,9 +223,7 @@ func (o *AWSInstanceCheckDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AWSInstanceCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -238,7 +234,6 @@ func (o *AWSInstanceCheckDefaultBody) contextValidateDetails(ctx context.Context return err } } - } return nil @@ -351,7 +346,6 @@ AWSInstanceCheckDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized swagger:model AWSInstanceCheckDefaultBodyDetailsItems0 */ type AWSInstanceCheckDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/serverpb/json/client/server/change_settings_parameters.go b/api/serverpb/json/client/server/change_settings_parameters.go index ea84b96ead..eb5dc182f6 100644 --- a/api/serverpb/json/client/server/change_settings_parameters.go +++ b/api/serverpb/json/client/server/change_settings_parameters.go @@ -60,7 +60,6 @@ ChangeSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeSettingsParams struct { - // Body. Body ChangeSettingsBody @@ -130,7 +129,6 @@ func (o *ChangeSettingsParams) SetBody(body ChangeSettingsBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/change_settings_responses.go b/api/serverpb/json/client/server/change_settings_responses.go index 9083bf25be..2b8002e621 100644 --- a/api/serverpb/json/client/server/change_settings_responses.go +++ b/api/serverpb/json/client/server/change_settings_responses.go @@ -60,12 +60,12 @@ type ChangeSettingsOK struct { func (o *ChangeSettingsOK) Error() string { return fmt.Sprintf("[POST /v1/Settings/Change][%d] changeSettingsOk %+v", 200, o.Payload) } + func (o *ChangeSettingsOK) GetPayload() *ChangeSettingsOKBody { return o.Payload } func (o *ChangeSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeSettingsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ChangeSettingsDefault) Code() int { func (o *ChangeSettingsDefault) Error() string { return fmt.Sprintf("[POST /v1/Settings/Change][%d] ChangeSettings default %+v", o._statusCode, o.Payload) } + func (o *ChangeSettingsDefault) GetPayload() *ChangeSettingsDefaultBody { return o.Payload } func (o *ChangeSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeSettingsDefaultBody) // response payload @@ -123,7 +123,6 @@ ChangeSettingsBody change settings body swagger:model ChangeSettingsBody */ type ChangeSettingsBody struct { - // enable updates EnableUpdates bool `json:"enable_updates,omitempty"` @@ -344,7 +343,6 @@ func (o *ChangeSettingsBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeSettingsBody) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -360,7 +358,6 @@ func (o *ChangeSettingsBody) contextValidateEmailAlertingSettings(ctx context.Co } func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -376,7 +373,6 @@ func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Conte } func (o *ChangeSettingsBody) contextValidateSlackAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.SlackAlertingSettings != nil { if err := o.SlackAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -392,7 +388,6 @@ func (o *ChangeSettingsBody) contextValidateSlackAlertingSettings(ctx context.Co } func (o *ChangeSettingsBody) contextValidateSttCheckIntervals(ctx context.Context, formats strfmt.Registry) error { - if o.SttCheckIntervals != nil { if err := o.SttCheckIntervals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -430,7 +425,6 @@ ChangeSettingsDefaultBody change settings default body swagger:model ChangeSettingsDefaultBody */ type ChangeSettingsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -496,9 +490,7 @@ func (o *ChangeSettingsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -509,7 +501,6 @@ func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -622,7 +613,6 @@ ChangeSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ChangeSettingsDefaultBodyDetailsItems0 */ type ChangeSettingsDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -686,7 +676,6 @@ ChangeSettingsOKBody change settings OK body swagger:model ChangeSettingsOKBody */ type ChangeSettingsOKBody struct { - // settings Settings *ChangeSettingsOKBodySettings `json:"settings,omitempty"` } @@ -739,7 +728,6 @@ func (o *ChangeSettingsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ChangeSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - if o.Settings != nil { if err := o.Settings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -777,7 +765,6 @@ ChangeSettingsOKBodySettings Settings represents PMM Server settings. swagger:model ChangeSettingsOKBodySettings */ type ChangeSettingsOKBodySettings struct { - // True if updates are disabled. UpdatesDisabled bool `json:"updates_disabled,omitempty"` @@ -974,7 +961,6 @@ func (o *ChangeSettingsOKBodySettings) ContextValidate(ctx context.Context, form } func (o *ChangeSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -990,7 +976,6 @@ func (o *ChangeSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx } func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1006,7 +991,6 @@ func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx con } func (o *ChangeSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.SlackAlertingSettings != nil { if err := o.SlackAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1022,7 +1006,6 @@ func (o *ChangeSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx } func (o *ChangeSettingsOKBodySettings) contextValidateSttCheckIntervals(ctx context.Context, formats strfmt.Registry) error { - if o.SttCheckIntervals != nil { if err := o.SttCheckIntervals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -1060,7 +1043,6 @@ ChangeSettingsOKBodySettingsEmailAlertingSettings EmailAlertingSettings represen swagger:model ChangeSettingsOKBodySettingsEmailAlertingSettings */ type ChangeSettingsOKBodySettingsEmailAlertingSettings struct { - // SMTP From header field. From string `json:"from,omitempty"` @@ -1119,7 +1101,6 @@ ChangeSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeSettingsOKBodySettingsMetricsResolutions */ type ChangeSettingsOKBodySettingsMetricsResolutions struct { - // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1163,7 +1144,6 @@ ChangeSettingsOKBodySettingsSlackAlertingSettings SlackAlertingSettings represen swagger:model ChangeSettingsOKBodySettingsSlackAlertingSettings */ type ChangeSettingsOKBodySettingsSlackAlertingSettings struct { - // Slack API (webhook) URL. URL string `json:"url,omitempty"` } @@ -1201,7 +1181,6 @@ ChangeSettingsOKBodySettingsSttCheckIntervals STTCheckIntervals represents inter swagger:model ChangeSettingsOKBodySettingsSttCheckIntervals */ type ChangeSettingsOKBodySettingsSttCheckIntervals struct { - // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1245,7 +1224,6 @@ ChangeSettingsParamsBodyEmailAlertingSettings EmailAlertingSettings represents e swagger:model ChangeSettingsParamsBodyEmailAlertingSettings */ type ChangeSettingsParamsBodyEmailAlertingSettings struct { - // SMTP From header field. From string `json:"from,omitempty"` @@ -1304,7 +1282,6 @@ ChangeSettingsParamsBodyMetricsResolutions MetricsResolutions represents Prometh swagger:model ChangeSettingsParamsBodyMetricsResolutions */ type ChangeSettingsParamsBodyMetricsResolutions struct { - // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1348,7 +1325,6 @@ ChangeSettingsParamsBodySlackAlertingSettings SlackAlertingSettings represents S swagger:model ChangeSettingsParamsBodySlackAlertingSettings */ type ChangeSettingsParamsBodySlackAlertingSettings struct { - // Slack API (webhook) URL. URL string `json:"url,omitempty"` } @@ -1386,7 +1362,6 @@ ChangeSettingsParamsBodySttCheckIntervals STTCheckIntervals represents intervals swagger:model ChangeSettingsParamsBodySttCheckIntervals */ type ChangeSettingsParamsBodySttCheckIntervals struct { - // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` diff --git a/api/serverpb/json/client/server/check_updates_parameters.go b/api/serverpb/json/client/server/check_updates_parameters.go index 71a36c3c14..41df75a538 100644 --- a/api/serverpb/json/client/server/check_updates_parameters.go +++ b/api/serverpb/json/client/server/check_updates_parameters.go @@ -60,7 +60,6 @@ CheckUpdatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CheckUpdatesParams struct { - // Body. Body CheckUpdatesBody @@ -130,7 +129,6 @@ func (o *CheckUpdatesParams) SetBody(body CheckUpdatesBody) { // WriteToRequest writes these params to a swagger request func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/check_updates_responses.go b/api/serverpb/json/client/server/check_updates_responses.go index faf384871f..cec3a2d77a 100644 --- a/api/serverpb/json/client/server/check_updates_responses.go +++ b/api/serverpb/json/client/server/check_updates_responses.go @@ -61,12 +61,12 @@ type CheckUpdatesOK struct { func (o *CheckUpdatesOK) Error() string { return fmt.Sprintf("[POST /v1/Updates/Check][%d] checkUpdatesOk %+v", 200, o.Payload) } + func (o *CheckUpdatesOK) GetPayload() *CheckUpdatesOKBody { return o.Payload } func (o *CheckUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CheckUpdatesOKBody) // response payload @@ -103,12 +103,12 @@ func (o *CheckUpdatesDefault) Code() int { func (o *CheckUpdatesDefault) Error() string { return fmt.Sprintf("[POST /v1/Updates/Check][%d] CheckUpdates default %+v", o._statusCode, o.Payload) } + func (o *CheckUpdatesDefault) GetPayload() *CheckUpdatesDefaultBody { return o.Payload } func (o *CheckUpdatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CheckUpdatesDefaultBody) // response payload @@ -124,7 +124,6 @@ CheckUpdatesBody check updates body swagger:model CheckUpdatesBody */ type CheckUpdatesBody struct { - // If false, cached information may be returned. Force bool `json:"force,omitempty"` @@ -165,7 +164,6 @@ CheckUpdatesDefaultBody check updates default body swagger:model CheckUpdatesDefaultBody */ type CheckUpdatesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -231,9 +229,7 @@ func (o *CheckUpdatesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -244,7 +240,6 @@ func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -357,7 +352,6 @@ CheckUpdatesDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model CheckUpdatesDefaultBodyDetailsItems0 */ type CheckUpdatesDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -421,7 +415,6 @@ CheckUpdatesOKBody check updates OK body swagger:model CheckUpdatesOKBody */ type CheckUpdatesOKBody struct { - // True if there is a PMM Server update available. UpdateAvailable bool `json:"update_available,omitempty"` @@ -530,7 +523,6 @@ func (o *CheckUpdatesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, formats strfmt.Registry) error { - if o.Installed != nil { if err := o.Installed.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -546,7 +538,6 @@ func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, forma } func (o *CheckUpdatesOKBody) contextValidateLatest(ctx context.Context, formats strfmt.Registry) error { - if o.Latest != nil { if err := o.Latest.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -584,7 +575,6 @@ CheckUpdatesOKBodyInstalled VersionInfo describes component version, or PMM Serv swagger:model CheckUpdatesOKBodyInstalled */ type CheckUpdatesOKBodyInstalled struct { - // User-visible version. Version string `json:"version,omitempty"` @@ -650,7 +640,6 @@ CheckUpdatesOKBodyLatest VersionInfo describes component version, or PMM Server swagger:model CheckUpdatesOKBodyLatest */ type CheckUpdatesOKBodyLatest struct { - // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/serverpb/json/client/server/get_settings_parameters.go b/api/serverpb/json/client/server/get_settings_parameters.go index e7bf706e9d..286fc45f4d 100644 --- a/api/serverpb/json/client/server/get_settings_parameters.go +++ b/api/serverpb/json/client/server/get_settings_parameters.go @@ -60,7 +60,6 @@ GetSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetSettingsParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *GetSettingsParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/get_settings_responses.go b/api/serverpb/json/client/server/get_settings_responses.go index b1902525c8..3d40aa6583 100644 --- a/api/serverpb/json/client/server/get_settings_responses.go +++ b/api/serverpb/json/client/server/get_settings_responses.go @@ -60,12 +60,12 @@ type GetSettingsOK struct { func (o *GetSettingsOK) Error() string { return fmt.Sprintf("[POST /v1/Settings/Get][%d] getSettingsOk %+v", 200, o.Payload) } + func (o *GetSettingsOK) GetPayload() *GetSettingsOKBody { return o.Payload } func (o *GetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetSettingsOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetSettingsDefault) Code() int { func (o *GetSettingsDefault) Error() string { return fmt.Sprintf("[POST /v1/Settings/Get][%d] GetSettings default %+v", o._statusCode, o.Payload) } + func (o *GetSettingsDefault) GetPayload() *GetSettingsDefaultBody { return o.Payload } func (o *GetSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetSettingsDefaultBody) // response payload @@ -123,7 +123,6 @@ GetSettingsDefaultBody get settings default body swagger:model GetSettingsDefaultBody */ type GetSettingsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *GetSettingsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -315,7 +311,6 @@ GetSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model GetSettingsDefaultBodyDetailsItems0 */ type GetSettingsDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -379,7 +374,6 @@ GetSettingsOKBody get settings OK body swagger:model GetSettingsOKBody */ type GetSettingsOKBody struct { - // settings Settings *GetSettingsOKBodySettings `json:"settings,omitempty"` } @@ -432,7 +426,6 @@ func (o *GetSettingsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - if o.Settings != nil { if err := o.Settings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -470,7 +463,6 @@ GetSettingsOKBodySettings Settings represents PMM Server settings. swagger:model GetSettingsOKBodySettings */ type GetSettingsOKBodySettings struct { - // True if updates are disabled. UpdatesDisabled bool `json:"updates_disabled,omitempty"` @@ -667,7 +659,6 @@ func (o *GetSettingsOKBodySettings) ContextValidate(ctx context.Context, formats } func (o *GetSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -683,7 +674,6 @@ func (o *GetSettingsOKBodySettings) contextValidateEmailAlertingSettings(ctx con } func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if err := o.MetricsResolutions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -699,7 +689,6 @@ func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx contex } func (o *GetSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.SlackAlertingSettings != nil { if err := o.SlackAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -715,7 +704,6 @@ func (o *GetSettingsOKBodySettings) contextValidateSlackAlertingSettings(ctx con } func (o *GetSettingsOKBodySettings) contextValidateSttCheckIntervals(ctx context.Context, formats strfmt.Registry) error { - if o.SttCheckIntervals != nil { if err := o.SttCheckIntervals.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -753,7 +741,6 @@ GetSettingsOKBodySettingsEmailAlertingSettings EmailAlertingSettings represents swagger:model GetSettingsOKBodySettingsEmailAlertingSettings */ type GetSettingsOKBodySettingsEmailAlertingSettings struct { - // SMTP From header field. From string `json:"from,omitempty"` @@ -812,7 +799,6 @@ GetSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Promet swagger:model GetSettingsOKBodySettingsMetricsResolutions */ type GetSettingsOKBodySettingsMetricsResolutions struct { - // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -856,7 +842,6 @@ GetSettingsOKBodySettingsSlackAlertingSettings SlackAlertingSettings represents swagger:model GetSettingsOKBodySettingsSlackAlertingSettings */ type GetSettingsOKBodySettingsSlackAlertingSettings struct { - // Slack API (webhook) URL. URL string `json:"url,omitempty"` } @@ -894,7 +879,6 @@ GetSettingsOKBodySettingsSttCheckIntervals STTCheckIntervals represents interval swagger:model GetSettingsOKBodySettingsSttCheckIntervals */ type GetSettingsOKBodySettingsSttCheckIntervals struct { - // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` diff --git a/api/serverpb/json/client/server/logs_parameters.go b/api/serverpb/json/client/server/logs_parameters.go index 787e34ced5..2463907eae 100644 --- a/api/serverpb/json/client/server/logs_parameters.go +++ b/api/serverpb/json/client/server/logs_parameters.go @@ -61,7 +61,6 @@ LogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type LogsParams struct { - /* Pprof. Include performance profiling data, @@ -134,7 +133,6 @@ func (o *LogsParams) SetPprof(pprof *bool) { // WriteToRequest writes these params to a swagger request func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -150,7 +148,6 @@ func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry } qPprof := swag.FormatBool(qrPprof) if qPprof != "" { - if err := r.SetQueryParam("pprof", qPprof); err != nil { return err } diff --git a/api/serverpb/json/client/server/logs_responses.go b/api/serverpb/json/client/server/logs_responses.go index b3c3261f74..ef66827e2e 100644 --- a/api/serverpb/json/client/server/logs_responses.go +++ b/api/serverpb/json/client/server/logs_responses.go @@ -45,7 +45,6 @@ func (o *LogsReader) ReadResponse(response runtime.ClientResponse, consumer runt // NewLogsOK creates a LogsOK with default headers values func NewLogsOK(writer io.Writer) *LogsOK { return &LogsOK{ - Payload: writer, } } @@ -62,12 +61,12 @@ type LogsOK struct { func (o *LogsOK) Error() string { return fmt.Sprintf("[GET /logs.zip][%d] logsOk %+v", 200, o.Payload) } + func (o *LogsOK) GetPayload() io.Writer { return o.Payload } func (o *LogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err @@ -102,12 +101,12 @@ func (o *LogsDefault) Code() int { func (o *LogsDefault) Error() string { return fmt.Sprintf("[GET /logs.zip][%d] Logs default %+v", o._statusCode, o.Payload) } + func (o *LogsDefault) GetPayload() *LogsDefaultBody { return o.Payload } func (o *LogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(LogsDefaultBody) // response payload @@ -123,7 +122,6 @@ LogsDefaultBody ErrorResponse is a message returned on HTTP error. swagger:model LogsDefaultBody */ type LogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` diff --git a/api/serverpb/json/client/server/readiness_parameters.go b/api/serverpb/json/client/server/readiness_parameters.go index 3ea1fa1a59..0389af80fe 100644 --- a/api/serverpb/json/client/server/readiness_parameters.go +++ b/api/serverpb/json/client/server/readiness_parameters.go @@ -115,7 +115,6 @@ func (o *ReadinessParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ReadinessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/readiness_responses.go b/api/serverpb/json/client/server/readiness_responses.go index afac1b172c..9920833a8a 100644 --- a/api/serverpb/json/client/server/readiness_responses.go +++ b/api/serverpb/json/client/server/readiness_responses.go @@ -60,12 +60,12 @@ type ReadinessOK struct { func (o *ReadinessOK) Error() string { return fmt.Sprintf("[GET /v1/readyz][%d] readinessOk %+v", 200, o.Payload) } + func (o *ReadinessOK) GetPayload() interface{} { return o.Payload } func (o *ReadinessOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *ReadinessDefault) Code() int { func (o *ReadinessDefault) Error() string { return fmt.Sprintf("[GET /v1/readyz][%d] Readiness default %+v", o._statusCode, o.Payload) } + func (o *ReadinessDefault) GetPayload() *ReadinessDefaultBody { return o.Payload } func (o *ReadinessDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ReadinessDefaultBody) // response payload @@ -121,7 +121,6 @@ ReadinessDefaultBody readiness default body swagger:model ReadinessDefaultBody */ type ReadinessDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -187,9 +186,7 @@ func (o *ReadinessDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -200,7 +197,6 @@ func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -313,7 +309,6 @@ ReadinessDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protoco swagger:model ReadinessDefaultBodyDetailsItems0 */ type ReadinessDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/serverpb/json/client/server/start_update_parameters.go b/api/serverpb/json/client/server/start_update_parameters.go index 4b070636e0..514a1b9d38 100644 --- a/api/serverpb/json/client/server/start_update_parameters.go +++ b/api/serverpb/json/client/server/start_update_parameters.go @@ -60,7 +60,6 @@ StartUpdateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartUpdateParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *StartUpdateParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *StartUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/start_update_responses.go b/api/serverpb/json/client/server/start_update_responses.go index 3abb57bea6..81ea850bb2 100644 --- a/api/serverpb/json/client/server/start_update_responses.go +++ b/api/serverpb/json/client/server/start_update_responses.go @@ -60,12 +60,12 @@ type StartUpdateOK struct { func (o *StartUpdateOK) Error() string { return fmt.Sprintf("[POST /v1/Updates/Start][%d] startUpdateOk %+v", 200, o.Payload) } + func (o *StartUpdateOK) GetPayload() *StartUpdateOKBody { return o.Payload } func (o *StartUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartUpdateOKBody) // response payload @@ -102,12 +102,12 @@ func (o *StartUpdateDefault) Code() int { func (o *StartUpdateDefault) Error() string { return fmt.Sprintf("[POST /v1/Updates/Start][%d] StartUpdate default %+v", o._statusCode, o.Payload) } + func (o *StartUpdateDefault) GetPayload() *StartUpdateDefaultBody { return o.Payload } func (o *StartUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartUpdateDefaultBody) // response payload @@ -123,7 +123,6 @@ StartUpdateDefaultBody start update default body swagger:model StartUpdateDefaultBody */ type StartUpdateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *StartUpdateDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -315,7 +311,6 @@ StartUpdateDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model StartUpdateDefaultBodyDetailsItems0 */ type StartUpdateDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -379,7 +374,6 @@ StartUpdateOKBody start update OK body swagger:model StartUpdateOKBody */ type StartUpdateOKBody struct { - // Authentication token for getting update statuses. AuthToken string `json:"auth_token,omitempty"` diff --git a/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go b/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go index fd9d46d8ff..df14058507 100644 --- a/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go +++ b/api/serverpb/json/client/server/test_email_alerting_settings_parameters.go @@ -60,7 +60,6 @@ TestEmailAlertingSettingsParams contains all the parameters to send to the API e Typically these are written to a http.Request. */ type TestEmailAlertingSettingsParams struct { - // Body. Body TestEmailAlertingSettingsBody @@ -130,7 +129,6 @@ func (o *TestEmailAlertingSettingsParams) SetBody(body TestEmailAlertingSettings // WriteToRequest writes these params to a swagger request func (o *TestEmailAlertingSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/test_email_alerting_settings_responses.go b/api/serverpb/json/client/server/test_email_alerting_settings_responses.go index 8d54608ee6..d244764a80 100644 --- a/api/serverpb/json/client/server/test_email_alerting_settings_responses.go +++ b/api/serverpb/json/client/server/test_email_alerting_settings_responses.go @@ -60,12 +60,12 @@ type TestEmailAlertingSettingsOK struct { func (o *TestEmailAlertingSettingsOK) Error() string { return fmt.Sprintf("[POST /v1/Settings/TestEmailAlertingSettings][%d] testEmailAlertingSettingsOk %+v", 200, o.Payload) } + func (o *TestEmailAlertingSettingsOK) GetPayload() interface{} { return o.Payload } func (o *TestEmailAlertingSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -100,12 +100,12 @@ func (o *TestEmailAlertingSettingsDefault) Code() int { func (o *TestEmailAlertingSettingsDefault) Error() string { return fmt.Sprintf("[POST /v1/Settings/TestEmailAlertingSettings][%d] TestEmailAlertingSettings default %+v", o._statusCode, o.Payload) } + func (o *TestEmailAlertingSettingsDefault) GetPayload() *TestEmailAlertingSettingsDefaultBody { return o.Payload } func (o *TestEmailAlertingSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(TestEmailAlertingSettingsDefaultBody) // response payload @@ -121,7 +121,6 @@ TestEmailAlertingSettingsBody test email alerting settings body swagger:model TestEmailAlertingSettingsBody */ type TestEmailAlertingSettingsBody struct { - // Target email address to send the email to. EmailTo string `json:"email_to,omitempty"` @@ -177,7 +176,6 @@ func (o *TestEmailAlertingSettingsBody) ContextValidate(ctx context.Context, for } func (o *TestEmailAlertingSettingsBody) contextValidateEmailAlertingSettings(ctx context.Context, formats strfmt.Registry) error { - if o.EmailAlertingSettings != nil { if err := o.EmailAlertingSettings.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -215,7 +213,6 @@ TestEmailAlertingSettingsDefaultBody test email alerting settings default body swagger:model TestEmailAlertingSettingsDefaultBody */ type TestEmailAlertingSettingsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -281,9 +278,7 @@ func (o *TestEmailAlertingSettingsDefaultBody) ContextValidate(ctx context.Conte } func (o *TestEmailAlertingSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -294,7 +289,6 @@ func (o *TestEmailAlertingSettingsDefaultBody) contextValidateDetails(ctx contex return err } } - } return nil @@ -407,7 +401,6 @@ TestEmailAlertingSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary se swagger:model TestEmailAlertingSettingsDefaultBodyDetailsItems0 */ type TestEmailAlertingSettingsDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -471,7 +464,6 @@ TestEmailAlertingSettingsParamsBodyEmailAlertingSettings EmailAlertingSettings r swagger:model TestEmailAlertingSettingsParamsBodyEmailAlertingSettings */ type TestEmailAlertingSettingsParamsBodyEmailAlertingSettings struct { - // SMTP From header field. From string `json:"from,omitempty"` diff --git a/api/serverpb/json/client/server/update_status_parameters.go b/api/serverpb/json/client/server/update_status_parameters.go index 2b035d56e0..c2b50ad2f8 100644 --- a/api/serverpb/json/client/server/update_status_parameters.go +++ b/api/serverpb/json/client/server/update_status_parameters.go @@ -60,7 +60,6 @@ UpdateStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateStatusParams struct { - // Body. Body UpdateStatusBody @@ -130,7 +129,6 @@ func (o *UpdateStatusParams) SetBody(body UpdateStatusBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/serverpb/json/client/server/update_status_responses.go b/api/serverpb/json/client/server/update_status_responses.go index dfafb1ab3b..15a084ac3f 100644 --- a/api/serverpb/json/client/server/update_status_responses.go +++ b/api/serverpb/json/client/server/update_status_responses.go @@ -60,12 +60,12 @@ type UpdateStatusOK struct { func (o *UpdateStatusOK) Error() string { return fmt.Sprintf("[POST /v1/Updates/Status][%d] updateStatusOk %+v", 200, o.Payload) } + func (o *UpdateStatusOK) GetPayload() *UpdateStatusOKBody { return o.Payload } func (o *UpdateStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateStatusOKBody) // response payload @@ -102,12 +102,12 @@ func (o *UpdateStatusDefault) Code() int { func (o *UpdateStatusDefault) Error() string { return fmt.Sprintf("[POST /v1/Updates/Status][%d] UpdateStatus default %+v", o._statusCode, o.Payload) } + func (o *UpdateStatusDefault) GetPayload() *UpdateStatusDefaultBody { return o.Payload } func (o *UpdateStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateStatusDefaultBody) // response payload @@ -123,7 +123,6 @@ UpdateStatusBody update status body swagger:model UpdateStatusBody */ type UpdateStatusBody struct { - // Authentication token. AuthToken string `json:"auth_token,omitempty"` @@ -164,7 +163,6 @@ UpdateStatusDefaultBody update status default body swagger:model UpdateStatusDefaultBody */ type UpdateStatusDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *UpdateStatusDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -356,7 +351,6 @@ UpdateStatusDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model UpdateStatusDefaultBodyDetailsItems0 */ type UpdateStatusDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -420,7 +414,6 @@ UpdateStatusOKBody update status OK body swagger:model UpdateStatusOKBody */ type UpdateStatusOKBody struct { - // Progress log lines. LogLines []string `json:"log_lines"` diff --git a/api/serverpb/json/client/server/version_parameters.go b/api/serverpb/json/client/server/version_parameters.go index 221207560e..6e1ac5601f 100644 --- a/api/serverpb/json/client/server/version_parameters.go +++ b/api/serverpb/json/client/server/version_parameters.go @@ -60,7 +60,6 @@ VersionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type VersionParams struct { - /* Dummy. Dummy parameter for internal testing. Do not use. @@ -133,7 +132,6 @@ func (o *VersionParams) SetDummy(dummy *string) { // WriteToRequest writes these params to a swagger request func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -149,7 +147,6 @@ func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qDummy := qrDummy if qDummy != "" { - if err := r.SetQueryParam("dummy", qDummy); err != nil { return err } diff --git a/api/serverpb/json/client/server/version_responses.go b/api/serverpb/json/client/server/version_responses.go index 37b89be7aa..6b84e5a583 100644 --- a/api/serverpb/json/client/server/version_responses.go +++ b/api/serverpb/json/client/server/version_responses.go @@ -62,12 +62,12 @@ type VersionOK struct { func (o *VersionOK) Error() string { return fmt.Sprintf("[GET /v1/version][%d] versionOk %+v", 200, o.Payload) } + func (o *VersionOK) GetPayload() *VersionOKBody { return o.Payload } func (o *VersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(VersionOKBody) // response payload @@ -104,12 +104,12 @@ func (o *VersionDefault) Code() int { func (o *VersionDefault) Error() string { return fmt.Sprintf("[GET /v1/version][%d] Version default %+v", o._statusCode, o.Payload) } + func (o *VersionDefault) GetPayload() *VersionDefaultBody { return o.Payload } func (o *VersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(VersionDefaultBody) // response payload @@ -125,7 +125,6 @@ VersionDefaultBody version default body swagger:model VersionDefaultBody */ type VersionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -191,9 +190,7 @@ func (o *VersionDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -204,7 +201,6 @@ func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -317,7 +313,6 @@ VersionDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol swagger:model VersionDefaultBodyDetailsItems0 */ type VersionDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -381,7 +376,6 @@ VersionOKBody version OK body swagger:model VersionOKBody */ type VersionOKBody struct { - // PMM Server version. Version string `json:"version,omitempty"` @@ -529,7 +523,6 @@ func (o *VersionOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strfmt.Registry) error { - if o.Managed != nil { if err := o.Managed.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -545,7 +538,6 @@ func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strf } func (o *VersionOKBody) contextValidateServer(ctx context.Context, formats strfmt.Registry) error { - if o.Server != nil { if err := o.Server.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -583,7 +575,6 @@ VersionOKBodyManaged VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyManaged */ type VersionOKBodyManaged struct { - // User-visible version. Version string `json:"version,omitempty"` @@ -649,7 +640,6 @@ VersionOKBodyServer VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyServer */ type VersionOKBodyServer struct { - // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/serverpb/server.pb.go b/api/serverpb/server.pb.go index 65d25561fc..996fda1cab 100644 --- a/api/serverpb/server.pb.go +++ b/api/serverpb/server.pb.go @@ -7,6 +7,9 @@ package serverpb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -14,8 +17,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -2289,37 +2290,40 @@ func file_serverpb_server_proto_rawDescGZIP() []byte { return file_serverpb_server_proto_rawDescData } -var file_serverpb_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_serverpb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_serverpb_server_proto_goTypes = []interface{}{ - (DistributionMethod)(0), // 0: server.DistributionMethod - (*VersionInfo)(nil), // 1: server.VersionInfo - (*VersionRequest)(nil), // 2: server.VersionRequest - (*VersionResponse)(nil), // 3: server.VersionResponse - (*ReadinessRequest)(nil), // 4: server.ReadinessRequest - (*ReadinessResponse)(nil), // 5: server.ReadinessResponse - (*CheckUpdatesRequest)(nil), // 6: server.CheckUpdatesRequest - (*CheckUpdatesResponse)(nil), // 7: server.CheckUpdatesResponse - (*StartUpdateRequest)(nil), // 8: server.StartUpdateRequest - (*StartUpdateResponse)(nil), // 9: server.StartUpdateResponse - (*UpdateStatusRequest)(nil), // 10: server.UpdateStatusRequest - (*UpdateStatusResponse)(nil), // 11: server.UpdateStatusResponse - (*MetricsResolutions)(nil), // 12: server.MetricsResolutions - (*EmailAlertingSettings)(nil), // 13: server.EmailAlertingSettings - (*SlackAlertingSettings)(nil), // 14: server.SlackAlertingSettings - (*STTCheckIntervals)(nil), // 15: server.STTCheckIntervals - (*Settings)(nil), // 16: server.Settings - (*GetSettingsRequest)(nil), // 17: server.GetSettingsRequest - (*GetSettingsResponse)(nil), // 18: server.GetSettingsResponse - (*ChangeSettingsRequest)(nil), // 19: server.ChangeSettingsRequest - (*ChangeSettingsResponse)(nil), // 20: server.ChangeSettingsResponse - (*TestEmailAlertingSettingsRequest)(nil), // 21: server.TestEmailAlertingSettingsRequest - (*TestEmailAlertingSettingsResponse)(nil), // 22: server.TestEmailAlertingSettingsResponse - (*AWSInstanceCheckRequest)(nil), // 23: server.AWSInstanceCheckRequest - (*AWSInstanceCheckResponse)(nil), // 24: server.AWSInstanceCheckResponse - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 26: google.protobuf.Duration -} +var ( + file_serverpb_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_serverpb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 24) + file_serverpb_server_proto_goTypes = []interface{}{ + (DistributionMethod)(0), // 0: server.DistributionMethod + (*VersionInfo)(nil), // 1: server.VersionInfo + (*VersionRequest)(nil), // 2: server.VersionRequest + (*VersionResponse)(nil), // 3: server.VersionResponse + (*ReadinessRequest)(nil), // 4: server.ReadinessRequest + (*ReadinessResponse)(nil), // 5: server.ReadinessResponse + (*CheckUpdatesRequest)(nil), // 6: server.CheckUpdatesRequest + (*CheckUpdatesResponse)(nil), // 7: server.CheckUpdatesResponse + (*StartUpdateRequest)(nil), // 8: server.StartUpdateRequest + (*StartUpdateResponse)(nil), // 9: server.StartUpdateResponse + (*UpdateStatusRequest)(nil), // 10: server.UpdateStatusRequest + (*UpdateStatusResponse)(nil), // 11: server.UpdateStatusResponse + (*MetricsResolutions)(nil), // 12: server.MetricsResolutions + (*EmailAlertingSettings)(nil), // 13: server.EmailAlertingSettings + (*SlackAlertingSettings)(nil), // 14: server.SlackAlertingSettings + (*STTCheckIntervals)(nil), // 15: server.STTCheckIntervals + (*Settings)(nil), // 16: server.Settings + (*GetSettingsRequest)(nil), // 17: server.GetSettingsRequest + (*GetSettingsResponse)(nil), // 18: server.GetSettingsResponse + (*ChangeSettingsRequest)(nil), // 19: server.ChangeSettingsRequest + (*ChangeSettingsResponse)(nil), // 20: server.ChangeSettingsResponse + (*TestEmailAlertingSettingsRequest)(nil), // 21: server.TestEmailAlertingSettingsRequest + (*TestEmailAlertingSettingsResponse)(nil), // 22: server.TestEmailAlertingSettingsResponse + (*AWSInstanceCheckRequest)(nil), // 23: server.AWSInstanceCheckRequest + (*AWSInstanceCheckResponse)(nil), // 24: server.AWSInstanceCheckResponse + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 26: google.protobuf.Duration + } +) + var file_serverpb_server_proto_depIdxs = []int32{ 25, // 0: server.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 1: server.VersionResponse.server:type_name -> server.VersionInfo diff --git a/api/serverpb/server.pb.gw.go b/api/serverpb/server.pb.gw.go index f1f01bc951..6b7c5f0f11 100644 --- a/api/serverpb/server.pb.gw.go +++ b/api/serverpb/server.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_Server_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) +var filter_Server_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_Server_Version_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VersionRequest var metadata runtime.ServerMetadata @@ -48,7 +48,6 @@ func request_Server_Version_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_Version_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,7 +63,6 @@ func local_request_Server_Version_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.Version(ctx, &protoReq) return msg, metadata, err - } func request_Server_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -73,7 +71,6 @@ func request_Server_Readiness_0(ctx context.Context, marshaler runtime.Marshaler msg, err := client.Readiness(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -82,7 +79,6 @@ func local_request_Server_Readiness_0(ctx context.Context, marshaler runtime.Mar msg, err := server.Readiness(ctx, &protoReq) return msg, metadata, err - } func request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -99,7 +95,6 @@ func request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.CheckUpdates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,7 +111,6 @@ func local_request_Server_CheckUpdates_0(ctx context.Context, marshaler runtime. msg, err := server.CheckUpdates(ctx, &protoReq) return msg, metadata, err - } func request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -133,7 +127,6 @@ func request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.StartUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -150,7 +143,6 @@ func local_request_Server_StartUpdate_0(ctx context.Context, marshaler runtime.M msg, err := server.StartUpdate(ctx, &protoReq) return msg, metadata, err - } func request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -167,7 +159,6 @@ func request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.UpdateStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -184,7 +175,6 @@ func local_request_Server_UpdateStatus_0(ctx context.Context, marshaler runtime. msg, err := server.UpdateStatus(ctx, &protoReq) return msg, metadata, err - } func request_Server_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -201,7 +191,6 @@ func request_Server_GetSettings_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.GetSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -218,7 +207,6 @@ func local_request_Server_GetSettings_0(ctx context.Context, marshaler runtime.M msg, err := server.GetSettings(ctx, &protoReq) return msg, metadata, err - } func request_Server_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -235,7 +223,6 @@ func request_Server_ChangeSettings_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ChangeSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -252,7 +239,6 @@ func local_request_Server_ChangeSettings_0(ctx context.Context, marshaler runtim msg, err := server.ChangeSettings(ctx, &protoReq) return msg, metadata, err - } func request_Server_TestEmailAlertingSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -269,7 +255,6 @@ func request_Server_TestEmailAlertingSettings_0(ctx context.Context, marshaler r msg, err := client.TestEmailAlertingSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_TestEmailAlertingSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -286,7 +271,6 @@ func local_request_Server_TestEmailAlertingSettings_0(ctx context.Context, marsh msg, err := server.TestEmailAlertingSettings(ctx, &protoReq) return msg, metadata, err - } func request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -303,7 +287,6 @@ func request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Ma msg, err := client.AWSInstanceCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -320,7 +303,6 @@ func local_request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runt msg, err := server.AWSInstanceCheck(ctx, &protoReq) return msg, metadata, err - } // RegisterServerHandlerServer registers the http handlers for service Server to "mux". @@ -328,7 +310,6 @@ func local_request_Server_AWSInstanceCheck_0(ctx context.Context, marshaler runt // 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 RegisterServerHandlerFromEndpoint instead. func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerServer) error { - mux.Handle("GET", pattern_Server_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -351,7 +332,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Server_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -376,7 +356,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -401,7 +380,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -426,7 +404,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -451,7 +428,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -476,7 +452,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -501,7 +476,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_TestEmailAlertingSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -526,7 +500,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_TestEmailAlertingSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_AWSInstanceCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -551,7 +524,6 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser } forward_Server_AWSInstanceCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -594,7 +566,6 @@ func RegisterServerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServerClient" to call the correct interceptors. func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerClient) error { - mux.Handle("GET", pattern_Server_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -614,7 +585,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_Server_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -636,7 +606,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -658,7 +627,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -680,7 +648,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -702,7 +669,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -724,7 +690,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -746,7 +711,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_TestEmailAlertingSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -768,7 +732,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_TestEmailAlertingSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_Server_AWSInstanceCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -790,7 +753,6 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } forward_Server_AWSInstanceCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/serverpb/server.swagger.json b/api/serverpb/server.swagger.json deleted file mode 100644 index 9cca1bc946..0000000000 --- a/api/serverpb/server.swagger.json +++ /dev/null @@ -1,835 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "serverpb/server.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "Server" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/AWSInstanceCheck": { - "post": { - "summary": "AWS instance check", - "description": "Checks AWS EC2 instance ID.", - "operationId": "AWSInstanceCheck", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverAWSInstanceCheckResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverAWSInstanceCheckRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/Settings/Change": { - "post": { - "summary": "Change settings", - "description": "Changes PMM Server settings.", - "operationId": "ChangeSettings", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverChangeSettingsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverChangeSettingsRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/Settings/Get": { - "post": { - "summary": "Get settings", - "description": "Returns current PMM Server settings.", - "operationId": "GetSettings", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverGetSettingsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverGetSettingsRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/Settings/TestEmailAlertingSettings": { - "post": { - "summary": "Test email alerting", - "description": "Sends test email to check current SMTP settings for email alerting.", - "operationId": "TestEmailAlertingSettings", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverTestEmailAlertingSettingsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverTestEmailAlertingSettingsRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/Updates/Check": { - "post": { - "summary": "Check updates", - "description": "Checks for available PMM Server updates.", - "operationId": "CheckUpdates", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverCheckUpdatesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverCheckUpdatesRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/Updates/Start": { - "post": { - "summary": "Start update", - "description": "Starts PMM Server update.", - "operationId": "StartUpdate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverStartUpdateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverStartUpdateRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/Updates/Status": { - "post": { - "summary": "Update status", - "description": "Returns PMM Server update status.", - "operationId": "UpdateStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverUpdateStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/serverUpdateStatusRequest" - } - } - ], - "tags": [ - "Server" - ] - } - }, - "/v1/readyz": { - "get": { - "summary": "Check server readiness", - "description": "Returns an error when Server components being restarted are not ready yet. Use this API for checking the health of Docker containers and for probing Kubernetes readiness.", - "operationId": "Readiness", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverReadinessResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "Server" - ] - } - }, - "/v1/version": { - "get": { - "summary": "Version", - "description": "Returns PMM Server versions.", - "operationId": "Version", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/serverVersionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "dummy", - "description": "Dummy parameter for internal testing. Do not use.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Server" - ] - } - } - }, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - } - }, - "additionalProperties": {}, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "serverAWSInstanceCheckRequest": { - "type": "object", - "properties": { - "instance_id": { - "type": "string", - "description": "AWS EC2 instance ID (i-1234567890abcdef0)." - } - } - }, - "serverAWSInstanceCheckResponse": { - "type": "object" - }, - "serverChangeSettingsRequest": { - "type": "object", - "properties": { - "enable_updates": { - "type": "boolean" - }, - "disable_updates": { - "type": "boolean" - }, - "enable_telemetry": { - "type": "boolean" - }, - "disable_telemetry": { - "type": "boolean" - }, - "metrics_resolutions": { - "$ref": "#/definitions/serverMetricsResolutions" - }, - "data_retention": { - "type": "string", - "description": "A number of full days for Prometheus and QAN data retention. Should have a suffix in JSON: 2592000s, 43200m, 720h." - }, - "ssh_key": { - "type": "string" - }, - "aws_partitions": { - "type": "array", - "items": { - "type": "string" - } - }, - "alert_manager_url": { - "type": "string", - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path)." - }, - "remove_alert_manager_url": { - "type": "boolean", - "description": "Remove external AlertManager URL.\n\nalert_manager_rules and remove_alert_manager_rules field names are incorrect\n (they never were _Alertmanager_ rules), but we can't rename them for compatibility reasons." - }, - "alert_manager_rules": { - "type": "string", - "description": "Custom alerting or recording rules." - }, - "remove_alert_manager_rules": { - "type": "boolean", - "description": "Remove custom alerting or recording rules." - }, - "enable_stt": { - "type": "boolean", - "description": "Enable Security Threat Tool." - }, - "disable_stt": { - "type": "boolean", - "description": "Disable Security Threat Tool." - }, - "enable_alerting": { - "type": "boolean", - "description": "Enable Alerting." - }, - "disable_alerting": { - "type": "boolean", - "description": "Disable Alerting." - }, - "email_alerting_settings": { - "$ref": "#/definitions/serverEmailAlertingSettings", - "description": "Change Alerting email (SMTP) settings, if set." - }, - "remove_email_alerting_settings": { - "type": "boolean", - "description": "If true, removes Alerting email (SMTP) settings." - }, - "slack_alerting_settings": { - "$ref": "#/definitions/serverSlackAlertingSettings", - "description": "Change Alerting Slack settings, if set." - }, - "remove_slack_alerting_settings": { - "type": "boolean", - "description": "If true, removes Alerting Slack settings." - }, - "pmm_public_address": { - "type": "string", - "description": "PMM Server public address." - }, - "remove_pmm_public_address": { - "type": "boolean" - }, - "stt_check_intervals": { - "$ref": "#/definitions/serverSTTCheckIntervals", - "description": "Intervals between STT check runs." - }, - "enable_azurediscover": { - "type": "boolean", - "description": "Enable Azure Discover." - }, - "disable_azurediscover": { - "type": "boolean", - "description": "Disable Azure Discover." - }, - "enable_backup_management": { - "type": "boolean", - "description": "Enable Backup Management." - }, - "disable_backup_management": { - "type": "boolean", - "description": "Disable Backup Management." - }, - "enable_access_control": { - "type": "boolean", - "title": "Enable Access Control" - }, - "disable_access_control": { - "type": "boolean", - "title": "Disable Access Control" - } - } - }, - "serverChangeSettingsResponse": { - "type": "object", - "properties": { - "settings": { - "$ref": "#/definitions/serverSettings" - } - } - }, - "serverCheckUpdatesRequest": { - "type": "object", - "properties": { - "force": { - "type": "boolean", - "description": "If false, cached information may be returned." - }, - "only_installed_version": { - "type": "boolean", - "description": "If true, only installed version will be in response." - } - } - }, - "serverCheckUpdatesResponse": { - "type": "object", - "properties": { - "installed": { - "$ref": "#/definitions/serverVersionInfo", - "description": "Currently installed PMM Server version." - }, - "latest": { - "$ref": "#/definitions/serverVersionInfo", - "description": "Latest available PMM Server version." - }, - "update_available": { - "type": "boolean", - "description": "True if there is a PMM Server update available." - }, - "latest_news_url": { - "type": "string", - "description": "Latest available PMM Server release announcement URL." - }, - "last_check": { - "type": "string", - "format": "date-time", - "description": "Last check time." - } - } - }, - "serverDistributionMethod": { - "type": "string", - "enum": [ - "DISTRIBUTION_METHOD_INVALID", - "DOCKER", - "OVF", - "AMI", - "AZURE", - "DO" - ], - "default": "DISTRIBUTION_METHOD_INVALID", - "description": "DistributionMethod defines PMM Server distribution method: Docker image, OVF/OVA, or AMI." - }, - "serverEmailAlertingSettings": { - "type": "object", - "properties": { - "from": { - "type": "string", - "description": "SMTP From header field." - }, - "smarthost": { - "type": "string", - "description": "SMTP host and port." - }, - "hello": { - "type": "string", - "description": "Hostname to identify to the SMTP server." - }, - "username": { - "type": "string", - "description": "Auth using CRAM-MD5, LOGIN and PLAIN." - }, - "password": { - "type": "string", - "description": "Auth using LOGIN and PLAIN." - }, - "identity": { - "type": "string", - "description": "Auth using PLAIN." - }, - "secret": { - "type": "string", - "description": "Auth using CRAM-MD5." - }, - "require_tls": { - "type": "boolean", - "description": "Require TLS." - } - }, - "description": "EmailAlertingSettings represents email (SMTP) configuration for Alerting." - }, - "serverGetSettingsRequest": { - "type": "object" - }, - "serverGetSettingsResponse": { - "type": "object", - "properties": { - "settings": { - "$ref": "#/definitions/serverSettings" - } - } - }, - "serverMetricsResolutions": { - "type": "object", - "properties": { - "hr": { - "type": "string", - "description": "High resolution. Should have a suffix in JSON: 1s, 1m, 1h." - }, - "mr": { - "type": "string", - "description": "Medium resolution. Should have a suffix in JSON: 1s, 1m, 1h." - }, - "lr": { - "type": "string", - "description": "Low resolution. Should have a suffix in JSON: 1s, 1m, 1h." - } - }, - "description": "MetricsResolutions represents Prometheus exporters metrics resolutions." - }, - "serverReadinessResponse": { - "type": "object", - "description": "This probe is available without authentication, so it should not contain any data." - }, - "serverSTTCheckIntervals": { - "type": "object", - "properties": { - "standard_interval": { - "type": "string", - "description": "Standard check interval." - }, - "rare_interval": { - "type": "string", - "description": "Interval for rare check runs." - }, - "frequent_interval": { - "type": "string", - "description": "Interval for frequent check runs." - } - }, - "description": "STTCheckIntervals represents intervals between STT checks." - }, - "serverSettings": { - "type": "object", - "properties": { - "updates_disabled": { - "type": "boolean", - "description": "True if updates are disabled." - }, - "telemetry_enabled": { - "type": "boolean", - "description": "True if telemetry is enabled." - }, - "metrics_resolutions": { - "$ref": "#/definitions/serverMetricsResolutions" - }, - "data_retention": { - "type": "string" - }, - "ssh_key": { - "type": "string" - }, - "aws_partitions": { - "type": "array", - "items": { - "type": "string" - } - }, - "alert_manager_url": { - "type": "string", - "description": "External AlertManager URL (e.g., https://username:password@1.2.3.4/path).\n\nalert_manager_rules field name is incorrect\n (they never were _Alertmanager_ rules), but we can't rename it for compatibility reasons." - }, - "alert_manager_rules": { - "type": "string", - "description": "Custom alerting or recording rules." - }, - "stt_enabled": { - "type": "boolean", - "description": "True if Security Threat Tool is enabled." - }, - "platform_email": { - "type": "string", - "description": "Percona Platform user's email, if this PMM instance is linked to the Platform." - }, - "alerting_enabled": { - "type": "boolean", - "description": "True if Alerting is enabled." - }, - "email_alerting_settings": { - "$ref": "#/definitions/serverEmailAlertingSettings", - "description": "Alerting email (SMTP) settings." - }, - "slack_alerting_settings": { - "$ref": "#/definitions/serverSlackAlertingSettings", - "description": "Alerting Slack settings." - }, - "pmm_public_address": { - "type": "string", - "description": "PMM Server public address." - }, - "stt_check_intervals": { - "$ref": "#/definitions/serverSTTCheckIntervals", - "description": "Intervals between STT check runs." - }, - "backup_management_enabled": { - "type": "boolean", - "description": "True if Backup Management is enabled." - }, - "azurediscover_enabled": { - "type": "boolean", - "description": "True if Azure Discover is enabled." - }, - "connected_to_platform": { - "type": "boolean", - "title": "True if the PMM instance is connected to Platform" - }, - "telemetry_summaries": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Includes list of collected telemetry" - }, - "enable_access_control": { - "type": "boolean", - "description": "True if Access Control is enabled." - }, - "default_role_id": { - "type": "integer", - "format": "int64", - "description": "Default Access Control role ID for new users." - } - }, - "description": "Settings represents PMM Server settings." - }, - "serverSlackAlertingSettings": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "Slack API (webhook) URL." - } - }, - "description": "SlackAlertingSettings represents Slack configuration for Alerting." - }, - "serverStartUpdateRequest": { - "type": "object" - }, - "serverStartUpdateResponse": { - "type": "object", - "properties": { - "auth_token": { - "type": "string", - "description": "Authentication token for getting update statuses." - }, - "log_offset": { - "type": "integer", - "format": "int64", - "description": "Progress log offset." - } - } - }, - "serverTestEmailAlertingSettingsRequest": { - "type": "object", - "properties": { - "email_alerting_settings": { - "$ref": "#/definitions/serverEmailAlertingSettings", - "description": "Alerting email (SMTP) settings." - }, - "email_to": { - "type": "string", - "description": "Target email address to send the email to." - } - } - }, - "serverTestEmailAlertingSettingsResponse": { - "type": "object" - }, - "serverUpdateStatusRequest": { - "type": "object", - "properties": { - "auth_token": { - "type": "string", - "description": "Authentication token." - }, - "log_offset": { - "type": "integer", - "format": "int64", - "description": "Progress log offset." - } - } - }, - "serverUpdateStatusResponse": { - "type": "object", - "properties": { - "log_lines": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Progress log lines." - }, - "log_offset": { - "type": "integer", - "format": "int64", - "description": "Progress log offset for the next request." - }, - "done": { - "type": "boolean", - "description": "True when update is done." - } - } - }, - "serverVersionInfo": { - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "User-visible version." - }, - "full_version": { - "type": "string", - "description": "Full version for debugging." - }, - "timestamp": { - "type": "string", - "format": "date-time", - "description": "Build or release date." - } - }, - "description": "VersionInfo describes component version, or PMM Server as a whole." - }, - "serverVersionResponse": { - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "PMM Server version." - }, - "server": { - "$ref": "#/definitions/serverVersionInfo", - "description": "Detailed PMM Server version information." - }, - "managed": { - "$ref": "#/definitions/serverVersionInfo", - "description": "pmm-managed version information for debugging." - }, - "distribution_method": { - "$ref": "#/definitions/serverDistributionMethod", - "description": "PMM Server distribution method.\n\nTODO Versions and statuses of Grafana, Prometheus, PostgreSQL, qan-api2, ClickHouse, pmm-agent, etc." - } - } - } - } -} diff --git a/api/serverpb/server_grpc.pb.go b/api/serverpb/server_grpc.pb.go index 38b9fbc58f..63197e8537 100644 --- a/api/serverpb/server_grpc.pb.go +++ b/api/serverpb/server_grpc.pb.go @@ -8,6 +8,7 @@ package serverpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -171,33 +172,40 @@ type ServerServer interface { } // UnimplementedServerServer must be embedded to have forward compatible implementations. -type UnimplementedServerServer struct { -} +type UnimplementedServerServer struct{} func (UnimplementedServerServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") } + func (UnimplementedServerServer) Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Readiness not implemented") } + func (UnimplementedServerServer) CheckUpdates(context.Context, *CheckUpdatesRequest) (*CheckUpdatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckUpdates not implemented") } + func (UnimplementedServerServer) StartUpdate(context.Context, *StartUpdateRequest) (*StartUpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartUpdate not implemented") } + func (UnimplementedServerServer) UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented") } + func (UnimplementedServerServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") } + func (UnimplementedServerServer) ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSettings not implemented") } + func (UnimplementedServerServer) TestEmailAlertingSettings(context.Context, *TestEmailAlertingSettingsRequest) (*TestEmailAlertingSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestEmailAlertingSettings not implemented") } + func (UnimplementedServerServer) AWSInstanceCheck(context.Context, *AWSInstanceCheckRequest) (*AWSInstanceCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AWSInstanceCheck not implemented") } diff --git a/api/uieventspb/server.pb.go b/api/uieventspb/server.pb.go index 4aa330dfcb..d8c2f13853 100644 --- a/api/uieventspb/server.pb.go +++ b/api/uieventspb/server.pb.go @@ -7,6 +7,9 @@ package uieventspb import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -14,8 +17,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -545,16 +546,19 @@ func file_uieventspb_server_proto_rawDescGZIP() []byte { return file_uieventspb_server_proto_rawDescData } -var file_uieventspb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_uieventspb_server_proto_goTypes = []interface{}{ - (*NotificationEvent)(nil), // 0: uievents.NotificationEvent - (*FetchingEvent)(nil), // 1: uievents.FetchingEvent - (*DashboardUsageEvent)(nil), // 2: uievents.DashboardUsageEvent - (*UserFlowEvent)(nil), // 3: uievents.UserFlowEvent - (*StoreRequest)(nil), // 4: uievents.StoreRequest - (*StoreResponse)(nil), // 5: uievents.StoreResponse - nil, // 6: uievents.UserFlowEvent.ParamsEntry -} +var ( + file_uieventspb_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) + file_uieventspb_server_proto_goTypes = []interface{}{ + (*NotificationEvent)(nil), // 0: uievents.NotificationEvent + (*FetchingEvent)(nil), // 1: uievents.FetchingEvent + (*DashboardUsageEvent)(nil), // 2: uievents.DashboardUsageEvent + (*UserFlowEvent)(nil), // 3: uievents.UserFlowEvent + (*StoreRequest)(nil), // 4: uievents.StoreRequest + (*StoreResponse)(nil), // 5: uievents.StoreResponse + nil, // 6: uievents.UserFlowEvent.ParamsEntry + } +) + var file_uieventspb_server_proto_depIdxs = []int32{ 6, // 0: uievents.UserFlowEvent.params:type_name -> uievents.UserFlowEvent.ParamsEntry 0, // 1: uievents.StoreRequest.notifications:type_name -> uievents.NotificationEvent diff --git a/api/uieventspb/server.pb.gw.go b/api/uieventspb/server.pb.gw.go index 61d3b07297..44705a12f0 100644 --- a/api/uieventspb/server.pb.gw.go +++ b/api/uieventspb/server.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marshaler, client UIEventsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StoreRequest @@ -45,7 +47,6 @@ func request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.Store(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marshaler, server UIEventsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -62,7 +63,6 @@ func local_request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.Store(ctx, &protoReq) return msg, metadata, err - } // RegisterUIEventsHandlerServer registers the http handlers for service UIEvents to "mux". @@ -70,7 +70,6 @@ func local_request_UIEvents_Store_0(ctx context.Context, marshaler runtime.Marsh // 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 RegisterUIEventsHandlerFromEndpoint instead. func RegisterUIEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UIEventsServer) error { - mux.Handle("POST", pattern_UIEvents_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -93,7 +92,6 @@ func RegisterUIEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s } forward_UIEvents_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -136,7 +134,6 @@ func RegisterUIEventsHandler(ctx context.Context, mux *runtime.ServeMux, conn *g // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UIEventsClient" to call the correct interceptors. func RegisterUIEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UIEventsClient) error { - mux.Handle("POST", pattern_UIEvents_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -156,16 +153,11 @@ func RegisterUIEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_UIEvents_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_UIEvents_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) -) +var pattern_UIEvents_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) -var ( - forward_UIEvents_Store_0 = runtime.ForwardResponseMessage -) +var forward_UIEvents_Store_0 = runtime.ForwardResponseMessage diff --git a/api/uieventspb/server.swagger.json b/api/uieventspb/server.swagger.json deleted file mode 100644 index c9ede6ea80..0000000000 --- a/api/uieventspb/server.swagger.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "uieventspb/server.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "UIEvents" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/ui-events/Store": { - "post": { - "summary": "Persist UI events", - "description": "Persists received UI events for further processing.", - "operationId": "Store", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/uieventsStoreResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/uieventsStoreRequest" - } - } - ], - "tags": [ - "UIEvents" - ] - } - } - }, - "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": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "uieventsDashboardUsageEvent": { - "type": "object", - "properties": { - "uid": { - "type": "string" - }, - "title": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "load_time": { - "type": "integer", - "format": "int32" - }, - "location": { - "type": "string" - }, - "location_params": { - "type": "string" - } - } - }, - "uieventsFetchingEvent": { - "type": "object", - "properties": { - "component": { - "type": "string" - }, - "load_time": { - "type": "integer", - "format": "int32" - }, - "location": { - "type": "string" - }, - "location_params": { - "type": "string" - } - } - }, - "uieventsNotificationEvent": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "text": { - "type": "string" - }, - "location": { - "type": "string" - }, - "location_params": { - "type": "string" - } - } - }, - "uieventsStoreRequest": { - "type": "object", - "properties": { - "notifications": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/uieventsNotificationEvent" - } - }, - "fetching": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/uieventsFetchingEvent" - } - }, - "dashboard_usage": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/uieventsDashboardUsageEvent" - } - }, - "user_flow_events": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/uieventsUserFlowEvent" - } - } - } - }, - "uieventsStoreResponse": { - "type": "object" - }, - "uieventsUserFlowEvent": { - "type": "object", - "properties": { - "flow_id": { - "type": "string" - }, - "story_id": { - "type": "string" - }, - "event": { - "type": "string" - }, - "params": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - } -} diff --git a/api/uieventspb/server_grpc.pb.go b/api/uieventspb/server_grpc.pb.go index dbca87a87a..2a167dccb0 100644 --- a/api/uieventspb/server_grpc.pb.go +++ b/api/uieventspb/server_grpc.pb.go @@ -8,6 +8,7 @@ package uieventspb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -57,8 +58,7 @@ type UIEventsServer interface { } // UnimplementedUIEventsServer must be embedded to have forward compatible implementations. -type UnimplementedUIEventsServer struct { -} +type UnimplementedUIEventsServer struct{} func (UnimplementedUIEventsServer) Store(context.Context, *StoreRequest) (*StoreResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Store not implemented") diff --git a/api/userpb/json/client/user/get_user_parameters.go b/api/userpb/json/client/user/get_user_parameters.go index 31920e417d..ce903ed286 100644 --- a/api/userpb/json/client/user/get_user_parameters.go +++ b/api/userpb/json/client/user/get_user_parameters.go @@ -115,7 +115,6 @@ func (o *GetUserParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/userpb/json/client/user/get_user_responses.go b/api/userpb/json/client/user/get_user_responses.go index 7f221bce81..8597bee46d 100644 --- a/api/userpb/json/client/user/get_user_responses.go +++ b/api/userpb/json/client/user/get_user_responses.go @@ -60,12 +60,12 @@ type GetUserOK struct { func (o *GetUserOK) Error() string { return fmt.Sprintf("[GET /v1/user][%d] getUserOk %+v", 200, o.Payload) } + func (o *GetUserOK) GetPayload() *GetUserOKBody { return o.Payload } func (o *GetUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetUserOKBody) // response payload @@ -102,12 +102,12 @@ func (o *GetUserDefault) Code() int { func (o *GetUserDefault) Error() string { return fmt.Sprintf("[GET /v1/user][%d] GetUser default %+v", o._statusCode, o.Payload) } + func (o *GetUserDefault) GetPayload() *GetUserDefaultBody { return o.Payload } func (o *GetUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetUserDefaultBody) // response payload @@ -123,7 +123,6 @@ GetUserDefaultBody get user default body swagger:model GetUserDefaultBody */ type GetUserDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *GetUserDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -231,7 +227,6 @@ GetUserDefaultBodyDetailsItems0 get user default body details items0 swagger:model GetUserDefaultBodyDetailsItems0 */ type GetUserDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ GetUserOKBody get user OK body swagger:model GetUserOKBody */ type GetUserOKBody struct { - // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/userpb/json/client/user/list_users_parameters.go b/api/userpb/json/client/user/list_users_parameters.go index 9976e3b7d1..60ad9f5a75 100644 --- a/api/userpb/json/client/user/list_users_parameters.go +++ b/api/userpb/json/client/user/list_users_parameters.go @@ -115,7 +115,6 @@ func (o *ListUsersParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/userpb/json/client/user/list_users_responses.go b/api/userpb/json/client/user/list_users_responses.go index 310cf02b9f..ae13f610f0 100644 --- a/api/userpb/json/client/user/list_users_responses.go +++ b/api/userpb/json/client/user/list_users_responses.go @@ -60,12 +60,12 @@ type ListUsersOK struct { func (o *ListUsersOK) Error() string { return fmt.Sprintf("[POST /v1/user/list][%d] listUsersOk %+v", 200, o.Payload) } + func (o *ListUsersOK) GetPayload() *ListUsersOKBody { return o.Payload } func (o *ListUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListUsersOKBody) // response payload @@ -102,12 +102,12 @@ func (o *ListUsersDefault) Code() int { func (o *ListUsersDefault) Error() string { return fmt.Sprintf("[POST /v1/user/list][%d] ListUsers default %+v", o._statusCode, o.Payload) } + func (o *ListUsersDefault) GetPayload() *ListUsersDefaultBody { return o.Payload } func (o *ListUsersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListUsersDefaultBody) // response payload @@ -123,7 +123,6 @@ ListUsersDefaultBody list users default body swagger:model ListUsersDefaultBody */ type ListUsersDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -189,9 +188,7 @@ func (o *ListUsersDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -202,7 +199,6 @@ func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -231,7 +227,6 @@ ListUsersDefaultBodyDetailsItems0 list users default body details items0 swagger:model ListUsersDefaultBodyDetailsItems0 */ type ListUsersDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -269,7 +264,6 @@ ListUsersOKBody list users OK body swagger:model ListUsersOKBody */ type ListUsersOKBody struct { - // users Users []*ListUsersOKBodyUsersItems0 `json:"users"` } @@ -329,9 +323,7 @@ func (o *ListUsersOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Users); i++ { - if o.Users[i] != nil { if err := o.Users[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -342,7 +334,6 @@ func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strf return err } } - } return nil @@ -371,7 +362,6 @@ ListUsersOKBodyUsersItems0 list users OK body users items0 swagger:model ListUsersOKBodyUsersItems0 */ type ListUsersOKBodyUsersItems0 struct { - // user id UserID int64 `json:"user_id,omitempty"` diff --git a/api/userpb/json/client/user/update_user_parameters.go b/api/userpb/json/client/user/update_user_parameters.go index 07ac34de23..b42c6ce1a8 100644 --- a/api/userpb/json/client/user/update_user_parameters.go +++ b/api/userpb/json/client/user/update_user_parameters.go @@ -60,7 +60,6 @@ UpdateUserParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateUserParams struct { - // Body. Body UpdateUserBody @@ -130,7 +129,6 @@ func (o *UpdateUserParams) SetBody(body UpdateUserBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/userpb/json/client/user/update_user_responses.go b/api/userpb/json/client/user/update_user_responses.go index f4d3701dc9..ffedede7cf 100644 --- a/api/userpb/json/client/user/update_user_responses.go +++ b/api/userpb/json/client/user/update_user_responses.go @@ -60,12 +60,12 @@ type UpdateUserOK struct { func (o *UpdateUserOK) Error() string { return fmt.Sprintf("[PUT /v1/user][%d] updateUserOk %+v", 200, o.Payload) } + func (o *UpdateUserOK) GetPayload() *UpdateUserOKBody { return o.Payload } func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateUserOKBody) // response payload @@ -102,12 +102,12 @@ func (o *UpdateUserDefault) Code() int { func (o *UpdateUserDefault) Error() string { return fmt.Sprintf("[PUT /v1/user][%d] UpdateUser default %+v", o._statusCode, o.Payload) } + func (o *UpdateUserDefault) GetPayload() *UpdateUserDefaultBody { return o.Payload } func (o *UpdateUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateUserDefaultBody) // response payload @@ -123,7 +123,6 @@ UpdateUserBody update user body swagger:model UpdateUserBody */ type UpdateUserBody struct { - // Product Tour ProductTourCompleted bool `json:"product_tour_completed,omitempty"` @@ -164,7 +163,6 @@ UpdateUserDefaultBody update user default body swagger:model UpdateUserDefaultBody */ type UpdateUserDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -230,9 +228,7 @@ func (o *UpdateUserDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if err := o.Details[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { @@ -243,7 +239,6 @@ func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -272,7 +267,6 @@ UpdateUserDefaultBodyDetailsItems0 update user default body details items0 swagger:model UpdateUserDefaultBodyDetailsItems0 */ type UpdateUserDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -310,7 +304,6 @@ UpdateUserOKBody update user OK body swagger:model UpdateUserOKBody */ type UpdateUserOKBody struct { - // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/userpb/user.pb.go b/api/userpb/user.pb.go index 8552ec0dc7..6e8cfecf80 100644 --- a/api/userpb/user.pb.go +++ b/api/userpb/user.pb.go @@ -7,14 +7,15 @@ package userpb import ( + reflect "reflect" + sync "sync" + _ "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" _ "google.golang.org/protobuf/types/known/timestamppb" _ "google.golang.org/protobuf/types/known/wrapperspb" - reflect "reflect" - sync "sync" ) const ( @@ -421,15 +422,18 @@ func file_userpb_user_proto_rawDescGZIP() []byte { return file_userpb_user_proto_rawDescData } -var file_userpb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_userpb_user_proto_goTypes = []interface{}{ - (*UserDetailsRequest)(nil), // 0: user.UserDetailsRequest - (*UserDetailsResponse)(nil), // 1: user.UserDetailsResponse - (*UserUpdateRequest)(nil), // 2: user.UserUpdateRequest - (*ListUsersRequest)(nil), // 3: user.ListUsersRequest - (*ListUsersResponse)(nil), // 4: user.ListUsersResponse - (*ListUsersResponse_UserDetail)(nil), // 5: user.ListUsersResponse.UserDetail -} +var ( + file_userpb_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_userpb_user_proto_goTypes = []interface{}{ + (*UserDetailsRequest)(nil), // 0: user.UserDetailsRequest + (*UserDetailsResponse)(nil), // 1: user.UserDetailsResponse + (*UserUpdateRequest)(nil), // 2: user.UserUpdateRequest + (*ListUsersRequest)(nil), // 3: user.ListUsersRequest + (*ListUsersResponse)(nil), // 4: user.ListUsersResponse + (*ListUsersResponse_UserDetail)(nil), // 5: user.ListUsersResponse.UserDetail + } +) + var file_userpb_user_proto_depIdxs = []int32{ 5, // 0: user.ListUsersResponse.users:type_name -> user.ListUsersResponse.UserDetail 0, // 1: user.User.GetUser:input_type -> user.UserDetailsRequest diff --git a/api/userpb/user.pb.gw.go b/api/userpb/user.pb.gw.go index 683d6d4fb9..1355ff4a7f 100644 --- a/api/userpb/user.pb.gw.go +++ b/api/userpb/user.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UserDetailsRequest @@ -37,7 +39,6 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -46,7 +47,6 @@ func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshal msg, err := server.GetUser(ctx, &protoReq) return msg, metadata, err - } func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,7 +63,6 @@ func request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -80,7 +79,6 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars msg, err := server.UpdateUser(ctx, &protoReq) return msg, metadata, err - } func request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -89,7 +87,6 @@ func request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -98,7 +95,6 @@ func local_request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marsh msg, err := server.ListUsers(ctx, &protoReq) return msg, metadata, err - } // RegisterUserHandlerServer registers the http handlers for service User to "mux". @@ -106,7 +102,6 @@ func local_request_User_ListUsers_0(ctx context.Context, marshaler runtime.Marsh // 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 RegisterUserHandlerFromEndpoint instead. func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error { - mux.Handle("GET", pattern_User_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -129,7 +124,6 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_User_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -154,7 +148,6 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_User_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_User_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -179,7 +172,6 @@ func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, serve } forward_User_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -222,7 +214,6 @@ func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc. // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UserClient" to call the correct interceptors. func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error { - mux.Handle("GET", pattern_User_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -242,7 +233,6 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_User_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_User_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -264,7 +254,6 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_User_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_User_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -286,7 +275,6 @@ func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, clien } forward_User_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/userpb/user.swagger.json b/api/userpb/user.swagger.json deleted file mode 100644 index a290877941..0000000000 --- a/api/userpb/user.swagger.json +++ /dev/null @@ -1,190 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "User API", - "version": "version not set" - }, - "tags": [ - { - "name": "User" - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/v1/user": { - "get": { - "summary": "Get user details", - "description": "Retrieve user details from PMM server", - "operationId": "GetUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/userUserDetailsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "User" - ] - }, - "put": { - "summary": "Update user", - "description": "Update details of given user in PMM server", - "operationId": "UpdateUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/userUserDetailsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/userUserUpdateRequest" - } - } - ], - "tags": [ - "User" - ] - } - }, - "/v1/user/list": { - "post": { - "summary": "List all users with details", - "description": "Retrieve user details for all users from PMM server", - "operationId": "ListUsers", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/userListUsersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "User" - ] - } - } - }, - "definitions": { - "ListUsersResponseUserDetail": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "format": "int64" - }, - "role_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "List of role IDs assigned to the user." - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "userListUsersResponse": { - "type": "object", - "properties": { - "users": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ListUsersResponseUserDetail" - } - } - } - }, - "userUserDetailsResponse": { - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "format": "int64", - "title": "User ID" - }, - "product_tour_completed": { - "type": "boolean", - "title": "Product Tour" - }, - "alerting_tour_completed": { - "type": "boolean", - "title": "Alerting Tour" - } - } - }, - "userUserUpdateRequest": { - "type": "object", - "properties": { - "product_tour_completed": { - "type": "boolean", - "title": "Product Tour" - }, - "alerting_tour_completed": { - "type": "boolean", - "title": "Alerting Tour" - } - } - } - } -} diff --git a/api/userpb/user_grpc.pb.go b/api/userpb/user_grpc.pb.go index e4247b4dbb..3db7168728 100644 --- a/api/userpb/user_grpc.pb.go +++ b/api/userpb/user_grpc.pb.go @@ -8,6 +8,7 @@ package userpb import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -79,15 +80,16 @@ type UserServer interface { } // UnimplementedUserServer must be embedded to have forward compatible implementations. -type UnimplementedUserServer struct { -} +type UnimplementedUserServer struct{} func (UnimplementedUserServer) GetUser(context.Context, *UserDetailsRequest) (*UserDetailsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } + func (UnimplementedUserServer) UpdateUser(context.Context, *UserUpdateRequest) (*UserDetailsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } + func (UnimplementedUserServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } From 50138c17cb822b7c984259185271d7c476a22040 Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 17 Aug 2023 20:19:58 +0600 Subject: [PATCH 07/11] EVEREST-287 fixed supervisor tests --- managed/services/supervisord/supervisord_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/managed/services/supervisord/supervisord_test.go b/managed/services/supervisord/supervisord_test.go index 04bcc5a425..266ab97e80 100644 --- a/managed/services/supervisord/supervisord_test.go +++ b/managed/services/supervisord/supervisord_test.go @@ -44,6 +44,10 @@ func TestConfig(t *testing.T) { settings.VictoriaMetrics.CacheEnabled = false for _, tmpl := range templates.Templates() { + n := tmpl.Name() + if n == "" { + continue + } tmpl := tmpl t.Run(tmpl.Name(), func(t *testing.T) { t.Parallel() From 0d2bcadd943850812a8b90543a6be3251709a7e6 Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 28 Sep 2023 20:34:47 +0600 Subject: [PATCH 08/11] EVEREST-287 Cleanup after merge --- Makefile.include | 2 +- docker-compose.yml | 1 - go.mod | 42 +- go.sum | 209 +--- managed/services/dbaas/dbaas_client.go | 170 --- .../dbaas/kubernetes/client/client.go | 1089 ----------------- .../dbaas/kubernetes/client/client_test.go | 631 ---------- .../services/dbaas/kubernetes/client/ctl.go | 65 - .../kubernetes/client/database/database.go | 116 -- .../services/dbaas/kubernetes/client/gen.go | 19 - .../kubernetes/client/kubeclient_interface.go | 83 -- .../dbaas/kubernetes/client/load_config.go | 51 - .../client/mock_kube_client_connector.go | 730 ----------- .../dbaas/kubernetes/client/writer.go | 67 - .../services/dbaas/kubernetes/kubernetes.go | 973 --------------- .../dbaas/kubernetes/olm_operator_test.go | 84 -- managed/services/dbaas/kubernetes/types.go | 597 --------- .../services/dbaas/kubernetes/types_test.go | 772 ------------ .../dbaas/utils/convertors/convertors.go | 122 -- .../dbaas/utils/convertors/convertors_test.go | 89 -- 20 files changed, 23 insertions(+), 5889 deletions(-) delete mode 100644 managed/services/dbaas/dbaas_client.go delete mode 100644 managed/services/dbaas/kubernetes/client/client.go delete mode 100644 managed/services/dbaas/kubernetes/client/client_test.go delete mode 100644 managed/services/dbaas/kubernetes/client/ctl.go delete mode 100644 managed/services/dbaas/kubernetes/client/database/database.go delete mode 100644 managed/services/dbaas/kubernetes/client/gen.go delete mode 100644 managed/services/dbaas/kubernetes/client/kubeclient_interface.go delete mode 100644 managed/services/dbaas/kubernetes/client/load_config.go delete mode 100644 managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go delete mode 100644 managed/services/dbaas/kubernetes/client/writer.go delete mode 100644 managed/services/dbaas/kubernetes/kubernetes.go delete mode 100644 managed/services/dbaas/kubernetes/olm_operator_test.go delete mode 100644 managed/services/dbaas/kubernetes/types.go delete mode 100644 managed/services/dbaas/kubernetes/types_test.go delete mode 100644 managed/services/dbaas/utils/convertors/convertors.go delete mode 100644 managed/services/dbaas/utils/convertors/convertors_test.go diff --git a/Makefile.include b/Makefile.include index 4559845dba..ae9170233f 100644 --- a/Makefile.include +++ b/Makefile.include @@ -39,7 +39,7 @@ gen: clean ## Generate files gen-api: ## Generate PMM API # generated by descriptors target - #bin/buf breaking --against descriptor.bin api + bin/buf breaking --against descriptor.bin api bin/buf generate -v api diff --git a/docker-compose.yml b/docker-compose.yml index b8ce1022f9..642897edc5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,6 @@ services: # - PERCONA_TEST_PMM_CLICKHOUSE_DATABASE=pmm # - PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE=10000 # - PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE=2 - # - PMM_DEBUG=1 # - PERCONA_TEST_CHECKS_FILE=/srv/checks/local-checks.yml # - PERCONA_TEST_POSTGRES_ADDR=pg # - PERCONA_TEST_POSTGRES_DBNAME=pmm-managed diff --git a/go.mod b/go.mod index e1fcbe7606..bf0a9aee9f 100644 --- a/go.mod +++ b/go.mod @@ -88,39 +88,29 @@ require ( require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect - github.com/blang/semver/v4 v4.0.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/go-errors/errors v1.4.2 // indirect - github.com/go-ini/ini v1.67.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/xlab/treeprint v1.2.0 // indirect - google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/mwitkow/go-proto-validators v0.3.2 // indirect + github.com/posener/complete v1.2.3 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/riywo/loginshell v0.0.0-20200815045211-7d26008be1ab // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.uber.org/atomic v1.11.0 // indirect google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect - sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + lukechampine.com/uint128 v1.2.0 // indirect + modernc.org/cc/v3 v3.40.0 // indirect + modernc.org/ccgo/v3 v3.16.13 // indirect + modernc.org/libc v1.24.1 // indirect + modernc.org/mathutil v1.5.0 // indirect + modernc.org/memory v1.6.0 // indirect + modernc.org/opt v0.1.3 // indirect + modernc.org/strutil v1.1.3 // indirect + modernc.org/token v1.0.1 // indirect ) require ( diff --git a/go.sum b/go.sum index c7cd284168..8d1c00e35c 100644 --- a/go.sum +++ b/go.sum @@ -43,24 +43,7 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aov github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.0 h1:+fxpya1I3WJEvl+qzET7NO2MkjtYkiZJxIcEN690W64= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph v0.8.0/go.mod h1:1wZ2sD5NUZGEk/RVNxjBFPqVHC39ekUDtmNnWhKhrGY= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -<<<<<<< HEAD -======= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest/adal v0.9.2/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= -github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -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 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= ->>>>>>> v3 github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -89,11 +72,7 @@ github.com/Percona-Lab/spec v0.20.5-percona/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5i github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= -<<<<<<< HEAD -======= github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= -github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= ->>>>>>> v3 github.com/alecthomas/kong v0.8.0 h1:ryDCzutfIqJPnNn0omnrgHLbAggDQM2VWHikE1xqK7s= github.com/alecthomas/kong v0.8.0/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= @@ -116,20 +95,9 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -<<<<<<< HEAD -github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.273 h1:CX8O0gK+cGrgUyv7bgJ6QQP9mQg7u5mweHdNzULH47c= -github.com/aws/aws-sdk-go v1.44.273/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= -======= -github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.40.7/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.45.2 h1:hTong9YUklQKqzrGk3WnKABReb5R8GjbG4Y6dEQfjnk= github.com/aws/aws-sdk-go v1.45.2/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= ->>>>>>> v3 github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -174,14 +142,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= -<<<<<<< HEAD -github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= -github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -======= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/craiggwilson/goke v0.0.0-20200309222237-69a77cdfe646/go.mod h1:IX+FckvUr3c6SNWSzspUD94HqCMFCW+sIK0lJGSkWkg= ->>>>>>> v3 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= @@ -191,11 +153,7 @@ github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27N github.com/dhui/dktest v0.3.16 h1:i6gq2YQEtcrjKbeJpBkWjE8MmLZPYllcjOFbTZuPDnw= github.com/dhui/dktest v0.3.16/go.mod h1:gYaA3LRmM8Z4vJl2MA0THIigJoZrwOansEOsp+kqxp0= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -<<<<<<< HEAD -======= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= ->>>>>>> v3 github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v23.0.4+incompatible h1:Kd3Bh9V/rO+XpTP/BLqM+gx8z7+Yb0AA2Ibj+nNo4ek= @@ -210,25 +168,10 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF 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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -<<<<<<< HEAD -github.com/envoyproxy/protoc-gen-validate v1.0.1 h1:kt9FtLiooDc0vbwTLhdg3dyNX1K9Qwa1EK9LcD4jVUQ= -github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -======= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.5.0/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= ->>>>>>> v3 github.com/go-co-op/gocron v1.31.0 h1:8VaWk7ARDpsVYFP8SmjvHrBZQkcPQ7HyAzF7acG57yE= github.com/go-co-op/gocron v1.31.0/go.mod h1:39f6KNSGVOU1LO/ZOoZfcSxwlsJDQOKSu8erN0SH48Y= github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= @@ -253,11 +196,6 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/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= -<<<<<<< HEAD -======= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= ->>>>>>> v3 github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= @@ -296,11 +234,6 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -<<<<<<< HEAD -======= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= ->>>>>>> v3 github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b h1:/vQ+oYKu+JoyaMPDsv5FzwuL2wwWBgBbtj/YLCi4LuA= github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b/go.mod h1:Xo4aNUOrJnVruqWQJBtW6+bTBDTniY8yZum5rF3b5jw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -354,9 +287,8 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU 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 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -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= @@ -381,11 +313,6 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -<<<<<<< HEAD -======= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= ->>>>>>> v3 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= @@ -397,6 +324,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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.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/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= @@ -411,31 +339,16 @@ github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbu github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= 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= -<<<<<<< HEAD -======= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= ->>>>>>> v3 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/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= -<<<<<<< HEAD -github.com/grafana/grafana-api-golang-client v0.23.0 h1:Uta0dSkxWYf1D83/E7MRLCG69387FiUc+k9U/35nMhY= -github.com/grafana/grafana-api-golang-client v0.23.0/go.mod h1:24W29gPe9yl0/3A9X624TPkAOR8DpHno490cPwnkv8E= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -======= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/grafana/grafana-api-golang-client v0.24.0 h1:9cUvft7xCMnnL/Uscwy7eoldn16Gz5TH4T1MymuVs8E= github.com/grafana/grafana-api-golang-client v0.24.0/go.mod h1:24W29gPe9yl0/3A9X624TPkAOR8DpHno490cPwnkv8E= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= ->>>>>>> v3 github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -544,22 +457,10 @@ github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsI github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -<<<<<<< HEAD -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -======= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= ->>>>>>> v3 github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= -<<<<<<< HEAD -github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -======= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= ->>>>>>> v3 github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -606,17 +507,8 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= -<<<<<<< HEAD -github.com/muesli/termenv v0.11.1-0.20220204035834-5ac8409525e0/go.mod h1:Bd5NYQ7pd+SrtBSrSNoBBmXlcY8+Xj4BMJgh8qcZrvs= -github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc= -github.com/muesli/termenv v0.15.1 h1:UzuTb/+hhlBugQz28rpzey4ZuKcZ03MeKsoG7IJZIxs= -github.com/muesli/termenv v0.15.1/go.mod h1:HeAQPTzpfs016yGtA4g00CsdYnVLJvxsS4ANqrZs2sQ= -======= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= ->>>>>>> v3 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 h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -627,15 +519,6 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -<<<<<<< HEAD -======= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= -github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= -github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= ->>>>>>> v3 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= @@ -664,9 +547,8 @@ github.com/percona/promconfig v0.2.5 h1:f/HN/CbECQs7d9RIB6MKVkuXstsrsqEDxRvf6yig github.com/percona/promconfig v0.2.5/go.mod h1:Y2uXi5QNk71+ceJHuI9poank+0S1kjxd3K105fXKVkg= github.com/pganalyze/pg_query_go/v2 v2.2.0 h1:OW+reH+ZY7jdEuPyuLGlf1m7dLbE+fDudKXhLs0Ttpk= github.com/pganalyze/pg_query_go/v2 v2.2.0/go.mod h1:XAxmVqz1tEGqizcQ3YSdN90vCOHBWjJi8URL1er5+cA= +github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -755,17 +637,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -<<<<<<< HEAD -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -======= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.3/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= ->>>>>>> v3 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= @@ -794,11 +667,6 @@ github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6 github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -<<<<<<< HEAD -======= -github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= -github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= ->>>>>>> v3 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= @@ -835,15 +703,7 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -<<<<<<< HEAD -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -======= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= ->>>>>>> v3 golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -857,8 +717,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 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/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 h1:pVgRXcIictcr+lBQIFeiwuwtDIs4eL21OuM9nyAADmo= +golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= 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= @@ -1024,9 +884,8 @@ golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/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-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1079,7 +938,6 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 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.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= @@ -1088,11 +946,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= -<<<<<<< HEAD -======= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= ->>>>>>> v3 gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= @@ -1152,21 +1005,12 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc 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= -<<<<<<< HEAD -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e h1:Ao9GzfUMPH3zjVfzXG5rlWlk+Q8MXWKwWpwVQE1MXfw= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -======= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= ->>>>>>> v3 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= @@ -1179,13 +1023,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa 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= -<<<<<<< HEAD -google.golang.org/grpc v1.57.0-dev h1:XCvzqke2TBzQUs3a1MO1VsqVkWeAdJ/KmxHCAVtPpe8= -google.golang.org/grpc v1.57.0-dev/go.mod h1:ZPf89/axrdgRDfHqb7fa0GF5t4VUER0vWnqnPNuRP7k= -======= google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= ->>>>>>> v3 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= @@ -1235,27 +1074,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh 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= -<<<<<<< HEAD -======= -k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= -k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= -k8s.io/apiextensions-apiserver v0.26.2 h1:/yTG2B9jGY2Q70iGskMf41qTLhL9XeNN2KhI0uDgwko= -k8s.io/apiextensions-apiserver v0.26.2/go.mod h1:Y7UPgch8nph8mGCuVk0SK83LnS8Esf3n6fUBgew8SH8= -k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= -k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/cli-runtime v0.28.0 h1:Tcz1nnccXZDNIzoH6EwjCs+7ezkUGhorzCweEvlVOFg= -k8s.io/cli-runtime v0.28.0/go.mod h1:U+ySmOKBm/JUCmebhmecXeTwNN1RzI7DW4+OM8Oryas= -k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= -k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.0 h1:qhfju0OaU+JGeBlToPeeIg2UJUWP++QwTkpio6nlPKg= -k8s.io/kubectl v0.28.0/go.mod h1:1We+E5nSX3/TVoSQ6y5Bzld5OhTBHZHlKEYl7g/NaTk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= ->>>>>>> v3 lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= @@ -1288,18 +1106,3 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -<<<<<<< HEAD -======= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= -sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= -sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= -sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= ->>>>>>> v3 diff --git a/managed/services/dbaas/dbaas_client.go b/managed/services/dbaas/dbaas_client.go deleted file mode 100644 index 2768eea2b1..0000000000 --- a/managed/services/dbaas/dbaas_client.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package dbaas contains logic related to communication with dbaas-controller. -// -//nolint:lll -package dbaas - -import ( - "context" - "sync" - "time" - - controllerv1beta1 "github.com/percona-platform/dbaas-api/gen/controller" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "google.golang.org/grpc" - "google.golang.org/grpc/backoff" - "google.golang.org/grpc/credentials/insecure" - - "github.com/percona/pmm/managed/services/dbaas/kubernetes" - "github.com/percona/pmm/version" -) - -// Client is a client for dbaas-controller. -type Client struct { - l *logrus.Entry - kubernetesClient controllerv1beta1.KubernetesClusterAPIClient - pxcClusterClient controllerv1beta1.PXCClusterAPIClient - psmdbClusterClient controllerv1beta1.PSMDBClusterAPIClient - logsClient controllerv1beta1.LogsAPIClient - pxcOperatorClient controllerv1beta1.PXCOperatorAPIClient - psmdbOperatorClient controllerv1beta1.PSMDBOperatorAPIClient - connM sync.RWMutex - conn *grpc.ClientConn - dbaasControllerAPIAddress string -} - -// NewClient creates new Client object. -func NewClient(dbaasControllerAPIAddress string) *Client { - c := &Client{ - l: logrus.WithField("component", "dbaas.Client"), - dbaasControllerAPIAddress: dbaasControllerAPIAddress, - } - return c -} - -// Connect connects the client to dbaas-controller API. -func (c *Client) Connect(ctx context.Context) error { - c.connM.Lock() - defer c.connM.Unlock() - c.l.Infof("Connecting to dbaas-controller API on %s.", c.dbaasControllerAPIAddress) - if c.conn != nil { - c.l.Warnf("Trying to connect to dbaas-controller API but connection is already up.") - return nil - } - backoffConfig := backoff.DefaultConfig - backoffConfig.MaxDelay = 10 * time.Second - opts := []grpc.DialOption{ - grpc.WithBlock(), // Dial blocks, we do not connect in background. - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithConnectParams(grpc.ConnectParams{Backoff: backoffConfig, MinConnectTimeout: 10 * time.Second}), - grpc.WithUserAgent("pmm-managed/" + version.Version), - } - - conn, err := grpc.DialContext(ctx, c.dbaasControllerAPIAddress, opts...) - if err != nil { - return errors.Errorf("failed to connect to dbaas-controller API: %v", err) - } - c.conn = conn - - c.kubernetesClient = controllerv1beta1.NewKubernetesClusterAPIClient(conn) - c.pxcClusterClient = controllerv1beta1.NewPXCClusterAPIClient(conn) - c.psmdbClusterClient = controllerv1beta1.NewPSMDBClusterAPIClient(conn) - c.logsClient = controllerv1beta1.NewLogsAPIClient(conn) - c.psmdbOperatorClient = controllerv1beta1.NewPSMDBOperatorAPIClient(conn) - c.pxcOperatorClient = controllerv1beta1.NewPXCOperatorAPIClient(conn) - - c.l.Info("Connected to dbaas-controller API.") - return nil -} - -// Disconnect disconnects the client from dbaas-controller API. -func (c *Client) Disconnect() error { - c.connM.Lock() - defer c.connM.Unlock() - c.l.Info("Disconnecting from dbaas-controller API.") - - if c.conn == nil { - c.l.Warnf("Trying to disconnect from dbaas-controller API but the connection is not up.") - return nil - } - - if err := c.conn.Close(); err != nil { - return errors.Errorf("failed to close conn to dbaas-controller API: %v", err) - } - c.conn = nil - c.l.Info("Disconected from dbaas-controller API.") - return nil -} - -// GetLogs gets logs out of cluster containers and events out of pods. -func (c *Client) GetLogs(ctx context.Context, in *controllerv1beta1.GetLogsRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetLogsResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.logsClient.GetLogs(ctx, in, opts...) -} - -// GetResources returns all and available resources of a Kubernetes cluster. -func (c *Client) GetResources(ctx context.Context, in *controllerv1beta1.GetResourcesRequest, opts ...grpc.CallOption) (*controllerv1beta1.GetResourcesResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.kubernetesClient.GetResources(ctx, in, opts...) -} - -// InstallPXCOperator installs kubernetes pxc operator. -func (c *Client) InstallPXCOperator(ctx context.Context, in *controllerv1beta1.InstallPXCOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPXCOperatorResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.pxcOperatorClient.InstallPXCOperator(ctx, in, opts...) -} - -// InstallPSMDBOperator installs kubernetes PSMDB operator. -func (c *Client) InstallPSMDBOperator(ctx context.Context, in *controllerv1beta1.InstallPSMDBOperatorRequest, opts ...grpc.CallOption) (*controllerv1beta1.InstallPSMDBOperatorResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.psmdbOperatorClient.InstallPSMDBOperator(ctx, in, opts...) -} - -// StartMonitoring sets up victoria metrics operator to monitor kubernetes cluster. -func (c *Client) StartMonitoring(ctx context.Context, in *controllerv1beta1.StartMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StartMonitoringResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.kubernetesClient.StartMonitoring(ctx, in, opts...) -} - -// StopMonitoring removes victoria metrics operator from the kubernetes cluster. -func (c *Client) StopMonitoring(ctx context.Context, in *controllerv1beta1.StopMonitoringRequest, opts ...grpc.CallOption) (*controllerv1beta1.StopMonitoringResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - return c.kubernetesClient.StopMonitoring(ctx, in, opts...) -} - -func (c *Client) GetKubeConfig(ctx context.Context, _ *controllerv1beta1.GetKubeconfigRequest, _ ...grpc.CallOption) (*controllerv1beta1.GetKubeconfigResponse, error) { - c.connM.RLock() - defer c.connM.RUnlock() - - kClient, err := kubernetes.NewIncluster() - if err != nil { - c.l.Errorf("failed creating kubernetes client: %v", err) - return nil, err - } - - kubeConfig, err := kClient.GetKubeconfig(ctx) - return &controllerv1beta1.GetKubeconfigResponse{ - Kubeconfig: kubeConfig, - }, err -} diff --git a/managed/services/dbaas/kubernetes/client/client.go b/managed/services/dbaas/kubernetes/client/client.go deleted file mode 100644 index 832023e00b..0000000000 --- a/managed/services/dbaas/kubernetes/client/client.go +++ /dev/null @@ -1,1089 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package client TODO. -package client - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "log" - "os" - "sort" - "strings" - "sync" - "text/tabwriter" - "time" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - "gopkg.in/yaml.v3" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextv1clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - yamlSerializer "k8s.io/apimachinery/pkg/runtime/serializer/yaml" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/duration" - "k8s.io/apimachinery/pkg/util/wait" - yamlutil "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/apimachinery/pkg/version" - "k8s.io/cli-runtime/pkg/resource" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/kubernetes/scheme" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - _ "k8s.io/client-go/plugin/pkg/client/auth" // load all auth plugins - "k8s.io/client-go/rest" - "k8s.io/client-go/restmapper" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/tools/reference" - deploymentutil "k8s.io/kubectl/pkg/util/deployment" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/apiutil" - - "github.com/percona/pmm/managed/services/dbaas/kubernetes/client/database" -) - -const ( - configKind = "Config" - apiVersion = "v1" - defaultName = "default" - - dbaasToolPath = "/opt/dbaas-tools/bin" - - defaultQPSLimit = 100 - defaultBurstLimit = 150 - defaultChunkSize = 500 - - defaultAPIURIPath = "/api" - defaultAPIsURIPath = "/apis" -) - -// Each level has 2 spaces for PrefixWriter -// -//nolint:stylecheck -const ( - LEVEL_0 = iota - LEVEL_1 - LEVEL_2 - LEVEL_3 - LEVEL_4 -) - -// Client is the internal client for Kubernetes. -type Client struct { - clientset kubernetes.Interface - apiextClientset apiextv1clientset.Interface - dynamicClientset dynamic.Interface - dbClusterClient *database.DatabaseClusterClient - rcLock *sync.Mutex - restConfig *rest.Config - namespace string -} - -// SortableEvents implements sort.Interface for []api.Event based on the Timestamp field. -type SortableEvents []corev1.Event - -func (list SortableEvents) Len() int { - return len(list) -} - -func (list SortableEvents) Swap(i, j int) { - list[i], list[j] = list[j], list[i] -} - -func (list SortableEvents) Less(i, j int) bool { - return list[i].LastTimestamp.Time.Before(list[j].LastTimestamp.Time) -} - -type resourceError struct { - name string - issue string -} - -type podError struct { - resourceError -} - -type deploymentError struct { - resourceError - podErrs podErrors -} - -type ( - deploymentErrors []deploymentError - podErrors []podError -) - -func (e deploymentErrors) Error() string { - var sb strings.Builder - for _, i := range e { - sb.WriteString(fmt.Sprintf("deployment %s has error: %s\n%s", i.name, i.issue, i.podErrs.Error())) - } - return sb.String() -} - -func (e podErrors) Error() string { - var sb strings.Builder - for _, i := range e { - sb.WriteString(fmt.Sprintf("\tpod %s has error: %s\n", i.name, i.issue)) - } - return sb.String() -} - -// NewFromInCluster returns a client object which uses the service account -// kubernetes gives to pods. It's intended for clients that expect to be -// running inside a pod running on kubernetes. It will return ErrNotInCluster -// if called from a process not running in a kubernetes environment. -func NewFromInCluster() (*Client, error) { - config, err := rest.InClusterConfig() - if err != nil { - return nil, err - } - config.QPS = defaultQPSLimit - config.Burst = defaultBurstLimit - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return nil, err - } - apiextClientset, err := apiextv1clientset.NewForConfig(config) - if err != nil { - return nil, err - } - dynamicClientset, err := dynamic.NewForConfig(config) - if err != nil { - return nil, err - } - c := &Client{ - clientset: clientset, - apiextClientset: apiextClientset, - dynamicClientset: dynamicClientset, - restConfig: config, - rcLock: &sync.Mutex{}, - } - err = c.setup() - return c, err -} - -// NewFromKubeConfigString creates a new client for the given config string. -// It's intended for clients that expect to be running outside of a cluster. -func NewFromKubeConfigString(kubeconfig string) (*Client, error) { - config, err := clientcmd.BuildConfigFromKubeconfigGetter("", NewConfigGetter(kubeconfig).loadFromString) - if err != nil { - return nil, err - } - config.QPS = defaultQPSLimit - config.Burst = defaultBurstLimit - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return nil, err - } - apiextClientset, err := apiextv1clientset.NewForConfig(config) - if err != nil { - return nil, err - } - dynamicClientset, err := dynamic.NewForConfig(config) - if err != nil { - return nil, err - } - c := &Client{ - clientset: clientset, - apiextClientset: apiextClientset, - dynamicClientset: dynamicClientset, - restConfig: config, - rcLock: &sync.Mutex{}, - } - err = c.setup() - return c, err -} - -func (c *Client) setup() error { - namespace := "default" - if space := os.Getenv("NAMESPACE"); space != "" { - namespace = space - } - // Set PATH variable to make aws-iam-authenticator executable - path := fmt.Sprintf("%s:%s", os.Getenv("PATH"), dbaasToolPath) - os.Setenv("PATH", path) - c.namespace = namespace - return c.initOperatorClients() -} - -// Initializes clients for operators. -func (c *Client) initOperatorClients() error { - dbClusterClient, err := database.NewForConfig(c.restConfig) - if err != nil { - return err - } - c.dbClusterClient = dbClusterClient - _, err = c.GetServerVersion() - return err -} - -// GetSecretsForServiceAccount returns secret by given service account name. -func (c *Client) GetSecretsForServiceAccount(ctx context.Context, accountName string) (*corev1.Secret, error) { - serviceAccount, err := c.clientset.CoreV1().ServiceAccounts(c.namespace).Get(ctx, accountName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - if len(serviceAccount.Secrets) == 0 { - return nil, errors.Errorf("no secrets available for namespace %s", c.namespace) - } - - return c.clientset.CoreV1().Secrets(c.namespace).Get( - ctx, - serviceAccount.Secrets[0].Name, - metav1.GetOptions{}) -} - -// GenerateKubeConfig generates kubeconfig. -func (c *Client) GenerateKubeConfig(secret *corev1.Secret) ([]byte, error) { - conf := &Config{ - Kind: configKind, - APIVersion: apiVersion, - CurrentContext: defaultName, - } - conf.Clusters = []ClusterInfo{ - { - Name: defaultName, - Cluster: Cluster{ - CertificateAuthorityData: secret.Data["ca.crt"], - Server: c.restConfig.Host, - }, - }, - } - conf.Contexts = []ContextInfo{ - { - Name: defaultName, - Context: Context{ - Cluster: defaultName, - User: "pmm-service-account", - Namespace: defaultName, - }, - }, - } - conf.Users = []UserInfo{ - { - Name: "pmm-service-account", - User: User{ - Token: string(secret.Data["token"]), - }, - }, - } - - return c.marshalKubeConfig(conf) -} - -// GetServerVersion returns server version. -func (c *Client) GetServerVersion() (*version.Info, error) { - return c.clientset.Discovery().ServerVersion() -} - -// ListDatabaseClusters returns list of managed PCX clusters. -func (c *Client) ListDatabaseClusters(ctx context.Context) (*dbaasv1.DatabaseClusterList, error) { - return c.dbClusterClient.DBClusters(c.namespace).List(ctx, metav1.ListOptions{}) -} - -// GetDatabaseCluster returns PXC clusters by provided name. -func (c *Client) GetDatabaseCluster(ctx context.Context, name string) (*dbaasv1.DatabaseCluster, error) { - cluster, err := c.dbClusterClient.DBClusters(c.namespace).Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return nil, err - } - return cluster, nil -} - -// GetStorageClasses returns all storage classes available in the cluster. -func (c *Client) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - return c.clientset.StorageV1().StorageClasses().List(ctx, metav1.ListOptions{}) -} - -// GetDeployment returns deployment by name. -func (c *Client) GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error) { - return c.clientset.AppsV1().Deployments(c.namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// GetSecret returns secret by name. -func (c *Client) GetSecret(ctx context.Context, name string) (*corev1.Secret, error) { - return c.clientset.CoreV1().Secrets(c.namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// ListSecrets returns secrets. -func (c *Client) ListSecrets(ctx context.Context) (*corev1.SecretList, error) { - return c.clientset.CoreV1().Secrets(c.namespace).List(ctx, metav1.ListOptions{}) -} - -// DeleteObject deletes object from the k8s cluster. -func (c *Client) DeleteObject(obj runtime.Object) error { - groupResources, err := restmapper.GetAPIGroupResources(c.clientset.Discovery()) - if err != nil { - return err - } - mapper := restmapper.NewDiscoveryRESTMapper(groupResources) - - gvk := obj.GetObjectKind().GroupVersionKind() - gk := schema.GroupKind{Group: gvk.Group, Kind: gvk.Kind} - mapping, err := mapper.RESTMapping(gk, gvk.Version) - if err != nil { - return err - } - namespace, name, err := c.retrieveMetaFromObject(obj) - if err != nil { - return err - } - cli, err := c.resourceClient(mapping.GroupVersionKind.GroupVersion()) - if err != nil { - return err - } - helper := resource.NewHelper(cli, mapping) - err = deleteObject(helper, namespace, name) - return err -} - -func deleteObject(helper *resource.Helper, namespace, name string) error { - if _, err := helper.Get(namespace, name); err == nil { - _, err = helper.Delete(namespace, name) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) ApplyObject(obj runtime.Object) error { - groupResources, err := restmapper.GetAPIGroupResources(c.clientset.Discovery()) - if err != nil { - return err - } - mapper := restmapper.NewDiscoveryRESTMapper(groupResources) - - gvk := obj.GetObjectKind().GroupVersionKind() - gk := schema.GroupKind{Group: gvk.Group, Kind: gvk.Kind} - mapping, err := mapper.RESTMapping(gk, gvk.Version) - if err != nil { - return err - } - namespace, name, err := c.retrieveMetaFromObject(obj) - if err != nil { - return err - } - cli, err := c.resourceClient(mapping.GroupVersionKind.GroupVersion()) - if err != nil { - return err - } - helper := resource.NewHelper(cli, mapping) - return c.applyObject(helper, namespace, name, obj) -} - -func (c *Client) applyObject(helper *resource.Helper, namespace, name string, obj runtime.Object) error { - if _, err := helper.Get(namespace, name); err != nil { - _, err = helper.Create(namespace, false, obj) - if err != nil { - return err - } - } else { - _, err = helper.Replace(namespace, name, true, obj) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) retrieveMetaFromObject(obj runtime.Object) (namespace, name string, err error) { //nolint:nonamedreturns - name, err = meta.NewAccessor().Name(obj) - if err != nil { - return - } - namespace, err = meta.NewAccessor().Namespace(obj) - if err != nil { - return - } - if namespace == "" { - namespace = c.namespace - } - return -} - -func (c *Client) resourceClient(gv schema.GroupVersion) (*rest.RESTClient, error) { - cfg := c.restConfig - cfg.ContentConfig = resource.UnstructuredPlusDefaultContentConfig() - cfg.GroupVersion = &gv - if len(gv.Group) == 0 { - cfg.APIPath = defaultAPIURIPath - } else { - cfg.APIPath = defaultAPIsURIPath - } - return rest.RESTClientFor(cfg) -} - -func (c *Client) marshalKubeConfig(conf *Config) ([]byte, error) { - config, err := json.Marshal(&conf) - if err != nil { - return nil, err - } - - var jsonObj interface{} - err = yaml.Unmarshal(config, &jsonObj) - if err != nil { - return nil, err - } - - return yaml.Marshal(jsonObj) -} - -// GetPersistentVolumes returns Persistent Volumes available in the cluster. -func (c *Client) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - return c.clientset.CoreV1().PersistentVolumes().List(ctx, metav1.ListOptions{}) -} - -// GetPods returns list of pods. -func (c *Client) GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) { - options := metav1.ListOptions{} - if labelSelector != nil && (labelSelector.MatchLabels != nil || labelSelector.MatchExpressions != nil) { - options.LabelSelector = metav1.FormatLabelSelector(labelSelector) - } - - return c.clientset.CoreV1().Pods(namespace).List(ctx, options) -} - -// GetNodes returns list of nodes. -func (c *Client) GetNodes(ctx context.Context) (*corev1.NodeList, error) { - return c.clientset.CoreV1().Nodes().List(ctx, metav1.ListOptions{}) -} - -// GetLogs returns logs for pod. -func (c *Client) GetLogs(ctx context.Context, pod, container string) (string, error) { - defaultLogLines := int64(3000) - options := &corev1.PodLogOptions{} - if container != "" { - options.Container = container - } - - options.TailLines = &defaultLogLines - buf := &bytes.Buffer{} - - req := c.clientset.CoreV1().Pods(c.namespace).GetLogs(pod, options) - podLogs, err := req.Stream(ctx) - if err != nil { - return buf.String(), err - } - - _, err = io.Copy(buf, podLogs) - if err != nil { - return buf.String(), err - } - - return buf.String(), nil -} - -func (c *Client) GetEvents(ctx context.Context, name string) (string, error) { - pod, err := c.clientset.CoreV1().Pods(c.namespace).Get(ctx, name, metav1.GetOptions{}) - if err != nil { - eventsInterface := c.clientset.CoreV1().Events(c.namespace) - selector := eventsInterface.GetFieldSelector(&name, &c.namespace, nil, nil) - initialOpts := metav1.ListOptions{ - FieldSelector: selector.String(), - Limit: defaultChunkSize, - } - events := &corev1.EventList{} - err2 := resource.FollowContinue(&initialOpts, - func(options metav1.ListOptions) (runtime.Object, error) { - newList, err := eventsInterface.List(ctx, options) - if err != nil { - return nil, resource.EnhanceListError(err, options, "events") - } - - events.Items = append(events.Items, newList.Items...) - return newList, nil - }) - - if err2 == nil && len(events.Items) != 0 { - return tabbedString(func(out io.Writer) error { - w := NewPrefixWriter(out) - w.Writef(0, "Pod '%v': error '%v', but found events.\n", name, err) - DescribeEvents(events, w) - return nil - }) - } - - return "", err - } - - var events *corev1.EventList - if ref, err := reference.GetReference(scheme.Scheme, pod); err != nil { - fmt.Printf("Unable to construct reference to '%#v': %v", pod, err) //nolint:forbidigo - } else { - ref.Kind = "" - if _, isMirrorPod := pod.Annotations[corev1.MirrorPodAnnotationKey]; isMirrorPod { - ref.UID = types.UID(pod.Annotations[corev1.MirrorPodAnnotationKey]) - } - - events, _ = searchEvents(c.clientset.CoreV1(), ref, defaultChunkSize) //nolint:contextcheck - } - - return tabbedString(func(out io.Writer) error { - w := NewPrefixWriter(out) - w.Writef(LEVEL_0, name+" ") - DescribeEvents(events, w) - return nil - }) -} - -func tabbedString(f func(io.Writer) error) (string, error) { - out := &tabwriter.Writer{} - buf := &bytes.Buffer{} - out.Init(buf, 0, 8, 2, ' ', 0) - - err := f(out) - if err != nil { - return "", err - } - - out.Flush() - str := buf.String() - return str, nil -} - -func DescribeEvents(el *corev1.EventList, w PrefixWriter) { - if len(el.Items) == 0 { - w.Writef(LEVEL_0, "Events:\t\n") - return - } - - w.Flush() - sort.Sort(SortableEvents(el.Items)) - w.Writef(LEVEL_0, "Events:\n Type\tReason\tAge\tFrom\tMessage\n") - w.Writef(LEVEL_1, "----\t------\t----\t----\t-------\n") - for _, e := range el.Items { - var interval string - firstTimestampSince := translateMicroTimestampSince(e.EventTime) - if e.EventTime.IsZero() { - firstTimestampSince = translateTimestampSince(e.FirstTimestamp) - } - - switch { - case e.Series != nil: - interval = fmt.Sprintf("%s (x%d over %s)", translateMicroTimestampSince(e.Series.LastObservedTime), e.Series.Count, firstTimestampSince) - case e.Count > 1: - interval = fmt.Sprintf("%s (x%d over %s)", translateTimestampSince(e.LastTimestamp), e.Count, firstTimestampSince) - default: - interval = firstTimestampSince - } - - source := e.Source.Component - if source == "" { - source = e.ReportingController - } - - w.Writef(LEVEL_1, "%v\t%v\t%s\t%v\t%v\n", - e.Type, - e.Reason, - interval, - source, - strings.TrimSpace(e.Message)) - } -} - -// searchEvents finds events about the specified object. -// It is very similar to CoreV1.Events.Search, but supports the Limit parameter. -func searchEvents(client corev1client.EventsGetter, objOrRef runtime.Object, limit int64) (*corev1.EventList, error) { - ref, err := reference.GetReference(scheme.Scheme, objOrRef) - if err != nil { - return nil, err - } - - stringRefKind := ref.Kind - var refKind *string - if len(stringRefKind) > 0 { - refKind = &stringRefKind - } - - stringRefUID := string(ref.UID) - var refUID *string - if len(stringRefUID) > 0 { - refUID = &stringRefUID - } - - e := client.Events(ref.Namespace) - fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - initialOpts := metav1.ListOptions{FieldSelector: fieldSelector.String(), Limit: limit} - eventList := &corev1.EventList{} - err = resource.FollowContinue(&initialOpts, - func(options metav1.ListOptions) (runtime.Object, error) { - newEvents, err := e.List(context.TODO(), options) - if err != nil { - return nil, resource.EnhanceListError(err, options, "events") - } - - eventList.Items = append(eventList.Items, newEvents.Items...) - return newEvents, nil - }) - - return eventList, err -} - -// translateMicroTimestampSince returns the elapsed time since timestamp in -// human-readable approximation. -func translateMicroTimestampSince(timestamp metav1.MicroTime) string { - if timestamp.IsZero() { - return "" - } - - return duration.HumanDuration(time.Since(timestamp.Time)) -} - -// translateTimestampSince returns the elapsed time since timestamp in -// human-readable approximation. -func translateTimestampSince(timestamp metav1.Time) string { - if timestamp.IsZero() { - return "" - } - - return duration.HumanDuration(time.Since(timestamp.Time)) -} - -// ApplyFile accepts manifest file contents, parses into []runtime.Object -// and applies them against the cluster. -func (c *Client) ApplyFile(fileBytes []byte) error { - objs, err := c.getObjects(fileBytes) - if err != nil { - return err - } - for i := range objs { - err := c.ApplyObject(objs[i]) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) getObjects(f []byte) ([]runtime.Object, error) { - objs := []runtime.Object{} - decoder := yamlutil.NewYAMLOrJSONDecoder(bytes.NewReader(f), 100) - var err error - for { - var rawObj runtime.RawExtension - if err = decoder.Decode(&rawObj); err != nil { - break - } - - obj, _, err := yamlSerializer.NewDecodingSerializer(unstructured.UnstructuredJSONScheme).Decode(rawObj.Raw, nil, nil) - if err != nil { - return nil, err - } - - unstructuredMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) - if err != nil { - return nil, err - } - - objs = append(objs, &unstructured.Unstructured{Object: unstructuredMap}) - } - - return objs, nil //nolint:nilerr -} - -// DoCSVWait waits until for a CSV to be applied. -func (c Client) DoCSVWait(ctx context.Context, key types.NamespacedName) error { - var ( - curPhase v1alpha1.ClusterServiceVersionPhase - newPhase v1alpha1.ClusterServiceVersionPhase - ) - - kubeclient, err := c.getKubeclient() - if err != nil { - return err - } - - csv := v1alpha1.ClusterServiceVersion{} - csvPhaseSucceeded := func() (bool, error) { - err := kubeclient.Get(ctx, key, &csv) - if err != nil { - if apierrors.IsNotFound(err) { - return false, nil - } - return false, err - } - newPhase = csv.Status.Phase - if newPhase != curPhase { - curPhase = newPhase - } - - switch curPhase { - case v1alpha1.CSVPhaseFailed: - return false, fmt.Errorf("csv failed: reason: %q, message: %q", csv.Status.Reason, csv.Status.Message) - case v1alpha1.CSVPhaseSucceeded: - return true, nil - default: - return false, nil - } - } - - err = wait.PollImmediateUntil(time.Second, csvPhaseSucceeded, ctx.Done()) - if err != nil && errors.Is(err, context.DeadlineExceeded) { - depCheckErr := c.checkDeploymentErrors(ctx, key, csv) - if depCheckErr != nil { - return depCheckErr - } - } - return err -} - -// GetSubscriptionCSV retrieves a subscription CSV. -func (c Client) GetSubscriptionCSV(ctx context.Context, subKey types.NamespacedName) (types.NamespacedName, error) { - var csvKey types.NamespacedName - - kubeclient, err := c.getKubeclient() - if err != nil { - return csvKey, err - } - - subscriptionInstalledCSV := func() (bool, error) { - sub := v1alpha1.Subscription{} - err := kubeclient.Get(ctx, subKey, &sub) - if err != nil { - return false, err - } - installedCSV := sub.Status.InstalledCSV - if installedCSV == "" { - return false, nil - } - csvKey = types.NamespacedName{ - Namespace: subKey.Namespace, - Name: installedCSV, - } - log.Printf(" Found installed CSV %q", installedCSV) - return true, nil - } - return csvKey, wait.PollImmediateUntil(time.Second, subscriptionInstalledCSV, ctx.Done()) -} - -func (c *Client) getKubeclient() (client.Client, error) { //nolint:ireturn - rm, err := apiutil.NewDynamicRESTMapper(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "failed to create dynamic rest mapper") - } - - cl, err := client.New(c.restConfig, client.Options{ - Scheme: scheme.Scheme, - Mapper: rm, - }) - if err != nil { - return nil, errors.Wrap(err, "failed to create client") - } - return cl, nil -} - -// checkDeploymentErrors function loops through deployment specs of a given CSV, and prints reason -// in case of failures, based on deployment condition. -func (c Client) checkDeploymentErrors(ctx context.Context, key types.NamespacedName, csv v1alpha1.ClusterServiceVersion) error { - depErrs := deploymentErrors{} - if key.Namespace == "" { - return fmt.Errorf("no namespace provided to get deployment failures") - } - - kubeclient, err := c.getKubeclient() - if err != nil { - return err - } - - dep := &appsv1.Deployment{} - for _, ds := range csv.Spec.InstallStrategy.StrategySpec.DeploymentSpecs { - depKey := types.NamespacedName{ - Namespace: key.Namespace, - Name: ds.Name, - } - depSelectors := ds.Spec.Selector - if err := kubeclient.Get(ctx, depKey, dep); err != nil { - depErrs = append(depErrs, deploymentError{ - resourceError: resourceError{ - name: ds.Name, - issue: err.Error(), - }, - }) - continue - } - for _, s := range dep.Status.Conditions { - if s.Type == appsv1.DeploymentAvailable && s.Status != corev1.ConditionTrue { - depErr := deploymentError{ - resourceError: resourceError{ - name: ds.Name, - issue: s.Reason, - }, - } - podErr := c.checkPodErrors(ctx, kubeclient, depSelectors, key) - podErrs := podErrors{} - if errors.As(podErr, &podErrs) { - depErr.podErrs = append(depErr.podErrs, podErrs...) - } else { - return podErr - } - depErrs = append(depErrs, depErr) - } - } - } - - return depErrs -} - -// checkPodErrors loops through pods, and returns pod errors if any. -func (c Client) checkPodErrors(ctx context.Context, kubeclient client.Client, depSelectors *metav1.LabelSelector, key types.NamespacedName) error { - // loop through pods and return specific error message. - podErr := podErrors{} - podList := &corev1.PodList{} - podLabelSelectors, err := metav1.LabelSelectorAsSelector(depSelectors) - if err != nil { - return err - } - - options := client.ListOptions{ - LabelSelector: podLabelSelectors, - Namespace: key.Namespace, - } - - if err := kubeclient.List(ctx, podList, &options); err != nil { - return errors.Wrap(err, "error getting Pods") - } - - for _, p := range podList.Items { - for _, cs := range p.Status.ContainerStatuses { - if !cs.Ready { - if cs.State.Waiting != nil { - containerName := p.Name + ":" + cs.Name - podErr = append(podErr, podError{resourceError{name: containerName, issue: cs.State.Waiting.Message}}) - } - } - } - } - - return podErr -} - -// DoRolloutWait waits until a deployment has been rolled out susccessfully or there is an error. -func (c Client) DoRolloutWait(ctx context.Context, key types.NamespacedName) error { - kubeclient, err := c.getKubeclient() - if err != nil { - return err - } - - rolloutComplete := func() (bool, error) { - deployment := appsv1.Deployment{} - err := kubeclient.Get(ctx, key, &deployment) - if err != nil { - if apierrors.IsNotFound(err) { - // Waiting for Deployment to appear - return false, nil - } - return false, err - } - if deployment.Generation <= deployment.Status.ObservedGeneration { - cond := deploymentutil.GetDeploymentCondition(deployment.Status, appsv1.DeploymentProgressing) - if cond != nil && cond.Reason == deploymentutil.TimedOutReason { - return false, errors.New("progress deadline exceeded") - } - if deployment.Spec.Replicas != nil && deployment.Status.UpdatedReplicas < *deployment.Spec.Replicas { - // Waiting for Deployment to rollout. Not all replicas have been updated - return false, nil - } - if deployment.Status.Replicas > deployment.Status.UpdatedReplicas { - // Waiting for Deployment to rollout. Old replicas are pending termination - return false, nil - } - if deployment.Status.AvailableReplicas < deployment.Status.UpdatedReplicas { - // Waiting for Deployment to rollout. Not all updated replicas are available - return false, nil - } - // Deployment successfully rolled out - return true, nil - } - // Waiting for Deployment to rollout: waiting for deployment spec update to be observed - return false, nil - } - return wait.PollImmediateUntil(time.Second, rolloutComplete, ctx.Done()) -} - -// GetOperatorGroup retrieves an operator group details by namespace and name. -func (c *Client) GetOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) { - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - if namespace == "" { - namespace = c.namespace - } - - return operatorClient.OperatorsV1().OperatorGroups(namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// CreateOperatorGroup creates an operator group to be used as part of a subscription. -func (c *Client) CreateOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) { - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - if namespace == "" { - namespace = c.namespace - } - og := &v1.OperatorGroup{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - Spec: v1.OperatorGroupSpec{ - TargetNamespaces: []string{namespace}, - }, - Status: v1.OperatorGroupStatus{ - LastUpdated: &metav1.Time{ - Time: time.Now(), - }, - }, - } - - return operatorClient.OperatorsV1().OperatorGroups(namespace).Create(ctx, og, metav1.CreateOptions{}) -} - -// CreateSubscriptionForCatalog creates an OLM subscription. -func (c *Client) CreateSubscriptionForCatalog(ctx context.Context, namespace, name, catalogNamespace, catalog, - packageName, channel, startingCSV string, approval v1alpha1.Approval, -) (*v1alpha1.Subscription, error) { - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - subscription := &v1alpha1.Subscription{ - TypeMeta: metav1.TypeMeta{ - Kind: v1alpha1.SubscriptionKind, - APIVersion: v1alpha1.SubscriptionCRDAPIVersion, - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - }, - Spec: &v1alpha1.SubscriptionSpec{ - CatalogSource: catalog, - CatalogSourceNamespace: catalogNamespace, - Package: packageName, - Channel: channel, - StartingCSV: startingCSV, - InstallPlanApproval: approval, - }, - } - - sub, err := operatorClient.OperatorsV1alpha1().Subscriptions(namespace).Create(ctx, subscription, metav1.CreateOptions{}) - if err != nil { - if apierrors.IsAlreadyExists(err) { - return sub, nil - } - return sub, err - } - return sub, nil -} - -// GetSubscription retrieves an OLM subscription by namespace and name. -func (c *Client) GetSubscription(ctx context.Context, namespace, name string) (*v1alpha1.Subscription, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().Subscriptions(namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// ListSubscriptions all the subscriptions in the namespace. -func (c *Client) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().Subscriptions(namespace).List(ctx, metav1.ListOptions{}) -} - -// GetInstallPlan retrieves an OLM install plan by namespace and name. -func (c *Client) GetInstallPlan(ctx context.Context, namespace string, name string) (*v1alpha1.InstallPlan, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().InstallPlans(namespace).Get(ctx, name, metav1.GetOptions{}) -} - -// UpdateInstallPlan updates the existing install plan in the specified namespace. -func (c *Client) UpdateInstallPlan(ctx context.Context, namespace string, installPlan *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error) { - c.rcLock.Lock() - defer c.rcLock.Unlock() - - operatorClient, err := versioned.NewForConfig(c.restConfig) - if err != nil { - return nil, errors.Wrap(err, "cannot create an operator client instance") - } - - return operatorClient.OperatorsV1alpha1().InstallPlans(namespace).Update(ctx, installPlan, metav1.UpdateOptions{}) -} - -// ListCRDs returns a list of CRDs. -func (c *Client) ListCRDs(ctx context.Context, labelSelector *metav1.LabelSelector) (*apiextv1.CustomResourceDefinitionList, error) { - options := metav1.ListOptions{} - if labelSelector != nil && (labelSelector.MatchLabels != nil || labelSelector.MatchExpressions != nil) { - options.LabelSelector = metav1.FormatLabelSelector(labelSelector) - } - - return c.apiextClientset.ApiextensionsV1().CustomResourceDefinitions().List(ctx, options) -} - -// ListCRs returns a list of CRs. -func (c *Client) ListCRs( - ctx context.Context, - namespace string, - gvr schema.GroupVersionResource, - labelSelector *metav1.LabelSelector, -) (*unstructured.UnstructuredList, error) { - options := metav1.ListOptions{} - if labelSelector != nil && (labelSelector.MatchLabels != nil || labelSelector.MatchExpressions != nil) { - options.LabelSelector = metav1.FormatLabelSelector(labelSelector) - } - - return c.dynamicClientset.Resource(gvr).Namespace(namespace).List(ctx, options) -} diff --git a/managed/services/dbaas/kubernetes/client/client_test.go b/managed/services/dbaas/kubernetes/client/client_test.go deleted file mode 100644 index 6bcdcf0e62..0000000000 --- a/managed/services/dbaas/kubernetes/client/client_test.go +++ /dev/null @@ -1,631 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - corev1 "k8s.io/api/core/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextv1clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - apiextfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/version" - "k8s.io/client-go/dynamic" - dynamicfake "k8s.io/client-go/dynamic/fake" - "k8s.io/client-go/kubernetes" - fake "k8s.io/client-go/kubernetes/fake" -) - -func TestGetSecretsForServiceAccount(t *testing.T) { - clientset := fake.NewSimpleClientset( - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account", - Namespace: "default", - }, - Secrets: []corev1.ObjectReference{ - { - Name: "pmm-service-account-token", - }, - { - Name: "pmm-service-account-token-ktgqd", - }, - }, - }, - &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account-token", - Namespace: "default", - }, - }, - &corev1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account-token-ktgqd", - Namespace: "default", - }, - }) - client := &Client{clientset: clientset, restConfig: nil, namespace: "default"} - - ctx := context.Background() - secret, err := client.GetSecretsForServiceAccount(ctx, "pmm-service-account") - assert.NotNil(t, secret, "secret is nil") - assert.NoError(t, err) -} - -func TestGetSecretsForServiceAccountNoSecrets(t *testing.T) { - clientset := fake.NewSimpleClientset( - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-service-account", - Namespace: "default", - }, - }) - client := &Client{clientset: clientset, restConfig: nil, namespace: "default"} - - ctx := context.Background() - secret, err := client.GetSecretsForServiceAccount(ctx, "pmm-service-account") - assert.Nil(t, secret, "secret is not nil") - assert.Error(t, err) -} - -func TestGetServerVersion(t *testing.T) { - clientset := fake.NewSimpleClientset() - client := &Client{clientset: clientset, namespace: "default"} - ver, err := client.GetServerVersion() - expectedVersion := &version.Info{} - require.NoError(t, err) - assert.Equal(t, expectedVersion.Minor, ver.Minor) -} - -func TestGetPods(t *testing.T) { - t.Parallel() - - data := []struct { - clientset kubernetes.Interface - countExpectedPods int - inputNamespace string - err error - }{ - // there are no pods in the specified namespace - { - clientset: fake.NewSimpleClientset(&corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-pod", - Namespace: "my-safe-space", - }, - Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - }, - }, &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-pod", - Namespace: "get-me-outta-here", - }, - }), - inputNamespace: "default", - countExpectedPods: 0, - }, - // there is a pod in the specified namespace - { - clientset: fake.NewSimpleClientset(&corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "pmm-0", - Namespace: "default", - }, - Status: corev1.PodStatus{ - Phase: corev1.PodRunning, - }, - }, &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-pod", - Namespace: "get-me-outta-here", - }, - }), - inputNamespace: "default", - countExpectedPods: 1, - }, - } - - for _, test := range data { - t.Run("", func(test struct { - clientset kubernetes.Interface - countExpectedPods int - inputNamespace string - err error - }, - ) func(t *testing.T) { - return func(t *testing.T) { - clientset := test.clientset - client := &Client{clientset: clientset, namespace: "default"} - - pods, err := client.GetPods(context.Background(), test.inputNamespace, nil) - if test.err == nil { - assert.NoError(t, err) - assert.Equal(t, test.countExpectedPods, len(pods.Items)) - } else { - assert.Error(t, err) - assert.Equal(t, test.err, err) - } - } - }(test)) - } -} - -func TestListCRDs(t *testing.T) { - t.Parallel() - - data := []struct { - clientset apiextv1clientset.Interface - inputLabelSelector *metav1.LabelSelector - countExpectedCRDs int - err error - }{ - // no label selector - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }), - inputLabelSelector: nil, - countExpectedCRDs: 2, - }, - // one CRD matches label selector - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }), - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRDs: 1, - }, - // two CRDs match label selector - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "another-crd", - Labels: map[string]string{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }), - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRDs: 2, - }, - // one CRD matches label selector with multiple labels - { - clientset: apiextfake.NewSimpleClientset(&apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "awesome-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "cool-crd", - Labels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, &apiextv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "another-crd", - Labels: map[string]string{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }), - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - countExpectedCRDs: 1, - }, - } - - for _, test := range data { - t.Run("", func(test struct { - clientset apiextv1clientset.Interface - inputLabelSelector *metav1.LabelSelector - countExpectedCRDs int - err error - }, - ) func(t *testing.T) { - return func(t *testing.T) { - clientset := test.clientset - client := &Client{apiextClientset: clientset, namespace: "default"} - - crds, err := client.ListCRDs(context.Background(), test.inputLabelSelector) - if test.err == nil { - assert.NoError(t, err) - assert.Equal(t, test.countExpectedCRDs, len(crds.Items)) - } else { - assert.Error(t, err) - assert.Equal(t, test.err, err) - } - } - }(test)) - } -} - -func TestListCRs(t *testing.T) { - t.Parallel() - - data := []struct { - clientset dynamic.Interface - inputNamespace string - inputGVR schema.GroupVersionResource - inputLabelSelector *metav1.LabelSelector - countExpectedCRs int - err error - }{ - // one CR matches namespace - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "get-me-outta-here", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: nil, - countExpectedCRs: 1, - }, - // one CR matches GVR - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - {Group: "dbaas.percona.com", Version: "v1", Resource: "othercoolkinds"}: "OtherKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "OtherKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: nil, - countExpectedCRs: 1, - }, - // no label selector - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: nil, - countExpectedCRs: 2, - }, - // one CR matches label selector - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRs: 1, - }, - // two CRs match label selector - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - countExpectedCRs: 2, - }, - // one CR matches label selector with multiple labels - { - clientset: dynamicfake.NewSimpleDynamicClientWithCustomListKinds(runtime.NewScheme(), - map[schema.GroupVersionResource]string{ - {Group: "dbaas.percona.com", Version: "v1", Resource: "mycoolkinds"}: "MyCoolKindList", - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "awesome-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "cool-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - }, - }, &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "dbaas.percona.com/v1", - "kind": "MyCoolKind", - "metadata": map[string]interface{}{ - "name": "another-cr", - "namespace": "my-safe-space", - "labels": map[string]interface{}{ - "custom_label_key_3": "custom_label_value_1", - }, - }, - }, - }), - inputNamespace: "my-safe-space", - inputGVR: schema.GroupVersionResource{ - Group: "dbaas.percona.com", - Version: "v1", - Resource: "mycoolkinds", - }, - inputLabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "custom_label_key_1": "custom_label_value_1", - "custom_label_key_2": "custom_label_value_2", - }, - }, - countExpectedCRs: 1, - }, - } - - for _, test := range data { - t.Run("", func(test struct { - clientset dynamic.Interface - inputNamespace string - inputGVR schema.GroupVersionResource - inputLabelSelector *metav1.LabelSelector - countExpectedCRs int - err error - }, - ) func(t *testing.T) { - return func(t *testing.T) { - clientset := test.clientset - client := &Client{dynamicClientset: clientset, namespace: "default"} - - crds, err := client.ListCRs(context.Background(), test.inputNamespace, test.inputGVR, test.inputLabelSelector) - if test.err == nil { - assert.NoError(t, err) - assert.Equal(t, test.countExpectedCRs, len(crds.Items)) - } else { - assert.Error(t, err) - assert.Equal(t, test.err, err) - } - } - }(test)) - } -} diff --git a/managed/services/dbaas/kubernetes/client/ctl.go b/managed/services/dbaas/kubernetes/client/ctl.go deleted file mode 100644 index a3081c35bb..0000000000 --- a/managed/services/dbaas/kubernetes/client/ctl.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -type ( - // Cluster contains information about how to communicate with a kubernetes cluster. - Cluster struct { - CertificateAuthorityData []byte `json:"certificate-authority-data"` - Server string `json:"server"` - } - // ClusterInfo is a struct used to parse Cluster config from kubeconfig. - ClusterInfo struct { - Name string `json:"name"` - Cluster Cluster `json:"cluster"` - } - // User contains information that describes identity information. This is use to tell the kubernetes cluster who you are. - User struct { - Token string `json:"token"` - } - // UserInfo is a struct used to parse User config from kubeconfig. - UserInfo struct { - Name string `json:"name"` - User User `json:"user"` - } - // Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), - // a user (how do I identify myself), and a namespace (what subset of resources do I want to work with). - Context struct { - Cluster string `json:"cluster"` - User string `json:"user"` - Namespace string `json:"namespace"` - } - // ContextInfo is a struct used to parse Context config from kubeconfig. - ContextInfo struct { - Name string `json:"name"` - Context Context `json:"context"` - } - // Config holds the information needed to build connect to remote kubernetes clusters as a given user. - Config struct { - // Legacy field from pkg/api/types.go TypeMeta. - Kind string `json:"kind,omitempty"` - // Legacy field from pkg/api/types.go TypeMeta. - APIVersion string `json:"apiVersion,omitempty"` - // Preferences holds general information to be use for cli interactions - Clusters []ClusterInfo `json:"clusters"` - // AuthInfos is a map of referencable names to user configs - Users []UserInfo `json:"users"` - // Contexts is a map of referencable names to context configs - Contexts []ContextInfo `json:"contexts"` - // CurrentContext is the name of the context that you would like to use by default - CurrentContext string `json:"current-context"` - } -) diff --git a/managed/services/dbaas/kubernetes/client/database/database.go b/managed/services/dbaas/kubernetes/client/database/database.go deleted file mode 100644 index b332f0f1e9..0000000000 --- a/managed/services/dbaas/kubernetes/client/database/database.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package database TODO. -package database - -import ( - "context" - "sync" - - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" -) - -const ( - DBClusterKind = "DatabaseCluster" - apiKind = "databaseclusters" -) - -type DatabaseClusterClientInterface interface { - DBClusters(namespace string) DatabaseClusterInterface -} - -type DatabaseClusterClient struct { - restClient rest.Interface -} - -var addToScheme sync.Once - -func NewForConfig(c *rest.Config) (*DatabaseClusterClient, error) { - config := *c - config.ContentConfig.GroupVersion = &dbaasv1.GroupVersion - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - config.UserAgent = rest.DefaultKubernetesUserAgent() - - addToScheme.Do(func() { - dbaasv1.SchemeBuilder.AddToScheme(scheme.Scheme) - metav1.AddToGroupVersion(scheme.Scheme, dbaasv1.GroupVersion) - }) - - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - - return &DatabaseClusterClient{restClient: client}, nil -} - -func (c *DatabaseClusterClient) DBClusters(namespace string) DatabaseClusterInterface { //nolint:ireturn - return &dbClusterClient{ - restClient: c.restClient, - namespace: namespace, - } -} - -type DatabaseClusterInterface interface { - List(ctx context.Context, opts metav1.ListOptions) (*dbaasv1.DatabaseClusterList, error) - Get(ctx context.Context, name string, options metav1.GetOptions) (*dbaasv1.DatabaseCluster, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type dbClusterClient struct { - restClient rest.Interface - namespace string -} - -func (c *dbClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*dbaasv1.DatabaseClusterList, error) { - result := &dbaasv1.DatabaseClusterList{} - err := c.restClient. - Get(). - Namespace(c.namespace). - Resource(apiKind). - VersionedParams(&opts, scheme.ParameterCodec). - Do(ctx). - Into(result) - return result, err -} - -func (c *dbClusterClient) Get(ctx context.Context, name string, opts metav1.GetOptions) (*dbaasv1.DatabaseCluster, error) { - result := &dbaasv1.DatabaseCluster{} - err := c.restClient. - Get(). - Namespace(c.namespace). - Resource(apiKind). - VersionedParams(&opts, scheme.ParameterCodec). - Name(name). - Do(ctx). - Into(result) - return result, err -} - -func (c *dbClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { //nolint:ireturn - opts.Watch = true - return c.restClient. - Get(). - Namespace(c.namespace). - Resource(apiKind). - VersionedParams(&opts, scheme.ParameterCodec). - Watch(ctx) -} diff --git a/managed/services/dbaas/kubernetes/client/gen.go b/managed/services/dbaas/kubernetes/client/gen.go deleted file mode 100644 index 1b9eddf585..0000000000 --- a/managed/services/dbaas/kubernetes/client/gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -//go:generate ../../../../../bin/ifacemaker -f client.go -s Client -i KubeClientConnector -p client -o kubeclient_interface.go -//go:generate ../../../../../bin/mockery --name=KubeClientConnector --case=snake --inpackage diff --git a/managed/services/dbaas/kubernetes/client/kubeclient_interface.go b/managed/services/dbaas/kubernetes/client/kubeclient_interface.go deleted file mode 100644 index 4a258117c6..0000000000 --- a/managed/services/dbaas/kubernetes/client/kubeclient_interface.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by ifacemaker; DO NOT EDIT. - -package client - -import ( - "context" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/version" - _ "k8s.io/client-go/plugin/pkg/client/auth" -) - -// KubeClientConnector ... -type KubeClientConnector interface { - // GetSecretsForServiceAccount returns secret by given service account name. - GetSecretsForServiceAccount(ctx context.Context, accountName string) (*corev1.Secret, error) - // GenerateKubeConfig generates kubeconfig. - GenerateKubeConfig(secret *corev1.Secret) ([]byte, error) - // GetServerVersion returns server version. - GetServerVersion() (*version.Info, error) - // ListDatabaseClusters returns list of managed PCX clusters. - ListDatabaseClusters(ctx context.Context) (*dbaasv1.DatabaseClusterList, error) - // GetDatabaseCluster returns PXC clusters by provided name. - GetDatabaseCluster(ctx context.Context, name string) (*dbaasv1.DatabaseCluster, error) - // GetStorageClasses returns all storage classes available in the cluster. - GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) - // GetDeployment returns deployment by name. - GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error) - // GetSecret returns secret by name. - GetSecret(ctx context.Context, name string) (*corev1.Secret, error) - // ListSecrets returns secrets. - ListSecrets(ctx context.Context) (*corev1.SecretList, error) - // DeleteObject deletes object from the k8s cluster. - DeleteObject(obj runtime.Object) error - ApplyObject(obj runtime.Object) error - // GetPersistentVolumes returns Persistent Volumes available in the cluster. - GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) - // GetPods returns list of pods. - GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) - // GetNodes returns list of nodes. - GetNodes(ctx context.Context) (*corev1.NodeList, error) - // GetLogs returns logs for pod. - GetLogs(ctx context.Context, pod, container string) (string, error) - GetEvents(ctx context.Context, name string) (string, error) - // ApplyFile accepts manifest file contents, parses into []runtime.Object - // and applies them against the cluster. - ApplyFile(fileBytes []byte) error - // DoCSVWait waits until for a CSV to be applied. - DoCSVWait(ctx context.Context, key types.NamespacedName) error - // GetSubscriptionCSV retrieves a subscription CSV. - GetSubscriptionCSV(ctx context.Context, subKey types.NamespacedName) (types.NamespacedName, error) - // DoRolloutWait waits until a deployment has been rolled out susccessfully or there is an error. - DoRolloutWait(ctx context.Context, key types.NamespacedName) error - // GetOperatorGroup retrieves an operator group details by namespace and name. - GetOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) - // CreateOperatorGroup creates an operator group to be used as part of a subscription. - CreateOperatorGroup(ctx context.Context, namespace, name string) (*v1.OperatorGroup, error) - // CreateSubscriptionForCatalog creates an OLM subscription. - CreateSubscriptionForCatalog(ctx context.Context, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV string, approval v1alpha1.Approval) (*v1alpha1.Subscription, error) - // GetSubscription retrieves an OLM subscription by namespace and name. - GetSubscription(ctx context.Context, namespace, name string) (*v1alpha1.Subscription, error) - // ListSubscriptions all the subscriptions in the namespace. - ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) - // GetInstallPlan retrieves an OLM install plan by namespace and name. - GetInstallPlan(ctx context.Context, namespace string, name string) (*v1alpha1.InstallPlan, error) - // UpdateInstallPlan updates the existing install plan in the specified namespace. - UpdateInstallPlan(ctx context.Context, namespace string, installPlan *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error) - // ListCRDs returns a list of CRDs. - ListCRDs(ctx context.Context, labelSelector *metav1.LabelSelector) (*apiextv1.CustomResourceDefinitionList, error) - // ListCRs returns a list of CRs. - ListCRs(ctx context.Context, namespace string, gvr schema.GroupVersionResource, labelSelector *metav1.LabelSelector) (*unstructured.UnstructuredList, error) -} diff --git a/managed/services/dbaas/kubernetes/client/load_config.go b/managed/services/dbaas/kubernetes/client/load_config.go deleted file mode 100644 index ec8cffa41c..0000000000 --- a/managed/services/dbaas/kubernetes/client/load_config.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -import ( - "k8s.io/client-go/tools/clientcmd" - clientcmdapi "k8s.io/client-go/tools/clientcmd/api" -) - -// configGetter stores kubeconfig string to convert it to the final object -type configGetter struct { - kubeconfig string -} - -// NewConfigGetter creates a new configGetter struct -func NewConfigGetter(kubeconfig string) *configGetter { - return &configGetter{kubeconfig: kubeconfig} -} - -// loadFromString takes a kubeconfig and deserializes the contents into Config object. -func (g *configGetter) loadFromString() (*clientcmdapi.Config, error) { - config, err := clientcmd.Load([]byte(g.kubeconfig)) - if err != nil { - return nil, err - } - - if config.AuthInfos == nil { - config.AuthInfos = make(map[string]*clientcmdapi.AuthInfo) - } - if config.Clusters == nil { - config.Clusters = make(map[string]*clientcmdapi.Cluster) - } - if config.Contexts == nil { - config.Contexts = make(map[string]*clientcmdapi.Context) - } - - return config, nil -} diff --git a/managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go b/managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go deleted file mode 100644 index 1a84ff20de..0000000000 --- a/managed/services/dbaas/kubernetes/client/mock_kube_client_connector.go +++ /dev/null @@ -1,730 +0,0 @@ -// Code generated by mockery v2.33.0. DO NOT EDIT. - -package client - -import ( - context "context" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - v1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" - apiv1 "github.com/percona/dbaas-operator/api/v1" - mock "github.com/stretchr/testify/mock" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - version "k8s.io/apimachinery/pkg/version" -) - -// MockKubeClientConnector is an autogenerated mock type for the KubeClientConnector type -type MockKubeClientConnector struct { - mock.Mock -} - -// ApplyFile provides a mock function with given fields: fileBytes -func (_m *MockKubeClientConnector) ApplyFile(fileBytes []byte) error { - ret := _m.Called(fileBytes) - - var r0 error - if rf, ok := ret.Get(0).(func([]byte) error); ok { - r0 = rf(fileBytes) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ApplyObject provides a mock function with given fields: obj -func (_m *MockKubeClientConnector) ApplyObject(obj runtime.Object) error { - ret := _m.Called(obj) - - var r0 error - if rf, ok := ret.Get(0).(func(runtime.Object) error); ok { - r0 = rf(obj) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CreateOperatorGroup provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) CreateOperatorGroup(ctx context.Context, namespace string, name string) (*v1.OperatorGroup, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1.OperatorGroup - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1.OperatorGroup, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1.OperatorGroup); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.OperatorGroup) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CreateSubscriptionForCatalog provides a mock function with given fields: ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval -func (_m *MockKubeClientConnector) CreateSubscriptionForCatalog(ctx context.Context, namespace string, name string, catalogNamespace string, catalog string, packageName string, channel string, startingCSV string, approval v1alpha1.Approval) (*v1alpha1.Subscription, error) { - ret := _m.Called(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - - var r0 *v1alpha1.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string, string, v1alpha1.Approval) (*v1alpha1.Subscription, error)); ok { - return rf(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string, string, v1alpha1.Approval) *v1alpha1.Subscription); ok { - r0 = rf(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string, string, string, v1alpha1.Approval) error); ok { - r1 = rf(ctx, namespace, name, catalogNamespace, catalog, packageName, channel, startingCSV, approval) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DeleteObject provides a mock function with given fields: obj -func (_m *MockKubeClientConnector) DeleteObject(obj runtime.Object) error { - ret := _m.Called(obj) - - var r0 error - if rf, ok := ret.Get(0).(func(runtime.Object) error); ok { - r0 = rf(obj) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DoCSVWait provides a mock function with given fields: ctx, key -func (_m *MockKubeClientConnector) DoCSVWait(ctx context.Context, key types.NamespacedName) error { - ret := _m.Called(ctx, key) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DoRolloutWait provides a mock function with given fields: ctx, key -func (_m *MockKubeClientConnector) DoRolloutWait(ctx context.Context, key types.NamespacedName) error { - ret := _m.Called(ctx, key) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GenerateKubeConfig provides a mock function with given fields: secret -func (_m *MockKubeClientConnector) GenerateKubeConfig(secret *corev1.Secret) ([]byte, error) { - ret := _m.Called(secret) - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(*corev1.Secret) ([]byte, error)); ok { - return rf(secret) - } - if rf, ok := ret.Get(0).(func(*corev1.Secret) []byte); ok { - r0 = rf(secret) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(*corev1.Secret) error); ok { - r1 = rf(secret) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDatabaseCluster provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDatabaseCluster(ctx context.Context, name string) (*apiv1.DatabaseCluster, error) { - ret := _m.Called(ctx, name) - - var r0 *apiv1.DatabaseCluster - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apiv1.DatabaseCluster, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apiv1.DatabaseCluster); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiv1.DatabaseCluster) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDeployment provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error) { - ret := _m.Called(ctx, name) - - var r0 *appsv1.Deployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*appsv1.Deployment, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *appsv1.Deployment); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*appsv1.Deployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetEvents provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetEvents(ctx context.Context, name string) (string, error) { - ret := _m.Called(ctx, name) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetInstallPlan provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) GetInstallPlan(ctx context.Context, namespace string, name string) (*v1alpha1.InstallPlan, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1alpha1.InstallPlan - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.InstallPlan, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.InstallPlan); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.InstallPlan) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLogs provides a mock function with given fields: ctx, pod, container -func (_m *MockKubeClientConnector) GetLogs(ctx context.Context, pod string, container string) (string, error) { - ret := _m.Called(ctx, pod, container) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { - return rf(ctx, pod, container) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) string); ok { - r0 = rf(ctx, pod, container) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, pod, container) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetNodes provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) GetNodes(ctx context.Context) (*corev1.NodeList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.NodeList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.NodeList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.NodeList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.NodeList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetOperatorGroup provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) GetOperatorGroup(ctx context.Context, namespace string, name string) (*v1.OperatorGroup, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1.OperatorGroup - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1.OperatorGroup, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1.OperatorGroup); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1.OperatorGroup) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPersistentVolumes provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.PersistentVolumeList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.PersistentVolumeList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.PersistentVolumeList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.PersistentVolumeList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetPods provides a mock function with given fields: ctx, namespace, labelSelector -func (_m *MockKubeClientConnector) GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) { - ret := _m.Called(ctx, namespace, labelSelector) - - var r0 *corev1.PodList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *metav1.LabelSelector) (*corev1.PodList, error)); ok { - return rf(ctx, namespace, labelSelector) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *metav1.LabelSelector) *corev1.PodList); ok { - r0 = rf(ctx, namespace, labelSelector) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.PodList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *metav1.LabelSelector) error); ok { - r1 = rf(ctx, namespace, labelSelector) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSecret provides a mock function with given fields: ctx, name -func (_m *MockKubeClientConnector) GetSecret(ctx context.Context, name string) (*corev1.Secret, error) { - ret := _m.Called(ctx, name) - - var r0 *corev1.Secret - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*corev1.Secret, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *corev1.Secret); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Secret) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSecretsForServiceAccount provides a mock function with given fields: ctx, accountName -func (_m *MockKubeClientConnector) GetSecretsForServiceAccount(ctx context.Context, accountName string) (*corev1.Secret, error) { - ret := _m.Called(ctx, accountName) - - var r0 *corev1.Secret - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*corev1.Secret, error)); ok { - return rf(ctx, accountName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *corev1.Secret); ok { - r0 = rf(ctx, accountName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.Secret) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, accountName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetServerVersion provides a mock function with given fields: -func (_m *MockKubeClientConnector) GetServerVersion() (*version.Info, error) { - ret := _m.Called() - - var r0 *version.Info - var r1 error - if rf, ok := ret.Get(0).(func() (*version.Info, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() *version.Info); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*version.Info) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetStorageClasses provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - ret := _m.Called(ctx) - - var r0 *storagev1.StorageClassList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*storagev1.StorageClassList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *storagev1.StorageClassList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*storagev1.StorageClassList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSubscription provides a mock function with given fields: ctx, namespace, name -func (_m *MockKubeClientConnector) GetSubscription(ctx context.Context, namespace string, name string) (*v1alpha1.Subscription, error) { - ret := _m.Called(ctx, namespace, name) - - var r0 *v1alpha1.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v1alpha1.Subscription, error)); ok { - return rf(ctx, namespace, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *v1alpha1.Subscription); ok { - r0 = rf(ctx, namespace, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, namespace, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSubscriptionCSV provides a mock function with given fields: ctx, subKey -func (_m *MockKubeClientConnector) GetSubscriptionCSV(ctx context.Context, subKey types.NamespacedName) (types.NamespacedName, error) { - ret := _m.Called(ctx, subKey) - - var r0 types.NamespacedName - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) (types.NamespacedName, error)); ok { - return rf(ctx, subKey) - } - if rf, ok := ret.Get(0).(func(context.Context, types.NamespacedName) types.NamespacedName); ok { - r0 = rf(ctx, subKey) - } else { - r0 = ret.Get(0).(types.NamespacedName) - } - - if rf, ok := ret.Get(1).(func(context.Context, types.NamespacedName) error); ok { - r1 = rf(ctx, subKey) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListCRDs provides a mock function with given fields: ctx, labelSelector -func (_m *MockKubeClientConnector) ListCRDs(ctx context.Context, labelSelector *metav1.LabelSelector) (*apiextensionsv1.CustomResourceDefinitionList, error) { - ret := _m.Called(ctx, labelSelector) - - var r0 *apiextensionsv1.CustomResourceDefinitionList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *metav1.LabelSelector) (*apiextensionsv1.CustomResourceDefinitionList, error)); ok { - return rf(ctx, labelSelector) - } - if rf, ok := ret.Get(0).(func(context.Context, *metav1.LabelSelector) *apiextensionsv1.CustomResourceDefinitionList); ok { - r0 = rf(ctx, labelSelector) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiextensionsv1.CustomResourceDefinitionList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *metav1.LabelSelector) error); ok { - r1 = rf(ctx, labelSelector) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListCRs provides a mock function with given fields: ctx, namespace, gvr, labelSelector -func (_m *MockKubeClientConnector) ListCRs(ctx context.Context, namespace string, gvr schema.GroupVersionResource, labelSelector *metav1.LabelSelector) (*unstructured.UnstructuredList, error) { - ret := _m.Called(ctx, namespace, gvr, labelSelector) - - var r0 *unstructured.UnstructuredList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, schema.GroupVersionResource, *metav1.LabelSelector) (*unstructured.UnstructuredList, error)); ok { - return rf(ctx, namespace, gvr, labelSelector) - } - if rf, ok := ret.Get(0).(func(context.Context, string, schema.GroupVersionResource, *metav1.LabelSelector) *unstructured.UnstructuredList); ok { - r0 = rf(ctx, namespace, gvr, labelSelector) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*unstructured.UnstructuredList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, schema.GroupVersionResource, *metav1.LabelSelector) error); ok { - r1 = rf(ctx, namespace, gvr, labelSelector) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListDatabaseClusters provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) ListDatabaseClusters(ctx context.Context) (*apiv1.DatabaseClusterList, error) { - ret := _m.Called(ctx) - - var r0 *apiv1.DatabaseClusterList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*apiv1.DatabaseClusterList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *apiv1.DatabaseClusterList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apiv1.DatabaseClusterList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListSecrets provides a mock function with given fields: ctx -func (_m *MockKubeClientConnector) ListSecrets(ctx context.Context) (*corev1.SecretList, error) { - ret := _m.Called(ctx) - - var r0 *corev1.SecretList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*corev1.SecretList, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *corev1.SecretList); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*corev1.SecretList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListSubscriptions provides a mock function with given fields: ctx, namespace -func (_m *MockKubeClientConnector) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - ret := _m.Called(ctx, namespace) - - var r0 *v1alpha1.SubscriptionList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*v1alpha1.SubscriptionList, error)); ok { - return rf(ctx, namespace) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *v1alpha1.SubscriptionList); ok { - r0 = rf(ctx, namespace) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.SubscriptionList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, namespace) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// UpdateInstallPlan provides a mock function with given fields: ctx, namespace, installPlan -func (_m *MockKubeClientConnector) UpdateInstallPlan(ctx context.Context, namespace string, installPlan *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error) { - ret := _m.Called(ctx, namespace, installPlan) - - var r0 *v1alpha1.InstallPlan - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, *v1alpha1.InstallPlan) (*v1alpha1.InstallPlan, error)); ok { - return rf(ctx, namespace, installPlan) - } - if rf, ok := ret.Get(0).(func(context.Context, string, *v1alpha1.InstallPlan) *v1alpha1.InstallPlan); ok { - r0 = rf(ctx, namespace, installPlan) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*v1alpha1.InstallPlan) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, *v1alpha1.InstallPlan) error); ok { - r1 = rf(ctx, namespace, installPlan) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewMockKubeClientConnector creates a new instance of MockKubeClientConnector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockKubeClientConnector(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockKubeClientConnector { - mock := &MockKubeClientConnector{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/dbaas/kubernetes/client/writer.go b/managed/services/dbaas/kubernetes/client/writer.go deleted file mode 100644 index 2c5839504c..0000000000 --- a/managed/services/dbaas/kubernetes/client/writer.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package client - -import ( - "fmt" - "io" -) - -// PrefixWriter can write text at various indentation levels. -type PrefixWriter interface { - // Writef writes text with the specified indentation level. - Writef(level int, format string, a ...interface{}) - // WriteLine writes an entire line with no indentation level. - WriteLine(a ...interface{}) - // Flush forces indentation to be reset. - Flush() -} - -// prefixWriter implements PrefixWriter -type prefixWriter struct { - out io.Writer -} - -var _ PrefixWriter = &prefixWriter{} - -// NewPrefixWriter creates a new PrefixWriter. -func NewPrefixWriter(out io.Writer) PrefixWriter { //nolint:ireturn - return &prefixWriter{out: out} -} - -func (pw *prefixWriter) Writef(level int, format string, a ...interface{}) { - levelSpace := " " - prefix := "" - for i := 0; i < level; i++ { - prefix += levelSpace - } - - fmt.Fprintf(pw.out, prefix+format, a...) -} - -func (pw *prefixWriter) WriteLine(a ...interface{}) { - fmt.Fprintln(pw.out, a...) -} - -func (pw *prefixWriter) Flush() { - if f, ok := pw.out.(flusher); ok { - f.Flush() - } -} - -type flusher interface { - Flush() -} diff --git a/managed/services/dbaas/kubernetes/kubernetes.go b/managed/services/dbaas/kubernetes/kubernetes.go deleted file mode 100644 index 207bff645a..0000000000 --- a/managed/services/dbaas/kubernetes/kubernetes.go +++ /dev/null @@ -1,973 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package kubernetes provides functionality for kubernetes. -package kubernetes - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "io/fs" - "log" - "net/http" - "strings" - "sync" - "time" - - "github.com/operator-framework/api/pkg/operators/v1alpha1" - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - corev1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/apimachinery/pkg/version" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/data" - "github.com/percona/pmm/managed/services/dbaas/kubernetes/client" - "github.com/percona/pmm/managed/services/dbaas/utils/convertors" -) - -type ClusterType string - -const ( - ClusterTypeUnknown ClusterType = "unknown" - ClusterTypeMinikube ClusterType = "minikube" - ClusterTypeEKS ClusterType = "eks" - ClusterTypeGeneric ClusterType = "generic" - pxcDeploymentName = "percona-xtradb-cluster-operator" - psmdbDeploymentName = "percona-server-mongodb-operator" - dbaasDeploymentName = "dbaas-operator-controller-manager" - psmdbOperatorContainerName = "percona-server-mongodb-operator" - pxcOperatorContainerName = "percona-xtradb-cluster-operator" - dbaasOperatorContainerName = "manager" - databaseClusterKind = "DatabaseCluster" - databaseClusterAPIVersion = "dbaas.percona.com/v1" - restartAnnotationKey = "dbaas.percona.com/restart" - managedByKey = "dbaas.percona.com/managed-by" - templateLabelKey = "dbaas.percona.com/template" - engineLabelKey = "dbaas.percona.com/engine" - - // ContainerStateWaiting represents a state when container requires some - // operations being done in order to complete start up. - ContainerStateWaiting ContainerState = "waiting" - // ContainerStateTerminated indicates that container began execution and - // then either ran to completion or failed for some reason. - ContainerStateTerminated ContainerState = "terminated" - - // Max size of volume for AWS Elastic Block Storage service is 16TiB. - maxVolumeSizeEBS uint64 = 16 * 1024 * 1024 * 1024 * 1024 - olmNamespace = "olm" - useDefaultNamespace = "" - - // APIVersionCoreosV1 constant for some API requests. - APIVersionCoreosV1 = "operators.coreos.com/v1" - - pollInterval = 1 * time.Second - pollDuration = 5 * time.Minute -) - -// ErrEmptyVersionTag Got an empty version tag from GitHub API. -var ErrEmptyVersionTag error = errors.New("got an empty version tag from Github") - -// Kubernetes is a client for Kubernetes. -type Kubernetes struct { - lock *sync.RWMutex - client client.KubeClientConnector - l *logrus.Entry - httpClient *http.Client - kubeconfig string -} - -// ContainerState describes container's state - waiting, running, terminated. -type ContainerState string - -// NodeSummaryNode holds information about Node inside Node's summary. -type NodeSummaryNode struct { - FileSystem NodeFileSystemSummary `json:"fs,omitempty"` -} - -// NodeSummary holds summary of the Node. -// One gets this by requesting Kubernetes API endpoint: -// /v1/nodes//proxy/stats/summary. -type NodeSummary struct { - Node NodeSummaryNode `json:"node,omitempty"` -} - -// NodeFileSystemSummary holds a summary of Node's filesystem. -type NodeFileSystemSummary struct { - UsedBytes uint64 `json:"usedBytes,omitempty"` -} - -// NewIncluster returns new Kubernetes object. -func NewIncluster() (*Kubernetes, error) { - l := logrus.WithField("component", "kubernetes") - - client, err := client.NewFromInCluster() - if err != nil { - return nil, err - } - - return &Kubernetes{ - client: client, - l: l, - lock: &sync.RWMutex{}, - httpClient: &http.Client{ - Timeout: time.Second * 5, - Transport: &http.Transport{ - MaxIdleConns: 1, - IdleConnTimeout: 10 * time.Second, - }, - }, - }, nil -} - -// New returns new Kubernetes object. -func New(kubeconfig string) (*Kubernetes, error) { - l := logrus.WithField("component", "kubernetes") - - client, err := client.NewFromKubeConfigString(kubeconfig) - if err != nil { - return nil, err - } - - return &Kubernetes{ - client: client, - l: l, - lock: &sync.RWMutex{}, - httpClient: &http.Client{ - Timeout: time.Second * 5, - Transport: &http.Transport{ - MaxIdleConns: 1, - IdleConnTimeout: 10 * time.Second, - }, - }, - kubeconfig: kubeconfig, - }, nil -} - -// NewEmpty returns new Kubernetes object. -func NewEmpty() *Kubernetes { - return &Kubernetes{ - client: &client.Client{}, - lock: &sync.RWMutex{}, - l: logrus.WithField("component", "kubernetes"), - httpClient: &http.Client{ - Timeout: time.Second * 5, - Transport: &http.Transport{ - MaxIdleConns: 1, - IdleConnTimeout: 10 * time.Second, - }, - }, - } -} - -// SetKubeconfig changes kubeconfig for active client. -func (k *Kubernetes) SetKubeconfig(kubeconfig string) error { - k.lock.Lock() - defer k.lock.Unlock() - client, err := client.NewFromKubeConfigString(kubeconfig) - if err != nil { - return err - } - k.client = client - k.kubeconfig = kubeconfig - return nil -} - -// GetKubeconfig generates kubeconfig compatible with kubectl for incluster created clients. -func (k *Kubernetes) GetKubeconfig(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - secret, err := k.client.GetSecretsForServiceAccount(ctx, "pmm-service-account") - if err != nil { - k.l.Errorf("failed getting service account: %v", err) - return "", err - } - - kubeConfig, err := k.client.GenerateKubeConfig(secret) - if err != nil { - k.l.Errorf("failed generating kubeconfig: %v", err) - return "", err - } - - return string(kubeConfig), nil -} - -// ListDatabaseClusters returns list of managed PCX clusters. -func (k *Kubernetes) ListDatabaseClusters(ctx context.Context) (*dbaasv1.DatabaseClusterList, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.ListDatabaseClusters(ctx) -} - -// GetDatabaseCluster returns PXC clusters by provided name. -func (k *Kubernetes) GetDatabaseCluster(ctx context.Context, name string) (*dbaasv1.DatabaseCluster, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.GetDatabaseCluster(ctx, name) -} - -// RestartDatabaseCluster restarts database cluster. -func (k *Kubernetes) RestartDatabaseCluster(ctx context.Context, name string) error { - k.lock.Lock() - defer k.lock.Unlock() - cluster, err := k.client.GetDatabaseCluster(ctx, name) - if err != nil { - return err - } - cluster.TypeMeta.APIVersion = databaseClusterAPIVersion - cluster.TypeMeta.Kind = databaseClusterKind - if cluster.ObjectMeta.Annotations == nil { - cluster.ObjectMeta.Annotations = make(map[string]string) - } - cluster.ObjectMeta.Annotations[restartAnnotationKey] = "true" - return k.client.ApplyObject(cluster) -} - -// PatchDatabaseCluster patches CR of managed Database cluster. -func (k *Kubernetes) PatchDatabaseCluster(cluster *dbaasv1.DatabaseCluster) error { - k.lock.Lock() - defer k.lock.Unlock() - return k.client.ApplyObject(cluster) -} - -// CreateDatabaseCluster creates database cluster. -func (k *Kubernetes) CreateDatabaseCluster(cluster *dbaasv1.DatabaseCluster) error { - k.lock.Lock() - defer k.lock.Unlock() - if cluster.ObjectMeta.Annotations == nil { - cluster.ObjectMeta.Annotations = make(map[string]string) - } - cluster.ObjectMeta.Annotations[managedByKey] = "pmm" - return k.client.ApplyObject(cluster) -} - -// DeleteDatabaseCluster deletes database cluster. -func (k *Kubernetes) DeleteDatabaseCluster(ctx context.Context, name string) error { - k.lock.Lock() - defer k.lock.Unlock() - cluster, err := k.client.GetDatabaseCluster(ctx, name) - if err != nil { - return err - } - cluster.TypeMeta.APIVersion = databaseClusterAPIVersion - cluster.TypeMeta.Kind = databaseClusterKind - return k.client.DeleteObject(cluster) -} - -// GetDefaultStorageClassName returns first storageClassName from kubernetes cluster. -func (k *Kubernetes) GetDefaultStorageClassName(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - storageClasses, err := k.client.GetStorageClasses(ctx) - if err != nil { - return "", err - } - if len(storageClasses.Items) != 0 { - return storageClasses.Items[0].Name, nil - } - return "", errors.New("no storage classes available") -} - -// GetClusterType tries to guess the underlying kubernetes cluster based on storage class. -func (k *Kubernetes) GetClusterType(ctx context.Context) (ClusterType, error) { - k.lock.RLock() - defer k.lock.RUnlock() - storageClasses, err := k.client.GetStorageClasses(ctx) - if err != nil { - return ClusterTypeUnknown, err - } - for _, storageClass := range storageClasses.Items { - if strings.Contains(storageClass.Provisioner, "aws") { - return ClusterTypeEKS, nil - } - if strings.Contains(storageClass.Provisioner, "minikube") || - strings.Contains(storageClass.Provisioner, "kubevirt.io/hostpath-provisioner") || - strings.Contains(storageClass.Provisioner, "standard") { - return ClusterTypeMinikube, nil - } - } - return ClusterTypeGeneric, nil -} - -// getOperatorVersion parses operator version from operator deployment. -func (k *Kubernetes) getOperatorVersion(ctx context.Context, deploymentName, containerName string) (string, error) { - deployment, err := k.client.GetDeployment(ctx, deploymentName) - if err != nil { - return "", err - } - for _, container := range deployment.Spec.Template.Spec.Containers { - if container.Name == containerName { - return strings.Split(container.Image, ":")[1], nil - } - } - return "", errors.New("unknown version of operator") -} - -// GetPSMDBOperatorVersion parses PSMDB operator version from operator deployment. -func (k *Kubernetes) GetPSMDBOperatorVersion(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.getOperatorVersion(ctx, psmdbDeploymentName, psmdbOperatorContainerName) -} - -// GetPXCOperatorVersion parses PXC operator version from operator deployment -func (k *Kubernetes) GetPXCOperatorVersion(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.getOperatorVersion(ctx, pxcDeploymentName, pxcOperatorContainerName) -} - -// GetDBaaSOperatorVersion parses DBaaS operator version from operator deployment. -func (k *Kubernetes) GetDBaaSOperatorVersion(ctx context.Context) (string, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.getOperatorVersion(ctx, dbaasDeploymentName, dbaasOperatorContainerName) -} - -// GetSecret returns secret by name. -func (k *Kubernetes) GetSecret(ctx context.Context, name string) (*corev1.Secret, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.GetSecret(ctx, name) -} - -// ListSecrets returns secret by name. -func (k *Kubernetes) ListSecrets(ctx context.Context) (*corev1.SecretList, error) { - k.lock.RLock() - defer k.lock.RUnlock() - return k.client.ListSecrets(ctx) -} - -// CreatePMMSecret creates pmm secret in kubernetes. -func (k *Kubernetes) CreatePMMSecret(secretName string, secrets map[string][]byte) error { - k.lock.Lock() - defer k.lock.Unlock() - secret := &corev1.Secret{ //nolint: exhaustruct - TypeMeta: metav1.TypeMeta{ - APIVersion: "v1", - Kind: "Secret", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: secretName, - }, - Type: corev1.SecretTypeOpaque, - Data: secrets, - } - return k.client.ApplyObject(secret) -} - -func (k *Kubernetes) CreateRestore(restore *dbaasv1.DatabaseClusterRestore) error { - k.lock.Lock() - defer k.lock.Unlock() - return k.client.ApplyObject(restore) -} - -// GetPods returns list of pods. -func (k *Kubernetes) GetPods(ctx context.Context, namespace string, labelSelector *metav1.LabelSelector) (*corev1.PodList, error) { - return k.client.GetPods(ctx, namespace, labelSelector) -} - -// GetLogs returns logs as slice of log lines - strings - for given pod's container. -func (k *Kubernetes) GetLogs( - ctx context.Context, - containerStatuses []corev1.ContainerStatus, - pod, - container string, -) ([]string, error) { - if IsContainerInState(containerStatuses, ContainerStateWaiting) { - return []string{}, nil - } - - stdout, err := k.client.GetLogs(ctx, pod, container) - if err != nil { - return nil, errors.Wrap(err, "couldn't get logs") - } - - if stdout == "" { - return []string{}, nil - } - - return strings.Split(stdout, "\n"), nil -} - -// GetEvents returns pod's events as a slice of strings. -func (k *Kubernetes) GetEvents(ctx context.Context, pod string) ([]string, error) { - stdout, err := k.client.GetEvents(ctx, pod) - if err != nil { - return nil, errors.Wrap(err, "couldn't describe pod") - } - - lines := strings.Split(stdout, "\n") - - return lines, nil -} - -// IsContainerInState returns true if container is in give state, otherwise false. -func IsContainerInState(containerStatuses []corev1.ContainerStatus, state ContainerState) bool { - containerState := make(map[string]interface{}) - for _, status := range containerStatuses { - data, err := json.Marshal(status.State) - if err != nil { - return false - } - - if err := json.Unmarshal(data, &containerState); err != nil { - return false - } - - if _, ok := containerState[string(state)]; ok { - return true - } - } - - return false -} - -// IsNodeInCondition returns true if node's condition given as an argument has -// status "True". Otherwise it returns false. -func IsNodeInCondition(node corev1.Node, conditionType corev1.NodeConditionType) bool { - for _, condition := range node.Status.Conditions { - if condition.Status == corev1.ConditionTrue && condition.Type == conditionType { - return true - } - } - return false -} - -// GetWorkerNodes returns list of cluster workers nodes. -func (k *Kubernetes) GetWorkerNodes(ctx context.Context) ([]corev1.Node, error) { - nodes, err := k.client.GetNodes(ctx) - if err != nil { - return nil, errors.Wrap(err, "could not get nodes of Kubernetes cluster") - } - forbidenTaints := map[string]corev1.TaintEffect{ - "node.cloudprovider.kubernetes.io/uninitialized": corev1.TaintEffectNoSchedule, - "node.kubernetes.io/unschedulable": corev1.TaintEffectNoSchedule, - "node-role.kubernetes.io/master": corev1.TaintEffectNoSchedule, - } - workers := make([]corev1.Node, 0, len(nodes.Items)) - for _, node := range nodes.Items { - if len(node.Spec.Taints) == 0 { - workers = append(workers, node) - continue - } - for _, taint := range node.Spec.Taints { - effect, keyFound := forbidenTaints[taint.Key] - if !keyFound || effect != taint.Effect { - workers = append(workers, node) - } - } - } - return workers, nil -} - -// GetAllClusterResources goes through all cluster nodes and sums their allocatable resources. -func (k *Kubernetes) GetAllClusterResources(ctx context.Context, clusterType ClusterType, volumes *corev1.PersistentVolumeList) ( //nolint:nonamedreturns - cpuMillis uint64, memoryBytes uint64, diskSizeBytes uint64, err error, -) { - nodes, err := k.GetWorkerNodes(ctx) - if err != nil { - return 0, 0, 0, errors.Wrap(err, "could not get a list of nodes") - } - var volumeCountEKS uint64 - for _, node := range nodes { - cpu, memory, err := getResources(node.Status.Allocatable) - if err != nil { - return 0, 0, 0, errors.Wrap(err, "could not get allocatable resources of the node") - } - cpuMillis += cpu - memoryBytes += memory - - switch clusterType { - case ClusterTypeUnknown: - return 0, 0, 0, errors.Errorf("unknown cluster type") - case ClusterTypeGeneric: - // TODO support other cluster types - continue - case ClusterTypeMinikube: - storage, ok := node.Status.Allocatable[corev1.ResourceEphemeralStorage] - if !ok { - return 0, 0, 0, errors.Errorf("could not get storage size of the node") - } - bytes, err := convertors.StrToBytes(storage.String()) - if err != nil { - return 0, 0, 0, errors.Wrapf(err, "could not convert storage size '%s' to bytes", storage.String()) - } - diskSizeBytes += bytes - case ClusterTypeEKS: - // See https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/#scheduler. - if IsNodeInCondition(node, corev1.NodeDiskPressure) { - continue - } - - // Get nodes's type. - nodeType, ok := node.Labels["beta.kubernetes.io/instance-type"] - if !ok { - return 0, 0, 0, errors.New("dealing with AWS EKS cluster but the node does not have label 'beta.kubernetes.io/instance-type'") - } - // 39 is a default limit for EKS cluster nodes ... - volumeLimitPerNode := uint64(39) - typeAndSize := strings.Split(strings.ToLower(nodeType), ".") - if len(typeAndSize) < 2 { - return 0, 0, 0, errors.Errorf("failed to parse EKS node type '%s', it's not in expected format 'type.size'", nodeType) - } - // ... however, if the node type is one of M5, C5, R5, T3, Z1D it's 25. - limitedVolumesSet := map[string]struct{}{ - "m5": {}, "c5": {}, "r5": {}, "t3": {}, "t1d": {}, - } - if _, ok := limitedVolumesSet[typeAndSize[0]]; ok { - volumeLimitPerNode = 25 - } - volumeCountEKS += volumeLimitPerNode - } - } - if clusterType == ClusterTypeEKS { - volumeCountEKSBackup := volumeCountEKS - volumeCountEKS -= uint64(len(volumes.Items)) - if volumeCountEKS > volumeCountEKSBackup { - // handle uint underflow - volumeCountEKS = 0 - } - - consumedBytes, err := sumVolumesSize(volumes) - if err != nil { - return 0, 0, 0, errors.Wrap(err, "failed to sum persistent volumes storage sizes") - } - diskSizeBytes = (volumeCountEKS * maxVolumeSizeEBS) + consumedBytes - } - return cpuMillis, memoryBytes, diskSizeBytes, nil -} - -// getResources extracts resources out of corev1.ResourceList and converts them to int64 values. -// Millicpus are used for CPU values and bytes for memory. -func getResources(resources corev1.ResourceList) (cpuMillis uint64, memoryBytes uint64, err error) { //nolint:nonamedreturns - cpu, ok := resources[corev1.ResourceCPU] - if ok { - cpuMillis, err = convertors.StrToMilliCPU(cpu.String()) - if err != nil { - return 0, 0, errors.Wrapf(err, "failed to convert '%s' to millicpus", cpu.String()) - } - } - memory, ok := resources[corev1.ResourceMemory] - if ok { - memoryBytes, err = convertors.StrToBytes(memory.String()) - if err != nil { - return 0, 0, errors.Wrapf(err, "failed to convert '%s' to bytes", memory.String()) - } - } - return cpuMillis, memoryBytes, nil -} - -// GetConsumedCPUAndMemory returns consumed CPU and Memory in given namespace. If namespace -// is empty, it tries to get them from all namespaces. -func (k *Kubernetes) GetConsumedCPUAndMemory(ctx context.Context, namespace string) ( //nolint:nonamedreturns - cpuMillis uint64, memoryBytes uint64, err error, -) { - // Get CPU and Memory Requests of Pods' containers. - pods, err := k.GetPods(ctx, namespace, nil) - if err != nil { - return 0, 0, errors.Wrap(err, "failed to get consumed resources") - } - for _, ppod := range pods.Items { - if ppod.Status.Phase != corev1.PodRunning { - continue - } - nonTerminatedInitContainers := make([]corev1.Container, 0, len(ppod.Spec.InitContainers)) - for _, container := range ppod.Spec.InitContainers { - if !IsContainerInState( - ppod.Status.InitContainerStatuses, ContainerStateTerminated, - ) { - nonTerminatedInitContainers = append(nonTerminatedInitContainers, container) - } - } - for _, container := range append(ppod.Spec.Containers, nonTerminatedInitContainers...) { - cpu, memory, err := getResources(container.Resources.Requests) - if err != nil { - return 0, 0, errors.Wrap(err, "failed to sum all consumed resources") - } - cpuMillis += cpu - memoryBytes += memory - } - } - - return cpuMillis, memoryBytes, nil -} - -// GetConsumedDiskBytes returns consumed bytes. The strategy differs based on k8s cluster type. -func (k *Kubernetes) GetConsumedDiskBytes(ctx context.Context, clusterType ClusterType, volumes *corev1.PersistentVolumeList) (consumedBytes uint64, err error) { //nolint:lll,nonamedreturns - switch clusterType { - case ClusterTypeUnknown: - return 0, errors.Errorf("unknown cluster type") - case ClusterTypeGeneric: - // TODO support other cluster types - return 0, nil - case ClusterTypeMinikube: - nodes, err := k.GetWorkerNodes(ctx) - if err != nil { - return 0, errors.Wrap(err, "can't compute consumed disk size: failed to get worker nodes") - } - clientConfig, err := clientcmd.NewClientConfigFromBytes([]byte(k.kubeconfig)) - if err != nil { - return 0, errors.Wrap(err, "failed to build kubeconfig out of given path") - } - config, err := clientConfig.ClientConfig() - if err != nil { - return 0, errors.Wrap(err, "failed to build kubeconfig out of given path") - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return 0, errors.Wrap(err, "failed to build client out of submited kubeconfig") - } - for _, node := range nodes { - var summary NodeSummary - request := clientset.CoreV1().RESTClient().Get().Resource("nodes").Name(node.Name).SubResource("proxy").Suffix("stats/summary") - responseRawArrayOfBytes, err := request.DoRaw(context.Background()) //nolint:contextcheck - if err != nil { - return 0, errors.Wrap(err, "failed to get stats from node") - } - if err := json.Unmarshal(responseRawArrayOfBytes, &summary); err != nil { - return 0, errors.Wrap(err, "failed to unmarshal response from kubernetes API") - } - consumedBytes += summary.Node.FileSystem.UsedBytes - } - return consumedBytes, nil - case ClusterTypeEKS: - consumedBytes, err := sumVolumesSize(volumes) - if err != nil { - return 0, errors.Wrap(err, "failed to sum persistent volumes storage sizes") - } - return consumedBytes, nil - } - - return 0, nil -} - -// sumVolumesSize returns sum of persistent volumes storage size in bytes. -func sumVolumesSize(pvs *corev1.PersistentVolumeList) (sum uint64, err error) { //nolint:nonamedreturns - for _, pv := range pvs.Items { - bytes, err := convertors.StrToBytes(pv.Spec.Capacity.Storage().String()) - if err != nil { - return 0, err - } - sum += bytes - } - return -} - -// GetPersistentVolumes returns list of persistent volumes. -func (k *Kubernetes) GetPersistentVolumes(ctx context.Context) (*corev1.PersistentVolumeList, error) { - return k.client.GetPersistentVolumes(ctx) -} - -// GetStorageClasses returns all storage classes available in the cluster. -func (k *Kubernetes) GetStorageClasses(ctx context.Context) (*storagev1.StorageClassList, error) { - return k.client.GetStorageClasses(ctx) -} - -// InstallOLMOperator installs the OLM in the Kubernetes cluster. -func (k *Kubernetes) InstallOLMOperator(ctx context.Context) error { - deployment, err := k.client.GetDeployment(ctx, "olm-operator") - if err == nil && deployment != nil && deployment.ObjectMeta.Name != "" { - return nil // already installed - } - - var crdFile, olmFile, perconaCatalog []byte - - crdFile, err = fs.ReadFile(data.OLMCRDs, "crds/olm/crds.yaml") - if err != nil { - return errors.Wrapf(err, "failed to read OLM CRDs file") - } - - if err := k.client.ApplyFile(crdFile); err != nil { - return errors.Wrapf(err, "cannot apply %q file", crdFile) - } - - olmFile, err = fs.ReadFile(data.OLMCRDs, "crds/olm/olm.yaml") - if err != nil { - return errors.Wrapf(err, "failed to read OLM file") - } - - if err := k.client.ApplyFile(olmFile); err != nil { - return errors.Wrapf(err, "cannot apply %q file", crdFile) - } - - perconaCatalog, err = fs.ReadFile(data.OLMCRDs, "crds/olm/percona-dbaas-catalog.yaml") - if err != nil { - return errors.Wrapf(err, "failed to read percona catalog yaml file") - } - - if err := k.client.ApplyFile(perconaCatalog); err != nil { - return errors.Wrapf(err, "cannot apply %q file", crdFile) - } - - if err := k.client.DoRolloutWait(ctx, types.NamespacedName{Namespace: olmNamespace, Name: "olm-operator"}); err != nil { - return errors.Wrap(err, "error while waiting for deployment rollout") - } - if err := k.client.DoRolloutWait(ctx, types.NamespacedName{Namespace: "olm", Name: "catalog-operator"}); err != nil { - return errors.Wrap(err, "error while waiting for deployment rollout") - } - - crdResources, err := decodeResources(crdFile) - if err != nil { - return errors.Wrap(err, "cannot decode crd resources") - } - - olmResources, err := decodeResources(olmFile) - if err != nil { - return errors.Wrap(err, "cannot decode olm resources") - } - - resources := append(crdResources, olmResources...) //nolint:gocritic - - subscriptions := filterResources(resources, func(r unstructured.Unstructured) bool { - return r.GroupVersionKind() == schema.GroupVersionKind{ - Group: v1alpha1.GroupName, - Version: v1alpha1.GroupVersion, - Kind: v1alpha1.SubscriptionKind, - } - }) - - for _, sub := range subscriptions { - subscriptionKey := types.NamespacedName{Namespace: sub.GetNamespace(), Name: sub.GetName()} - log.Printf("Waiting for subscription/%s to install CSV", subscriptionKey.Name) - csvKey, err := k.client.GetSubscriptionCSV(ctx, subscriptionKey) - if err != nil { - return fmt.Errorf("subscription/%s failed to install CSV: %w", subscriptionKey.Name, err) - } - log.Printf("Waiting for clusterserviceversion/%s to reach 'Succeeded' phase", csvKey.Name) - if err := k.client.DoCSVWait(ctx, csvKey); err != nil { - return fmt.Errorf("clusterserviceversion/%s failed to reach 'Succeeded' phase", csvKey.Name) - } - } - - if err := k.client.DoRolloutWait(ctx, types.NamespacedName{Namespace: "olm", Name: "packageserver"}); err != nil { - return errors.Wrap(err, "error while waiting for deployment rollout") - } - - return nil -} - -func decodeResources(f []byte) ([]unstructured.Unstructured, error) { - dec := yaml.NewYAMLOrJSONDecoder(bytes.NewReader(f), 8) - var objs []unstructured.Unstructured - - for { - var u unstructured.Unstructured - err := dec.Decode(&u) - if errors.Is(err, io.EOF) { - break - } else if err != nil { - return nil, err - } - objs = append(objs, u) - } - - return objs, nil -} - -func filterResources( //nolint:nonamedreturns - resources []unstructured.Unstructured, - filter func(unstructured.Unstructured) bool, -) (filtered []unstructured.Unstructured) { - for _, r := range resources { - if filter(r) { - filtered = append(filtered, r) - } - } - return filtered -} - -// InstallOperatorRequest holds the fields to make an operator install request. -type InstallOperatorRequest struct { - Namespace string - Name string - OperatorGroup string - CatalogSource string - CatalogSourceNamespace string - Channel string - InstallPlanApproval v1alpha1.Approval - StartingCSV string -} - -// InstallOperator installs an operator via OLM. -func (k *Kubernetes) InstallOperator(ctx context.Context, req InstallOperatorRequest) error { - if err := createOperatorGroupIfNeeded(ctx, k.client, req.OperatorGroup); err != nil { - return err - } - - subs, err := k.client.CreateSubscriptionForCatalog(ctx, req.Namespace, req.Name, "olm", req.CatalogSource, - req.Name, req.Channel, req.StartingCSV, v1alpha1.ApprovalManual) - if err != nil { - return errors.Wrap(err, "cannot create a susbcription to install the operator") - } - - err = wait.Poll(pollInterval, pollDuration, func() (bool, error) { - k.lock.Lock() - defer k.lock.Unlock() - - subs, err = k.client.GetSubscription(ctx, req.Namespace, req.Name) - if err != nil || subs == nil || (subs != nil && subs.Status.Install == nil) { - return false, err - } - - return true, nil - }) - - if err != nil { - return err - } - if subs == nil { - return fmt.Errorf("cannot get an install plan for the operator subscription: %q", req.Name) - } - - ip, err := k.client.GetInstallPlan(ctx, req.Namespace, subs.Status.Install.Name) - if err != nil { - return err - } - - ip.Spec.Approved = true - _, err = k.client.UpdateInstallPlan(ctx, req.Namespace, ip) - - return err -} - -func createOperatorGroupIfNeeded(ctx context.Context, client client.KubeClientConnector, name string) error { - _, err := client.GetOperatorGroup(ctx, useDefaultNamespace, name) - if err == nil { - return nil - } - - _, err = client.CreateOperatorGroup(ctx, "default", name) - - return err -} - -// ListSubscriptions all the subscriptions in the namespace. -func (k *Kubernetes) ListSubscriptions(ctx context.Context, namespace string) (*v1alpha1.SubscriptionList, error) { - return k.client.ListSubscriptions(ctx, namespace) -} - -// UpgradeOperator upgrades an operator to the next available version. -func (k *Kubernetes) UpgradeOperator(ctx context.Context, namespace, name string) error { - var subs *v1alpha1.Subscription - - // If the subscription was recently created, the install plan might not be ready yet. - err := wait.Poll(pollInterval, pollDuration, func() (bool, error) { - var err error - subs, err = k.client.GetSubscription(ctx, namespace, name) - if err != nil { - return false, err - } - if subs == nil || subs.Status.Install == nil || subs.Status.Install.Name == "" { - return false, nil - } - - return true, nil - }) - if err != nil { - return err - } - if subs == nil || subs.Status.Install == nil || subs.Status.Install.Name == "" { - return fmt.Errorf("cannot get subscription for %q operator", name) - } - - ip, err := k.client.GetInstallPlan(ctx, namespace, subs.Status.Install.Name) - if err != nil { - return errors.Wrapf(err, "cannot get install plan to upgrade %q", name) - } - - if ip.Spec.Approved { - return nil // There are no upgrades. - } - - ip.Spec.Approved = true - - _, err = k.client.UpdateInstallPlan(ctx, namespace, ip) - - return err -} - -// GetServerVersion returns server version. -func (k *Kubernetes) GetServerVersion() (*version.Info, error) { - return k.client.GetServerVersion() -} - -// ListTemplates returns a list of templates. -func (k *Kubernetes) ListTemplates(ctx context.Context, engine, namespace string) ([]*dbaasv1beta1.Template, error) { - k.lock.RLock() - defer k.lock.RUnlock() - - labelSelector := &metav1.LabelSelector{ - MatchLabels: map[string]string{ - templateLabelKey: "yes", - engineLabelKey: engine, - }, - } - - templateCRDs, err := k.client.ListCRDs(ctx, labelSelector) - if err != nil { - return nil, errors.Wrap(err, "failed listing template CRDs") - } - - templates := []*dbaasv1beta1.Template{} - for _, templateCRD := range templateCRDs.Items { - var storedVersionName string - for _, version := range templateCRD.Spec.Versions { - if version.Storage { - storedVersionName = version.Name - break - } - } - // XXX: logically we should check that storedVersionName has been set and - // return an error otherwise but according to the - // CustomResourceDefinitionVersion documentation - // "There must be exactly one version with storage=true." so we are sure - // that storedVersionName will be set. If for some reason it's not, it will - // fail to find the CRs so an error will be returned either way. - gvr := schema.GroupVersionResource{ - Group: templateCRD.Spec.Group, - Version: storedVersionName, - Resource: templateCRD.Spec.Names.Plural, - } - - templateCRs, err := k.client.ListCRs(ctx, namespace, gvr, labelSelector) - if err != nil { - return nil, errors.Wrap(err, "failed listing template CRs") - } - - for _, templateCR := range templateCRs.Items { - //nolint:forcetypeassert - templates = append(templates, &dbaasv1beta1.Template{ - Name: templateCR.Object["metadata"].(map[string]interface{})["name"].(string), - Kind: templateCR.Object["kind"].(string), - }) - } - } - - return templates, nil -} diff --git a/managed/services/dbaas/kubernetes/olm_operator_test.go b/managed/services/dbaas/kubernetes/olm_operator_test.go deleted file mode 100644 index 83906ee61b..0000000000 --- a/managed/services/dbaas/kubernetes/olm_operator_test.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package operator contains logic related to kubernetes operators. -package kubernetes - -import ( - "context" - "testing" - - v1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - appsv1 "k8s.io/api/apps/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/percona/pmm/managed/services/dbaas/kubernetes/client" -) - -func TestInstallOlmOperator(t *testing.T) { - ctx := context.Background() - k8sclient := &client.MockKubeClientConnector{} - - olms := NewEmpty() - olms.client = k8sclient - - t.Run("Install OLM Operator", func(t *testing.T) { - k8sclient.On("CreateSubscriptionForCatalog", mock.Anything, mock.Anything, mock.Anything, - mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). - Return(&v1alpha1.Subscription{}, nil) - k8sclient.On("GetDeployment", ctx, mock.Anything).Return(&appsv1.Deployment{}, nil) - k8sclient.On("ApplyFile", mock.Anything).Return(nil) - k8sclient.On("DoRolloutWait", ctx, mock.Anything).Return(nil) - k8sclient.On("GetSubscriptionCSV", ctx, mock.Anything).Return(types.NamespacedName{}, nil) - k8sclient.On("DoRolloutWait", ctx, mock.Anything).Return(nil) - err := olms.InstallOLMOperator(ctx) - assert.NoError(t, err) - }) - - t.Run("Install PSMDB Operator", func(t *testing.T) { - // Install PSMDB Operator - subscriptionNamespace := "default" - operatorGroup := "percona-operators-group" - catalosSourceNamespace := "olm" - operatorName := "percona-server-mongodb-operator" - params := InstallOperatorRequest{ - Namespace: subscriptionNamespace, - Name: operatorName, - OperatorGroup: operatorGroup, - CatalogSource: "operatorhubio-catalog", - CatalogSourceNamespace: catalosSourceNamespace, - Channel: "stable", - InstallPlanApproval: v1alpha1.ApprovalManual, - } - - k8sclient.On("GetOperatorGroup", ctx, "", operatorGroup).Return(&v1.OperatorGroup{}, nil) - mockSubscription := &v1alpha1.Subscription{ - Status: v1alpha1.SubscriptionStatus{ - Install: &v1alpha1.InstallPlanReference{ - Name: "abcd1234", - }, - }, - } - k8sclient.On("GetSubscription", ctx, subscriptionNamespace, operatorName).Return(mockSubscription, nil) - mockInstallPlan := &v1alpha1.InstallPlan{} - k8sclient.On("GetInstallPlan", ctx, subscriptionNamespace, mockSubscription.Status.Install.Name).Return(mockInstallPlan, nil) - k8sclient.On("UpdateInstallPlan", ctx, subscriptionNamespace, mockInstallPlan).Return(mockInstallPlan, nil) - err := olms.InstallOperator(ctx, params) - assert.NoError(t, err) - }) -} diff --git a/managed/services/dbaas/kubernetes/types.go b/managed/services/dbaas/kubernetes/types.go deleted file mode 100644 index db29220e1c..0000000000 --- a/managed/services/dbaas/kubernetes/types.go +++ /dev/null @@ -1,597 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package kubernetes - -import ( - "fmt" - "strconv" - "strings" - - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/pkg/errors" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" -) - -const ( - dbaasAPI = "dbaas.percona.com/v1" - dbaasKind = "DatabaseCluster" - pxcSecretNameTmpl = "dbaas-%s-pxc-secrets" //nolint:gosec - psmdbSecretNameTmpl = "dbaas-%s-psmdb-secrets" //nolint:gosec - // DatabaseTypePXC is a pxc database - DatabaseTypePXC dbaasv1.EngineType = "pxc" - // DatabaseTypePSMDB is a psmdb database - DatabaseTypePSMDB dbaasv1.EngineType = "psmdb" - externalNLB string = "external" - - dbTemplateKindAnnotationKey = "dbaas.percona.com/dbtemplate-kind" - dbTemplateNameAnnotationKey = "dbaas.percona.com/dbtemplate-name" -) - -var errSimultaneous = errors.New("field suspend and resume cannot be true simultaneously") - -var exposeTypeMap = map[ClusterType]corev1.ServiceType{ - ClusterTypeMinikube: corev1.ServiceTypeNodePort, - ClusterTypeEKS: corev1.ServiceTypeLoadBalancer, - ClusterTypeGeneric: corev1.ServiceTypeLoadBalancer, -} - -var exposeAnnotationsMap = map[ClusterType]map[string]string{ - ClusterTypeMinikube: make(map[string]string), - ClusterTypeEKS: { - "service.beta.kubernetes.io/aws-load-balancer-nlb-target-type": "ip", - "service.beta.kubernetes.io/aws-load-balancer-scheme": "internet-facing", - "service.beta.kubernetes.io/aws-load-balancer-target-group-attributes": "preserve_client_ip.enabled=true", - }, - ClusterTypeGeneric: make(map[string]string), -} - -func convertComputeResource(res *dbaasv1beta1.ComputeResources) (corev1.ResourceRequirements, error) { - req := corev1.ResourceRequirements{} - if res == nil { - return req, nil - } - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", res.CpuM)) - if err != nil { - return req, err - } - memory, err := resource.ParseQuantity(strconv.FormatInt(res.MemoryBytes, 10)) - if err != nil { - return req, err - } - req.Limits = corev1.ResourceList{} - req.Limits[corev1.ResourceCPU] = cpu - req.Limits[corev1.ResourceMemory] = memory - return req, nil -} - -// DatabaseClusterForPXC fills dbaasv1.DatabaseCluster struct with data provided for specified cluster type -func DatabaseClusterForPXC(cluster *dbaasv1beta1.CreatePXCClusterRequest, clusterType ClusterType, backupLocation *models.BackupLocation) (*dbaasv1.DatabaseCluster, *dbaasv1.DatabaseClusterRestore, error) { //nolint:lll - if (cluster.Params.Proxysql != nil) == (cluster.Params.Haproxy != nil) { - return nil, nil, errors.New("pxc cluster must have one and only one proxy type defined") - } - if backupLocation != nil && backupLocation.Type != models.S3BackupLocationType { - return nil, nil, errors.New("only s3 compatible storages are supported for backup/restore") - } - diskSize := resource.NewQuantity(cluster.Params.Pxc.DiskSize, resource.DecimalSI) - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", cluster.Params.Pxc.ComputeResources.CpuM)) - if err != nil { - return nil, nil, err - } - clusterMemory := resource.NewQuantity(cluster.Params.Pxc.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: cluster.Params.Pxc.Image, - DatabaseConfig: cluster.Params.Pxc.Configuration, - ClusterSize: cluster.Params.ClusterSize, - SecretsName: fmt.Sprintf(pxcSecretNameTmpl, cluster.Name), - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: *diskSize, - CPU: cpu, - Memory: *clusterMemory, - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{}, - Backup: &dbaasv1.BackupSpec{}, - }, - } - if cluster.Params.Pxc.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &cluster.Params.Pxc.StorageClass - } - if cluster.Params.Haproxy != nil { - resources, err := convertComputeResource(cluster.Params.Haproxy.ComputeResources) - if err != nil { - return nil, nil, err - } - dbCluster.Spec.LoadBalancer.Image = cluster.Params.Haproxy.Image - dbCluster.Spec.LoadBalancer.Size = cluster.Params.ClusterSize - dbCluster.Spec.LoadBalancer.Resources = resources - dbCluster.Spec.LoadBalancer.Type = "haproxy" - dbCluster.Spec.LoadBalancer.TrafficPolicy = "Cluster" - } - if cluster.Params.Proxysql != nil { - resources, err := convertComputeResource(cluster.Params.Proxysql.ComputeResources) - if err != nil { - return nil, nil, err - } - dbCluster.Spec.LoadBalancer.Size = cluster.Params.ClusterSize - dbCluster.Spec.LoadBalancer.Image = cluster.Params.Proxysql.Image - dbCluster.Spec.LoadBalancer.Resources = resources - dbCluster.Spec.LoadBalancer.Type = "proxysql" - } - if cluster.Params.Backup != nil { - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Enabled = true - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - dbCluster.Spec.Backup.ServiceAccountName = cluster.Params.Backup.ServiceAccount - dbCluster.Spec.Backup.Schedule = []dbaasv1.BackupSchedule{ - { - Name: "schedule", - Enabled: true, - Schedule: cluster.Params.Backup.CronExpression, - Keep: int(cluster.Params.Backup.KeepCopies), - StorageName: storageName, - }, - } - } - if cluster.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if cluster.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - var sourceRanges []string - for _, sourceRange := range cluster.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - - if cluster.Template != nil && cluster.Template.Name != "" && cluster.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = cluster.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = cluster.Template.Kind - } - - if cluster.Params.Restore != nil && cluster.Params.Restore.Destination != "" { - if cluster.Params.Restore.SecretsName != "" { - dbCluster.Spec.SecretsName = cluster.Params.Restore.SecretsName - } - dbCluster.Spec.Backup.Enabled = true - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - - dbRestore := &dbaasv1.DatabaseClusterRestore{ - TypeMeta: metav1.TypeMeta{ - Kind: "DatabaseClusterRestore", - APIVersion: "dbaas.percona.com/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-restore", dbCluster.Name), - }, - Spec: dbaasv1.DatabaseClusterRestoreSpec{ - DatabaseCluster: dbCluster.Name, - DatabaseType: "pxc", - BackupSource: &dbaasv1.BackupSource{ - Destination: cluster.Params.Restore.Destination, - StorageType: dbaasv1.BackupStorageS3, - S3: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - StorageName: storageName, - }, - }, - } - return dbCluster, dbRestore, nil - } - return dbCluster, nil, nil -} - -// DatabaseClusterForPSMDB fills dbaasv1.DatabaseCluster struct with data provided for specified cluster type -func DatabaseClusterForPSMDB(cluster *dbaasv1beta1.CreatePSMDBClusterRequest, clusterType ClusterType, backupLocation *models.BackupLocation, backupImage string) (*dbaasv1.DatabaseCluster, *dbaasv1.DatabaseClusterRestore, error) { //nolint:lll - if backupLocation != nil && backupLocation.Type != models.S3BackupLocationType { - return nil, nil, errors.New("only s3 compatible storages are supported for backup/restore") - } - diskSize := resource.NewQuantity(cluster.Params.Replicaset.DiskSize, resource.DecimalSI) - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", cluster.Params.Replicaset.ComputeResources.CpuM)) - if err != nil { - return nil, nil, err - } - clusterMemory := resource.NewQuantity(cluster.Params.Replicaset.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster := &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: cluster.Name, - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePSMDB, - DatabaseImage: cluster.Params.Image, - DatabaseConfig: cluster.Params.Replicaset.Configuration, - ClusterSize: cluster.Params.ClusterSize, - SecretsName: fmt.Sprintf(psmdbSecretNameTmpl, cluster.Name), - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: *diskSize, - CPU: cpu, - Memory: *clusterMemory, - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{}, - Backup: &dbaasv1.BackupSpec{}, - }, - } - if cluster.Params.Replicaset.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &cluster.Params.Replicaset.StorageClass - } - dbCluster.Spec.LoadBalancer.Size = cluster.Params.ClusterSize - dbCluster.Spec.LoadBalancer.Type = "mongos" - if cluster.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return dbCluster, nil, fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if cluster.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - if cluster.Params.Backup != nil { - dbCluster.Spec.Backup.Enabled = true - if backupImage != "" { - dbCluster.Spec.Backup.Image = backupImage - } - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - dbCluster.Spec.Backup.ServiceAccountName = cluster.Params.Backup.ServiceAccount - dbCluster.Spec.Backup.Schedule = []dbaasv1.BackupSchedule{ - { - Name: "schedule", - Enabled: true, - Schedule: cluster.Params.Backup.CronExpression, - Keep: int(cluster.Params.Backup.KeepCopies), - StorageName: storageName, - }, - } - } - var sourceRanges []string - for _, sourceRange := range cluster.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - - if cluster.Template != nil && cluster.Template.Name != "" && cluster.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = cluster.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = cluster.Template.Kind - } - - if cluster.Params.Restore != nil && cluster.Params.Restore.Destination != "" { - if cluster.Params.Restore.SecretsName != "" { - dbCluster.Spec.SecretsName = cluster.Params.Restore.SecretsName - } - dbCluster.Spec.Backup.Enabled = true - storageName := strings.ToLower(backupLocation.Name) - dbCluster.Spec.Backup.Storages = map[string]*dbaasv1.BackupStorageSpec{ - storageName: { - Type: dbaasv1.BackupStorageType(backupLocation.Type), - StorageProvider: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - }, - } - - dbRestore := &dbaasv1.DatabaseClusterRestore{ - TypeMeta: metav1.TypeMeta{ - Kind: "DatabaseClusterRestore", - APIVersion: "dbaas.percona.com/v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-restore", dbCluster.Name), - }, - Spec: dbaasv1.DatabaseClusterRestoreSpec{ - DatabaseCluster: dbCluster.Name, - DatabaseType: "psmdb", - BackupSource: &dbaasv1.BackupSource{ - Destination: cluster.Params.Restore.Destination, - StorageType: dbaasv1.BackupStorageS3, - S3: &dbaasv1.BackupStorageProviderSpec{ - Bucket: backupLocation.S3Config.BucketName, - Region: backupLocation.S3Config.BucketRegion, - EndpointURL: backupLocation.S3Config.Endpoint, - CredentialsSecret: fmt.Sprintf("%s-backup", dbCluster.Spec.SecretsName), - }, - StorageName: storageName, - }, - }, - } - return dbCluster, dbRestore, nil - } - return dbCluster, nil, nil -} - -// UpdatePatchForPSMDB returns a patch to update a database cluster -func UpdatePatchForPSMDB(dbCluster *dbaasv1.DatabaseCluster, updateRequest *dbaasv1beta1.UpdatePSMDBClusterRequest, clusterType ClusterType) error { - if updateRequest.Params.Suspend && updateRequest.Params.Resume { - return errSimultaneous - } - dbCluster.TypeMeta = metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - } - if updateRequest.Template != nil && updateRequest.Template.Name != "" && updateRequest.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = updateRequest.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = updateRequest.Template.Kind - } else { - delete(dbCluster.ObjectMeta.Annotations, dbTemplateNameAnnotationKey) - delete(dbCluster.ObjectMeta.Annotations, dbTemplateKindAnnotationKey) - } - if updateRequest.Params.ClusterSize > 0 { - dbCluster.Spec.ClusterSize = updateRequest.Params.ClusterSize - } - if updateRequest.Params.Image != "" { - dbCluster.Spec.DatabaseImage = updateRequest.Params.Image - } - //nolint:nestif - if updateRequest.Params.Replicaset != nil { - if updateRequest.Params.Replicaset.ComputeResources != nil { - if updateRequest.Params.Replicaset.ComputeResources.CpuM > 0 { - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", updateRequest.Params.Replicaset.ComputeResources.CpuM)) - if err != nil { - return err - } - dbCluster.Spec.DBInstance.CPU = cpu - } - if updateRequest.Params.Replicaset.ComputeResources.MemoryBytes > 0 { - clusterMemory := resource.NewQuantity(updateRequest.Params.Replicaset.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster.Spec.DBInstance.Memory = *clusterMemory - } - } - if updateRequest.Params.Replicaset.Configuration != "" { - dbCluster.Spec.DatabaseConfig = updateRequest.Params.Replicaset.Configuration - } - - if updateRequest.Params.Replicaset.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &updateRequest.Params.Replicaset.StorageClass - } - } - if updateRequest.Params.Suspend { - dbCluster.Spec.Pause = true - } - if updateRequest.Params.Resume { - dbCluster.Spec.Pause = false - } - if !updateRequest.Expose { - dbCluster.Spec.LoadBalancer.ExposeType = corev1.ServiceTypeClusterIP - } - if updateRequest.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if updateRequest.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - var sourceRanges []string - for _, sourceRange := range updateRequest.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - if len(sourceRanges) == 0 && len(dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - return nil -} - -// UpdatePatchForPXC returns a patch to update a database cluster -func UpdatePatchForPXC(dbCluster *dbaasv1.DatabaseCluster, updateRequest *dbaasv1beta1.UpdatePXCClusterRequest, clusterType ClusterType) error { //nolint:cyclop - if updateRequest.Params.Suspend && updateRequest.Params.Resume { - return errSimultaneous - } - dbCluster.TypeMeta = metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - } - if updateRequest.Template != nil && updateRequest.Template.Name != "" && updateRequest.Template.Kind != "" { - if dbCluster.ObjectMeta.Annotations == nil { - dbCluster.ObjectMeta.Annotations = make(map[string]string) - } - dbCluster.ObjectMeta.Annotations[dbTemplateNameAnnotationKey] = updateRequest.Template.Name - dbCluster.ObjectMeta.Annotations[dbTemplateKindAnnotationKey] = updateRequest.Template.Kind - } else { - delete(dbCluster.ObjectMeta.Annotations, dbTemplateNameAnnotationKey) - delete(dbCluster.ObjectMeta.Annotations, dbTemplateKindAnnotationKey) - } - - if updateRequest.Params.ClusterSize > 0 { - dbCluster.Spec.ClusterSize = updateRequest.Params.ClusterSize - } - if updateRequest.Params.Pxc != nil { - if updateRequest.Params.Pxc.Image != "" { - dbCluster.Spec.DatabaseImage = updateRequest.Params.Pxc.Image - } - if updateRequest.Params.Pxc.Configuration != "" { - dbCluster.Spec.DatabaseConfig = updateRequest.Params.Pxc.Configuration - } - if updateRequest.Params.Pxc.StorageClass != "" { - dbCluster.Spec.DBInstance.StorageClassName = &updateRequest.Params.Pxc.StorageClass - } - } - - if updateRequest.Params.Pxc != nil && updateRequest.Params.Pxc.ComputeResources != nil { - if updateRequest.Params.Pxc.ComputeResources.CpuM > 0 { - cpu, err := resource.ParseQuantity(fmt.Sprintf("%dm", updateRequest.Params.Pxc.ComputeResources.CpuM)) - if err != nil { - return err - } - dbCluster.Spec.DBInstance.CPU = cpu - } - if updateRequest.Params.Pxc.ComputeResources.MemoryBytes > 0 { - clusterMemory := resource.NewQuantity(updateRequest.Params.Pxc.ComputeResources.MemoryBytes, resource.DecimalSI) - dbCluster.Spec.DBInstance.Memory = *clusterMemory - } - } - if updateRequest.Params.Haproxy != nil && updateRequest.Params.Haproxy.ComputeResources != nil { - resources, err := convertComputeResource(updateRequest.Params.Haproxy.ComputeResources) - if err != nil { - return err - } - dbCluster.Spec.LoadBalancer.Resources = resources - } - if updateRequest.Params.Proxysql != nil && updateRequest.Params.Proxysql.ComputeResources != nil { - resources, err := convertComputeResource(updateRequest.Params.Proxysql.ComputeResources) - if err != nil { - return err - } - dbCluster.Spec.LoadBalancer.Resources = resources - } - if updateRequest.Params.Suspend { - dbCluster.Spec.Pause = true - } - if updateRequest.Params.Resume { - dbCluster.Spec.Pause = false - } - if !updateRequest.Expose { - dbCluster.Spec.LoadBalancer.ExposeType = corev1.ServiceTypeClusterIP - } - if updateRequest.Expose { - exposeType, ok := exposeTypeMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose type for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.ExposeType = exposeType - annotations, ok := exposeAnnotationsMap[clusterType] - if !ok { - return fmt.Errorf("failed to recognize expose annotations for %s cluster type", clusterType) - } - dbCluster.Spec.LoadBalancer.Annotations = annotations - if updateRequest.InternetFacing && clusterType == ClusterTypeEKS { - dbCluster.Spec.LoadBalancer.Annotations["service.beta.kubernetes.io/aws-load-balancer-type"] = externalNLB - } - } - var sourceRanges []string - for _, sourceRange := range updateRequest.SourceRanges { - if sourceRange != "" { - sourceRanges = append(sourceRanges, sourceRange) - } - } - if len(sourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - if len(sourceRanges) == 0 && len(dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges) != 0 { - dbCluster.Spec.LoadBalancer.LoadBalancerSourceRanges = sourceRanges - } - return nil -} - -func SecretForBackup(backupLocation *models.BackupLocation) map[string][]byte { - return map[string][]byte{ - "AWS_ACCESS_KEY_ID": []byte(backupLocation.S3Config.AccessKey), - "AWS_SECRET_ACCESS_KEY": []byte(backupLocation.S3Config.SecretKey), - } -} diff --git a/managed/services/dbaas/kubernetes/types_test.go b/managed/services/dbaas/kubernetes/types_test.go deleted file mode 100644 index 08daf4c349..0000000000 --- a/managed/services/dbaas/kubernetes/types_test.go +++ /dev/null @@ -1,772 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package kubernetes - -import ( - "testing" - - dbaasv1 "github.com/percona/dbaas-operator/api/v1" - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - dbaasv1beta1 "github.com/percona/pmm/api/managementpb/dbaas" - "github.com/percona/pmm/managed/models" -) - -func TestDatabaseClusterForPXC(t *testing.T) { - t.Parallel() - testCases := []struct { - name string - input *dbaasv1beta1.CreatePXCClusterRequest - clusterType ClusterType - expected *dbaasv1.DatabaseCluster - }{ - { - name: "Basic PXC cluster with ProxySQL", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: false, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Proxysql: &dbaasv1beta1.PXCClusterParams_ProxySQL{ - Image: "something", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 100, - MemoryBytes: 100, - }, - DiskSize: 100, - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "proxysql", - Image: "something", - Size: 1, - Configuration: "", - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("100"), - corev1.ResourceCPU: resource.MustParse("100m"), - }, - }, - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic PXC cluster with HAProxy", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: false, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 100, - MemoryBytes: 100, - }, - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("100"), - corev1.ResourceCPU: resource.MustParse("100m"), - }, - }, - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic PXC cluster with HAProxy without compute resources", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: false, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic exposed PXC cluster with HAProxy (EKS)", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: true, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeEKS, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeLoadBalancer, - Annotations: map[string]string{ - "service.beta.kubernetes.io/aws-load-balancer-nlb-target-type": "ip", - "service.beta.kubernetes.io/aws-load-balancer-scheme": "internet-facing", - "service.beta.kubernetes.io/aws-load-balancer-target-group-attributes": "preserve_client_ip.enabled=true", - }, - - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic exposed PXC cluster with HAProxy and internet facing", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: true, - InternetFacing: true, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeEKS, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeLoadBalancer, - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - Annotations: map[string]string{ - "service.beta.kubernetes.io/aws-load-balancer-nlb-target-type": "ip", - "service.beta.kubernetes.io/aws-load-balancer-scheme": "internet-facing", - "service.beta.kubernetes.io/aws-load-balancer-target-group-attributes": "preserve_client_ip.enabled=true", - "service.beta.kubernetes.io/aws-load-balancer-type": "external", - }, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - { - name: "Basic exposed PXC cluster with HAProxy", - input: &dbaasv1beta1.CreatePXCClusterRequest{ - Name: "test-pxc-whatever", - Expose: true, - InternetFacing: false, - SourceRanges: []string{}, - Params: &dbaasv1beta1.PXCClusterParams{ - ClusterSize: 1, - Pxc: &dbaasv1beta1.PXCClusterParams_PXC{ - Image: "pxc_image", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 2000, - }, - DiskSize: 2000, - Configuration: "", - StorageClass: "", - }, - Haproxy: &dbaasv1beta1.PXCClusterParams_HAProxy{ - Image: "something", - }, - }, - }, - clusterType: ClusterTypeGeneric, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - SecretsName: "dbaas-test-pxc-whatever-pxc-secrets", - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeLoadBalancer, - Image: "something", - Size: 1, - Configuration: "", - TrafficPolicy: "Cluster", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - }, - } - for _, testCase := range testCases { - tt := testCase - cluster, _, err := DatabaseClusterForPXC(tt.input, tt.clusterType, &models.BackupLocation{Type: models.S3BackupLocationType}) - assert.NoError(t, err, tt.name) - assert.Equal(t, tt.expected, cluster, tt.name) - } -} - -func TestUpdatePatchForPXC(t *testing.T) { - t.Parallel() - storageClass := "gp2" - testCases := []struct { - name string - updateRequest *dbaasv1beta1.UpdatePXCClusterRequest - cluster *dbaasv1.DatabaseCluster - expected *dbaasv1.DatabaseCluster - }{ - { - name: "Empty update does not update anything", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{}, - }, - }, - { - name: "Pause cluster", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - Pause: true, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - Suspend: true, - }, - }, - }, - { - name: "Resume cluster", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - Pause: true, - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - Resume: true, - }, - }, - }, - { - name: "Update Cluster", - cluster: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "pxc_image", - DatabaseConfig: "", - ClusterSize: 1, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("200m"), - Memory: resource.MustParse("2000"), - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - expected: &dbaasv1.DatabaseCluster{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pxc-whatever", - }, - TypeMeta: metav1.TypeMeta{ - APIVersion: dbaasAPI, - Kind: dbaasKind, - }, - Spec: dbaasv1.DatabaseSpec{ - Database: DatabaseTypePXC, - DatabaseImage: "updatedImage", - DatabaseConfig: "", - ClusterSize: 3, - DBInstance: dbaasv1.DBInstanceSpec{ - DiskSize: resource.MustParse("2000"), - CPU: resource.MustParse("300m"), - Memory: resource.MustParse("3000"), - StorageClassName: &storageClass, - }, - Monitoring: dbaasv1.MonitoringSpec{ - PMM: &dbaasv1.PMMSpec{}, - }, - LoadBalancer: dbaasv1.LoadBalancerSpec{ - Type: "haproxy", - ExposeType: corev1.ServiceTypeClusterIP, - Image: "something", - Size: 1, - Configuration: "", - LoadBalancerSourceRanges: nil, - Annotations: make(map[string]string), - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceMemory: resource.MustParse("200"), - corev1.ResourceCPU: resource.MustParse("200m"), - }, - }, - }, - Backup: &dbaasv1.BackupSpec{}, - }, - }, - updateRequest: &dbaasv1beta1.UpdatePXCClusterRequest{ - Params: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams{ - ClusterSize: 3, - Pxc: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams_PXC{ - Image: "updatedImage", - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 300, - MemoryBytes: 3000, - }, - StorageClass: "gp2", - }, - Haproxy: &dbaasv1beta1.UpdatePXCClusterRequest_UpdatePXCClusterParams_HAProxy{ - ComputeResources: &dbaasv1beta1.ComputeResources{ - CpuM: 200, - MemoryBytes: 200, - }, - }, - }, - }, - }, - } - - for _, testCase := range testCases { - tt := testCase - err := UpdatePatchForPXC(tt.cluster, tt.updateRequest, ClusterTypeGeneric) - assert.NoError(t, err) - assert.Equal(t, tt.expected, tt.cluster) - } -} diff --git a/managed/services/dbaas/utils/convertors/convertors.go b/managed/services/dbaas/utils/convertors/convertors.go deleted file mode 100644 index a7f3d2f55d..0000000000 --- a/managed/services/dbaas/utils/convertors/convertors.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -// Package convertors provides data size convert functinality. -package convertors - -import ( - "math" - "strconv" - "strings" - "unicode" - - "github.com/pkg/errors" -) - -const ( - kiloByte uint64 = 1000 - kibiByte uint64 = 1024 - megaByte uint64 = kiloByte * 1000 - mibiByte uint64 = kibiByte * 1024 - gigaByte uint64 = megaByte * 1000 - gibiByte uint64 = mibiByte * 1024 - teraByte uint64 = gigaByte * 1000 - tebiByte uint64 = gibiByte * 1024 - petaByte uint64 = teraByte * 1000 - pebiByte uint64 = tebiByte * 1024 - exaByte uint64 = petaByte * 1000 - exbiByte uint64 = pebiByte * 1024 -) - -// StrToBytes converts string containing memory as string to number of bytes the string represents. -func StrToBytes(memory string) (uint64, error) { - if len(memory) == 0 { - return 0, nil - } - i := len(memory) - 1 - for i >= 0 && !unicode.IsDigit(rune(memory[i])) { - i-- - } - var suffix string - if i >= 0 { - suffix = memory[i+1:] - } - - // Resources units map for k8s - // - // Supports the following units - // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory - // - // Support of 'm' unit can be redundant because it's used for CPU limits mostly - suffixMapping := map[string]float64{ - "m": 0.001, - "k": float64(kiloByte), - "Ki": float64(kibiByte), - "M": float64(megaByte), - "Mi": float64(mibiByte), - "G": float64(gigaByte), - "Gi": float64(gibiByte), - "T": float64(teraByte), - "Ti": float64(tebiByte), - "P": float64(petaByte), - "Pi": float64(pebiByte), - "E": float64(exaByte), - "Ei": float64(exbiByte), - "": 1.0, - } - coeficient, ok := suffixMapping[suffix] - if !ok { - return 0, errors.Errorf("suffix '%s' is not supported", suffix) - } - - if suffix != "" { - memory = memory[:i+1] - } - value, err := strconv.ParseFloat(memory, 64) - if err != nil { - return 0, errors.Errorf("given value '%s' is not a number", memory) - } - return uint64(math.Ceil(value * coeficient)), nil -} - -// StrToMilliCPU converts CPU as a string representation to millicpus represented as an integer. -func StrToMilliCPU(cpu string) (uint64, error) { - if cpu == "" { - return 0, nil - } - if strings.HasSuffix(cpu, "m") { - cpu = cpu[:len(cpu)-1] - millis, err := strconv.ParseUint(cpu, 10, 64) - if err != nil { - return 0, err - } - return millis, nil - } - floatCPU, err := strconv.ParseFloat(cpu, 64) - if err != nil { - return 0, err - } - return uint64(floatCPU * 1000), nil -} - -// BytesToStr converts integer of bytes to string. -func BytesToStr(i int64) string { - return strconv.FormatInt(i, 10) -} - -// MilliCPUToStr converts integer of milli CPU to string. -func MilliCPUToStr(i int32) string { - return strconv.FormatInt(int64(i), 10) + "m" -} diff --git a/managed/services/dbaas/utils/convertors/convertors_test.go b/managed/services/dbaas/utils/convertors/convertors_test.go deleted file mode 100644 index d3eefec788..0000000000 --- a/managed/services/dbaas/utils/convertors/convertors_test.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2023 Percona LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package convertors - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestConvertToCPUMillis(t *testing.T) { - t.Parallel() - testCases := []struct { - in string - expectedOut uint64 - errShouldBeNil bool - }{ - {in: "100m", expectedOut: 100, errShouldBeNil: true}, - {in: "1", expectedOut: 1000, errShouldBeNil: true}, - {in: "1.252", expectedOut: 1252, errShouldBeNil: true}, - {in: "0.252", expectedOut: 252, errShouldBeNil: true}, - {in: "0.0", expectedOut: 0, errShouldBeNil: true}, - {in: "0.", expectedOut: 0, errShouldBeNil: true}, - {in: ".0", expectedOut: 0, errShouldBeNil: true}, - {in: ".", expectedOut: 0, errShouldBeNil: false}, - {in: "", expectedOut: 0, errShouldBeNil: true}, - {in: "adf", expectedOut: 0, errShouldBeNil: false}, - } - - for _, test := range testCases { - out, err := StrToMilliCPU(test.in) - assert.Equal(t, test.expectedOut, out, "in=%v, out=%v, err=%v", test.in, out, err) - assert.Equal( - t, test.errShouldBeNil, err == nil, - "in=%v, out=%v, errShouldBeNil=%v: actually err == nil is %v\nerr=%v", - test.in, out, test.errShouldBeNil, err == nil, err) - } -} - -func TestConvertToBytes(t *testing.T) { - t.Parallel() - testCases := []struct { - in string - expectedOut uint64 - errShouldBeNil bool - }{ - {in: "3000m", expectedOut: 3, errShouldBeNil: true}, - {in: "100M", expectedOut: 100 * 1000 * 1000, errShouldBeNil: true}, - {in: "100Mi", expectedOut: 100 * 1024 * 1024, errShouldBeNil: true}, - {in: "100", expectedOut: 100, errShouldBeNil: true}, - {in: "1G", expectedOut: 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Gi", expectedOut: 1024 * 1024 * 1024, errShouldBeNil: true}, - {in: "0.5Gi", expectedOut: 1024 * 1024 * 1024 / 2, errShouldBeNil: true}, - {in: "0.3Gi", expectedOut: 322122548, errShouldBeNil: true}, - {in: "Gi", expectedOut: 0, errShouldBeNil: false}, - {in: "", expectedOut: 0, errShouldBeNil: true}, - {in: "1Z", expectedOut: 0, errShouldBeNil: false}, - {in: "1Ki", expectedOut: 1024, errShouldBeNil: true}, - {in: "1k", expectedOut: 1000, errShouldBeNil: true}, - {in: "1T", expectedOut: 1000 * 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Ti", expectedOut: 1024 * 1024 * 1024 * 1024, errShouldBeNil: true}, - {in: "1P", expectedOut: 1000 * 1000 * 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Pi", expectedOut: 1024 * 1024 * 1024 * 1024 * 1024, errShouldBeNil: true}, - {in: "1E", expectedOut: 1000 * 1000 * 1000 * 1000 * 1000 * 1000, errShouldBeNil: true}, - {in: "1Ei", expectedOut: 1024 * 1024 * 1024 * 1024 * 1024 * 1024, errShouldBeNil: true}, - } - - for _, test := range testCases { - out, err := StrToBytes(test.in) - assert.Equal(t, test.expectedOut, out, "in=%v, out=%v, err=%v", test.in, out, err) - assert.Equal( - t, test.errShouldBeNil, err == nil, - "in=%v, out=%v, errShouldBeNil=%v: actually err == nil is %v\nerr=%v", - test.in, out, test.errShouldBeNil, err == nil, err) - } -} From 6685a7069cb86fe406c784afc37b22a1d399aa9b Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 28 Sep 2023 20:43:07 +0600 Subject: [PATCH 09/11] EVEREST-287 Disable buf breaking --- Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index ae9170233f..4559845dba 100644 --- a/Makefile.include +++ b/Makefile.include @@ -39,7 +39,7 @@ gen: clean ## Generate files gen-api: ## Generate PMM API # generated by descriptors target - bin/buf breaking --against descriptor.bin api + #bin/buf breaking --against descriptor.bin api bin/buf generate -v api From f452221f71f2ccd23c37619a2a97266ce7460cbe Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 28 Sep 2023 20:51:53 +0600 Subject: [PATCH 10/11] EVEREST-287 Feedback changes --- .github/CODEOWNERS | 1 - Makefile.include | 2 +- .../playbook/tasks/roles/dashboards_upgrade/tasks/main.yml | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7239a2189e..e1c0fbd5b3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,7 +3,6 @@ /agent/runner/ @artemgavrilov @percona/pmm-review-be /api/ @BupycHuk @percona/pmm-review-be /managed/services/checks/ @idoqo @percona/pmm-review-be -/managed/ @percona/pmm-review-be /update/ @BupycHuk @talhabinrizwan @percona/pmm-review-be **/go.mod @percona/pmm-review-dependency @percona/pmm-review-be **/Dockerfile @percona/pmm-review-dependency @percona/pmm-review-be diff --git a/Makefile.include b/Makefile.include index 4559845dba..ae9170233f 100644 --- a/Makefile.include +++ b/Makefile.include @@ -39,7 +39,7 @@ gen: clean ## Generate files gen-api: ## Generate PMM API # generated by descriptors target - #bin/buf breaking --against descriptor.bin api + bin/buf breaking --against descriptor.bin api bin/buf generate -v api diff --git a/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml b/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml index 409e831670..7c5080cfa9 100644 --- a/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/dashboards_upgrade/tasks/main.yml @@ -83,6 +83,10 @@ ignore_errors: true # FIXME: we have a race condition here. We generate grafana supervisor config in pmm-managed and it doesn't exist at this stage + - name: Remove old DBaaS dashboard (Before provisioning times) + command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'DBaaS' AND slug = 'dbaas';" + changed_when: true + - name: Remove old PMM Inventory (Before provisioning times) command: sqlite3 /srv/grafana/grafana.db -cmd ".timeout 60000" "DELETE FROM dashboard WHERE title = 'PMM Inventory' AND slug = 'pmm-inventory';" changed_when: true From 0cace43208719533e1165b70d183004d9c5a77bd Mon Sep 17 00:00:00 2001 From: Andrew Minkin Date: Thu, 28 Sep 2023 21:07:49 +0600 Subject: [PATCH 11/11] EVEREST-287 updated descriptors --- descriptor.bin | Bin 766212 -> 708737 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/descriptor.bin b/descriptor.bin index 99e65eae4362064e7a66a6764a015cb7f6ff1954..053780940b4810756ea2ef7a842ac78d7dd29370 100644 GIT binary patch delta 4045 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 bM=1oQ`n75OA1y>o2thwRbNlD)<&FP8sIDgr